summaryrefslogtreecommitdiff
path: root/src/amdgpu_dri2.c
diff options
context:
space:
mode:
authorMichel Dänzer <michel.daenzer@amd.com>2016-09-07 18:03:05 +0900
committerMichel Dänzer <michel.daenzer@amd.com>2016-09-07 18:03:05 +0900
commitd166d04f6951f6a48d7d5ce5d31bba857fe0cb06 (patch)
treecaf8674276d914a3466c95b07e08ac4d04f774d1 /src/amdgpu_dri2.c
parent6a1ba044c2b71081e6060d0c096917d6238f2145 (diff)
Add explicit AMDGPU_DRM_QUEUE_ERROR define
Should make the amdgpu_drm_queue_alloc error handling clearer, and gets rid of a compile warning about it returning NULL. (Ported from radeon commit a37af701768b12d86868a831a79f1e02ee4968cf) Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'src/amdgpu_dri2.c')
-rw-r--r--src/amdgpu_dri2.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/amdgpu_dri2.c b/src/amdgpu_dri2.c
index 1cbf1eb..31ac3f3 100644
--- a/src/amdgpu_dri2.c
+++ b/src/amdgpu_dri2.c
@@ -1035,7 +1035,7 @@ static int amdgpu_dri2_schedule_wait_msc(ClientPtr client, DrawablePtr draw,
drm_queue_seq = amdgpu_drm_queue_alloc(crtc, client, AMDGPU_DRM_QUEUE_ID_DEFAULT,
wait_info, amdgpu_dri2_frame_event_handler,
amdgpu_dri2_frame_event_abort);
- if (!drm_queue_seq) {
+ if (drm_queue_seq == AMDGPU_DRM_QUEUE_ERROR) {
xf86DrvMsg(scrn->scrnIndex, X_WARNING,
"Allocating DRM queue event entry failed.\n");
goto out_complete;
@@ -1183,7 +1183,7 @@ static int amdgpu_dri2_schedule_swap(ClientPtr client, DrawablePtr draw,
drm_queue_seq = amdgpu_drm_queue_alloc(crtc, client, AMDGPU_DRM_QUEUE_ID_DEFAULT,
swap_info, amdgpu_dri2_frame_event_handler,
amdgpu_dri2_frame_event_abort);
- if (!drm_queue_seq) {
+ if (drm_queue_seq == AMDGPU_DRM_QUEUE_ERROR) {
xf86DrvMsg(scrn->scrnIndex, X_WARNING,
"Allocating DRM queue entry failed.\n");
goto blit_fallback;