Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp129398pxf; Wed, 17 Mar 2021 17:35:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxKlW4cVpRK8ZGD08/xyJsvr5yuXaLWC7cv/5jXLXhzhXiCKeBgYVHobtrLPSI/DluiuDgy X-Received: by 2002:a17:906:d157:: with SMTP id br23mr39335859ejb.192.1616027719093; Wed, 17 Mar 2021 17:35:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616027719; cv=none; d=google.com; s=arc-20160816; b=R6VrXaOPy7n5evljcUXvQX171CzoPNf2cJV6LRSKqbGqA2WZdF7vFVbQwfpQMoeFfh Ekreh3RJTouaW1sXfRYaJeENrZrdwaks/3XNVbXQdnT2fDY5CseuLzZonpl17L522f/Q lk8spVnXkAHg9VAAC/4OvMTZt+ciNjBL2j5b1ErrSY7Ad1ieWHvxaxWgvXlZOfV5QYbB y3tBZ8V6CdEAJL+5XZHQ9GgpS2dboQcRPUxQSvkDDB8SBuBiPnmUb9M2vLlEltz4qhtZ d6Yj5vbcf0Y/NWTh9+cuou2TTUoH5ih9IBOtk8+Y6/aj1GG8gczCJJxqWmUvTGXkLzJq lpOw== 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=67SdEydAfkejTy48CZs/gVcc1Y+0IVjuyeKJUhdr9Ck=; b=Z1jBPW3nck8R9aZjQ2c5rwdZ6Mo+q0VtKWQF4IynAVoINkFY5PObSqeAgET8EJkGuv uJv5yNYR6Dz5/QOpVlJbLMPSoHnINFksvUz6njjTfnYrrstedGJlKvZDFBO7QRAHakRT z+0SAROLt9MJOTglv8rDkdQzC1J4x4reZ7NM4ze5msBv65cOIWoU+eq29rpbwLxU8GXl Ll5Ps8/6e0O2+R6EV7eplXMyXm8HFbEqm/QJTnGEkWgqZEz8sX1y7GthTnQ0F6WN++hZ JfmwIkHKhBH9OegvzapB2mtK/9lEQz6EgIEftv5O6oy7GanN7QnegalPFuW6k5jrJvrV C/jw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mgEdWsIT; 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 bs9si254955edb.575.2021.03.17.17.34.51; Wed, 17 Mar 2021 17:35:19 -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=mgEdWsIT; 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 S229884AbhCRAb3 (ORCPT + 99 others); Wed, 17 Mar 2021 20:31:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:39090 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229644AbhCRAbQ (ORCPT ); Wed, 17 Mar 2021 20:31:16 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id A420764F2B; Thu, 18 Mar 2021 00:31:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1616027476; bh=kE5pzJREcMtcsKe3XXovC6KJw1unQTOB5zOB90M91cY=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=mgEdWsITi62mNieWrt3tt4Ns/P9SkqyfMc4vReldRwLoUMBhwCeLpKFrGitrVwO59 i8j6PIp2pGqzOw5zBDDYh3FCyiHGnYDTzzv7DimOmXrbnxyjT58J57rttyeT+gXRsP hhSHuapQuAoYMuAcVFjcxOre4h3RyYrNXlp7nyqvWEmrJg+JzhxnEjufjYuF+IrqwD KV3tZDwKhJQqOrVs4NIvcq74tTGCKgKBWMklbZUvKI1x9hTDejZ6eeWdeN7HAW4ZYj ZCLrQaO51S3FceqzACjNEjRZ0JxLaAh4HaExjt9IK1Jj+R/12M0fAGa4t+Ok2UMDs3 /gMmCT9ZWHEpQ== Received: by mail-ej1-f52.google.com with SMTP id t18so1187225ejc.13; Wed, 17 Mar 2021 17:31:15 -0700 (PDT) X-Gm-Message-State: AOAM532LU8OEgzaEMdgKvkxT3oFvJ56AwjTl+uQUfXBCtStjssuSiJyX t75g1pv+8oU/MsRF3pGAZMIu1wnh5LtJeVnhTg== X-Received: by 2002:a17:907:3e8a:: with SMTP id hs10mr38674530ejc.267.1616027473977; Wed, 17 Mar 2021 17:31:13 -0700 (PDT) MIME-Version: 1.0 References: <20210201034755.15793-1-jitao.shi@mediatek.com> In-Reply-To: <20210201034755.15793-1-jitao.shi@mediatek.com> From: Chun-Kuang Hu Date: Thu, 18 Mar 2021 08:31:02 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] drm/mediatek: fine tune the data lane trail by project dts 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 , shuijing.li@mediatek.com, "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=B42=E6=9C=881=E6=97= =A5 =E9=80=B1=E4=B8=80 =E4=B8=8A=E5=8D=8811:48=E5=AF=AB=E9=81=93=EF=BC=9A > > Some panels or bridges require customized hs_da_trail time. > So add a property in devicetree for this panels and bridges. > > Signed-off-by: Jitao Shi > --- > drivers/gpu/drm/mediatek/mtk_dsi.c | 10 +++++++++- > 1 file changed, 9 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediate= k/mtk_dsi.c > index 8c70ec39bfe1..6e7092fa2fee 100644 > --- a/drivers/gpu/drm/mediatek/mtk_dsi.c > +++ b/drivers/gpu/drm/mediatek/mtk_dsi.c > @@ -194,6 +194,7 @@ struct mtk_dsi { > struct clk *hs_clk; > > u32 data_rate; > + u32 da_trail_delta; > > unsigned long mode_flags; > enum mipi_dsi_pixel_format format; > @@ -234,7 +235,7 @@ static void mtk_dsi_phy_timconfig(struct mtk_dsi *dsi= ) > timing->da_hs_prepare =3D (80 * data_rate_mhz + 4 * 1000) / 8000; > timing->da_hs_zero =3D (170 * data_rate_mhz + 10 * 1000) / 8000 += 1 - > timing->da_hs_prepare; > - timing->da_hs_trail =3D timing->da_hs_prepare + 1; > + timing->da_hs_trail =3D timing->da_hs_prepare + 1 + dsi->da_trail= _delta; > > timing->ta_go =3D 4 * timing->lpx - 2; > timing->ta_sure =3D timing->lpx + 2; > @@ -1094,6 +1095,13 @@ static int mtk_dsi_probe(struct platform_device *p= dev) > goto err_unregister_host; > } > > + ret =3D of_property_read_u32_index(dev->of_node, "da_trail_delta"= , 0, > + &dsi->da_trail_delta); This value depends on panel, so I think we should get some value from panel's device node to calculate this value. Regards, Chun-Kuang. > + if (ret) { > + dev_info(dev, "Can't get da_trail_delta, keep it as 0: %d= \n", ret); > + dsi->da_trail_delta =3D 0; > + } > + > comp_id =3D mtk_ddp_comp_get_id(dev->of_node, MTK_DSI); > if (comp_id < 0) { > dev_err(dev, "Failed to identify by alias: %d\n", comp_id= ); > -- > 2.12.5 > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel