diff options
author | Marek Olšák <[email protected]> | 2015-07-15 21:14:24 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2015-08-07 00:07:10 +0200 |
commit | 6dea2456ca82d2c62afbd90327d265c5e78fca9c (patch) | |
tree | a660d3b3716bf2615698f83164f70c06c5337014 /src/gallium/winsys/radeon | |
parent | 42d9f6323a523d786fc3797587fdf63048becceb (diff) |
winsys/radeon: add a specific error message for cs_submit -> -ENOMEM
Reviewed-by: Michel Dänzer <[email protected]>
Reviewed-by: Christian König <[email protected]>
Diffstat (limited to 'src/gallium/winsys/radeon')
-rw-r--r-- | src/gallium/winsys/radeon/drm/radeon_drm_cs.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_cs.c b/src/gallium/winsys/radeon/drm/radeon_drm_cs.c index 5fde875c34c..856a4ede8de 100644 --- a/src/gallium/winsys/radeon/drm/radeon_drm_cs.c +++ b/src/gallium/winsys/radeon/drm/radeon_drm_cs.c @@ -406,10 +406,14 @@ static boolean radeon_drm_cs_memory_below_limit(struct radeon_winsys_cs *rcs, ui void radeon_drm_cs_emit_ioctl_oneshot(struct radeon_drm_cs *cs, struct radeon_cs_context *csc) { unsigned i; - - if (drmCommandWriteRead(csc->fd, DRM_RADEON_CS, - &csc->cs, sizeof(struct drm_radeon_cs))) { - if (debug_get_bool_option("RADEON_DUMP_CS", FALSE)) { + int r; + + r = drmCommandWriteRead(csc->fd, DRM_RADEON_CS, + &csc->cs, sizeof(struct drm_radeon_cs)); + if (r) { + if (r == -ENOMEM) + fprintf(stderr, "radeon: Not enough memory for command submission.\n"); + else if (debug_get_bool_option("RADEON_DUMP_CS", FALSE)) { unsigned i; fprintf(stderr, "radeon: The kernel rejected CS, dumping...\n"); |