diff options
author | Michel Dänzer <michel.daenzer@amd.com> | 2017-08-01 17:29:16 +0900 |
---|---|---|
committer | Michel Dänzer <michel@daenzer.net> | 2017-08-03 17:11:30 +0900 |
commit | 4441c7c6dde2d71bd44c3031c5679ee3186ea8f9 (patch) | |
tree | 4bc912ce361c932180f106119f7d6fa028469153 /src/amdgpu_dri2.c | |
parent | 3e08409344a2fd504429522507592f98555bec05 (diff) |
Add drmmode_crtc_can_flip helper
To reduce code duplication between DRI2 and Present. No functional
change intended yet.
(Ported from radeon commit 9bc3eef74452d924f9101c024f66ad9b14c404c8)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'src/amdgpu_dri2.c')
-rw-r--r-- | src/amdgpu_dri2.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/amdgpu_dri2.c b/src/amdgpu_dri2.c index a854ce5..b4cb1ec 100644 --- a/src/amdgpu_dri2.c +++ b/src/amdgpu_dri2.c @@ -655,14 +655,11 @@ can_flip(ScrnInfoPtr pScrn, DrawablePtr draw, xf86CrtcPtr crtc = config->crtc[i]; drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; - if (!crtc->enabled) - continue; - if (!drmmode_crtc || drmmode_crtc->rotate.bo || drmmode_crtc->scanout[drmmode_crtc->scanout_id].bo) return FALSE; - if (drmmode_crtc->pending_dpms_mode == DPMSModeOn) + if (drmmode_crtc_can_flip(crtc)) num_crtcs_on++; } |