Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp1793354ybn; Wed, 2 Oct 2019 23:53:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqwCrirh5Fv2b/CYTJN1oXRnmskCGwfDUP0wN0lozXHJqZ1UMV7jsidw6BA8OGZ0+xW7GQDb X-Received: by 2002:a17:906:80c3:: with SMTP id a3mr6255039ejx.271.1570085633053; Wed, 02 Oct 2019 23:53:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570085633; cv=none; d=google.com; s=arc-20160816; b=ADP/LHXzBs80vDplMbX0hJj4sn+EKNnL3kiFB7iI/20zn5wOSBUdDc8Kp+d/TVxoec aXkAKarsbXud6wOkCp8fFth7uMHZ7+YSFa0iUlC8HHKfb6o6vz5sCJVI5RpV2eTDdzrh vj89YVGgd5MJFYRLuKKhxTHGv21kRW9jk+i6IvKoBTNNrQny1BzpNrHLjHrzDGechqr+ 8bDBNz6DEYEuiM9zgTn3tROwWTF3xHPNq7r3I33l4wXEboQLcwBJrooskazTbMMv8UQ0 jwi/u+v2avwZRXeYnjntV7/dRsr0PIKFVU7HqgsUZJ1dt2SCpeG55yTqBVlUte0Nn4bH B+aQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:from:cc:to:subject :content-transfer-encoding:mime-version:references:in-reply-to:date; bh=kiOmM3+fuycwENCc+NdBf3L4ogdYyTIfvACxLdHr22k=; b=HafaGaI077ktZJ8L/BtX8Dj2mhawuRk/+A5FPOm8W2q8lwTA4zoBz4CtXo1CPb5OsT 7ci5VZdrzaO3dqYI38cLgC/GkfxbxtNCG13q7qjqFG0q2uPI414f0H5o6BcAdAe+cmw/ 4vP/+axhOx9VsoSso6IlOsBhM3o9nAcnAYr2on3V78OaFd9XD9xhEoR0dRIwFUuhNl0V cND3epbEwOkjfpCOrareHrOeu6a1dMN//7J08PKYPCrDIGMvgazK9q+IWA92qwCSdT3r LOksPH4AOnstDOgTdMfzN+ZmSJanYM2aQm/rgBuwXkiM0G2wK8BmCCCSOuKQDZCpN/0l 9OmQ== 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 l45si953464edc.185.2019.10.02.23.53.29; Wed, 02 Oct 2019 23:53:53 -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 S1727705AbfJCGwa convert rfc822-to-8bit (ORCPT + 99 others); Thu, 3 Oct 2019 02:52:30 -0400 Received: from hermes.aosc.io ([199.195.250.187]:47109 "EHLO hermes.aosc.io" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726210AbfJCGwa (ORCPT ); Thu, 3 Oct 2019 02:52:30 -0400 Received: from localhost (localhost [127.0.0.1]) (Authenticated sender: icenowy@aosc.io) by hermes.aosc.io (Postfix) with ESMTPSA id AA72B82E72; Thu, 3 Oct 2019 06:52:27 +0000 (UTC) Date: Thu, 03 Oct 2019 14:52:23 +0800 In-Reply-To: <20191003064527.15128-3-jagan@amarulasolutions.com> References: <20191003064527.15128-1-jagan@amarulasolutions.com> <20191003064527.15128-3-jagan@amarulasolutions.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT Subject: Re: [PATCH v11 2/7] drm/sun4i: dsi: Update start value in video start delay To: Jagan Teki , Maxime Ripard , Chen-Yu Tsai , David Airlie , Daniel Vetter CC: michael@amarulasolutions.com, linux-sunxi , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org From: Icenowy Zheng Message-ID: <75B6346D-714D-4235-B4B8-CAE4384919DB@aosc.io> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 于 2019年10月3日 GMT+08:00 下午2:45:22, Jagan Teki 写到: >start value in video start delay was changed in >commit da676c6aa641 ("drm/sun4i: dsi: Change the start delay >calculation") >to match the legacy BSP driver [1]. > >So, using this existing start delay computation gives the wrong >start delay value for the "bananapi,s070wv20-ct16" panel. Due to >this the panel trigger below flip_done timed out as during kernel >bootup: > >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 Tainted: G W >5.1.0-next-20190514-00025-gf928bc7cc146 #15 > 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_pan_display+0xac/0x1d0) >[] (drm_fb_helper_pan_display) from [] >(fb_pan_display+0xcc/0x134) >[] (fb_pan_display) from [] >(bit_update_start+0x14/0x30) >[] (bit_update_start) from [] >(fbcon_switch+0x3d8/0x4e0) >[] (fbcon_switch) from [] >(redraw_screen+0x174/0x238) >[] (redraw_screen) from [] >(fbcon_prepare_logo+0x3c4/0x400) >[] (fbcon_prepare_logo) from [] >(fbcon_init+0x3c8/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 755e10f62b83f396 ]--- > Console: switching to colour frame buffer device 100x30 >[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 > >To fix this, adjust the start delay computation according to the >new BSP code [2]. > >Unfortunately we don't have any evidence or documentation for this >reassignment to 1 in new bsp, but it is working with below mainline >supported panels in A33, A64. >- bananapi,s070wv20-ct16 >- feiyang,fy07024di26a30d >- techstar,ts8550b > >So, use the start as per new bsp code since it is working in all >the supported panels. > >[1] >https://github.com/BPI-SINOVOIP/BPI-M2M-bsp/blob/master/linux-sunxi/drivers/video/sunxi/legacy/disp/de_bsp/de/ebios/de_dsi.c#L682 >[2] >https://github.com/BPI-SINOVOIP/BPI-M2M-bsp/blob/master/linux-sunxi/drivers/video/sunxi/disp/de/lowlevel_sun8iw5/de_dsi.c#L807 > >Signed-off-by: Jagan Teki >--- > drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 12 +++++++++++- > 1 file changed, 11 insertions(+), 1 deletion(-) > >diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c >b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c >index f83522717488..c9c99c52bf1e 100644 >--- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c >+++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c >@@ -365,7 +365,17 @@ static void sun6i_dsi_inst_init(struct sun6i_dsi >*dsi, > static u16 sun6i_dsi_get_video_start_delay(struct sun6i_dsi *dsi, > struct drm_display_mode *mode) > { >- u16 start = clamp(mode->vtotal - mode->vdisplay - 10, 8, 100); >+ /** >+ * Allwinner legacy (drivers/video/sunxi/legacy), >+ * new (drivers/video/sunxi/disp/de/lowlevel_sun8iw5) bsp drivers >+ * are evaluating start as: >+ * >+ * vtotal - vdisplay - 10 >+ * >+ * but the new drivers are reassigning start to 1, which seems to be >+ * working in DSI panels available in mainline. Please see my patchset for the reason that set 1 here. >+ */ >+ u8 start = 1; > u16 delay = mode->vtotal - (mode->vsync_end - mode->vdisplay) + start; > > if (delay > mode->vtotal) -- 使用 K-9 Mail 发送自我的Android设备。