On 04.08.2016 22:30, Marek Olšák wrote:
On Tue, Aug 2, 2016 at 4:38 PM, Nicolai Hähnle <nhaeh...@gmail.com> wrote:
On 29.07.2016 23:42, Marek Olšák wrote:
From: Marek Olšák <marek.ol...@amd.com>
---
src/gallium/winsys/amdgpu/drm/amdgpu_cs.c | 2 +-
src/gallium/winsys/radeon/drm/radeon_drm_cs.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c
b/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c
index fb517b9..35e1b48 100644
--- a/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c
+++ b/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c
@@ -935,7 +935,7 @@ void amdgpu_cs_submit_ib(void *job, int thread_index)
fprintf(stderr, "amdgpu: Not enough memory for command
submission.\n");
else
fprintf(stderr, "amdgpu: The CS has been rejected, "
- "see dmesg for more information.\n");
+ "see dmesg for more information (%i).\n", r);
amdgpu_fence_signalled(cs->fence);
} else {
diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_cs.c
b/src/gallium/winsys/radeon/drm/radeon_drm_cs.c
index 606c38d..4a6f005 100644
--- a/src/gallium/winsys/radeon/drm/radeon_drm_cs.c
+++ b/src/gallium/winsys/radeon/drm/radeon_drm_cs.c
@@ -447,7 +447,7 @@ void radeon_drm_cs_emit_ioctl_oneshot(void *job, int
thread_index)
}
} else {
fprintf(stderr, "radeon: The kernel rejected CS, "
- "see dmesg for more information.\n");
+ "see dmesg for more information (%i).\n", r);
}
}
It would be nice to use strerror_r here:
char buf[128];
strerror_r(-r, buf, sizeof(buf));
... then use buf ...
That would also get rid of the ENOMEM special case.
Are you sure that's a good idea? It returns "Cannot allocate memory"
for ENOMEM, which is slightly different from "Not enough memory for
command submission."
I believe they're equally (un)informative for an unaware user, and as
developers we will know the likely underlying reason regardless. But I
admit that it's a bit of bike-shedding.
Also, while I started experimenting with the buffer-list-commit/rollback
thing, I have other things to look at first. So whichever way you decide
on this particular patch, I'm fine with the series as-is. For patches 1-11:
Reviewed-by: Nicolai Hähnle <nicolai.haeh...@amd.com>
Marek
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev