summaryrefslogtreecommitdiff
path: root/src/gallium
diff options
context:
space:
mode:
authorJosé Roberto de Souza <jose.souza@intel.com>2022-10-06 13:33:15 -0700
committerJosé Roberto de Souza <jose.souza@intel.com>2023-01-25 09:17:15 -0800
commit80dd6ed074bf34f2ca81209c48ae0b551f1c0a68 (patch)
tree4f26056a7a504e1206ad756b0701f3a71b988a0e /src/gallium
parent162695f0b87a6bdea946f00bf08520d6bf335cda (diff)
intel: Add kmd_type parameter to necessary intel_gem.h functions
Here adding kmd_type parameter to intel_gem_read_render_timestamp(), intel_gem_can_render_on_fd() and intel_gem_supports_protected_context(). Those 3 functions will have Xe implementations, the other functions in intel_gem.h will not be called by Xe code paths so not adding kernel_driver_type to it. Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com> Signed-off-by: José Roberto de Souza <jose.souza@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20773>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/crocus/crocus_screen.c2
-rw-r--r--src/gallium/drivers/iris/iris_screen.c5
2 files changed, 4 insertions, 3 deletions
diff --git a/src/gallium/drivers/crocus/crocus_screen.c b/src/gallium/drivers/crocus/crocus_screen.c
index 2614ba861fe..95cfadaa609 100644
--- a/src/gallium/drivers/crocus/crocus_screen.c
+++ b/src/gallium/drivers/crocus/crocus_screen.c
@@ -614,7 +614,7 @@ crocus_get_timestamp(struct pipe_screen *pscreen)
uint64_t result;
if (!intel_gem_read_render_timestamp(crocus_bufmgr_get_fd(screen->bufmgr),
- &result))
+ screen->devinfo.kmd_type, &result))
return 0;
result = intel_device_info_timebase_scale(&screen->devinfo, result);
diff --git a/src/gallium/drivers/iris/iris_screen.c b/src/gallium/drivers/iris/iris_screen.c
index 933cf95c099..ffb78f52695 100644
--- a/src/gallium/drivers/iris/iris_screen.c
+++ b/src/gallium/drivers/iris/iris_screen.c
@@ -641,7 +641,7 @@ iris_get_timestamp(struct pipe_screen *pscreen)
uint64_t result;
if (!intel_gem_read_render_timestamp(iris_bufmgr_get_fd(screen->bufmgr),
- &result))
+ screen->devinfo->kmd_type, &result))
return 0;
result = intel_device_info_timebase_scale(screen->devinfo, result);
@@ -744,10 +744,11 @@ iris_shader_perf_log(void *data, unsigned *id, const char *fmt, ...)
static void
iris_detect_kernel_features(struct iris_screen *screen)
{
+ const struct intel_device_info *devinfo = screen->devinfo;
/* Kernel 5.2+ */
if (intel_gem_supports_syncobj_wait(screen->fd))
screen->kernel_features |= KERNEL_HAS_WAIT_FOR_SUBMIT;
- if (intel_gem_supports_protected_context(screen->fd))
+ if (intel_gem_supports_protected_context(screen->fd, devinfo->kmd_type))
screen->kernel_features |= KERNEL_HAS_PROTECTED_CONTEXT;
}