Re: [v3 3/3] drm/mediatek: add mt8183 dpi support

2019-05-19 Thread Jitao Shi
On Tue, 2019-05-07 at 15:41 +0800, CK Hu wrote:
> Hi, Jitao:
> 
> On Tue, 2019-04-16 at 13:52 +0800, Jitao Shi wrote:
> 
> I need the commit message. Even though the code is easy to understand,
> words for this patch is still necessary.
> 
> Regards,
> CK
> 

I'll fine tune the commit message next version.

Best Regards
Jitao

> > Signed-off-by: Jitao Shi 
> > ---
> >  drivers/gpu/drm/mediatek/mtk_dpi.c | 19 +++
> >  1 file changed, 19 insertions(+)
> > 
> > diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c 
> > b/drivers/gpu/drm/mediatek/mtk_dpi.c
> > index 66405159141a..fbb087218775 100644
> > --- a/drivers/gpu/drm/mediatek/mtk_dpi.c
> > +++ b/drivers/gpu/drm/mediatek/mtk_dpi.c
> > @@ -681,6 +681,16 @@ static unsigned int mt2701_calculate_factor(int clock)
> > return 2;
> >  }
> >  
> > +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,
> > @@ -692,6 +702,12 @@ 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,
> > +   .dual_edge = true,
> > +};
> > +
> >  static int mtk_dpi_probe(struct platform_device *pdev)
> >  {
> > struct device *dev = >dev;
> > @@ -787,6 +803,9 @@ static const struct of_device_id mtk_dpi_of_ids[] = {
> > { .compatible = "mediatek,mt8173-dpi",
> >   .data = _conf,
> > },
> > +   { .compatible = "mediatek,mt8183-dpi",
> > + .data = _conf,
> > +   },
> > { },
> >  };
> >  
> 
> 


___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [v3 3/3] drm/mediatek: add mt8183 dpi support

2019-05-07 Thread CK Hu
Hi, Jitao:

On Tue, 2019-04-16 at 13:52 +0800, Jitao Shi wrote:

I need the commit message. Even though the code is easy to understand,
words for this patch is still necessary.

Regards,
CK

> Signed-off-by: Jitao Shi 
> ---
>  drivers/gpu/drm/mediatek/mtk_dpi.c | 19 +++
>  1 file changed, 19 insertions(+)
> 
> diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c 
> b/drivers/gpu/drm/mediatek/mtk_dpi.c
> index 66405159141a..fbb087218775 100644
> --- a/drivers/gpu/drm/mediatek/mtk_dpi.c
> +++ b/drivers/gpu/drm/mediatek/mtk_dpi.c
> @@ -681,6 +681,16 @@ static unsigned int mt2701_calculate_factor(int clock)
>   return 2;
>  }
>  
> +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,
> @@ -692,6 +702,12 @@ 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,
> + .dual_edge = true,
> +};
> +
>  static int mtk_dpi_probe(struct platform_device *pdev)
>  {
>   struct device *dev = >dev;
> @@ -787,6 +803,9 @@ static const struct of_device_id mtk_dpi_of_ids[] = {
>   { .compatible = "mediatek,mt8173-dpi",
> .data = _conf,
>   },
> + { .compatible = "mediatek,mt8183-dpi",
> +   .data = _conf,
> + },
>   { },
>  };
>  


___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

[v3 3/3] drm/mediatek: add mt8183 dpi support

2019-04-15 Thread Jitao Shi
Signed-off-by: Jitao Shi 
---
 drivers/gpu/drm/mediatek/mtk_dpi.c | 19 +++
 1 file changed, 19 insertions(+)

diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c 
b/drivers/gpu/drm/mediatek/mtk_dpi.c
index 66405159141a..fbb087218775 100644
--- a/drivers/gpu/drm/mediatek/mtk_dpi.c
+++ b/drivers/gpu/drm/mediatek/mtk_dpi.c
@@ -681,6 +681,16 @@ static unsigned int mt2701_calculate_factor(int clock)
return 2;
 }
 
+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,
@@ -692,6 +702,12 @@ 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,
+   .dual_edge = true,
+};
+
 static int mtk_dpi_probe(struct platform_device *pdev)
 {
struct device *dev = >dev;
@@ -787,6 +803,9 @@ static const struct of_device_id mtk_dpi_of_ids[] = {
{ .compatible = "mediatek,mt8173-dpi",
  .data = _conf,
},
+   { .compatible = "mediatek,mt8183-dpi",
+ .data = _conf,
+   },
{ },
 };
 
-- 
2.21.0

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel