[Mesa-dev] [PATCH] dri: Include kernel release in vendor info
Chris Wilson
chris at chris-wilson.co.uk
Tue Oct 9 13:24:24 UTC 2018
The userspace driver does not exist in isolation and occasionally
depends on kernel uapi, and so it is useful in bug reports to include
that information. (radeonsi, r600 and radv already include utsname)
References: https://bugs.freedesktop.org/show_bug.cgi?id=108282
---
src/mesa/drivers/dri/common/utils.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/mesa/drivers/dri/common/utils.c b/src/mesa/drivers/dri/common/utils.c
index 5a66bcf8e05..4d0d654dbfd 100644
--- a/src/mesa/drivers/dri/common/utils.c
+++ b/src/mesa/drivers/dri/common/utils.c
@@ -34,6 +34,8 @@
#include <stdlib.h>
#include <stdbool.h>
#include <stdint.h>
+#include <sys/utsname.h>
+
#include "main/macros.h"
#include "main/mtypes.h"
#include "main/cpuinfo.h"
@@ -77,11 +79,15 @@ unsigned
driGetRendererString( char * buffer, const char * hardware_name,
GLuint agp_mode )
{
+ struct utsname uts;
unsigned offset;
char *cpu;
offset = sprintf( buffer, "Mesa DRI %s", hardware_name );
+ if (uname(&uts) == 0)
+ offset += sprintf(buffer + offset, " [%s]", uts.release);
+
/* Append any AGP-specific information.
*/
switch ( agp_mode ) {
--
2.19.1
More information about the mesa-dev
mailing list