Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1647892 > unrolled thread

Re: [PATCH] drm/mediatek: hdmi: Filter interlaced resolutions

Started byCK Hu <ck.hu@mediatek.com>
First post2017-05-23 11:40 +0200
Last post2017-05-25 05:40 +0200
Articles 5 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH] drm/mediatek: hdmi: Filter interlaced resolutions CK Hu <ck.hu@mediatek.com> - 2017-05-23 11:40 +0200
    Re: [PATCH] drm/mediatek: hdmi: Filter interlaced resolutions Daniel Vetter <daniel@ffwll.ch> - 2017-05-23 15:20 +0200
      Re: [PATCH] drm/mediatek: hdmi: Filter interlaced resolutions CK Hu <ck.hu@mediatek.com> - 2017-05-24 11:30 +0200
        Re: [PATCH] drm/mediatek: hdmi: Filter interlaced resolutions Daniel Vetter <daniel@ffwll.ch> - 2017-05-24 14:30 +0200
          Re: [PATCH] drm/mediatek: hdmi: Filter interlaced resolutions CK Hu <ck.hu@mediatek.com> - 2017-05-25 05:40 +0200

#1647892 — Re: [PATCH] drm/mediatek: hdmi: Filter interlaced resolutions

FromCK Hu <ck.hu@mediatek.com>
Date2017-05-23 11:40 +0200
SubjectRe: [PATCH] drm/mediatek: hdmi: Filter interlaced resolutions
Message-ID<tKesi-1hY-23@gated-at.bofh.it>
Hi, Bibby:

I've applied this patch to my branch mediatek-drm-fixes-4.12-rc1,
thanks.

Regards,
CK

On Tue, 2017-01-24 at 13:10 +0800, Bibby Hsieh wrote:
> Current Mediatek DRM driver does not support interlaced mode, and
> will hang if such resolution is used: Filter those to prevent
> kernel hangs, until the DRM driver is fixed properly.
> 
> Signed-off-by: Bibby Hsieh <bibby.hsieh@mediatek.com>
> ---
>  drivers/gpu/drm/mediatek/mtk_hdmi.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/gpu/drm/mediatek/mtk_hdmi.c b/drivers/gpu/drm/mediatek/mtk_hdmi.c
> index 0e8c4d9..e33678d 100644
> --- a/drivers/gpu/drm/mediatek/mtk_hdmi.c
> +++ b/drivers/gpu/drm/mediatek/mtk_hdmi.c
> @@ -1244,6 +1244,8 @@ static int mtk_hdmi_conn_mode_valid(struct drm_connector *conn,
>  			return MODE_BAD;
>  	}
>  
> +	if (mode->flags & DRM_MODE_FLAG_INTERLACE)
> +		return MODE_NO_INTERLACE;
>  	if (mode->clock < 27000)
>  		return MODE_CLOCK_LOW;
>  	if (mode->clock > 297000)

[toc] | [next] | [standalone]


#1648037

FromDaniel Vetter <daniel@ffwll.ch>
Date2017-05-23 15:20 +0200
Message-ID<tKhTd-3GR-47@gated-at.bofh.it>
In reply to#1647892
On Tue, May 23, 2017 at 05:28:15PM +0800, CK Hu wrote:
> Hi, Bibby:
> 
> I've applied this patch to my branch mediatek-drm-fixes-4.12-rc1,
> thanks.
> 
> Regards,
> CK
> 
> On Tue, 2017-01-24 at 13:10 +0800, Bibby Hsieh wrote:
> > Current Mediatek DRM driver does not support interlaced mode, and
> > will hang if such resolution is used: Filter those to prevent
> > kernel hangs, until the DRM driver is fixed properly.
> > 
> > Signed-off-by: Bibby Hsieh <bibby.hsieh@mediatek.com>
> > ---
> >  drivers/gpu/drm/mediatek/mtk_hdmi.c | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/drivers/gpu/drm/mediatek/mtk_hdmi.c b/drivers/gpu/drm/mediatek/mtk_hdmi.c
> > index 0e8c4d9..e33678d 100644
> > --- a/drivers/gpu/drm/mediatek/mtk_hdmi.c
> > +++ b/drivers/gpu/drm/mediatek/mtk_hdmi.c
> > @@ -1244,6 +1244,8 @@ static int mtk_hdmi_conn_mode_valid(struct drm_connector *conn,
> >  			return MODE_BAD;
> >  	}
> >  
> > +	if (mode->flags & DRM_MODE_FLAG_INTERLACE)
> > +		return MODE_NO_INTERLACE;
> >  	if (mode->clock < 27000)
> >  		return MODE_CLOCK_LOW;
> >  	if (mode->clock > 297000)

