diff options
Diffstat (limited to 'xorg/ati-fix-crtc-dpms-state-check.patch')
-rw-r--r-- | xorg/ati-fix-crtc-dpms-state-check.patch | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/xorg/ati-fix-crtc-dpms-state-check.patch b/xorg/ati-fix-crtc-dpms-state-check.patch new file mode 100644 index 000000000..9fc44ab26 --- /dev/null +++ b/xorg/ati-fix-crtc-dpms-state-check.patch @@ -0,0 +1,47 @@ +From 248e912c487636d7352cfad43c03fc9f19fc2215 Mon Sep 17 00:00:00 2001 +From: Michel Dänzer <michel.daenzer@amd.com> +Date: Fri, 08 Jun 2012 10:18:48 +0000 +Subject: UMS: Fix CRTC DPMS state check. + +Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> +--- +diff --git a/src/radeon_video.c b/src/radeon_video.c +index 01703a0..fcca507 100644 +--- a/src/radeon_video.c ++++ b/src/radeon_video.c +@@ -143,6 +143,22 @@ radeon_box_area(BoxPtr box) + return (int) (box->x2 - box->x1) * (int) (box->y2 - box->y1); + } + ++static Bool ++radeon_crtc_is_enabled(xf86CrtcPtr crtc) ++{ ++ RADEONCrtcPrivatePtr radeon_crtc; ++ ++#ifdef XF86DRM_MODE ++ if (RADEONPTR(crtc->scrn)->cs) { ++ drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; ++ return drmmode_crtc->dpms_mode == DPMSModeOn; ++ } ++#endif ++ ++ radeon_crtc = crtc->driver_private; ++ return radeon_crtc->enabled; ++} ++ + xf86CrtcPtr + radeon_pick_best_crtc(ScrnInfoPtr pScrn, + int x1, int x2, int y1, int y2) +@@ -171,9 +187,8 @@ radeon_pick_best_crtc(ScrnInfoPtr pScrn, + + for (c = 0; c < xf86_config->num_crtc; c++) { + xf86CrtcPtr crtc = xf86_config->crtc[c]; +- drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; + +- if (drmmode_crtc->dpms_mode == DPMSModeOff) ++ if (!radeon_crtc_is_enabled(crtc)) + continue; + + radeon_crtc_box(crtc, &crtc_box); +-- +cgit v0.9.0.2-2-gbebe |