summaryrefslogtreecommitdiff
path: root/src/amdgpu_dri2.c
diff options
context:
space:
mode:
authorMichel Dänzer <michel.daenzer@amd.com>2017-07-13 17:35:55 +0900
committerMichel Dänzer <michel.daenzer@amd.com>2017-07-13 17:35:55 +0900
commit88147c1a532a9275eb57e14d8c11be41bf4c1fe1 (patch)
tree34bda1cddc22d6876b46a95e88eb862de5045308 /src/amdgpu_dri2.c
parente90721ba654d70db5eeb1cf552308c73151530ee (diff)
Use drmmode_crtc->scanout_id instead of 0 to check for scanout buffer
Preparation for following change, no functional change intended. (Ported from radeon commit aff267ee36cc6a703a532f91f82adc1ba1425ff3) Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'src/amdgpu_dri2.c')
-rw-r--r--src/amdgpu_dri2.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/amdgpu_dri2.c b/src/amdgpu_dri2.c
index 8dde293..a854ce5 100644
--- a/src/amdgpu_dri2.c
+++ b/src/amdgpu_dri2.c
@@ -608,7 +608,8 @@ can_exchange(ScrnInfoPtr pScrn, DrawablePtr draw,
drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
if (crtc->enabled &&
- (crtc->rotatedData || drmmode_crtc->scanout[0].bo))
+ (crtc->rotatedData ||
+ drmmode_crtc->scanout[drmmode_crtc->scanout_id].bo))
return FALSE;
}
@@ -658,7 +659,7 @@ can_flip(ScrnInfoPtr pScrn, DrawablePtr draw,
continue;
if (!drmmode_crtc || drmmode_crtc->rotate.bo ||
- drmmode_crtc->scanout[0].bo)
+ drmmode_crtc->scanout[drmmode_crtc->scanout_id].bo)
return FALSE;
if (drmmode_crtc->pending_dpms_mode == DPMSModeOn)