diff options
author | Michel Dänzer <michel.daenzer@amd.com> | 2017-07-27 15:46:41 +0900 |
---|---|---|
committer | Michel Dänzer <michel@daenzer.net> | 2017-08-02 18:54:54 +0900 |
commit | 9bc3eef74452d924f9101c024f66ad9b14c404c8 (patch) | |
tree | cf41b11503e79f72c38aba09bffb93f0eae7c203 /src/radeon_dri2.c | |
parent | c2d26890691ec105858f086b63170ad94c6f7f05 (diff) |
Add drmmode_crtc_can_flip helper
To reduce code duplication between DRI2 and Present. No functional
change intended yet.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'src/radeon_dri2.c')
-rw-r--r-- | src/radeon_dri2.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/radeon_dri2.c b/src/radeon_dri2.c index 35fb60d9..70751b0b 100644 --- a/src/radeon_dri2.c +++ b/src/radeon_dri2.c @@ -774,14 +774,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++; } |