diff mbox series

Aw: [PATCH v5 3/7] drm/mediatek: disable tmds on mt2701

Message ID trinity-14a1b182-38ab-4f84-bb72-94d448b05fd5-1597994235320@3c-app-gmx-bs37 (mailing list archive)
State New, archived
Headers show
Series Aw: [PATCH v5 3/7] drm/mediatek: disable tmds on mt2701 | expand

Commit Message

Frank Wunderlich Aug. 21, 2020, 7:17 a.m. UTC
> diff --git a/drivers/gpu/drm/mediatek/mtk_hdmi_phy.c b/drivers/gpu/drm/mediatek/mtk_hdmi_phy.c
> index 5223498502c4..edadb7a700f1 100644
> --- a/drivers/gpu/drm/mediatek/mtk_hdmi_phy.c
> +++ b/drivers/gpu/drm/mediatek/mtk_hdmi_phy.c
> @@ -184,6 +184,9 @@ static int mtk_hdmi_phy_probe(struct platform_device *pdev)
>  		return PTR_ERR(phy_provider);
>  	}
>
> +	if (hdmi_phy->conf->pll_default_off)
> +		hdmi_phy->conf->hdmi_phy_disable_tmds(hdmi_phy);
> +
>  	return of_clk_add_provider(dev->of_node, of_clk_src_simple_get,
>  				   hdmi_phy->pll);
>  }

tried modifying mtk_hdmi_phy_power_on using the new flag to not enable tmds instead of enabling and later disabling it, but this does not work...



same problem as without this Patch (horizontally distorted image flickering on 1280x1024)

any idea CK Hu?

regards Frank

Comments

Matthias Brugger Aug. 27, 2020, 8:15 a.m. UTC | #1
On 21/08/2020 09:17, Frank Wunderlich wrote:
>> diff --git a/drivers/gpu/drm/mediatek/mtk_hdmi_phy.c b/drivers/gpu/drm/mediatek/mtk_hdmi_phy.c
>> index 5223498502c4..edadb7a700f1 100644
>> --- a/drivers/gpu/drm/mediatek/mtk_hdmi_phy.c
>> +++ b/drivers/gpu/drm/mediatek/mtk_hdmi_phy.c
>> @@ -184,6 +184,9 @@ static int mtk_hdmi_phy_probe(struct platform_device *pdev)
>>   		return PTR_ERR(phy_provider);
>>   	}
>>
>> +	if (hdmi_phy->conf->pll_default_off)
>> +		hdmi_phy->conf->hdmi_phy_disable_tmds(hdmi_phy);
>> +
>>   	return of_clk_add_provider(dev->of_node, of_clk_src_simple_get,
>>   				   hdmi_phy->pll);
>>   }
> 
> tried modifying mtk_hdmi_phy_power_on using the new flag to not enable tmds instead of enabling and later disabling it, but this does not work...
> 
> --- a/drivers/gpu/drm/mediatek/mtk_hdmi_phy.c
> +++ b/drivers/gpu/drm/mediatek/mtk_hdmi_phy.c
> @@ -62,7 +62,8 @@ static int mtk_hdmi_phy_power_on(struct phy *phy)
>          if (ret < 0)
>                  return ret;
> 
> -       hdmi_phy->conf->hdmi_phy_enable_tmds(hdmi_phy);
> +       if (!hdmi_phy->conf->pll_default_off)
> +               hdmi_phy->conf->hdmi_phy_enable_tmds(hdmi_phy);
>          return 0;
>   }
> 
> @@ -184,8 +185,8 @@ static int mtk_hdmi_phy_probe(struct platform_device *pdev)
>                  return PTR_ERR(phy_provider);
>          }
> 
> -       if (hdmi_phy->conf->pll_default_off)
> -               hdmi_phy->conf->hdmi_phy_disable_tmds(hdmi_phy);
> +       //if (hdmi_phy->conf->pll_default_off)
> +       //      hdmi_phy->conf->hdmi_phy_disable_tmds(hdmi_phy);
> 
>          return of_clk_add_provider(dev->of_node, of_clk_src_simple_get,
>                                     hdmi_phy->pll);
> 
> 
> same problem as without this Patch (horizontally distorted image flickering on 1280x1024)
> 
> any idea CK Hu?
> 

I'll leave it to CK to decide how to go forward with this. Would be interesting 
to understand why we need to disable the phy. Someone would need to verify that 
this holds for mt2701 as well, and not only for mt7623, otherwise we would break 
mt2701.

Regards,
Matthias
Frank Wunderlich Aug. 27, 2020, 1:41 p.m. UTC | #2
Hi Matthias,

any opinions about the dts-changes?

maybe series except the tmds-Patch get merged...so i add it only to my own repo till we find a better way?
currently mainline does not support hdmi at all for the board. the tmds-patch is only a fix for specific resolutions which have a "flickering" without this Patch.

regards Frank
Matthias Brugger Aug. 27, 2020, 2:28 p.m. UTC | #3
On 27/08/2020 15:41, Frank Wunderlich wrote:
> Hi Matthias,
> 
> any opinions about the dts-changes?
> 

they look good to me.

