diff options
author | Ilija Hadzic <ihadzic@research.bell-labs.com> | 2012-12-19 10:35:43 -0500 |
---|---|---|
committer | Michel Dänzer <michel.daenzer@amd.com> | 2013-01-03 10:59:37 +0100 |
commit | 6981a5c087165b126c15ba0025cffdba218ab652 (patch) | |
tree | 09abdf221318025fdd9b93c0e04f2d1ec3a038c4 /src/radeon_video.c | |
parent | 3657672207322be651cdb94a811337b7c5668c84 (diff) |
DRI2: limit the swap rate when CRTC is in DPMS-off state
If drawable is displayed on a CRTC and relevant CRTC is in
DPMS off state, defer the swap by a fixed (hard-coded) time.
This patch fixes a bug that caused an application to render
at uncontrolled rate when CRTC goes into DPMS "off" state,
thus thrashing the GPU and CPU and likely offsetting the
power savings achieved by shutting off the display.
Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Diffstat (limited to 'src/radeon_video.c')
-rw-r--r-- | src/radeon_video.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/radeon_video.c b/src/radeon_video.c index 9381e4a3..a0de4f60 100644 --- a/src/radeon_video.c +++ b/src/radeon_video.c @@ -67,8 +67,7 @@ radeon_box_area(BoxPtr box) return (int) (box->x2 - box->x1) * (int) (box->y2 - box->y1); } -static Bool -radeon_crtc_is_enabled(xf86CrtcPtr crtc) +Bool radeon_crtc_is_enabled(xf86CrtcPtr crtc) { drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; return drmmode_crtc->dpms_mode == DPMSModeOn; |