You probably want to check out Jose's mode_valid work, since only
filtering in the connector's ->mode_valid callback isn't enough. You also
need to filter in ->mode_fixup (or some other place called at atomic_check
time).
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

[toc] | [prev] | [next] | [standalone]


#1649366

FromCK Hu <ck.hu@mediatek.com>
Date2017-05-24 11:30 +0200
Message-ID<tKAMa-tv-9@gated-at.bofh.it>
In reply to#1648037
On Tue, 2017-05-23 at 15:12 +0200, Daniel Vetter wrote:
> On Tue, May 23, 2017 at 05:28:15PM +0800, CK Hu wrote:
> > Hi, Bibby:
> > 
> > I've applied this patch to my branch mediatek-drm-fixes-4.12-rc1,
> > thanks.
> > 
> > Regards,
> > CK
> > 
> > On Tue, 2017-01-24 at 13:10 +0800, Bibby Hsieh wrote:
> > > Current Mediatek DRM driver does not support interlaced mode, and
> > > will hang if such resolution is used: Filter those to prevent
> > > kernel hangs, until the DRM driver is fixed properly.
> > > 
> > > Signed-off-by: Bibby Hsieh <bibby.hsieh@mediatek.com>
> > > ---
> > >  drivers/gpu/drm/mediatek/mtk_hdmi.c | 2 ++
> > >  1 file changed, 2 insertions(+)
> > > 
> > > diff --git a/drivers/gpu/drm/mediatek/mtk_hdmi.c b/drivers/gpu/drm/mediatek/mtk_hdmi.c
> > > index 0e8c4d9..e33678d 100644
> > > --- a/drivers/gpu/drm/mediatek/mtk_hdmi.c
> > > +++ b/drivers/gpu/drm/mediatek/mtk_hdmi.c
> > > @@ -1244,6 +1244,8 @@ static int mtk_hdmi_conn_mode_valid(struct drm_connector *conn,
> > >  			return MODE_BAD;
> > >  	}
> > >  
> > > +	if (mode->flags & DRM_MODE_FLAG_INTERLACE)
> > > +		return MODE_NO_INTERLACE;
> > >  	if (mode->clock < 27000)
> > >  		return MODE_CLOCK_LOW;
> > >  	if (mode->clock > 297000)
> 
> You probably want to check out Jose's mode_valid work, since only
> filtering in the connector's ->mode_valid callback isn't enough. You also
> need to filter in ->mode_fixup (or some other place called at atomic_check
> time).
> -Daniel

Hi, Daniel:

Yes, I still need to filter in ->mode_fixup.

Hi, Bibby:

Because Jose's work plan to use mode_valid to replace mode_fixup, so
it's better to refine this patch after Jose's work is done. And I would
now remove this patch from my branch.

Regards,
CK

[toc] | [prev] | [next] | [standalone]


#1649576

FromDaniel Vetter <daniel@ffwll.ch>
Date2017-05-24 14:30 +0200
Message-ID<tKDAm-2jq-15@gated-at.bofh.it>
In reply to#1649366
On Wed, May 24, 2017 at 05:20:45PM +0800, CK Hu wrote:
> On Tue, 2017-05-23 at 15:12 +0200, Daniel Vetter wrote:
> > On Tue, May 23, 2017 at 05:28:15PM +0800, CK Hu wrote:
> > > Hi, Bibby:
> > > 
> > > I've applied this patch to my branch mediatek-drm-fixes-4.12-rc1,
> > > thanks.
> > > 
> > > Regards,
> > > CK
> > > 
> > > On Tue, 2017-01-24 at 13:10 +0800, Bibby Hsieh wrote:
> > > > Current Mediatek DRM driver does not support interlaced mode, and
> > > > will hang if such resolution is used: Filter those to prevent
> > > > kernel hangs, until the DRM driver is fixed properly.
> > > > 
> > > > Signed-off-by: Bibby Hsieh <bibby.hsieh@mediatek.com>
> > > > ---
> > > >  drivers/gpu/drm/mediatek/mtk_hdmi.c | 2 ++
> > > >  1 file changed, 2 insertions(+)
> > > > 
> > > > diff --git a/drivers/gpu/drm/mediatek/mtk_hdmi.c b/drivers/gpu/drm/mediatek/mtk_hdmi.c
> > > > index 0e8c4d9..e33678d 100644
> > > > --- a/drivers/gpu/drm/mediatek/mtk_hdmi.c
> > > > +++ b/drivers/gpu/drm/mediatek/mtk_hdmi.c
> > > > @@ -1244,6 +1244,8 @@ static int mtk_hdmi_conn_mode_valid(struct drm_connector *conn,
> > > >  			return MODE_BAD;
> > > >  	}
> > > >  
> > > > +	if (mode->flags & DRM_MODE_FLAG_INTERLACE)
> > > > +		return MODE_NO_INTERLACE;
> > > >  	if (mode->clock < 27000)
> > > >  		return MODE_CLOCK_LOW;
> > > >  	if (mode->clock > 297000)
> > 
> > You probably want to check out Jose's mode_valid work, since only
> > filtering in the connector's ->mode_valid callback isn't enough. You also
> > need to filter in ->mode_fixup (or some other place called at atomic_check
> > time).
> > -Daniel
> 
> Hi, Daniel:
> 
> Yes, I still need to filter in ->mode_fixup.
> 
> Hi, Bibby:
> 
> Because Jose's work plan to use mode_valid to replace mode_fixup, so
> it's better to refine this patch after Jose's work is done. And I would
> now remove this patch from my branch.

