Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp407113ybi; Fri, 21 Jun 2019 01:36:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqwaM7M0h5YRdG6lvW1vk5nqXuLh3lrsLzGuXOJqzctCT0gQGidUKWt4h5v4lPZG7nkRvEaU X-Received: by 2002:a17:902:7043:: with SMTP id h3mr71230019plt.10.1561106176462; Fri, 21 Jun 2019 01:36:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561106176; cv=none; d=google.com; s=arc-20160816; b=BYlh8GkY14wtD1GSbUn3a0YwuCDWYmbS1a0UvKTnNSOG48D1G0YujrnmyYIB2BeHHj X8RVkDN3C40dr2lrkm4n3wNzGC0/CTmL5ETSmnXO9yoU2z9mLA/NnjACzHm/mXy5cOeg L/F4U5twjeCTtRfavn1dd6dtlTJm+IFwOx1UczCtBH4VUNf6Z5AJeRos3FBQI6FaVLFc ZyIWj8e9UgWKfQS4XIcJBpgIF4r4PaqUud/MjpZXxkxBvyyxyk6chFvF84idPwZjabfM VP0PA7zLXa7w1sVSwovIIgtnCS7FDtmnIe6ERSOmbGqwMkBY3YLWgIw5usQg1+ALPxIR J0qA== 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; bh=mmt0kiyLRw+HeqUtPae5wb8eOqt4c0M39SkXRh/JHCk=; b=xssOmqWk+QSXLsb8p7+O7Lc3e4yYlC8F5sSCoc0fNo4RwI5CrpqoQEkshzBfeJEsLm SdE46VOvtR553vF5Jq9mXdnUD268LL7wkL4apg+iVUvcsG1X6Xl1XfPIMhzdiKBj70R1 qqhohSeCI5JdbaitSKt30Mlf0dDaX88ykUrA1bJV/4+ip+6wZDGvUSV59mexjbqGL2un Q88eUTHBYsrQw3DwcJV7+EKGw14Wv50YoIUv/YdlqZSl1eYxkCvgESHkggk3kUF8u/oe 84O3ugJZZ4LPJDD1sjpqeEgloWIdIGRrWZo+IHIfrJqW6FMKaRfKb+9iZU7OLrol7pgM rIBw== ARC-Authentication-Results: i=1; mx.google.com; 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 m143si2299561pfd.224.2019.06.21.01.36.01; Fri, 21 Jun 2019 01:36:16 -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; 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 S1726509AbfFUIfa (ORCPT + 99 others); Fri, 21 Jun 2019 04:35:30 -0400 Received: from mail-ed1-f65.google.com ([209.85.208.65]:38809 "EHLO mail-ed1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726055AbfFUIf2 (ORCPT ); Fri, 21 Jun 2019 04:35:28 -0400 Received: by mail-ed1-f65.google.com with SMTP id r12so8920142edo.5 for ; Fri, 21 Jun 2019 01:35:26 -0700 (PDT) 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=mmt0kiyLRw+HeqUtPae5wb8eOqt4c0M39SkXRh/JHCk=; b=TvudfNZefnjNTT4KG9Plq5BqFXTflJOYcA0n32/VPlEZ8A4fHqS1TISHInUf10VFLB cItyClSbPURa8gCJHGPJNi8QntKT47PSrSPxZXcbsvjEG2R+1BhLrIoZz3OnkCxxmzQB Jtts4SYgFfQ3Mrx7GhGKcOwncNjEk0s1MsGAkVp+d1oWmOSqODXAUgiNBvJuavVcLBqY fTbCkuy8EBwatYm4aCgddttKRt9ivxzDjsmXZ0TBOmVH8WMuCVbQJI0n8t1oQxMl+C7G wGA4Ekt2vvS1eWQtVGBKlveMkz8heRcj5EXfrLG2BWg8hPQkenXUvGiJokmzEJA2vg17 z0eA== X-Gm-Message-State: APjAAAUpA40W6zTf7Vsae/7Tak9agQb85szD1ELzjO7k6+g9ZRtghQlD dgaBxXwelAyFumx/Q6Atr1gXe35NErs= X-Received: by 2002:a50:f7c1:: with SMTP id i1mr15861292edn.268.1561106125627; Fri, 21 Jun 2019 01:35:25 -0700 (PDT) Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com. [209.85.221.51]) by smtp.gmail.com with ESMTPSA id g16sm625392edc.76.2019.06.21.01.35.25 for (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Fri, 21 Jun 2019 01:35:25 -0700 (PDT) Received: by mail-wr1-f51.google.com with SMTP id n9so5737737wru.0 for ; Fri, 21 Jun 2019 01:35:25 -0700 (PDT) X-Received: by 2002:a05:6000:114b:: with SMTP id d11mr28630201wrx.167.1561106124764; Fri, 21 Jun 2019 01:35:24 -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: From: Chen-Yu Tsai Date: Fri, 21 Jun 2019 16:35:09 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [linux-sunxi] Re: [PATCH v10 03/11] drm/sun4i: dsi: Fix video start delay computation To: Jagan Teki Cc: Maxime Ripard , David Airlie , Daniel Vetter , 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 6:27 PM Jagan Teki wrote: > > 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. So this patch fixes the misinterpretation of Allwinner's back porch value, much like patch 1, but this one is for the vertical back porch. So I think you should follow the same advice I gave you for patch 1. ChenYu