Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp992782imu; Tue, 20 Nov 2018 09:55:35 -0800 (PST) X-Google-Smtp-Source: AFSGD/XqHaDhHRMedlg2+DlhGNajU/J0z2rVSRMdM9lrxV0sYZY6yRjx3YE/Q/H/liyeeCAtgt/u X-Received: by 2002:a17:902:854b:: with SMTP id d11-v6mr3274147plo.205.1542736535599; Tue, 20 Nov 2018 09:55:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542736535; cv=none; d=google.com; s=arc-20160816; b=ZSkwnqskfsoisfHEn4KdIeMGQe/4l63XFCdFbVtkSKRZB4nAg7U8mCZ1NPAuAUnD99 gE8cuZiFZsN2+LDcBwMG4nAChwcCEwXOrHqTwolVfHtQpu0Ujj/3UDkss3Dw5vHU25Va bCpR4SnKYCYIXmSQV6yz62biudZQ+bv6fBahpntJKv0YixUDzdmX5t6FNEYP/3iD1vxq 92AimmkuCUTl8mf2FXBaPqMVeKzv3BB9oxaeCW92h2hoAb6VnIcJ2+s+qF5s9l6Ww9is HuhAT6WBGunuaAfgOBQZx1cKcVC2PoTg0PtRsanZQ6bSb/ZPSu2G438c0KayJE7A4Smx 02NQ== 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=CIcMlO7uz+W0h9L7KRQcroQP6P30CmSof6JAhzvLurk=; b=dsHShhD8/wI1IdvJHfTWURhuoI0Ce5WLMYgD1vBrswfrkF3NJ3ZYqf+lo6QOFgF0k3 VJzb+XHG8G0pTyxVODp8Rq5PowGcQ27jMVu8+9sYrvdcy7tJihTFuGWmMhp45DaAM2qf DG7DtgyMTIb5LIC8WvSTW4SmTQGUkdF/hrNWODzZRlVOLiMZpf1qoLl11u9HzF4Ja8Ag zbFShdV3ieEzoIvXXYkGbZPuqm36QhaP82Ft0fZSP4wwTqhG+5teKr4Qo2JPJJFnRikc xObiawZdZ1B/NuSkq99ZFGV/eNY6jXh/k5VN7J20KXR5TmpntNZ2xbLd26VShHGq/HsZ DeyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=kj9ZttUi; 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 t9si23467108plq.337.2018.11.20.09.55.19; Tue, 20 Nov 2018 09:55:35 -0800 (PST) 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=kj9ZttUi; 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 S1729328AbeKUCtx (ORCPT + 99 others); Tue, 20 Nov 2018 21:49:53 -0500 Received: from mail-it1-f194.google.com ([209.85.166.194]:38293 "EHLO mail-it1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725998AbeKUCtx (ORCPT ); Tue, 20 Nov 2018 21:49:53 -0500 Received: by mail-it1-f194.google.com with SMTP id h65so4385550ith.3 for ; Tue, 20 Nov 2018 08:19:57 -0800 (PST) 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=CIcMlO7uz+W0h9L7KRQcroQP6P30CmSof6JAhzvLurk=; b=kj9ZttUiL/qU9oDcv4Tn2RxDuGiPqrOI8/9ZrR/T2tilLctYxMorKdr2P1sWEo+oI/ 4wc95GQWpRqd/0FaZUKT3xzbtri1fdt1KQNO0RlF3lYq4RzE3jECLUVPKv97CXRf6QAz e1p7JtLYmr1JRUhH3Cs14Up5MMseS/3HkQjLU= 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=CIcMlO7uz+W0h9L7KRQcroQP6P30CmSof6JAhzvLurk=; b=Q3msD5c54LQfvwNfWi4YUN2FPIChumjLevgpPWbKvdHjFdpkbO6+iWzty9/rPqWuA7 q0rVZrc3eS68X4N19z9pF/pEq+uTz3CA++h4DcETeOuQ5Eut09MGp8juYt+Djiwgioa1 hIGgrHXgrIBUuZxVVuW3Nt/oj1RTenJFaBj2bGjv9YVqqkbMgTSHD7BU89tUOyRBGXCW +bLwjEJ/59hH8HXjgznDMgspLOpp+S5zO+Ru834c/0bB+WOn6aH5qxKrJM4wdTje5pZ9 DZ3fzCWIF9K8WFcaM3BpWUAXQ7TVILWTiXi1LRq7zSGaACrWtstaFvLebVcVRp/Iws+D Kg7A== X-Gm-Message-State: AGRZ1gIcs78YwRlDc/ZUSznVNBL5GNdF9coMUJG4KWtir/3ZHmY8oQSq sORev97dStnlZy/rOIMX+KYd9WSY+2LxtwZg9lJB3A== X-Received: by 2002:a02:94d:: with SMTP id f74-v6mr2398608jad.85.1542730797107; Tue, 20 Nov 2018 08:19:57 -0800 (PST) MIME-Version: 1.0 References: <20181116163916.29621-1-jagan@amarulasolutions.com> <20181116163916.29621-2-jagan@amarulasolutions.com> <20181119082707.kbsw2gyntxxbh6no@flea> <20181120132357.xge6gkurjjjvwi2i@flea> <20181120155826.j5rja22jnxpkmjrs@flea> In-Reply-To: <20181120155826.j5rja22jnxpkmjrs@flea> From: Jagan Teki Date: Tue, 20 Nov 2018 21:49:45 +0530 Message-ID: Subject: Re: [PATCH v2 01/12] drm/sun4i: sun6i_mipi_dsi: Compute burst mode loop N1 instruction delay To: Maxime Ripard Cc: Maarten Lankhorst , Sean Paul , David Airlie , Rob Herring , Chen-Yu Tsai , Icenowy Zheng , Jernej Skrabec , Vasily Khoruzhick , Thierry Reding , Mark Rutland , dri-devel , devicetree , linux-kernel , linux-arm-kernel , Michael Trimarchi , TL Lim , linux-sunxi@googlegroups.com, linux-amarula@amarulasolutions.com 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 Tue, Nov 20, 2018 at 9:29 PM Maxime Ripard wrote: > > On Tue, Nov 20, 2018 at 07:06:30PM +0530, Jagan Teki wrote: > > On Tue, Nov 20, 2018 at 6:53 PM Maxime Ripard wrote: > > > > > > On Mon, Nov 19, 2018 at 04:28:29PM +0530, Jagan Teki wrote: > > > > On Mon, Nov 19, 2018 at 1:57 PM Maxime Ripard wrote: > > > > > > > > > > On Fri, Nov 16, 2018 at 10:09:05PM +0530, Jagan Teki wrote: > > > > > > Loop N1 instruction delay for burst mode lcd panel are > > > > > > computed as per BSP code. > > > > > > > > > > > > Reference code is available in BSP (from linux-sunxi > > > > > > drivers/video/sunxi/disp2/disp/de/lowlevel_sun50iw1/de_dsi.c) > > > > > > > > > > > > dsi_dev[sel]->dsi_inst_loop_num.bits.loop_n1= > > > > > > (panel->lcd_ht-panel->lcd_x)*(150)/(panel->lcd_dclk_freq*8) - 50; > > > > > > => (((mode->htotal - mode->hdisplay) * 150) / > > > > > > ((mode->clock / 1000) * 8)) - 50; > > > > > > > > > > > > So use the similar computation for loop N1 delay. > > > > > > > > > > > > Signed-off-by: Jagan Teki > > > > > > > > > > *why* are you doing this? What is it fixing? on which devices? > > > > > > > > You mentioned the separate function to compute the delay for all modes > > > > [1], ie what I did. did I missing anything? > > > > > > You're missing that you are never explaining why that patch is needed > > > in the first place. Or answering the question I asked a couple of > > > lines above. > > > > OK. > > > > The instruction delay varies between video and burst mode. for burst > > mode panels it is computed based on the panel clock along with > > horizontal sync+porch timings. > > You're still stating a fact. What issue, that you experienced, are you > trying to solve here? This change is specific for burst mode instruction delay. for non-burst it is 50 - 1 and for burst mode it is computed as mentioned in commit message. Both things are available in BSP code. and without this burst mode panels not working with existing (50 - 1)