diff options
Diffstat (limited to 'drivers/gpu/drm/drm_modes.c')
-rw-r--r-- | drivers/gpu/drm/drm_modes.c | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c index 11cc4deca55b..5125aa91e66f 100644 --- a/drivers/gpu/drm/drm_modes.c +++ b/drivers/gpu/drm/drm_modes.c | |||
@@ -739,6 +739,8 @@ EXPORT_SYMBOL(drm_mode_vrefresh); | |||
739 | * - The CRTC_STEREO_DOUBLE flag can be used to compute the timings for | 739 | * - The CRTC_STEREO_DOUBLE flag can be used to compute the timings for |
740 | * buffers containing two eyes (only adjust the timings when needed, eg. for | 740 | * buffers containing two eyes (only adjust the timings when needed, eg. for |
741 | * "frame packing" or "side by side full"). | 741 | * "frame packing" or "side by side full"). |
742 | * - The CRTC_NO_DBLSCAN and CRTC_NO_VSCAN flags request that adjustment *not* | ||
743 | * be performed for doublescan and vscan > 1 modes respectively. | ||
742 | */ | 744 | */ |
743 | void drm_mode_set_crtcinfo(struct drm_display_mode *p, int adjust_flags) | 745 | void drm_mode_set_crtcinfo(struct drm_display_mode *p, int adjust_flags) |
744 | { | 746 | { |
@@ -765,18 +767,22 @@ void drm_mode_set_crtcinfo(struct drm_display_mode *p, int adjust_flags) | |||
765 | } | 767 | } |
766 | } | 768 | } |
767 | 769 | ||
768 | if (p->flags & DRM_MODE_FLAG_DBLSCAN) { | 770 | if (!(adjust_flags & CRTC_NO_DBLSCAN)) { |
769 | p->crtc_vdisplay *= 2; | 771 | if (p->flags & DRM_MODE_FLAG_DBLSCAN) { |
770 | p->crtc_vsync_start *= 2; | 772 | p->crtc_vdisplay *= 2; |
771 | p->crtc_vsync_end *= 2; | 773 | p->crtc_vsync_start *= 2; |
772 | p->crtc_vtotal *= 2; | 774 | p->crtc_vsync_end *= 2; |
775 | p->crtc_vtotal *= 2; | ||
776 | } | ||
773 | } | 777 | } |
774 | 778 | ||
775 | if (p->vscan > 1) { | 779 | if (!(adjust_flags & CRTC_NO_VSCAN)) { |
776 | p->crtc_vdisplay *= p->vscan; | 780 | if (p->vscan > 1) { |
777 | p->crtc_vsync_start *= p->vscan; | 781 | p->crtc_vdisplay *= p->vscan; |
778 | p->crtc_vsync_end *= p->vscan; | 782 | p->crtc_vsync_start *= p->vscan; |
779 | p->crtc_vtotal *= p->vscan; | 783 | p->crtc_vsync_end *= p->vscan; |
784 | p->crtc_vtotal *= p->vscan; | ||
785 | } | ||
780 | } | 786 | } |
781 | 787 | ||
782 | if (adjust_flags & CRTC_STEREO_DOUBLE) { | 788 | if (adjust_flags & CRTC_STEREO_DOUBLE) { |