diff mbox series

[V8,3/5] drm/mediatek: using new factor for tvdpll in MT2701

Message ID 20190402093605.82004-4-wangyan.wang@mediatek.com (mailing list archive)
State New, archived
Headers show
Series make mt7623 clock of hdmi stable | expand

Commit Message

wangyan wang April 2, 2019, 9:36 a.m. UTC
From: Wangyan Wang <wangyan.wang@mediatek.com>

This is the second step to make MT2701 HDMI stable.
The factor depends on the divider of DPI in MT2701, therefore,
we should fix this factor to the right and new one.

Signed-off-by: Wangyan Wang <wangyan.wang@mediatek.com>
---
 drivers/gpu/drm/mediatek/mtk_dpi.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

Comments

CK Hu (胡俊光) April 8, 2019, 3:54 a.m. UTC | #1
Hi, Wangyan:

On Tue, 2019-04-02 at 17:36 +0800, wangyan wang wrote:
> From: Wangyan Wang <wangyan.wang@mediatek.com>
> 
> This is the second step to make MT2701 HDMI stable.
> The factor depends on the divider of DPI in MT2701, therefore,
> we should fix this factor to the right and new one.

Reviewed-by: CK Hu <ck.hu@mediatek.com>

> 
> Signed-off-by: Wangyan Wang <wangyan.wang@mediatek.com>
> ---
>  drivers/gpu/drm/mediatek/mtk_dpi.c | 8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediatek/mtk_dpi.c
> index 69c6e42dad6b..4a2f4a650494 100644
> --- a/drivers/gpu/drm/mediatek/mtk_dpi.c
> +++ b/drivers/gpu/drm/mediatek/mtk_dpi.c
> @@ -662,13 +662,11 @@ static unsigned int mt8173_calculate_factor(int clock)
>  static unsigned int mt2701_calculate_factor(int clock)
>  {
>  	if (clock <= 64000)
> -		return 16;
> -	else if (clock <= 128000)
> -		return 8;
> -	else if (clock <= 256000)
>  		return 4;
> -	else
> +	else if (clock <= 128000)
>  		return 2;
> +	else
> +		return 1;
>  }
>  
>  static const struct mtk_dpi_conf mt8173_conf = {
diff mbox series

Patch

diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediatek/mtk_dpi.c
index 69c6e42dad6b..4a2f4a650494 100644
--- a/drivers/gpu/drm/mediatek/mtk_dpi.c
+++ b/drivers/gpu/drm/mediatek/mtk_dpi.c
@@ -662,13 +662,11 @@  static unsigned int mt8173_calculate_factor(int clock)
 static unsigned int mt2701_calculate_factor(int clock)
 {
 	if (clock <= 64000)
-		return 16;
-	else if (clock <= 128000)
-		return 8;
-	else if (clock <= 256000)
 		return 4;
-	else
+	else if (clock <= 128000)
 		return 2;
+	else
+		return 1;
 }
 
 static const struct mtk_dpi_conf mt8173_conf = {