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


Groups > linux.kernel > #1648037

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

From Daniel Vetter <daniel@ffwll.ch>
Newsgroups linux.kernel
Subject Re: [PATCH] drm/mediatek: hdmi: Filter interlaced resolutions
Date 2017-05-23 15:20 +0200
Message-ID <tKhTd-3GR-47@gated-at.bofh.it> (permalink)
References <t31Gq-8u2-13@gated-at.bofh.it> <tKesi-1hY-23@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

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

csiph-web