Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3569714pxj; Mon, 21 Jun 2021 01:30:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy3qpe0gxRvZlRqgnnr1CTv7OfyHrg29ym21MmpSsIH2M5WmeaLNXiR5eFfV6QpABsFNDAA X-Received: by 2002:a92:3004:: with SMTP id x4mr1858722ile.269.1624264232963; Mon, 21 Jun 2021 01:30:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624264232; cv=none; d=google.com; s=arc-20160816; b=nYadfzHxoGmwhvE5BAMIBTeb0UcwodcGDHMjQorOfAw8R+y9mc4L3e7KN8/olpVj2H oGO2wqvxYo/+/rVp8xueI30Yd+Cxq9LyLCQ1NNNiBgSQvtLr5eZYqvUvLkJugPubICK2 PdRycEtwXkwJEAXjJ0Y4kxNo0AmE4cL4h5goRmDsH98/UISM+OzAL9nW3r27g/ZHjRl4 4XpJES3gYbyKrvGpBlZFePV2W2PmwLWcq64PQhR8ac3cOBSOyvHnVYVW8VNcQqlbBgYJ bgPiVrP3S8kK9EX2pa2SeTeqODjB0cj5RWZaQZ7kKoeXAqCtV4ufM4Q0Leqwf+iFCdhd e6cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=PlDy8jEtofzs0fE4j0X0JreFB5grWF3oaKe9hcgM+es=; b=BHogP0R/iGTRDe0EB5/sk7JpllrOA007In/6Oh7tsvC3sIZkBcB+rWMewaGfuuLfVN MInfl6ULu5K+CyZFTROxXROTOEDwjioZ1VUbvbCeQXYxxOH+vyNxjtAE4P0PBLCLvq+W xfzm4rJvVMsG8Pzken5wJBDRaHZBJFlyzC9uNIbvMkWofP3RxK0HRE6ZdtEfx4NDvnoC l/rrhudniYmnmcs+5ZNEQQqj/FqaA0hpFRaarsivL/cOg4/2SiZXcQDW9FPacqGVU2UF WwoJL3ua7qYFgk7quMiaKtNjgG+9BFPW03FvM5kelZr2brGvUDR3yTwyIzL5TLIKvedc j+JA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=fENbtecu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j1si14899902jat.105.2021.06.21.01.30.20; Mon, 21 Jun 2021 01:30:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=fENbtecu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230161AbhFUIcA (ORCPT + 99 others); Mon, 21 Jun 2021 04:32:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:34464 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229618AbhFUIb7 (ORCPT ); Mon, 21 Jun 2021 04:31:59 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5868261183 for ; Mon, 21 Jun 2021 08:29:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1624264185; bh=3k7UKLAzplWylccCBWjz7kXMM/herlyLZaHwytCXBXE=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=fENbtecuXfxTiz7RPH+9f4S8YpxmcBZol1rcmNfPb26+/uh/SRxCJJcnzISj0bvlN 8H7IASU54wrLZG84P7cvMi8lGU3pTEkDX4gEyepqJqB0QlzOqzhE2lSzYhCgvwhJST z8KWdWiWTzgQPfxtInMgvnMxfSB7EQhLtLxFvEP/CJ9hc20IVQ7CW/hHsMfye89SWg aAdZMtkoKR+H9F86ZBXuCthjiPxSgubLC7NDsbdxxZhwGxfXt5DXwlQRqY6jdjWIr2 YQ5jlF0lPdK7/6uwz+3mZ59mv6Qfh9trZFrkcMVMBZWird4L2EtHRPVy7jtYf5XsCu D8dGxhBzEtSHw== Received: by mail-ed1-f47.google.com with SMTP id r7so17701071edv.12 for ; Mon, 21 Jun 2021 01:29:45 -0700 (PDT) X-Gm-Message-State: AOAM533x+LcQ2NZ/4gu1unU1X2YB9f1eZa+8oM8MjAArLvpBVKUKF+lR gWdd1m7MlNs8u+/UMT8ovCYg5Gyy8+8kLaoQ9g== X-Received: by 2002:aa7:ce0c:: with SMTP id d12mr6504464edv.49.1624264183889; Mon, 21 Jun 2021 01:29:43 -0700 (PDT) MIME-Version: 1.0 References: <20210617103214.44217-1-jitao.shi@mediatek.com> In-Reply-To: <20210617103214.44217-1-jitao.shi@mediatek.com> From: Chun-Kuang Hu Date: Mon, 21 Jun 2021 16:29:30 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2] drm/mediatek: force hsa hbp hfp packets multiple of lanenum to avoid screen shift To: Jitao Shi Cc: Chun-Kuang Hu , Philipp Zabel , Matthias Brugger , Daniel Vetter , David Airlie , DRI Development , linux-kernel , "moderated list:ARM/Mediatek SoC support" , Linux ARM , CK Hu , stonea168@163.com, huijuan.xie@mediatek.com, Rex-BC Chen , shuijing.li@mediatek.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Jitao: Jitao Shi =E6=96=BC 2021=E5=B9=B46=E6=9C=8817=E6= =97=A5 =E9=80=B1=E5=9B=9B =E4=B8=8B=E5=8D=886:32=E5=AF=AB=E9=81=93=EF=BC=9A > > The bridge chip "ANX7625" requires the packets on lanes to aligne at the = end, > or ANX7625 will shift the screen. > > Signed-off-by: Jitao Shi > --- > drivers/gpu/drm/mediatek/mtk_dsi.c | 13 +++++++++++++ > 1 file changed, 13 insertions(+) > > diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediate= k/mtk_dsi.c > index ae403c67cbd9..4735e0092ffe 100644 > --- a/drivers/gpu/drm/mediatek/mtk_dsi.c > +++ b/drivers/gpu/drm/mediatek/mtk_dsi.c > @@ -194,6 +194,8 @@ struct mtk_dsi { > struct clk *hs_clk; > > u32 data_rate; > + /* force dsi line end without dsi_null data */ > + bool force_dsi_end_without_null; > > unsigned long mode_flags; > enum mipi_dsi_pixel_format format; > @@ -499,6 +501,13 @@ static void mtk_dsi_config_vdo_timing(struct mtk_dsi= *dsi) > DRM_WARN("HFP + HBP less than d-phy, FPS will under 60Hz\= n"); > } > > + if (dsi->force_dsi_end_without_null) { > + horizontal_sync_active_byte =3D roundup(horizontal_sync_a= ctive_byte, dsi->lanes) - 2; > + horizontal_frontporch_byte =3D roundup(horizontal_frontpo= rch_byte, dsi->lanes) - 2; > + horizontal_backporch_byte =3D roundup(horizontal_backporc= h_byte, dsi->lanes) - 2; > + horizontal_backporch_byte -=3D (vm->hactive * dsi_tmp_buf= _bpp + 2) % dsi->lanes; > + } > + > writel(horizontal_sync_active_byte, dsi->regs + DSI_HSA_WC); > writel(horizontal_backporch_byte, dsi->regs + DSI_HBP_WC); > writel(horizontal_frontporch_byte, dsi->regs + DSI_HFP_WC); > @@ -1095,6 +1104,10 @@ static int mtk_dsi_probe(struct platform_device *p= dev) > dsi->bridge.of_node =3D dev->of_node; > dsi->bridge.type =3D DRM_MODE_CONNECTOR_DSI; > > + if (dsi->next_bridge) > + dsi->force_dsi_end_without_null =3D of_property_read_bool= (dsi->next_bridge->of_node, > + "= force_dsi_end_without_null"); This patch looks good to me, but I could not find "force_dsi_end_without_null" in binding document. Regards, Chun-Kuang. > + > drm_bridge_add(&dsi->bridge); > > ret =3D component_add(&pdev->dev, &mtk_dsi_component_ops); > -- > 2.25.1