diff options
author | Michel Dänzer <michel.daenzer@amd.com> | 2016-07-06 12:46:01 +0900 |
---|---|---|
committer | Michel Dänzer <michel@daenzer.net> | 2016-07-22 19:08:38 +0900 |
commit | a37af701768b12d86868a831a79f1e02ee4968cf (patch) | |
tree | 438daae31206b52bf0eb8406360d042dd8ed2cca /src/radeon_dri2.c | |
parent | 024afff27eb9f4c60043214099ddb42bbfb3d289 (diff) |
Add explicit RADEON_DRM_QUEUE_ERROR define
Should make the radeon_drm_queue_alloc error handling clearer, and gets
rid of a compile warning about it returning NULL.
Reviewed-by: Alexandre Demers <alexandre.f.demers@gmail.com>
Diffstat (limited to 'src/radeon_dri2.c')
-rw-r--r-- | src/radeon_dri2.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/radeon_dri2.c b/src/radeon_dri2.c index 62325bde..c55e6ee8 100644 --- a/src/radeon_dri2.c +++ b/src/radeon_dri2.c @@ -1201,7 +1201,7 @@ static int radeon_dri2_schedule_wait_msc(ClientPtr client, DrawablePtr draw, drm_queue_seq = radeon_drm_queue_alloc(crtc, client, RADEON_DRM_QUEUE_ID_DEFAULT, wait_info, radeon_dri2_frame_event_handler, radeon_dri2_frame_event_abort); - if (!drm_queue_seq) { + if (drm_queue_seq == RADEON_DRM_QUEUE_ERROR) { xf86DrvMsg(scrn->scrnIndex, X_WARNING, "Allocating DRM queue event entry failed.\n"); goto out_complete; @@ -1348,7 +1348,7 @@ static int radeon_dri2_schedule_swap(ClientPtr client, DrawablePtr draw, drm_queue_seq = radeon_drm_queue_alloc(crtc, client, RADEON_DRM_QUEUE_ID_DEFAULT, swap_info, radeon_dri2_frame_event_handler, radeon_dri2_frame_event_abort); - if (!drm_queue_seq) { + if (drm_queue_seq == RADEON_DRM_QUEUE_ERROR) { xf86DrvMsg(scrn->scrnIndex, X_WARNING, "Allocating DRM queue entry failed.\n"); goto blit_fallback; |