Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp897193pxf; Wed, 7 Apr 2021 14:28:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzN/NWZ+wytm33eoNh+lhlRgWRsRsa1U0H6V7dY4jYsDOrIYM+kEo8Dolo2s123/BJEPFLt X-Received: by 2002:a50:fd12:: with SMTP id i18mr1331568eds.137.1617830883591; Wed, 07 Apr 2021 14:28:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617830883; cv=none; d=google.com; s=arc-20160816; b=i/fSs0UBtG9KAjB6mgS9CtDbAGh3+tm/TB2f62m1b5mKOVlA1TFBCmp543TrQlexTA Cg51Ig0Wg6+hXf1MnRkzG2wwCMmp/TUtFxjkhbpptBlkE8h4gQsdAp6SGb1B7SOfiH6o NNSD2CxljYJsnvTYYQ9Ri6dSYwMV3NS57AyAqOVSMOsJJz4g2vKYgXTUuR1T5R6b5q2O vmjmyvEokUFLWn5HlEw2CBRquVge3S5sbk4nLBYLP6v99oR9p6xK6dwexzf1XMyNsgB4 WeWnXq52JwJXLTho4lmPc1iD8+1HP14i3hxKmma8viomdymTQi0c5WH+Be82IBI1NTST EFzw== 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=JxEXpGUjnjEnIa5GheCRSwKKFf/EojEXTdgs1RuSNDY=; b=q+XP4AtiQ1xWuKY17qBrEPbf1b7KxbTPZZ5isT4Tt8Js8/GpMnXGczdIA2e91rXo2m 4zHU7ate5t02Fx9Y+onKWKw83eja+Z0GH+wGnhR2FdNLwmmwiw62NOk0cIGOVyeNy9UN 6gwwZnzrGYYYwEy8lPyYZ9pbf8bxU2ZB02Csun6Sya04pVwY4iPFgtL7jqEzeHKTzIef 2j7Fi6uJtspGJi+ziUqRDE31telO8e3wpSY4Zd18nT3yawOE0LEBhMWSH5uPfZXD27b6 N90ABtUK5ebLpb2WCpOKvItOeoxO3bZ2mHgTv38nJvHTbo4Xkx5bMKTHVqYrenVKbVpB VLJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Eo9KXeSe; 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 lk24si10224613ejb.40.2021.04.07.14.27.39; Wed, 07 Apr 2021 14:28:03 -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=Eo9KXeSe; 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 S1347410AbhDGP76 (ORCPT + 99 others); Wed, 7 Apr 2021 11:59:58 -0400 Received: from mail.kernel.org ([198.145.29.99]:47608 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245406AbhDGP75 (ORCPT ); Wed, 7 Apr 2021 11:59:57 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2D87261394; Wed, 7 Apr 2021 15:59:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1617811187; bh=hGXNzVJiH86Iaj7zXKQ35uQKcMAGo1DSHvGN1U3LigI=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=Eo9KXeSeF+qiiMEGBRTSan29w2Je5fOzX3pOmVElTHi7slb0WJjRYTAXzrWkEi5x6 yTVFc4CvBTJLc4Oujco6Z+AL2tSisD/h6vlGZU9lXUEL07/Wl6JQn2Ltl6/VIKK/Ye kE5p1sWa2AOpUz8CiyzLM9P0jaCQHocVmc316We4uxopIxF4FX5SavnDy87kwOQXVe y3qrrM/cTCmaPCZPDElsMGRKu91TH7Zad4Nw1Vnl7HZrMlZFT4pmA7H2B08jwBkbay JCixRc/O6Upa3OxBNVKdH4K2DBI/HDrK1y4hXX13GRC95O/hZGGO3y2jZyrxQI4e2T TNJ52eMFZd0YQ== Received: by mail-ej1-f51.google.com with SMTP id e14so28483738ejz.11; Wed, 07 Apr 2021 08:59:47 -0700 (PDT) X-Gm-Message-State: AOAM530xpUItdPpmZOeQ8s41sjVb+gXxYSC0yUytwpMgGTy+bJ2yM6xY vSkrlzP30AKFV0FAWogJTDzAQo8UCmI70FPM1w== X-Received: by 2002:a17:906:4a52:: with SMTP id a18mr4522021ejv.194.1617811185726; Wed, 07 Apr 2021 08:59:45 -0700 (PDT) MIME-Version: 1.0 References: <20210407143656.2574-1-jitao.shi@mediatek.com> In-Reply-To: <20210407143656.2574-1-jitao.shi@mediatek.com> From: Chun-Kuang Hu Date: Wed, 7 Apr 2021 23:59:34 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] drm/mediatek: force hsa hsa hfp packets multiple of line num to avoid screen shift To: Jitao Shi Cc: Rob Herring , Mark Rutland , Matthias Brugger , Daniel Vetter , David Airlie , DRI Development , linux-kernel , DTML , srv_heupstream , huijuan.xie@mediatek.com, stonea168@163.com, Cawa Cheng , Rex-BC Chen , "moderated list:ARM/Mediatek SoC support" , yingjoe.chen@mediatek.com, eddie.huang@mediatek.com, Linux ARM 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=B44=E6=9C=887=E6=97= =A5 =E9=80=B1=E4=B8=89 =E4=B8=8B=E5=8D=8810:37=E5=AF=AB=E9=81=93=EF=BC=9A > > The bridge chip ANX7625 require the line packets ending at the sametime > or ANX7625 will shift the screen. > > Change-Id: Ia324ad28fbff54140feedb9a1d6bfb2b246d0447 > Signed-off-by: Jitao Shi > --- > drivers/gpu/drm/mediatek/mtk_dsi.c | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > > diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediate= k/mtk_dsi.c > index a1ff152ef468..e825a80862de 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; > @@ -495,6 +497,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); > @@ -1091,6 +1100,9 @@ static int mtk_dsi_probe(struct platform_device *pd= ev) > dsi->bridge.of_node =3D dev->of_node; > dsi->bridge.type =3D DRM_MODE_CONNECTOR_DSI; > > + dsi->force_dsi_end_without_null =3D of_property_read_bool(dev->of= _node, > + "force_ds= i_end_without_null"); If force_dsi_end_without_null is caused by ANX7625, I think we should get this information from ANX7625. Regards, Chun-Kuang. > + > drm_bridge_add(&dsi->bridge); > > ret =3D component_add(&pdev->dev, &mtk_dsi_component_ops); > -- > 2.25.1 > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel