Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp753844rwr; Thu, 20 Apr 2023 06:07:53 -0700 (PDT) X-Google-Smtp-Source: AKy350aHGwvUDng+REv5bohlZZfmri/CuF2U3Q02EgCJKB2g7/UXi8o8JeeiQrauNx970Z1m/fzK X-Received: by 2002:a17:902:c946:b0:1a6:961e:fd09 with SMTP id i6-20020a170902c94600b001a6961efd09mr1605331pla.14.1681996073206; Thu, 20 Apr 2023 06:07:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681996073; cv=none; d=google.com; s=arc-20160816; b=0skyOccx7Ez69Qw/hBN/qNrql4gdrsM+gft7WN0FJ70lwIH8+iL6XXLvwXrXzq1FHl LmhH/KwlGl5EzRyBDsb1VHpMyklN/hxusG1vxB/xCPxZHLrKbwHsnMSGTNa7Fk/g2z4u xWa3tPrxRO+hjJJlfCGScvxHWhVzwmc3+etmF7xBHmsrZor0jebiG0E7Zg9ofm17xcas S9D3iGesxBqw/AlohkkyymHDfaX9ra9o7NqlOg35EkogwFEztZL+INH4d9hg617nBBRe tUu6Qyq2JOU5oZ7h9i96F6EnBBRtMLAkUkZKKkcnOw4gmWgNvdKWOktbIXMti+AiLUMU BVNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id; bh=nlZG+Z9i1h5rMToxlid03bhP6bVlo0ku+xQOetwDago=; b=WeT8dpWP3h/AEa8/z99EOAAPeLRuwjy0KyxJnWPC7hezINbvhhYOp2fZLRfecIOrp2 gXTt1krpRoOhbW8GXZUdBv6nNj8RuRkDDykj/IjvKrQrkrBnuj/R9+qYHN1sxWBxFjm4 bPmcj/XcqfcndTPhlDQ7ZAN4/FH0wEaURVKNjp0Kja2VTE83hd4U2KzOw5SW49uKXNvb uTbhV5XJWhFBk8yFgczhgf8jeVrsHIH4d7DPNe1T1INt4o0DsD/zSRIlAqDukgsSqBJl dL5i+LAK+88i8rzEtkq0lCJ4xz2Qyxt258h3vbNzCO5ga4RvnL5zXZDaoOZDiQrEpU+l rHog== ARC-Authentication-Results: i=1; mx.google.com; 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 y190-20020a638ac7000000b0051b5ecb17c0si1715886pgd.61.2023.04.20.06.07.37; Thu, 20 Apr 2023 06:07:53 -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; 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 S229841AbjDTNHU convert rfc822-to-8bit (ORCPT + 99 others); Thu, 20 Apr 2023 09:07:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54556 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229568AbjDTNHT (ORCPT ); Thu, 20 Apr 2023 09:07:19 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AAB6E40E7 for ; Thu, 20 Apr 2023 06:07:17 -0700 (PDT) Received: from ptz.office.stw.pengutronix.de ([2a0a:edc0:0:900:1d::77] helo=[IPv6:::1]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ppTzu-0005Ar-MN; Thu, 20 Apr 2023 15:06:50 +0200 Message-ID: Subject: Re: [PATCH 1/6] drm: bridge: samsung-dsim: Support multi-lane calculations From: Lucas Stach To: Adam Ford Cc: dri-devel@lists.freedesktop.org, Krzysztof Kozlowski , aford@beaconembedded.com, Laurent Pinchart , Andrzej Hajda , Fabio Estevam , m.szyprowski@samsung.com, marex@denx.de, Robert Foss , David Airlie , Jernej Skrabec , Jagan Teki , NXP Linux Team , devicetree@vger.kernel.org, Daniel Vetter , Jonas Karlman , Sascha Hauer , Inki Dae , Rob Herring , linux-arm-kernel@lists.infradead.org, Neil Armstrong , linux-kernel@vger.kernel.org, Pengutronix Kernel Team , Shawn Guo Date: Thu, 20 Apr 2023 15:06:45 +0200 In-Reply-To: References: <20230415104104.5537-1-aford173@gmail.com> <3e47f0d1017fe4c9f71a5de65f32c6ba1662efe2.camel@pengutronix.de> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT User-Agent: Evolution 3.46.4 (3.46.4-1.fc37) MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2a0a:edc0:0:900:1d::77 X-SA-Exim-Mail-From: l.stach@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 Hi Adam, Am Mittwoch, dem 19.04.2023 um 05:47 -0500 schrieb Adam Ford: > On Mon, Apr 17, 2023 at 6:55 AM Adam Ford wrote: > > > > On Mon, Apr 17, 2023 at 3:43 AM Lucas Stach wrote: > > > > > > Hi Adam, > > > > > > Am Samstag, dem 15.04.2023 um 05:40 -0500 schrieb Adam Ford: > > > > 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. > > > > > > > > > > In the testing I did to come up with my patch "drm: bridge: samsung- > > > dsim: fix blanking packet size calculation" the number of lanes didn't > > > make any difference. My testing might be flawed, as I could only > > > measure the blanking after translation from MIPI DSI to DPI, so I'm > > > interested to know what others did here. How did you validate the > > > blanking with your patch? Would you have a chance to test my patch and > > > see if it works or breaks in your setup? > > Lucas, > > I tried your patch instead of mine. Yours is dependent on the > hs_clock being always set to the burst clock which is configured by > the device tree. I unrolled a bit of my stuff and replaced it with > yours. It worked at 1080p, but when I tried a few other resolutions, > they did not work. I assume it's because the DSI clock is fixed and > not changing based on the pixel clock. In the version I did, I only > did that math when the lanes were > 1. In your patch, you divide by 8, > and in mine, I fetch the bits-per-pixel (which is 8) and I divide by > that just in case the bpp ever changes from 8. Overall, I think our > patches basically do the same thing. The calculations in your and my patch are quite different. I'm not taking into account the number of lanes or the MIPI format. I'm basing the blanking size purely on the ratio between MIPI DSI byte clock and the DPI interface clock. It's quite counter-intuitive that the host would scale the blanking to the number of lanes automatically, but still require the MIPI packet offset removed, but that's what my measurements showed to produce the correct blanking after translation to DPI by the TC358767 bridge chip. If you dynamically scale the HS clock, then you would need to input the real used HS clock to the calculation in my patch, instead of the fixed burst mode rate. Regards, Lucas