diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/winsys/radeon/drm/radeon_drm_bo.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c index f4ed3ce632b..f6d5c8a51c3 100644 --- a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c +++ b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c @@ -186,8 +186,13 @@ static enum radeon_bo_domain radeon_bo_get_initial_domain( args.handle = bo->handle; args.op = RADEON_GEM_OP_GET_INITIAL_DOMAIN; - drmCommandWriteRead(bo->rws->fd, DRM_RADEON_GEM_OP, - &args, sizeof(args)); + if (drmCommandWriteRead(bo->rws->fd, DRM_RADEON_GEM_OP, + &args, sizeof(args))) { + fprintf(stderr, "radeon: failed to get initial domain: %p 0x%08X\n", + bo, bo->handle); + /* Default domain as returned by get_valid_domain. */ + return RADEON_DOMAIN_VRAM_GTT; + } /* GEM domains and winsys domains are defined the same. */ return get_valid_domain(args.value); |