intel: don't assume Linux minor dev node
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Cc: mesa-stable Acked-by: Emma Anholt <emma@anholt.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24744>
This commit is contained in:
committed by
Marge Bot
parent
6857497be6
commit
a851dc5e3c
@@ -183,10 +183,7 @@ void iris_utrace_init(struct iris_context *ice)
|
||||
else
|
||||
minor = 0;
|
||||
|
||||
/* We could be dealing with /dev/dri/card0 or /dev/dri/renderD128 so to get
|
||||
* a GPU ID we % 128 the minor number.
|
||||
*/
|
||||
intel_ds_device_init(&ice->ds, screen->devinfo, screen->fd, minor % 128,
|
||||
intel_ds_device_init(&ice->ds, screen->devinfo, screen->fd, minor,
|
||||
INTEL_DS_API_OPENGL);
|
||||
|
||||
u_trace_context_init(&ice->ds.trace_context, &ice->ctx,
|
||||
|
||||
@@ -548,7 +548,6 @@ intel_ds_device_init(struct intel_ds_device *device,
|
||||
{
|
||||
memset(device, 0, sizeof(*device));
|
||||
|
||||
assert(gpu_id < 128);
|
||||
device->gpu_id = gpu_id;
|
||||
device->gpu_clock_id = intel_pps_clock_id(gpu_id);
|
||||
device->fd = drm_fd;
|
||||
|
||||
@@ -423,7 +423,7 @@ anv_device_utrace_init(struct anv_device *device)
|
||||
{
|
||||
anv_bo_pool_init(&device->utrace_bo_pool, device, "utrace");
|
||||
intel_ds_device_init(&device->ds, device->info, device->fd,
|
||||
device->physical->local_minor - 128,
|
||||
device->physical->local_minor,
|
||||
INTEL_DS_API_VULKAN);
|
||||
u_trace_context_init(&device->ds.trace_context,
|
||||
&device->ds,
|
||||
|
||||
@@ -271,7 +271,7 @@ anv_device_utrace_init(struct anv_device *device)
|
||||
{
|
||||
anv_bo_pool_init(&device->utrace_bo_pool, device, "utrace");
|
||||
intel_ds_device_init(&device->ds, device->info, device->fd,
|
||||
device->physical->local_minor - 128,
|
||||
device->physical->local_minor,
|
||||
INTEL_DS_API_VULKAN);
|
||||
u_trace_context_init(&device->ds.trace_context,
|
||||
&device->ds,
|
||||
|
||||
Reference in New Issue
Block a user