summaryrefslogtreecommitdiff
path: root/src/radeon_kms.c
diff options
context:
space:
mode:
authorMichel Dänzer <michel.daenzer@amd.com>2017-08-03 17:51:20 +0900
committerMichel Dänzer <michel@daenzer.net>2017-08-17 15:42:45 +0900
commite6d7dc2070f4d21a6900916bb70a31839112882c (patch)
treeea3ce0e1c69ad437577e02e76dc8d831d576da58 /src/radeon_kms.c
parentf87acdbfb1b0b6d2769764772a52ea8b81675e20 (diff)
Wait for pending flips synchronously before turning off a CRTC
Allows removing drmmode_clear_pending_flip and the pending_dpms_mode field and cleaning up the code considerably. Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'src/radeon_kms.c')
-rw-r--r--src/radeon_kms.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/radeon_kms.c b/src/radeon_kms.c
index 423d36cb..977504d9 100644
--- a/src/radeon_kms.c
+++ b/src/radeon_kms.c
@@ -732,7 +732,7 @@ radeon_prime_scanout_update(PixmapDirtyUpdatePtr dirty)
drmmode_crtc = xf86_crtc->driver_private;
if (drmmode_crtc->scanout_update_pending ||
!drmmode_crtc->scanout[drmmode_crtc->scanout_id].pixmap ||
- drmmode_crtc->pending_dpms_mode != DPMSModeOn)
+ drmmode_crtc->dpms_mode != DPMSModeOn)
return;
drm_queue_seq = radeon_drm_queue_alloc(xf86_crtc,
@@ -761,10 +761,12 @@ radeon_prime_scanout_update(PixmapDirtyUpdatePtr dirty)
static void
radeon_prime_scanout_flip_abort(xf86CrtcPtr crtc, void *event_data)
{
+ RADEONEntPtr pRADEONEnt = RADEONEntPriv(crtc->scrn);
drmmode_crtc_private_ptr drmmode_crtc = event_data;
drmmode_crtc->scanout_update_pending = FALSE;
- drmmode_clear_pending_flip(crtc);
+ drmmode_fb_reference(pRADEONEnt->fd, &drmmode_crtc->flip_pending,
+ NULL);
}
static void
@@ -796,7 +798,7 @@ radeon_prime_scanout_flip(PixmapDirtyUpdatePtr ent)
drmmode_crtc = crtc->driver_private;
if (drmmode_crtc->scanout_update_pending ||
!drmmode_crtc->scanout[drmmode_crtc->scanout_id].pixmap ||
- drmmode_crtc->pending_dpms_mode != DPMSModeOn)
+ drmmode_crtc->dpms_mode != DPMSModeOn)
return;
scanout_id = drmmode_crtc->scanout_id ^ 1;
@@ -1022,7 +1024,7 @@ radeon_scanout_update(xf86CrtcPtr xf86_crtc)
if (!xf86_crtc->enabled ||
drmmode_crtc->scanout_update_pending ||
- drmmode_crtc->pending_dpms_mode != DPMSModeOn)
+ drmmode_crtc->dpms_mode != DPMSModeOn)
return;
pDamage = drmmode_crtc->scanout_damage;
@@ -1088,7 +1090,7 @@ radeon_scanout_flip(ScreenPtr pScreen, RADEONInfoPtr info,
unsigned scanout_id;
if (drmmode_crtc->scanout_update_pending ||
- drmmode_crtc->pending_dpms_mode != DPMSModeOn)
+ drmmode_crtc->dpms_mode != DPMSModeOn)
return;
scanout_id = drmmode_crtc->scanout_id ^ 1;