Btw if you have a revised version of your patch on top of Jose's series, a
tested-by on that would be awesome. The more people find it useful, the
faster it will land.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

[toc] | [prev] | [next] | [standalone]


#1650145

FromCK Hu <ck.hu@mediatek.com>
Date2017-05-25 05:40 +0200
Message-ID<tKRN0-2Oz-5@gated-at.bofh.it>
In reply to#1649576
On Wed, 2017-05-24 at 14:24 +0200, Daniel Vetter wrote:
> On Wed, May 24, 2017 at 05:20:45PM +0800, CK Hu wrote:
> > On Tue, 2017-05-23 at 15:12 +0200, Daniel Vetter wrote:
> > > On Tue, May 23, 2017 at 05:28:15PM +0800, CK Hu wrote:
> > > > Hi, Bibby:
> > > > 
> > > > I've applied this patch to my branch mediatek-drm-fixes-4.12-rc1,
> > > > thanks.
> > > > 
> > > > Regards,
> > > > CK
> > > > 
> > > > On Tue, 2017-01-24 at 13:10 +0800, Bibby Hsieh wrote:
> > > > > Current Mediatek DRM driver does not support interlaced mode, and
> > > > > will hang if such resolution is used: Filter those to prevent
> > > > > kernel hangs, until the DRM driver is fixed properly.
> > > > > 
> > > > > Signed-off-by: Bibby Hsieh <bibby.hsieh@mediatek.com>
> > > > > ---
> > > > >  drivers/gpu/drm/mediatek/mtk_hdmi.c | 2 ++
> > > > >  1 file changed, 2 insertions(+)
> > > > > 
> > > > > diff --git a/drivers/gpu/drm/mediatek/mtk_hdmi.c b/drivers/gpu/drm/mediatek/mtk_hdmi.c
> > > > > index 0e8c4d9..e33678d 100644
> > > > > --- a/drivers/gpu/drm/mediatek/mtk_hdmi.c
> > > > > +++ b/drivers/gpu/drm/mediatek/mtk_hdmi.c
> > > > > @@ -1244,6 +1244,8 @@ static int mtk_hdmi_conn_mode_valid(struct drm_connector *conn,
> > > > >  			return MODE_BAD;
> > > > >  	}
> > > > >  
> > > > > +	if (mode->flags & DRM_MODE_FLAG_INTERLACE)
> > > > > +		return MODE_NO_INTERLACE;
> > > > >  	if (mode->clock < 27000)
> > > > >  		return MODE_CLOCK_LOW;
> > > > >  	if (mode->clock > 297000)
> > > 
> > > You probably want to check out Jose's mode_valid work, since only
> > > filtering in the connector's ->mode_valid callback isn't enough. You also
> > > need to filter in ->mode_fixup (or some other place called at atomic_check
> > > time).
> > > -Daniel
> > 
> > Hi, Daniel:
> > 
> > Yes, I still need to filter in ->mode_fixup.
> > 
> > Hi, Bibby:
> > 
> > Because Jose's work plan to use mode_valid to replace mode_fixup, so
> > it's better to refine this patch after Jose's work is done. And I would
> > now remove this patch from my branch.
> 
> Btw if you have a revised version of your patch on top of Jose's series, a
> tested-by on that would be awesome. The more people find it useful, the
> faster it will land.
> -Daniel

Hi, Daniel:

I understand.

Hi Bibby:

If you have time, please help to test Jose's patches with the problem
you have met. Otherwise, it would be a long process.

Regards,
CK

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web