> maybe series except the tmds-Patch get merged...so i add it only to my own repo till we find a better way?
> currently mainline does not support hdmi at all for the board. the tmds-patch is only a fix for specific resolutions which have a "flickering" without this Patch.
> 

Well let's see what CK's opinion.

Regards,
Matthias
Chun-Kuang Hu Aug. 27, 2020, 11:46 p.m. UTC | #4
Hi, Frank:

Matthias Brugger <matthias.bgg@gmail.com> 於 2020年8月27日 週四 下午10:28寫道:
>
>
>
> On 27/08/2020 15:41, Frank Wunderlich wrote:
> > Hi Matthias,
> >
> > any opinions about the dts-changes?
> >
>
> they look good to me.
>
> > maybe series except the tmds-Patch get merged...so i add it only to my own repo till we find a better way?
> > currently mainline does not support hdmi at all for the board. the tmds-patch is only a fix for specific resolutions which have a "flickering" without this Patch.
> >
>
> Well let's see what CK's opinion.
>

Because no one has comment on this patch, I could apply this patch but
I need you to add more experiment information so if someone meets
another bug, he could fix his bug and consider your problem.

Regards,
Chun-Kuang.

> Regards,
> Matthias
Frank Wunderlich Aug. 28, 2020, 5:21 a.m. UTC | #5
Without this patch i have flickering/horizontal distortion (looks line every second line has different x position as one above approx. 5 px) on my 1280x1024 tft.

Fbcon is unreadable with this problem.

Hard to describe by words only :(

Am 28. August 2020 01:46:07 MESZ schrieb Chun-Kuang Hu <chunkuang.hu@kernel.org>:
>Hi, Frank:
>
>Matthias Brugger <matthias.bgg@gmail.com> 於 2020年8月27日 週四 下午10:28寫道:
>>
>>
>>
>> On 27/08/2020 15:41, Frank Wunderlich wrote:
>> > Hi Matthias,
>> >
>> > any opinions about the dts-changes?
>> >
>>
>> they look good to me.
>>
>> > maybe series except the tmds-Patch get merged...so i add it only to
>my own repo till we find a better way?
>> > currently mainline does not support hdmi at all for the board. the
>tmds-patch is only a fix for specific resolutions which have a
>"flickering" without this Patch.
>> >
>>
>> Well let's see what CK's opinion.
>>
>
>Because no one has comment on this patch, I could apply this patch but
>I need you to add more experiment information so if someone meets
>another bug, he could fix his bug and consider your problem.
>
>Regards,
>Chun-Kuang.
>
>> Regards,
>> Matthias
>
>_______________________________________________
>Linux-mediatek mailing list
>Linux-mediatek@lists.infradead.org
>http://lists.infradead.org/mailman/listinfo/linux-mediatek

regards Frank
Matthias Brugger Aug. 28, 2020, 5:45 p.m. UTC | #6
On 28/08/2020 01:46, Chun-Kuang Hu wrote:
> Hi, Frank:
> 
> Matthias Brugger <matthias.bgg@gmail.com> 於 2020年8月27日 週四 下午10:28寫道:
>>
>>
>>
>> On 27/08/2020 15:41, Frank Wunderlich wrote:
>>> Hi Matthias,
>>>
>>> any opinions about the dts-changes?
>>>
>>
>> they look good to me.
>>
>>> maybe series except the tmds-Patch get merged...so i add it only to my own repo till we find a better way?
>>> currently mainline does not support hdmi at all for the board. the tmds-patch is only a fix for specific resolutions which have a "flickering" without this Patch.
>>>
>>
>> Well let's see what CK's opinion.
>>
> 
> Because no one has comment on this patch, I could apply this patch but
> I need you to add more experiment information so if someone meets
> another bug, he could fix his bug and consider your problem.
> 

I'm adding Chunhui Dai as he got dropped in the discussion.

Chunhui can you as the first patch author provide some more technical background 
why the distortion happens and why this patch fixes it?

Thanks a lot,
Matthias
diff mbox series

Patch

--- a/drivers/gpu/drm/mediatek/mtk_hdmi_phy.c
+++ b/drivers/gpu/drm/mediatek/mtk_hdmi_phy.c
@@ -62,7 +62,8 @@  static int mtk_hdmi_phy_power_on(struct phy *phy)
        if (ret < 0)
                return ret;

-       hdmi_phy->conf->hdmi_phy_enable_tmds(hdmi_phy);
+       if (!hdmi_phy->conf->pll_default_off)
+               hdmi_phy->conf->hdmi_phy_enable_tmds(hdmi_phy);
        return 0;
 }

@@ -184,8 +185,8 @@  static int mtk_hdmi_phy_probe(struct platform_device *pdev)
                return PTR_ERR(phy_provider);
        }

-       if (hdmi_phy->conf->pll_default_off)
-               hdmi_phy->conf->hdmi_phy_disable_tmds(hdmi_phy);
+       //if (hdmi_phy->conf->pll_default_off)
+       //      hdmi_phy->conf->hdmi_phy_disable_tmds(hdmi_phy);

        return of_clk_add_provider(dev->of_node, of_clk_src_simple_get,
                                   hdmi_phy->pll);