diff options
author | Jesse Barnes <jbarnes@virtuousgeek.org> | 2009-06-24 13:12:25 -0700 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2009-06-24 13:13:07 -0700 |
commit | 5d80e24b5fc6d6028028da6ded35389c08bfce29 (patch) | |
tree | 02571f6b3270a0fe8297f2bd590bd9c8c9bce64f /src/drmmode_display.c | |
parent | 6d025e679a99778496576af9a6a6fa8c043ae811 (diff) |
Treat disabled CRTCs as "not covering" for scanline wait purposes
Now that swapbuffers does a scanline wait to avoid tearing, it's
important to take into account the CRTC status to avoid hangs. If we
do a scanline wait when the CRTC is off (due to DPMS for example) we'll
hang the GPU. So add some code to check the CRTC DPMS status to the
i830_covering_crtc function, returning NULL if none of the covering
CRTCs are actually active. KMS vs UMS logic is hidden in new i830*
functions, cleaning up both DRI2 & video paths a bit.
Fixes fdo bug #22383.
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'src/drmmode_display.c')
-rw-r--r-- | src/drmmode_display.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/drmmode_display.c b/src/drmmode_display.c index 02a71ae0..8f45e84e 100644 --- a/src/drmmode_display.c +++ b/src/drmmode_display.c @@ -71,7 +71,7 @@ typedef struct { int num_props; drmmode_prop_ptr props; void *private_data; - /* this is used to store private data */ + int dpms_mode; } drmmode_output_private_rec, *drmmode_output_private_ptr; static void @@ -727,6 +727,7 @@ drmmode_output_dpms(xf86OutputPtr output, int mode) drmmode_output->output_id, props->prop_id, mode); + drmmode_output->dpms_mode = mode; drmModeFreeProperty(props); return; } @@ -734,6 +735,14 @@ drmmode_output_dpms(xf86OutputPtr output, int mode) } } +int +drmmode_output_dpms_status(xf86OutputPtr output) +{ + drmmode_output_private_ptr drmmode_output = output->driver_private; + + return drmmode_output->dpms_mode; +} + static Bool drmmode_property_ignore(drmModePropertyPtr prop) { |