Received: by 2002:a05:7412:6592:b0:d7:7d3a:4fe2 with SMTP id m18csp1162782rdg; Fri, 11 Aug 2023 11:45:56 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFzU1bZ62spQTXL+9pzDr8YxaEfshYtE4HM1pVRTtzC5Hr2Rmc2Cj5jNc63YLUdwGVQ5Qyk X-Received: by 2002:a17:906:318c:b0:99b:d440:bf0b with SMTP id 12-20020a170906318c00b0099bd440bf0bmr2248160ejy.67.1691779556122; Fri, 11 Aug 2023 11:45:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691779556; cv=none; d=google.com; s=arc-20160816; b=Ob6K7nSpv8ZFFQP/fpyFwiC1ZOy3pKl1SNu65tNe1lXYFwRSB0i1+RNXtwRghfzWLi mRiY/H6tEYYdEGkZDRCp2U1EGOwY93kD8nnczitsgcGeuTD7pxdeJpZjNuG7sAuUlR8T xr9qTB4WUa0gWqFMmSeuw2WcHqErIVozGTR78QL/SIL+NAwn/H5gF+hkVp70FFBDmDkS rTv+UoXQd5uncg/qrdUd2TgsP5mmHb6nMmYx8+2wVqut9vAqI0MyGK06Xs9fcrRpYXU6 WvD1OQDDj4X76/NSgTGWOQ6ATCdzKUjI6OkoaB3oy64axIKGrprOJT5LzTaG9F46L0Kz tWLw== 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=NND7NF45Mat5445hBe3XsfwCjYWL+emdbSloqhpsh0A=; fh=3QbqESXJnchgYeOzdjIBlGxddfyGojmAihSJsrm+GQA=; b=WJlTA6aecalNe5uo2Z0psKPed0hvmQgy8dtO7EMCZi3/HOatgErCyQpF2GaOZyG+Qp OROccBDT35x2bmQapRsLyIS7e8kLL1YbjSRoBXsVbVQr8vx4y/6PDqjW+qrxAgauBBUE mUzmADSyNYghp9o/B4oNIZCtUnnXgOIU92TctFfeB5CEEx7QyO6I7rLa7d7Nj9Z4y31/ aoQ4K61a4o21A9hTtyglUqDyehpBp5otWK1/ezQN27xVyDAFVTEIqg5qxlogRxK0B8XV m7a+TxiobTVbIjFy0uz6c0JC+RqMzccep1mJh2GvROkBHinC+5H0EbeBhhyoRsGagxjH 1tjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=sHAdkddq; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h3-20020a1709060f4300b009927d850155si3644102ejj.892.2023.08.11.11.45.30; Fri, 11 Aug 2023 11:45:56 -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=@gmail.com header.s=20221208 header.b=sHAdkddq; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233920AbjHKQhx (ORCPT + 99 others); Fri, 11 Aug 2023 12:37:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41770 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229479AbjHKQhw (ORCPT ); Fri, 11 Aug 2023 12:37:52 -0400 Received: from mail-lj1-x22e.google.com (mail-lj1-x22e.google.com [IPv6:2a00:1450:4864:20::22e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EFA24114 for ; Fri, 11 Aug 2023 09:37:50 -0700 (PDT) Received: by mail-lj1-x22e.google.com with SMTP id 38308e7fff4ca-2b95d5ee18dso33415661fa.1 for ; Fri, 11 Aug 2023 09:37:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691771869; x=1692376669; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=NND7NF45Mat5445hBe3XsfwCjYWL+emdbSloqhpsh0A=; b=sHAdkddqvt7TXqcvI+FxmzyRmaggkP/CEV0glQCnbdrvzSm4hbBmWp6ucVO8KkHzr5 IPuuC0541NikOM/+8miJQVzX3KenSslyr0uWWE2PQxuKFrBw0lB6qgJo2K8YHna0Vabv 8ELqptldZn/C6jQLdGxfkCOtJtKIwTS91aCMHhr6UR4UNymwpv3Uu3qlqjJ9zVlLvaXb 6r4VOJ6AUX/bqM7c6eDvPFrR8ExzXRmasCSSCXWfx0V5BPVEDQRT/lckBElZbYK3b0Cw hjDMZMcGwuLf2bufZdW/EwX3rax5GqyY5GNVghwDqX9gzwu4m1s9LIr/ojJg0RZ2H4iA n3fw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691771869; x=1692376669; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=NND7NF45Mat5445hBe3XsfwCjYWL+emdbSloqhpsh0A=; b=hTE5KjpyO/IxgCfJme2MX/evE8VMJK7BMkJ/9F1UPfYQtObnx5A5fukdO8GXafxWqj llqopf8hPDarC/t4OG/b9D6fBu24ILxsedetGXaLY0i5PH1qGiE9VPuJGkhh2c2jkap4 G1FdSpQ9R3UQhkgToxVgWLS4ZD7mGjh34kAOoxKNdowfP4Qa5xW4ztg+1/UDkm4/K2mA HKV7VEuuoVhutMDy8hmt9BYdhXky7lJrYSEZG5ehJSUU+TNOYQjOIekXUCf1slGElS0T aMnuDV8rfxEH0bnThKzQhJHBsFv3xeWPHO1TDG8KKkhlgxeuZJvAj+AVxumwFc3hB1xj H5uA== X-Gm-Message-State: AOJu0YwmuWF8kczH9QdH9oXWi3gvGvNdJ+rFTKDRKHyACyMX8wY7/Ccx hALZ4zOQWtzSPOrj58Yr2Bs= X-Received: by 2002:a2e:8790:0:b0:2b9:cd79:8f94 with SMTP id n16-20020a2e8790000000b002b9cd798f94mr2050058lji.39.1691771868889; Fri, 11 Aug 2023 09:37:48 -0700 (PDT) Received: from [10.0.0.100] (host-85-29-92-32.kaisa-laajakaista.fi. [85.29.92.32]) by smtp.gmail.com with ESMTPSA id u8-20020a2e9b08000000b002b6ef2fca66sm946383lji.41.2023.08.11.09.37.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 11 Aug 2023 09:37:48 -0700 (PDT) Message-ID: <81238735-3727-451c-acc0-703bba7ecff5@gmail.com> Date: Fri, 11 Aug 2023 19:39:51 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 10/11] drm/bridge: tc358768: Attempt to fix DSI horizontal timings Content-Language: en-US To: Tomi Valkeinen , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , David Airlie , Daniel Vetter , Francesco Dolcini Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Aradhya Bhatia References: <20230804-tc358768-v1-0-1afd44b7826b@ideasonboard.com> <20230804-tc358768-v1-10-1afd44b7826b@ideasonboard.com> From: =?UTF-8?Q?P=C3=A9ter_Ujfalusi?= In-Reply-To: <20230804-tc358768-v1-10-1afd44b7826b@ideasonboard.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS 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 04/08/2023 13:44, Tomi Valkeinen wrote: > The DSI horizontal timing calculations done by the driver seem to often > lead to underflows or overflows, depending on the videomode. > > There are two main things the current driver doesn't seem to get right: > DSI HSW and HFP, and VSDly. However, even following Toshiba's > documentation it seems we don't always get a working display. > > This patch attempts to fix the horizontal timings for DSI event mode, and > on a system with a DSI->HDMI encoder, a lot of standard HDMI modes now > seem to work. The work relies on Toshiba's documentation, but also quite > a bit on empirical testing. > > This also adds timing related debug prints to make it easier to improve > on this later. > > The DSI pulse mode has only been tested with a fixed-resolution panel, > which limits the testing of different modes on DSI pulse mode. However, > as the VSDly calculation also affects pulse mode, so this might cause a > regression. If my memory serves me right we only had this used in a sinlge, static configuration and again, it might be mentioned in a comment somewhere? Nice work! Reviewed-by: Peter Ujfalusi > > Signed-off-by: Tomi Valkeinen > --- > drivers/gpu/drm/bridge/tc358768.c | 211 +++++++++++++++++++++++++++++++++----- > 1 file changed, 183 insertions(+), 28 deletions(-) > > diff --git a/drivers/gpu/drm/bridge/tc358768.c b/drivers/gpu/drm/bridge/tc358768.c > index dc2241c18dde..ea19de5509ed 100644 > --- a/drivers/gpu/drm/bridge/tc358768.c > +++ b/drivers/gpu/drm/bridge/tc358768.c > @@ -9,6 +9,7 @@ > #include > #include > #include > +#include > #include > #include > #include > @@ -157,6 +158,7 @@ struct tc358768_priv { > u32 frs; /* PLL Freqency range for HSCK (post divider) */ > > u32 dsiclk; /* pll_clk / 2 */ > + u32 pclk; /* incoming pclk rate */ > }; > > static inline struct tc358768_priv *dsi_host_to_tc358768(struct mipi_dsi_host > @@ -380,6 +382,7 @@ static int tc358768_calc_pll(struct tc358768_priv *priv, > priv->prd = best_prd; > priv->frs = frs; > priv->dsiclk = best_pll / 2; > + priv->pclk = mode->clock * 1000; > > return 0; > } > @@ -638,6 +641,28 @@ static u32 tc358768_ps_to_ns(u32 ps) > return ps / 1000; > } > > +static u32 tc358768_dpi_to_ns(u32 val, u32 pclk) > +{ > + return (u32)div_u64((u64)val * NANO, pclk); > +} > + > +/* Convert value in DPI pixel clock units to DSI byte count */ > +static u32 tc358768_dpi_to_dsi_bytes(struct tc358768_priv *priv, u32 val) > +{ > + u64 m = (u64)val * priv->dsiclk / 4 * priv->dsi_lanes; > + u64 n = priv->pclk; > + > + return (u32)div_u64(m + n - 1, n); > +} > + > +static u32 tc358768_dsi_bytes_to_ns(struct tc358768_priv *priv, u32 val) > +{ > + u64 m = (u64)val * NANO; > + u64 n = priv->dsiclk / 4 * priv->dsi_lanes; > + > + return (u32)div_u64(m, n); > +} > + > static void tc358768_bridge_pre_enable(struct drm_bridge *bridge) > { > struct tc358768_priv *priv = bridge_to_tc358768(bridge); > @@ -647,11 +672,19 @@ static void tc358768_bridge_pre_enable(struct drm_bridge *bridge) > s32 raw_val; > const struct drm_display_mode *mode; > u32 hsbyteclk_ps, dsiclk_ps, ui_ps; > - u32 dsiclk, hsbyteclk, video_start; > - const u32 internal_delay = 40; > + u32 dsiclk, hsbyteclk; > int ret, i; > struct videomode vm; > struct device *dev = priv->dev; > + /* In pixelclock units */ > + u32 dpi_htot, dpi_data_start; > + /* In byte units */ > + u32 dsi_dpi_htot, dsi_dpi_data_start; > + u32 dsi_hsw, dsi_hbp, dsi_hact, dsi_hfp; > + const u32 dsi_hss = 4; /* HSS is a short packet (4 bytes) */ > + /* In hsbyteclk units */ > + u32 dsi_vsdly; > + const u32 internal_dly = 40; > > if (mode_flags & MIPI_DSI_CLOCK_NON_CONTINUOUS) { > dev_warn_once(dev, "Non-continuous mode unimplemented, falling back to continuous\n"); > @@ -686,27 +719,23 @@ static void tc358768_bridge_pre_enable(struct drm_bridge *bridge) > case MIPI_DSI_FMT_RGB888: > val |= (0x3 << 4); > hact = vm.hactive * 3; > - video_start = (vm.hsync_len + vm.hback_porch) * 3; > data_type = MIPI_DSI_PACKED_PIXEL_STREAM_24; > break; > case MIPI_DSI_FMT_RGB666: > val |= (0x4 << 4); > hact = vm.hactive * 3; > - video_start = (vm.hsync_len + vm.hback_porch) * 3; > data_type = MIPI_DSI_PACKED_PIXEL_STREAM_18; > break; > > case MIPI_DSI_FMT_RGB666_PACKED: > val |= (0x4 << 4) | BIT(3); > hact = vm.hactive * 18 / 8; > - video_start = (vm.hsync_len + vm.hback_porch) * 18 / 8; > data_type = MIPI_DSI_PIXEL_STREAM_3BYTE_18; > break; > > case MIPI_DSI_FMT_RGB565: > val |= (0x5 << 4); > hact = vm.hactive * 2; > - video_start = (vm.hsync_len + vm.hback_porch) * 2; > data_type = MIPI_DSI_PACKED_PIXEL_STREAM_16; > break; > default: > @@ -716,9 +745,150 @@ static void tc358768_bridge_pre_enable(struct drm_bridge *bridge) > return; > } > > + /* > + * There are three important things to make TC358768 work correctly, > + * which are not trivial to manage: > + * > + * 1. Keep the DPI line-time and the DSI line-time as close to each > + * other as possible. > + * 2. TC358768 goes to LP mode after each line's active area. The DSI > + * HFP period has to be long enough for entering and exiting LP mode. > + * But it is not clear how to calculate this. > + * 3. VSDly (video start delay) has to be long enough to ensure that the > + * DSI TX does not start transmitting util we have started receiving > + * pixel data from the DPI input. It is not clear how to calculate > + * this either. > + */ > + > + dpi_htot = vm.hactive + vm.hfront_porch + vm.hsync_len + vm.hback_porch; > + dpi_data_start = vm.hsync_len + vm.hback_porch; > + > + dev_dbg(dev, "dpi horiz timing (pclk): %u + %u + %u + %u = %u\n", > + vm.hsync_len, vm.hback_porch, vm.hactive, vm.hfront_porch, > + dpi_htot); > + > + dev_dbg(dev, "dpi horiz timing (ns): %u + %u + %u + %u = %u\n", > + tc358768_dpi_to_ns(vm.hsync_len, vm.pixelclock), > + tc358768_dpi_to_ns(vm.hback_porch, vm.pixelclock), > + tc358768_dpi_to_ns(vm.hactive, vm.pixelclock), > + tc358768_dpi_to_ns(vm.hfront_porch, vm.pixelclock), > + tc358768_dpi_to_ns(dpi_htot, vm.pixelclock)); > + > + dev_dbg(dev, "dpi data start (ns): %u + %u = %u\n", > + tc358768_dpi_to_ns(vm.hsync_len, vm.pixelclock), > + tc358768_dpi_to_ns(vm.hback_porch, vm.pixelclock), > + tc358768_dpi_to_ns(dpi_data_start, vm.pixelclock)); > + > + dsi_dpi_htot = tc358768_dpi_to_dsi_bytes(priv, dpi_htot); > + dsi_dpi_data_start = tc358768_dpi_to_dsi_bytes(priv, dpi_data_start); > + > + if (dsi_dev->mode_flags & MIPI_DSI_MODE_VIDEO_SYNC_PULSE) { > + dsi_hsw = tc358768_dpi_to_dsi_bytes(priv, vm.hsync_len); > + dsi_hbp = tc358768_dpi_to_dsi_bytes(priv, vm.hback_porch); > + } else { > + /* HBP is included in HSW in event mode */ > + dsi_hbp = 0; > + dsi_hsw = tc358768_dpi_to_dsi_bytes(priv, > + vm.hsync_len + vm.hback_porch); > + > + /* > + * The pixel packet includes the actual pixel data, and: > + * DSI packet header = 4 bytes > + * DCS code = 1 byte > + * DSI packet footer = 2 bytes > + */ > + dsi_hact = hact + 4 + 1 + 2; > + > + dsi_hfp = dsi_dpi_htot - dsi_hact - dsi_hsw - dsi_hss; > + > + /* > + * Here we should check if HFP is long enough for entering LP > + * and exiting LP, but it's not clear how to calculate that. > + * Instead, this is a naive algorithm that just adjusts the HFP > + * and HSW so that HFP is (at least) roughly 2/3 of the total > + * blanking time. > + */ > + if (dsi_hfp < (dsi_hfp + dsi_hsw + dsi_hss) * 2 / 3) { > + u32 old_hfp = dsi_hfp; > + u32 old_hsw = dsi_hsw; > + u32 tot = dsi_hfp + dsi_hsw + dsi_hss; > + > + dsi_hsw = tot / 3; > + > + /* > + * Seems like sometimes HSW has to be divisible by num-lanes, but > + * not always... > + */ > + dsi_hsw = roundup(dsi_hsw, priv->dsi_lanes); > + > + dsi_hfp = dsi_dpi_htot - dsi_hact - dsi_hsw - dsi_hss; > + > + dev_dbg(dev, > + "hfp too short, adjusting dsi hfp and dsi hsw from %u, %u to %u, %u\n", > + old_hfp, old_hsw, dsi_hfp, dsi_hsw); > + } > + > + dev_dbg(dev, > + "dsi horiz timing (bytes): %u, %u + %u + %u + %u = %u\n", > + dsi_hss, dsi_hsw, dsi_hbp, dsi_hact, dsi_hfp, > + dsi_hss + dsi_hsw + dsi_hbp + dsi_hact + dsi_hfp); > + > + dev_dbg(dev, "dsi horiz timing (ns): %u + %u + %u + %u + %u = %u\n", > + tc358768_dsi_bytes_to_ns(priv, dsi_hss), > + tc358768_dsi_bytes_to_ns(priv, dsi_hsw), > + tc358768_dsi_bytes_to_ns(priv, dsi_hbp), > + tc358768_dsi_bytes_to_ns(priv, dsi_hact), > + tc358768_dsi_bytes_to_ns(priv, dsi_hfp), > + tc358768_dsi_bytes_to_ns(priv, dsi_hss + dsi_hsw + dsi_hbp + dsi_hact + dsi_hfp)); > + } > + > + /* VSDly calculation */ > + > + /* Start with the HW internal delay */ > + dsi_vsdly = internal_dly; > + > + /* Convert to byte units as the other variables are in byte units */ > + dsi_vsdly *= priv->dsi_lanes; > + > + /* Do we need more delay, in addition to the internal? */ > + if (dsi_dpi_data_start > dsi_vsdly + dsi_hss + dsi_hsw + dsi_hbp) { > + dsi_vsdly = dsi_dpi_data_start - dsi_hss - dsi_hsw - dsi_hbp; > + dsi_vsdly = roundup(dsi_vsdly, priv->dsi_lanes); > + } > + > + dev_dbg(dev, "dsi data start (bytes) %u + %u + %u + %u = %u\n", > + dsi_vsdly, dsi_hss, dsi_hsw, dsi_hbp, > + dsi_vsdly + dsi_hss + dsi_hsw + dsi_hbp); > + > + dev_dbg(dev, "dsi data start (ns) %u + %u + %u + %u = %u\n", > + tc358768_dsi_bytes_to_ns(priv, dsi_vsdly), > + tc358768_dsi_bytes_to_ns(priv, dsi_hss), > + tc358768_dsi_bytes_to_ns(priv, dsi_hsw), > + tc358768_dsi_bytes_to_ns(priv, dsi_hbp), > + tc358768_dsi_bytes_to_ns(priv, dsi_vsdly + dsi_hss + dsi_hsw + dsi_hbp)); > + > + /* Convert back to hsbyteclk */ > + dsi_vsdly /= priv->dsi_lanes; > + > + /* > + * The docs say that there is an internal delay of 40 cycles. > + * However, we get underflows if we follow that rule. If we > + * instead ignore the internal delay, things work. So either > + * the docs are wrong or the calculations are wrong. > + * > + * As a temporary fix, add the internal delay here, to counter > + * the subtraction when writing the register. > + */ > + dsi_vsdly += internal_dly; > + > + /* Clamp to the register max */ > + if (dsi_vsdly - internal_dly > 0x3ff) { > + dev_warn(dev, "VSDly too high, underflows likely\n"); > + dsi_vsdly = 0x3ff + internal_dly; > + } > + > /* VSDly[9:0] */ > - video_start = max(video_start, internal_delay + 1) - internal_delay; > - tc358768_write(priv, TC358768_VSDLY, video_start); > + tc358768_write(priv, TC358768_VSDLY, dsi_vsdly - internal_dly); > > tc358768_write(priv, TC358768_DATAFMT, val); > tc358768_write(priv, TC358768_DSITX_DT, data_type); > @@ -826,18 +996,6 @@ static void tc358768_bridge_pre_enable(struct drm_bridge *bridge) > > /* vbp */ > tc358768_write(priv, TC358768_DSI_VBPR, vm.vback_porch); > - > - /* hsw * byteclk * ndl / pclk */ > - val = (u32)div_u64(vm.hsync_len * > - (u64)hsbyteclk * priv->dsi_lanes, > - vm.pixelclock); > - tc358768_write(priv, TC358768_DSI_HSW, val); > - > - /* hbp * byteclk * ndl / pclk */ > - val = (u32)div_u64(vm.hback_porch * > - (u64)hsbyteclk * priv->dsi_lanes, > - vm.pixelclock); > - tc358768_write(priv, TC358768_DSI_HBPR, val); > } else { > /* Set event mode */ > tc358768_write(priv, TC358768_DSI_EVENT, 1); > @@ -851,16 +1009,13 @@ static void tc358768_bridge_pre_enable(struct drm_bridge *bridge) > > /* vbp (not used in event mode) */ > tc358768_write(priv, TC358768_DSI_VBPR, 0); > + } > > - /* (hsw + hbp) * byteclk * ndl / pclk */ > - val = (u32)div_u64((vm.hsync_len + vm.hback_porch) * > - (u64)hsbyteclk * priv->dsi_lanes, > - vm.pixelclock); > - tc358768_write(priv, TC358768_DSI_HSW, val); > + /* hsw (bytes) */ > + tc358768_write(priv, TC358768_DSI_HSW, dsi_hsw); > > - /* hbp (not used in event mode) */ > - tc358768_write(priv, TC358768_DSI_HBPR, 0); > - } > + /* hbp (bytes) */ > + tc358768_write(priv, TC358768_DSI_HBPR, dsi_hbp); > > /* hact (bytes) */ > tc358768_write(priv, TC358768_DSI_HACT, hact); > -- Péter