summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichel Dänzer <michel.daenzer@amd.com>2016-08-25 18:22:34 +0900
committerMichel Dänzer <michel@daenzer.net>2016-09-15 16:45:02 +0900
commit08672d31a616060d23a2e1543643eafa97bfe236 (patch)
tree9688d0a7876a6ca7b76a1c64fd56063917be7467
parenta12ff1c6aec4453a6f64878cc64961488e803ed1 (diff)
Also call drmmode_clear_pending_flip from radeon_scanout_flip_abort
Not doing so could break DPMS with TearFree. Reported-and-Tested-by: furkan on IRC Fixes: 9090309e057d ("Wait for pending flips to complete before turning off an output or CRTC") Reviewed-by: Alex Deucher <alexander.deucher@amd.com> (Cherry picked from commit e520ce0ec0adf91ddce5c932d4b3f9477fd49304)
-rw-r--r--src/drmmode_display.c2
-rw-r--r--src/drmmode_display.h1
-rw-r--r--src/radeon_kms.c2
3 files changed, 3 insertions, 2 deletions
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 1ee271c0..e79065a2 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -2195,7 +2195,7 @@ static const xf86CrtcConfigFuncsRec drmmode_xf86crtc_config_funcs = {
drmmode_xf86crtc_resize
};
-static void
+void
drmmode_clear_pending_flip(xf86CrtcPtr crtc)
{
drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
diff --git a/src/drmmode_display.h b/src/drmmode_display.h
index 59b2f9b0..bbb827ce 100644
--- a/src/drmmode_display.h
+++ b/src/drmmode_display.h
@@ -149,6 +149,7 @@ extern int drmmode_get_crtc_id(xf86CrtcPtr crtc);
extern int drmmode_get_height_align(ScrnInfoPtr scrn, uint32_t tiling);
extern int drmmode_get_pitch_align(ScrnInfoPtr scrn, int bpe, uint32_t tiling);
extern int drmmode_get_base_align(ScrnInfoPtr scrn, int bpe, uint32_t tiling);
+extern void drmmode_clear_pending_flip(xf86CrtcPtr crtc);
Bool radeon_do_pageflip(ScrnInfoPtr scrn, ClientPtr client,
uint32_t new_front_handle, uint64_t id, void *data,
diff --git a/src/radeon_kms.c b/src/radeon_kms.c
index 00918a69..f9abc098 100644
--- a/src/radeon_kms.c
+++ b/src/radeon_kms.c
@@ -556,7 +556,7 @@ radeon_scanout_flip_abort(xf86CrtcPtr crtc, void *event_data)
drmmode_crtc_private_ptr drmmode_crtc = event_data;
drmmode_crtc->scanout_update_pending = FALSE;
- drmmode_crtc->flip_pending = FALSE;
+ drmmode_clear_pending_flip(crtc);
}
static void