Re: [PATCH] drm/i915/sdvo: Fully translate sync flags in the dtd->mode conversion

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Sep 10, 2013 at 12:38:24PM +0300, Ville Syrjälä wrote:
> On Tue, Sep 10, 2013 at 10:02:48AM +0200, Daniel Vetter wrote:
> > Instead of just a flag bit for each of the positive/negative sync
> > modes drm actually uses a separate flag for each ... This upsets the
> > modeset checker since the adjusted mode filled out at modeset time
> > doesn't match the one reconstructed at check time (since the
> > ->get_config callback already gets this right).
> > 
> > Reported-by: Knut Petersen <Knut_Petersen@xxxxxxxxxxx>
> > Cc: Knut Petersen <Knut_Petersen@xxxxxxxxxxx>
> > References: http://www.gossamer-threads.com/lists/linux/kernel/1778688?do=post_view_threaded
> > Signed-off-by: Daniel Vetter <daniel.vetter@xxxxxxxx>
> > ---
> >  drivers/gpu/drm/i915/intel_sdvo.c | 4 ++++
> >  1 file changed, 4 insertions(+)
> > 
> > diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c
> > index 85037b9..5033c74 100644
> > --- a/drivers/gpu/drm/i915/intel_sdvo.c
> > +++ b/drivers/gpu/drm/i915/intel_sdvo.c
> > @@ -866,8 +866,12 @@ static void intel_sdvo_get_mode_from_dtd(struct drm_display_mode * mode,
> >  		mode->flags |= DRM_MODE_FLAG_INTERLACE;
> >  	if (dtd->part2.dtd_flags & DTD_FLAG_HSYNC_POSITIVE)
> >  		mode->flags |= DRM_MODE_FLAG_PHSYNC;
> > +	else
> > +		mode->flags |= DRM_MODE_FLAG_NHSYNC;
> >  	if (dtd->part2.dtd_flags & DTD_FLAG_VSYNC_POSITIVE)
> >  		mode->flags |= DRM_MODE_FLAG_PVSYNC;
> > +	else
> > +		mode->flags |= DRM_MODE_FLAG_NVSYNC;
> 
> Actually it seems we don't recreate the mode from scratch here, so we
> should also clear the negative sync flags (and the interlace flag too) 
> before we set them.

... and we seem to be missing a drm_mode_set_crtcinfo() call too.

> 
> >  }
> >  
> >  static bool intel_sdvo_check_supp_encode(struct intel_sdvo *intel_sdvo)
> > -- 
> > 1.8.4.rc3
> > 
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
> > http://lists.freedesktop.org/mailman/listinfo/intel-gfx
> 
> -- 
> Ville Syrjälä
> Intel OTC

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx





[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux