Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp3247056rwe; Sun, 16 Apr 2023 15:32:02 -0700 (PDT) X-Google-Smtp-Source: AKy350YOCqEk3btqRCwaXOk9Te3AjbWV+Y/yX7//IF6uG3c2rN0c/knojFxeVaZMPt3RSPuq5cEV X-Received: by 2002:a17:903:41ce:b0:1a6:d15f:3cde with SMTP id u14-20020a17090341ce00b001a6d15f3cdemr2663340ple.54.1681684322688; Sun, 16 Apr 2023 15:32:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681684322; cv=none; d=google.com; s=arc-20160816; b=mQ6gfY+2PNfnvM2aHaTZAFhZIwYOb+uxAoar8FOTYR4hhcnhWlLv3zKof/+/G/K8Vt oUjrFqFBJEq9+ykY5CJJWz72QdhKhdq+gWgY8uDwtVOvyx6/HK20bjWmSeaMzS/IWeJ6 A2XGhioQerNA4vTKvptereLtVpZjWHWYMl+6XBhzfxtaBm9CNICxOyo3aPBH6uWyhlJF ETbPHgUhZl5hjGBOGIZCDY8CCLBYhkHT+fa0rrmCPGOrkvAWPMorNfjWpTtD49VCQh8o UeU8dc6aQklYEMlbm4hBPKRm1QTMUo39OUQbaZEjFC70pEx0tfeVA3Eak9L0sSbANQtA HyxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=JXOO0HH7hgkSuYOF/8TS6jyPZhhE7U1JS+DTKN8pPds=; b=xLBz2q1EuZuENWG1cZ1uLBlZ63OUGDMzNZWowC9C5TnQJUs82IfG6wNa0VXUFBEK7A JnwFJG8RKt7tNZY5C6Pw9U3qKwoC3GjnH0wCwJRDEg/VUNxgLBZ5yqbbMk2/d8ZtZE4G +xlMNNQCTj1Rx4pyD5rUHHGvi5Ox8Kh5aX7Z6nmGIa2raUz/rPK1uC41GavxilndsqAq v9ZJzXIJivD/QvP50ULfHrIkUwa29j+HRnihESC69sUZkVTue+7G+ABImUwUzBz3NhSU sId7TeELFRDtUR3DjjQbOX81tJ4kgo29Q6X1MLoRTA0QzYhlmDYnN8syfWL1w/dWgx4f hNEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@denx.de header.s=phobos-20191101 header.b=OoV12WlR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d7-20020a170902728700b001a6e8791efbsi41728pll.465.2023.04.16.15.31.51; Sun, 16 Apr 2023 15:32:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@denx.de header.s=phobos-20191101 header.b=OoV12WlR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229854AbjDPWCv (ORCPT + 99 others); Sun, 16 Apr 2023 18:02:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33688 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229513AbjDPWCu (ORCPT ); Sun, 16 Apr 2023 18:02:50 -0400 Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 133CC211C; Sun, 16 Apr 2023 15:02:47 -0700 (PDT) Received: from [127.0.0.1] (p578adb1c.dip0.t-ipconnect.de [87.138.219.28]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: marex@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id 438B585C9B; Mon, 17 Apr 2023 00:02:42 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1681682564; bh=JXOO0HH7hgkSuYOF/8TS6jyPZhhE7U1JS+DTKN8pPds=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=OoV12WlRdtE7Or0xGRTZE3jHnaCPBOcm80TQHxHgMiKO03ci3JoUjDzCS7OvLD5RX wU6uCJQAEK6aUAFm8GF3cf4tO7q4F6/z5Sy9ufHVMAkxPYWzhFR9RiZpmECV+Wcouq 3KGXmT6HhVJdJg1PFlhHy0h+ObJdi+t+SUd+NNkwLnbasypWl1Qld9ddAKVcPH2rGP BdFWfuqzty3Pnm7huZDiQdFnBfEw/LRan04973rt4yjhun34SHjkOWouxTGUTMmFwg utIevBBGrwgDnIJ4kac+l6nc5gDz7JhpXwVfyOog+tTmX3hUzbU8BMpV1oaiDkiEz+ 7CvOwJlN1vNrA== Message-ID: <6bfeb8aa-f4f4-4b24-a070-108e5553ad48@denx.de> Date: Mon, 17 Apr 2023 00:02:41 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: [PATCH 1/6] drm: bridge: samsung-dsim: Support multi-lane calculations Content-Language: en-US To: Adam Ford , dri-devel@lists.freedesktop.org Cc: m.szyprowski@samsung.com, aford@beaconembedded.com, Rob Herring , Krzysztof Kozlowski , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Inki Dae , Jagan Teki , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , David Airlie , Daniel Vetter , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <20230415104104.5537-1-aford173@gmail.com> From: Marek Vasut In-Reply-To: <20230415104104.5537-1-aford173@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/15/23 12:40, Adam Ford wrote: > If there is more than one lane, the HFP, HBP, and HSA is calculated in > bytes/pixel, then they are divided amongst the different lanes with some > additional overhead. This is necessary to achieve higher resolutions while > keeping the pixel clocks lower as the number of lanes increase. > > Signed-off-by: Adam Ford > --- > drivers/gpu/drm/bridge/samsung-dsim.c | 40 +++++++++++++++++++++++---- > 1 file changed, 34 insertions(+), 6 deletions(-) > > diff --git a/drivers/gpu/drm/bridge/samsung-dsim.c b/drivers/gpu/drm/bridge/samsung-dsim.c > index e0a402a85787..1ccbad4ea577 100644 > --- a/drivers/gpu/drm/bridge/samsung-dsim.c > +++ b/drivers/gpu/drm/bridge/samsung-dsim.c > @@ -215,6 +215,7 @@ > #define DSI_RX_FIFO_SIZE 256 > #define DSI_XFER_TIMEOUT_MS 100 > #define DSI_RX_FIFO_EMPTY 0x30800002 > +#define DSI_HSYNC_PKT_OVERHEAD 6 > > #define OLD_SCLK_MIPI_CLK_NAME "pll_clk" > > @@ -879,13 +880,40 @@ static void samsung_dsim_set_display_mode(struct samsung_dsim *dsi) > | DSIM_MAIN_VBP(m->vtotal - m->vsync_end); > samsung_dsim_write(dsi, DSIM_MVPORCH_REG, reg); > > - reg = DSIM_MAIN_HFP(m->hsync_start - m->hdisplay) > - | DSIM_MAIN_HBP(m->htotal - m->hsync_end); > - samsung_dsim_write(dsi, DSIM_MHPORCH_REG, reg); > + /* > + * If there is more than one lane, the HFP, HBP, and HSA > + * is calculated in bytes/pixel, then they are divided > + * amongst the different lanes with some additional > + * overhead correction > + */ Did you find any confirmation of this in the MX8M* datasheet or at least by measuring the DSI data lanes with a scope ? It would be real cool if this could be confirmed somehow, and we could rule out that this tweaking of HSA/HSE/... stuff isn't related to either LP-HS transition timing calculation this driver is missing, OR, incorrect flags in various bridge/panel drivers like commit: ca161b259cc84 ("drm/bridge: ti-sn65dsi83: Do not generate HFP/HBP/HSA and EOT packet")