From: CK Hu <ck.hu@mediatek.com>
To: Jitao Shi <jitao.shi@mediatek.com>
Cc: Mark Rutland <mark.rutland@arm.com>,
devicetree@vger.kernel.org, David Airlie <airlied@linux.ie>,
stonea168@163.com, dri-devel@lists.freedesktop.org,
yingjoe.chen@mediatek.com, Ajay Kumar <ajaykumar.rs@samsung.com>,
Vincent Palatin <vpalatin@chromium.org>,
cawa.cheng@mediatek.com,
Russell King <rmk+kernel@arm.linux.org.uk>,
Thierry Reding <treding@nvidia.com>,
linux-pwm@vger.kernel.org, Sascha Hauer <kernel@pengutronix.de>,
Pawel Moll <pawel.moll@arm.com>,
Ian Campbell <ijc+devicetree@hellion.org.uk>,
Rob Herring <robh+dt@kernel.org>,
linux-mediatek@lists.infradead.org,
Andy Yan <andy.yan@rock-chips.com>,
Matthias Brugger <matthias.bgg@gmail.com>,
eddie.huang@mediatek.com, linux-arm-kernel@lists.infradead.org,
Rahul Sharma <rahul.sharma@samsung.com>,
srv_heupstream@mediatek.com, linux-kernel@vger.kernel.org,
Sean Paul <seanpaul@chromium.org>
Subject: Re: [PATCH v5 3/4] drm/mediatek: add mt8183 dpi clock factor
Date: Thu, 8 Aug 2019 15:14:35 +0800 [thread overview]
Message-ID: <1565248475.31636.0.camel@mtksdaap41> (raw)
In-Reply-To: <20190807060257.57007-4-jitao.shi@mediatek.com>
Hi, Jitao:
On Wed, 2019-08-07 at 14:02 +0800, Jitao Shi wrote:
> The factor depends on the divider of DPI in MT8183, therefore,
> we should fix this factor to the right and new one.
>
Reviewed-by: CK Hu <ck.hu@mediatek.com>
> Signed-off-by: Jitao Shi <jitao.shi@mediatek.com>
> ---
> drivers/gpu/drm/mediatek/mtk_dpi.c | 18 ++++++++++++++++++
> 1 file changed, 18 insertions(+)
>
> diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediatek/mtk_dpi.c
> index 743230864ba0..4f2700cbfdb7 100644
> --- a/drivers/gpu/drm/mediatek/mtk_dpi.c
> +++ b/drivers/gpu/drm/mediatek/mtk_dpi.c
> @@ -672,6 +672,16 @@ static unsigned int mt2701_calculate_factor(int clock)
> return 1;
> }
>
> +static unsigned int mt8183_calculate_factor(int clock)
> +{
> + if (clock <= 27000)
> + return 8;
> + else if (clock <= 167000)
> + return 4;
> + else
> + return 2;
> +}
> +
> static const struct mtk_dpi_conf mt8173_conf = {
> .cal_factor = mt8173_calculate_factor,
> .reg_h_fre_con = 0xe0,
> @@ -683,6 +693,11 @@ static const struct mtk_dpi_conf mt2701_conf = {
> .edge_sel_en = true,
> };
>
> +static const struct mtk_dpi_conf mt8183_conf = {
> + .cal_factor = mt8183_calculate_factor,
> + .reg_h_fre_con = 0xe0,
> +};
> +
> static int mtk_dpi_probe(struct platform_device *pdev)
> {
> struct device *dev = &pdev->dev;
> @@ -779,6 +794,9 @@ static const struct of_device_id mtk_dpi_of_ids[] = {
> { .compatible = "mediatek,mt8173-dpi",
> .data = &mt8173_conf,
> },
> + { .compatible = "mediatek,mt8183-dpi",
> + .data = &mt8183_conf,
> + },
> { },
> };
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
WARNING: multiple messages have this Message-ID (diff)
From: CK Hu <ck.hu@mediatek.com>
To: Jitao Shi <jitao.shi@mediatek.com>
Cc: Mark Rutland <mark.rutland@arm.com>,
devicetree@vger.kernel.org, David Airlie <airlied@linux.ie>,
stonea168@163.com, dri-devel@lists.freedesktop.org,
yingjoe.chen@mediatek.com, Ajay Kumar <ajaykumar.rs@samsung.com>,
Vincent Palatin <vpalatin@chromium.org>,
cawa.cheng@mediatek.com, bibby.hsieh@mediatek.com,
Russell King <rmk+kernel@arm.linux.org.uk>,
Thierry Reding <treding@nvidia.com>,
linux-pwm@vger.kernel.org, Sascha Hauer <kernel@pengutronix.de>,
Pawel Moll <pawel.moll@arm.com>,
Ian Campbell <ijc+devicetree@hellion.org.uk>,
Inki Dae <inki.dae@samsung.com>, Rob Herring <robh+dt@kernel.org>,
linux-mediatek@lists.infradead.org,
Andy Yan <andy.yan@rock-chips.com>,
Matthias Brugger <matthias.bgg@gmail.com>,
eddie.huang@mediatek.com, linux-arm-kernel@lists.infradead.org,
Rahul Sharma <rahul.sharma@samsung.com>,
srv_heupstream@mediatek.com, linux-kernel@vger.kernel.org,
Philipp Zabel <p.zabel@pengutronix.de>,
Sean Paul <seanpaul@chromium.org>
Subject: Re: [PATCH v5 3/4] drm/mediatek: add mt8183 dpi clock factor
Date: Thu, 8 Aug 2019 15:14:35 +0800 [thread overview]
Message-ID: <1565248475.31636.0.camel@mtksdaap41> (raw)
In-Reply-To: <20190807060257.57007-4-jitao.shi@mediatek.com>
Hi, Jitao:
On Wed, 2019-08-07 at 14:02 +0800, Jitao Shi wrote:
> The factor depends on the divider of DPI in MT8183, therefore,
> we should fix this factor to the right and new one.
>
Reviewed-by: CK Hu <ck.hu@mediatek.com>
> Signed-off-by: Jitao Shi <jitao.shi@mediatek.com>
> ---
> drivers/gpu/drm/mediatek/mtk_dpi.c | 18 ++++++++++++++++++
> 1 file changed, 18 insertions(+)
>
> diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediatek/mtk_dpi.c
> index 743230864ba0..4f2700cbfdb7 100644
> --- a/drivers/gpu/drm/mediatek/mtk_dpi.c
> +++ b/drivers/gpu/drm/mediatek/mtk_dpi.c
> @@ -672,6 +672,16 @@ static unsigned int mt2701_calculate_factor(int clock)
> return 1;
> }
>
> +static unsigned int mt8183_calculate_factor(int clock)
> +{
> + if (clock <= 27000)
> + return 8;
> + else if (clock <= 167000)
> + return 4;
> + else
> + return 2;
> +}
> +
> static const struct mtk_dpi_conf mt8173_conf = {
> .cal_factor = mt8173_calculate_factor,
> .reg_h_fre_con = 0xe0,
> @@ -683,6 +693,11 @@ static const struct mtk_dpi_conf mt2701_conf = {
> .edge_sel_en = true,
> };
>
> +static const struct mtk_dpi_conf mt8183_conf = {
> + .cal_factor = mt8183_calculate_factor,
> + .reg_h_fre_con = 0xe0,
> +};
> +
> static int mtk_dpi_probe(struct platform_device *pdev)
> {
> struct device *dev = &pdev->dev;
> @@ -779,6 +794,9 @@ static const struct of_device_id mtk_dpi_of_ids[] = {
> { .compatible = "mediatek,mt8173-dpi",
> .data = &mt8173_conf,
> },
> + { .compatible = "mediatek,mt8183-dpi",
> + .data = &mt8183_conf,
> + },
> { },
> };
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
WARNING: multiple messages have this Message-ID (diff)
From: CK Hu <ck.hu@mediatek.com>
To: Jitao Shi <jitao.shi@mediatek.com>
Cc: Rob Herring <robh+dt@kernel.org>, Pawel Moll <pawel.moll@arm.com>,
"Mark Rutland" <mark.rutland@arm.com>,
Ian Campbell <ijc+devicetree@hellion.org.uk>,
<linux-pwm@vger.kernel.org>, David Airlie <airlied@linux.ie>,
Matthias Brugger <matthias.bgg@gmail.com>,
"Thierry Reding" <treding@nvidia.com>,
Ajay Kumar <ajaykumar.rs@samsung.com>,
"Inki Dae" <inki.dae@samsung.com>,
Rahul Sharma <rahul.sharma@samsung.com>,
"Sean Paul" <seanpaul@chromium.org>,
Vincent Palatin <vpalatin@chromium.org>,
"Andy Yan" <andy.yan@rock-chips.com>,
Philipp Zabel <p.zabel@pengutronix.de>,
Russell King <rmk+kernel@arm.linux.org.uk>,
<devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<dri-devel@lists.freedesktop.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-mediatek@lists.infradead.org>,
<srv_heupstream@mediatek.com>,
Sascha Hauer <kernel@pengutronix.de>, <yingjoe.chen@mediatek.com>,
<eddie.huang@mediatek.com>, <cawa.cheng@mediatek.com>,
<bibby.hsieh@mediatek.com>, <stonea168@163.com>
Subject: Re: [PATCH v5 3/4] drm/mediatek: add mt8183 dpi clock factor
Date: Thu, 8 Aug 2019 15:14:35 +0800 [thread overview]
Message-ID: <1565248475.31636.0.camel@mtksdaap41> (raw)
In-Reply-To: <20190807060257.57007-4-jitao.shi@mediatek.com>
Hi, Jitao:
On Wed, 2019-08-07 at 14:02 +0800, Jitao Shi wrote:
> The factor depends on the divider of DPI in MT8183, therefore,
> we should fix this factor to the right and new one.
>
Reviewed-by: CK Hu <ck.hu@mediatek.com>
> Signed-off-by: Jitao Shi <jitao.shi@mediatek.com>
> ---
> drivers/gpu/drm/mediatek/mtk_dpi.c | 18 ++++++++++++++++++
> 1 file changed, 18 insertions(+)
>
> diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediatek/mtk_dpi.c
> index 743230864ba0..4f2700cbfdb7 100644
> --- a/drivers/gpu/drm/mediatek/mtk_dpi.c
> +++ b/drivers/gpu/drm/mediatek/mtk_dpi.c
> @@ -672,6 +672,16 @@ static unsigned int mt2701_calculate_factor(int clock)
> return 1;
> }
>
> +static unsigned int mt8183_calculate_factor(int clock)
> +{
> + if (clock <= 27000)
> + return 8;
> + else if (clock <= 167000)
> + return 4;
> + else
> + return 2;
> +}
> +
> static const struct mtk_dpi_conf mt8173_conf = {
> .cal_factor = mt8173_calculate_factor,
> .reg_h_fre_con = 0xe0,
> @@ -683,6 +693,11 @@ static const struct mtk_dpi_conf mt2701_conf = {
> .edge_sel_en = true,
> };
>
> +static const struct mtk_dpi_conf mt8183_conf = {
> + .cal_factor = mt8183_calculate_factor,
> + .reg_h_fre_con = 0xe0,
> +};
> +
> static int mtk_dpi_probe(struct platform_device *pdev)
> {
> struct device *dev = &pdev->dev;
> @@ -779,6 +794,9 @@ static const struct of_device_id mtk_dpi_of_ids[] = {
> { .compatible = "mediatek,mt8173-dpi",
> .data = &mt8173_conf,
> },
> + { .compatible = "mediatek,mt8183-dpi",
> + .data = &mt8183_conf,
> + },
> { },
> };
>
next prev parent reply other threads:[~2019-08-08 7:14 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-07 6:02 [PATCH v5 0/4] add mt8183 dpi driver Jitao Shi
2019-08-07 6:02 ` Jitao Shi
2019-08-07 6:02 ` Jitao Shi
2019-08-07 6:02 ` [PATCH v5 1/4] dt-bindings: display: mediatek: update dpi supported chips Jitao Shi
2019-08-07 6:02 ` Jitao Shi
2019-08-07 6:02 ` Jitao Shi
2019-08-12 21:49 ` Rob Herring
2019-08-12 21:49 ` Rob Herring
2019-08-12 21:49 ` Rob Herring
2019-08-12 21:51 ` Rob Herring
2019-08-12 21:51 ` Rob Herring
2019-08-12 21:51 ` Rob Herring
2019-08-07 6:02 ` [PATCH v5 2/4] drm/mediatek: dpi dual edge support Jitao Shi
2019-08-07 6:02 ` Jitao Shi
2019-08-07 6:02 ` Jitao Shi
2019-08-07 6:02 ` [PATCH v5 3/4] drm/mediatek: add mt8183 dpi clock factor Jitao Shi
2019-08-07 6:02 ` Jitao Shi
2019-08-07 6:02 ` Jitao Shi
2019-08-08 7:14 ` CK Hu [this message]
2019-08-08 7:14 ` CK Hu
2019-08-08 7:14 ` CK Hu
2019-08-07 6:02 ` [PATCH v5 4/4] drm/mediatek: control dpi pins dpi or gpio mode in on or off Jitao Shi
2019-08-07 6:02 ` Jitao Shi
2019-08-07 6:02 ` Jitao Shi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1565248475.31636.0.camel@mtksdaap41 \
--to=ck.hu@mediatek.com \
--cc=airlied@linux.ie \
--cc=ajaykumar.rs@samsung.com \
--cc=andy.yan@rock-chips.com \
--cc=cawa.cheng@mediatek.com \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=eddie.huang@mediatek.com \
--cc=ijc+devicetree@hellion.org.uk \
--cc=jitao.shi@mediatek.com \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-pwm@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=matthias.bgg@gmail.com \
--cc=pawel.moll@arm.com \
--cc=rahul.sharma@samsung.com \
--cc=rmk+kernel@arm.linux.org.uk \
--cc=robh+dt@kernel.org \
--cc=seanpaul@chromium.org \
--cc=srv_heupstream@mediatek.com \
--cc=stonea168@163.com \
--cc=treding@nvidia.com \
--cc=vpalatin@chromium.org \
--cc=yingjoe.chen@mediatek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.