From 494ecef6b42198ab6c3eaa8b3e5222643e1e44ff Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 13 May 2019 14:03:07 -0700 Subject: freedreno: Add support for drm-shim. I'm using this for shader-db analysis on x86_64 systems. Reviewed-by: Rob Clark --- src/drm-shim/device.c | 4 ++++ src/drm-shim/drm_shim.h | 1 + 2 files changed, 5 insertions(+) (limited to 'src/drm-shim') diff --git a/src/drm-shim/device.c b/src/drm-shim/device.c index fe1cbbba351..8020c2ae5cc 100644 --- a/src/drm-shim/device.c +++ b/src/drm-shim/device.c @@ -130,6 +130,10 @@ drm_shim_ioctl_version(int fd, unsigned long request, void *arg) const char *date = "20190320"; const char *desc = "shim"; + args->version_major = shim_device.version_major; + args->version_minor = shim_device.version_minor; + args->version_patchlevel = shim_device.version_patchlevel; + if (args->name) strncpy(args->name, shim_device.driver_name, args->name_len); if (args->date) diff --git a/src/drm-shim/drm_shim.h b/src/drm-shim/drm_shim.h index b14353a7962..2cd053f6d65 100644 --- a/src/drm-shim/drm_shim.h +++ b/src/drm-shim/drm_shim.h @@ -43,6 +43,7 @@ struct shim_device { /* Returned by drmGetVersion(). */ const char *driver_name; + int version_major, version_minor, version_patchlevel; }; extern struct shim_device shim_device; -- cgit v1.2.3