Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp2173829ybd; Mon, 24 Jun 2019 01:58:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqzVTfte8HV0WZOgnJU2XFPbxGXm7xDWl+8CP4xK0LSap/R8HMg74RHGmgRMZtC63p69sd71 X-Received: by 2002:a17:90a:ba93:: with SMTP id t19mr23161572pjr.139.1561366725597; Mon, 24 Jun 2019 01:58:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561366725; cv=none; d=google.com; s=arc-20160816; b=aS6VoCMr6F7tqOWhlu8VOPcCnftUrylHXR7NwGbLhGsG+WK6MTH1ZEW3Q8wPVhLyUP 6xI46EVfeM7EOfgTaspXdBQi7BPLzbvjVLH8WMKyvmX3P4z21IrsAOz1DHKMPXWTZ4fw IijgcMdiRAhcH6o2amGOn8arbLsTLZdSyuktpFtQnskd89Km0UGFLl5qiYqfnyzyu8S8 KgPHH/GP09Qs+m0saqQLFwO3PeEok32cQ88or8q2oku1aYLlc1xXnZVEjGoS49J//PLm 4QjRHiUbZmBJsprQBCLW3keCAospYhDqeQKzTjkQubVdh/mevQJaO4KLWs7iZT4qPiYC lrGw== 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=G8nkLyiOaKgOFrbXNHkWxjnqz5OluwUUizZDLmikCzc=; b=H8aW4beXSoa2WRfORhBQRnuv+Tlcxo0aY7MqG+peGcQCa5P3JpS6Moj8svs7Hb3pPu ZbXu4BhAvr92K0/sE/eNNHKXFnyavJwDaZnowEujYV4MigtESdOR4FoJ103pEAvfoUdU b0oY/gFRxH7tVDDlWarnFYMRYjYOS0plgzCM6uZmfPNZ67CUhTfaTDOGaeJy9Pq+7i4z 7SjetHMWiyRxBA3Ms0P//dOH6wiJ7gc+ivmV/Yw54yYsQNMFFccP+T4qe0ffMR7Qdr6Q M3l0S8vEIcUDbY3tjebCYztKiMuPKC4+5WsyOcWdsxUHx7lrwydWxKexrkSLdMaSDzd1 THnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=bQa7w3w9; 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 x9si9229922pll.347.2019.06.24.01.58.29; Mon, 24 Jun 2019 01:58:45 -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=bQa7w3w9; 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 S1728191AbfFXIxK (ORCPT + 99 others); Mon, 24 Jun 2019 04:53:10 -0400 Received: from mail-io1-f68.google.com ([209.85.166.68]:46594 "EHLO mail-io1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725916AbfFXIxI (ORCPT ); Mon, 24 Jun 2019 04:53:08 -0400 Received: by mail-io1-f68.google.com with SMTP id i10so544277iol.13 for ; Mon, 24 Jun 2019 01:53:08 -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=G8nkLyiOaKgOFrbXNHkWxjnqz5OluwUUizZDLmikCzc=; b=bQa7w3w9/tWFlqTl3ELpwdzGQDB+EPZzU7W2gMufCdWT1u4LtQjwwKHj9CsaYLT4PM 0JG06gaRGRWkCLsd2vl1uHTSvidjZb8DMvpSe4PFcET2cf2zO+kFhYO3YFZMz7NXeqX3 E8UsbVgASYcuCGL2fFoPDQVWFONW9BOa5eNV8= 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=G8nkLyiOaKgOFrbXNHkWxjnqz5OluwUUizZDLmikCzc=; b=NcHg5QXC4i8w7HvfYBTgW2zSNzyFFARNaLka7/DmuVedskn4xK2TRnoCsPeQLiHO/n LFdoorvOdlc/nZ3M8z0hMRmyTJcn+7EX3DjoajUtbGW1Hd+CJacjJI58MVb3i24egDrb Dxt70r41s1N68Ve7EsKb+JAimjuU/d37Fhi6C67Pf3BjcxjJBDucQntxXhmBOW2bK8SW 6D2ebL5cvbIzsNVqjqlkO/KYwt/ZWEN5MUNwhdeafo9A7F0TqeqC14UNa/Dide2huPyK VnZdRL+eEukv/bReZ4EPe0fm/BrNnQTzQsbbFn89nP5iduBkN0aXM7k1aLhbDoIImm3P z1xA== X-Gm-Message-State: APjAAAWKs1ANSJ94ktvGx6LX7FrnIkPN0VQRAXldDh6ynjOOxLyBdXDN 60q9hF4N1Em1bv7pTCctZZmHr47gtPGhmU/JO5Hj8A== X-Received: by 2002:a05:6602:2253:: with SMTP id o19mr16852836ioo.297.1561366387533; Mon, 24 Jun 2019 01:53:07 -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: Jagan Teki Date: Mon, 24 Jun 2019 14:22:56 +0530 Message-ID: Subject: Re: [linux-sunxi] Re: [PATCH v10 03/11] drm/sun4i: dsi: Fix video start delay computation To: Chen-Yu Tsai 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, Jun 21, 2019 at 2:05 PM Chen-Yu Tsai wrote: > > 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. Yes, indeed I'm planning to do the same. thanks!