From 191f9a39c9db3e62f59b33173af6b4a0cdf39f6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Roberto=20de=20Souza?= Date: Tue, 11 Oct 2022 12:14:35 -0700 Subject: [PATCH] iris: Nuke pci_id from iris_screen MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We have the same information in devinfo. Signed-off-by: José Roberto de Souza Reviewed-by: Lionel Landwerlin Part-of: --- src/gallium/drivers/iris/iris_disk_cache.c | 2 +- src/gallium/drivers/iris/iris_screen.c | 3 +-- src/gallium/drivers/iris/iris_screen.h | 3 --- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/gallium/drivers/iris/iris_disk_cache.c b/src/gallium/drivers/iris/iris_disk_cache.c index 520bfd83397..777d9e8a327 100644 --- a/src/gallium/drivers/iris/iris_disk_cache.c +++ b/src/gallium/drivers/iris/iris_disk_cache.c @@ -268,7 +268,7 @@ iris_disk_cache_init(struct iris_screen *screen) /* array length = print length + nul char + 1 extra to verify it's unused */ char renderer[11]; UNUSED int len = - snprintf(renderer, sizeof(renderer), "iris_%04x", screen->pci_id); + snprintf(renderer, sizeof(renderer), "iris_%04x", screen->devinfo.pci_device_id); assert(len == sizeof(renderer) - 2); const struct build_id_note *note = diff --git a/src/gallium/drivers/iris/iris_screen.c b/src/gallium/drivers/iris/iris_screen.c index 58e6d9f91cd..609a86e3c9a 100644 --- a/src/gallium/drivers/iris/iris_screen.c +++ b/src/gallium/drivers/iris/iris_screen.c @@ -358,7 +358,7 @@ iris_get_param(struct pipe_screen *pscreen, enum pipe_cap param) case PIPE_CAP_VENDOR_ID: return 0x8086; case PIPE_CAP_DEVICE_ID: - return screen->pci_id; + return screen->devinfo.pci_device_id; case PIPE_CAP_VIDEO_MEMORY: return iris_get_video_memory(screen); case PIPE_CAP_MAX_SHADER_PATCH_VARYINGS: @@ -787,7 +787,6 @@ iris_screen_create(int fd, const struct pipe_screen_config *config) if (!intel_get_device_info_from_fd(fd, &screen->devinfo)) return NULL; - screen->pci_id = screen->devinfo.pci_device_id; p_atomic_set(&screen->refcount, 1); diff --git a/src/gallium/drivers/iris/iris_screen.h b/src/gallium/drivers/iris/iris_screen.h index ab3778130b6..5dffa9fcfa6 100644 --- a/src/gallium/drivers/iris/iris_screen.h +++ b/src/gallium/drivers/iris/iris_screen.h @@ -165,9 +165,6 @@ struct iris_screen { */ int winsys_fd; - /** PCI ID for our GPU device */ - int pci_id; - struct iris_vtable vtbl; /** Global program_string_id counter (see get_program_string_id()) */