Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp262117ybi; Fri, 24 May 2019 03:30:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqw5Gmb+9ZwmYcv6174Qrzz4mthSYS5OEcedqSLlbnxjNrWbwc6XQtJSILF6Be3ge91Nmk/7 X-Received: by 2002:a62:ab10:: with SMTP id p16mr79033046pff.222.1558693846646; Fri, 24 May 2019 03:30:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558693846; cv=none; d=google.com; s=arc-20160816; b=AGnEdJ6bgR+ZX0Qhxw+O8KPmvow41AXO9TE6MyesE57SpHgOmQFuOEbq3ZVnIM0COC gcWc6r6dqvpLHExUrq/Qdf4Noh1bO2JHw6eJT2LyhouDd0eC7bg+g6hhtN3YxSb5Kt81 lR0a4zOEm4BQmlvNFdUqyrGpgcARK9GnRQ+rJBh+f+T/Gws4NG7JziSe0Ryu7tOb9KBk W1YSQQLcG1BbVX8AI6N/7WtO6evmiuuA+lXJE4+25uZI1sEUmwTrR387+JmR3A+31ivW 8ZorvbBf2Ai4Wx7zXrMu5+qELIrBEg6emk7a1Fh+BSZH/gCwtljwfx9HgXX6lVkfqBHy Vvuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=SPlEglQ/6Q3TJ75NagM4QC1DwwrTkTqIVzLkih7YL5c=; b=0QtxTxWRPa0Nje2Nh1lAjDVEFCN3QoaykFrvgFMUHR3+AKfiu7x6CHBkxnnUSHHjtR ApPEoz6ZqnOIVLAGTN5HOw2n/ojiKi7tZ5uucaGYxxQnTwhqhV4RbGVGZ3ggJyh3JSyq 7lQlOjtJDrU3MjizyaCQXRLINKczBfl2qAfmwkppr+dJiVk+KL4m5z/cjmnCo7mLHOHO um3Tyv2rFnfQkRL3gO5T4IHz9Of67WOCDyx79fqT6GuZs+3W8485ILfgn44shb2Wne3b piJoix7ROtvYTQ2KcUKYn94WIwB9aYARqc/5lB633srxCcqUk862oU3ej4T09Gzakcwc 9Ofw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=XkPReTF3; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d20si3238352pgv.102.2019.05.24.03.30.25; Fri, 24 May 2019 03:30:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=XkPReTF3; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390729AbfEXK1G (ORCPT + 99 others); Fri, 24 May 2019 06:27:06 -0400 Received: from mail-io1-f66.google.com ([209.85.166.66]:34665 "EHLO mail-io1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390374AbfEXK1F (ORCPT ); Fri, 24 May 2019 06:27:05 -0400 Received: by mail-io1-f66.google.com with SMTP id g84so7376600ioa.1 for ; Fri, 24 May 2019 03:27:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=SPlEglQ/6Q3TJ75NagM4QC1DwwrTkTqIVzLkih7YL5c=; b=XkPReTF3yJ3Svu28w+MBFecQPonOKoGFfttpuk0FbeISoFJyn7K67PwKQDaIWZA0+D s1xLzZbyrktBR0eD+5qW8weCrU31KAosE7QjSM6u07LgYJpkbCiWGqGAOqN8cLh70oyK mN2I7FPImruKjWvMGy7vDuGlzmmm7LKYeXeIo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=SPlEglQ/6Q3TJ75NagM4QC1DwwrTkTqIVzLkih7YL5c=; b=svQfJpn02PHXDKja7moQkrVmzYCnfHf8t2KtiEijHiC5g7VDCy4Sv6UmVbO2pHH+2Q SAcq+tWsiQWbeBbwnjaQL32TnkhK/7v9lS68VJg1JKni4s5LpoK2H+7tOGCKF3KbjlMW 3pbK7FnSr7T1V0qlUUH+1MXJheUlY8Vy/15qsWfZfDiOc7SylpRESwNq2bxSwON8LVnh IUPuk5/A2TKuC89dL7WVwodTnxljwW6JYQIBXRkvTjhR5lE/jI+8dGLmFlOd2Z7Mq/Su czQPWpfbhhz3TQYJAlmJ1GlnZ2JSRoaAgbW8BReBJbotgPPqmndiBuVrGj8CksbLzHjB zfTg== X-Gm-Message-State: APjAAAUgVw6gdBlFwMMFgYPBy6uWBqQq87hWEctmrTE8fsh4BVqG84rJ UBvPojL9T1woyg/KBYtYjZZ2DL6owjNL+MdUvnzxDQ== X-Received: by 2002:a5d:9f46:: with SMTP id u6mr44962698iot.297.1558693624522; Fri, 24 May 2019 03:27:04 -0700 (PDT) MIME-Version: 1.0 References: <20190520090318.27570-1-jagan@amarulasolutions.com> <20190520090318.27570-4-jagan@amarulasolutions.com> <20190523203836.xy7nmte3ubyxwg27@flea> In-Reply-To: <20190523203836.xy7nmte3ubyxwg27@flea> From: Jagan Teki Date: Fri, 24 May 2019 15:56:53 +0530 Message-ID: Subject: Re: [PATCH v10 03/11] drm/sun4i: dsi: Fix video start delay computation To: Maxime Ripard Cc: David Airlie , Daniel Vetter , Chen-Yu Tsai , dri-devel , linux-arm-kernel , linux-kernel , Bhushan Shah , Vasily Khoruzhick , =?UTF-8?B?5Z2a5a6a5YmN6KGM?= , Michael Trimarchi , linux-amarula , linux-sunxi Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 24, 2019 at 2:18 AM Maxime Ripard wrote: > > On Mon, May 20, 2019 at 02:33:10PM +0530, Jagan Teki wrote: > > The current code is computing vertical video start delay as > > > > delay = mode->vtotal - (mode->vsync_end - mode->vdisplay) + start; > > > > On which the second parameter > > > > mode->vsync_end - mode->vdisplay = front porch + sync timings > > > > according to "DRM kernel-internal display mode structure" in > > include/drm/drm_modes.h > > > > With adding additional sync timings, the desired video start delay > > value as 510 for "bananapi,s070wv20-ct16" panel timings which indeed > > trigger panel flip_done timed out as: > > > > WARNING: CPU: 0 PID: 31 at drivers/gpu/drm/drm_atomic_helper.c:1429 drm_atomic_helper_wait_for_vblanks.part.1+0x298/0x2a0 > > [CRTC:46:crtc-0] vblank wait timed out > > Modules linked in: > > CPU: 0 PID: 31 Comm: kworker/0:1 Not tainted 5.1.0-next-20190514-00029-g09e5b0ed0a58 #18 > > Hardware name: Allwinner sun8i Family > > Workqueue: events deferred_probe_work_func > > [] (unwind_backtrace) from [] (show_stack+0x10/0x14) > > [] (show_stack) from [] (dump_stack+0x84/0x98) > > [] (dump_stack) from [] (__warn+0xfc/0x114) > > [] (__warn) from [] (warn_slowpath_fmt+0x44/0x68) > > [] (warn_slowpath_fmt) from [] (drm_atomic_helper_wait_for_vblanks.part.1+0x298/0x2a0) > > [] (drm_atomic_helper_wait_for_vblanks.part.1) from [] (drm_atomic_helper_commit_tail_rpm+0x5c/0x6c) > > [] (drm_atomic_helper_commit_tail_rpm) from [] (commit_tail+0x40/0x6c) > > [] (commit_tail) from [] (drm_atomic_helper_commit+0xbc/0x128) > > [] (drm_atomic_helper_commit) from [] (restore_fbdev_mode_atomic+0x1cc/0x1dc) > > [] (restore_fbdev_mode_atomic) from [] (drm_fb_helper_restore_fbdev_mode_unlocked+0x54/0xa0) > > [] (drm_fb_helper_restore_fbdev_mode_unlocked) from [] (drm_fb_helper_set_par+0x30/0x54) > > [] (drm_fb_helper_set_par) from [] (fbcon_init+0x560/0x5ac) > > [] (fbcon_init) from [] (visual_init+0xbc/0x104) > > [] (visual_init) from [] (do_bind_con_driver+0x1b0/0x390) > > [] (do_bind_con_driver) from [] (do_take_over_console+0x13c/0x1c4) > > [] (do_take_over_console) from [] (do_fbcon_takeover+0x74/0xcc) > > [] (do_fbcon_takeover) from [] (notifier_call_chain+0x44/0x84) > > [] (notifier_call_chain) from [] (__blocking_notifier_call_chain+0x48/0x60) > > [] (__blocking_notifier_call_chain) from [] (blocking_notifier_call_chain+0x18/0x20) > > [] (blocking_notifier_call_chain) from [] (register_framebuffer+0x1e0/0x2f8) > > [] (register_framebuffer) from [] (__drm_fb_helper_initial_config_and_unlock+0x2fc/0x50c) > > [] (__drm_fb_helper_initial_config_and_unlock) from [] (drm_fbdev_client_hotplug+0xe8/0x1b8) > > [] (drm_fbdev_client_hotplug) from [] (drm_fbdev_generic_setup+0x88/0x118) > > [] (drm_fbdev_generic_setup) from [] (sun4i_drv_bind+0x128/0x160) > > [] (sun4i_drv_bind) from [] (try_to_bring_up_master+0x164/0x1a0) > > [] (try_to_bring_up_master) from [] (__component_add+0x94/0x140) > > [] (__component_add) from [] (sun6i_dsi_probe+0x144/0x234) > > [] (sun6i_dsi_probe) from [] (platform_drv_probe+0x48/0x9c) > > [] (platform_drv_probe) from [] (really_probe+0x1dc/0x2c8) > > [] (really_probe) from [] (driver_probe_device+0x60/0x160) > > [] (driver_probe_device) from [] (bus_for_each_drv+0x74/0xb8) > > [] (bus_for_each_drv) from [] (__device_attach+0xd0/0x13c) > > [] (__device_attach) from [] (bus_probe_device+0x84/0x8c) > > [] (bus_probe_device) from [] (deferred_probe_work_func+0x64/0x90) > > [] (deferred_probe_work_func) from [] (process_one_work+0x204/0x420) > > [] (process_one_work) from [] (worker_thread+0x274/0x5a0) > > [] (worker_thread) from [] (kthread+0x11c/0x14c) > > [] (kthread) from [] (ret_from_fork+0x14/0x2c) > > Exception stack(0xde539fb0 to 0xde539ff8) > > 9fa0: 00000000 00000000 00000000 00000000 > > 9fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 > > 9fe0: 00000000 00000000 00000000 00000000 00000013 00000000 > > ---[ end trace 495200a78b24980e ]--- > > random: fast init done > > [drm:drm_atomic_helper_wait_for_dependencies] *ERROR* [CRTC:46:crtc-0] flip_done timed out > > [drm:drm_atomic_helper_wait_for_dependencies] *ERROR* [CONNECTOR:48:DSI-1] flip_done timed out > > [drm:drm_atomic_helper_wait_for_dependencies] *ERROR* [PLANE:30:plane-0] flip_done timed out > > > > But the expected video start delay value is 513 which states that > > the second parameter on the computation is "front porch" value > > (no sync timings included). > > > > This is clearly confirmed from the legacy [1] and new [2] bsp codes > > that the second parameter on the video start delay is "front porch" > > > > Here is the detailed evidence for calculating front porch as per > > bsp code. > > > > vfp = panel->lcd_vt - panel->lcd_y - panel->lcd_vbp > > => (panel->lcd_vt) - panel->lcd_y - panel->lcd_vbp > > => (tt->ver_front_porch + lcdp->panel_info.lcd_vbp > > + lcdp->panel_info.lcd_y) - panel->lcd_y - panel->lcd_vbp > > => tt->ver_front_porch > > The comment on patch 1 still applies on this patch Thanks, I have responded on that. Same applies here.