drm/i915/sdvo: Fully translate sync flags in the dtd->mode conversion
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 10 Sep 2013 08:02:48 +0000 (10:02 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 10 Sep 2013 10:32:38 +0000 (12:32 +0200)
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@t-online.de>
Cc: Knut Petersen <Knut_Petersen@t-online.de>
References: http://www.gossamer-threads.com/lists/linux/kernel/1778688?do=post_view_threaded
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_sdvo.c

index 85037b9d4934d406306634c486ed93cc92b771f3..5033c74966aae2c0473da1af3d5ebf4d1aa8ee3c 100644 (file)
@@ -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;
 }
 
 static bool intel_sdvo_check_supp_encode(struct intel_sdvo *intel_sdvo)