drm/i915: Honor sync polarity from VBT panel timing descriptors
authorAdam Jackson <ajax@redhat.com>
Fri, 28 May 2010 21:17:37 +0000 (17:17 -0400)
committerEric Anholt <eric@anholt.net>
Tue, 1 Jun 2010 17:19:37 +0000 (10:19 -0700)
I'm actually kind of shocked that it works at all otherwise.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
drivers/gpu/drm/i915/intel_bios.c

index 4c748d8f73d63a4da25f8ea10a981f7fc8860c2e..96f75d7f663319c77ed5f77d279c8cc4794591d2 100644 (file)
@@ -95,6 +95,16 @@ fill_detail_timing_data(struct drm_display_mode *panel_fixed_mode,
        panel_fixed_mode->clock = dvo_timing->clock * 10;
        panel_fixed_mode->type = DRM_MODE_TYPE_PREFERRED;
 
+       if (dvo_timing->hsync_positive)
+               panel_fixed_mode->flags |= DRM_MODE_FLAG_PHSYNC;
+       else
+               panel_fixed_mode->flags |= DRM_MODE_FLAG_NHSYNC;
+
+       if (dvo_timing->vsync_positive)
+               panel_fixed_mode->flags |= DRM_MODE_FLAG_PVSYNC;
+       else
+               panel_fixed_mode->flags |= DRM_MODE_FLAG_NVSYNC;
+
        /* Some VBTs have bogus h/vtotal values */
        if (panel_fixed_mode->hsync_end > panel_fixed_mode->htotal)
                panel_fixed_mode->htotal = panel_fixed_mode->hsync_end + 1;