Commit 3396900a authored by Matthew Brost's avatar Matthew Brost

drm/xe: Fix tile fini sequence

Only set tile->mmio.regs to NULL if not the root tile in tile_fini. The
root tile mmio regs is setup ealier in MMIO init thus it should be set
to NULL in mmio_fini.

Fixes: dd08ebf6 ("drm/xe: Introduce a new DRM driver for Intel GPUs")
Signed-off-by: default avatarMatthew Brost <matthew.brost@intel.com>
Reviewed-by: default avatarLucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: default avatarHimal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240809232830.3302251-1-matthew.brost@intel.com
parent 8d3a2d3d
...@@ -30,7 +30,8 @@ static void tiles_fini(void *arg) ...@@ -30,7 +30,8 @@ static void tiles_fini(void *arg)
int id; int id;
for_each_tile(tile, xe, id) for_each_tile(tile, xe, id)
tile->mmio.regs = NULL; if (tile != xe_device_get_root_tile(xe))
tile->mmio.regs = NULL;
} }
/* /*
...@@ -146,9 +147,11 @@ int xe_mmio_probe_tiles(struct xe_device *xe) ...@@ -146,9 +147,11 @@ int xe_mmio_probe_tiles(struct xe_device *xe)
static void mmio_fini(void *arg) static void mmio_fini(void *arg)
{ {
struct xe_device *xe = arg; struct xe_device *xe = arg;
struct xe_tile *root_tile = xe_device_get_root_tile(xe);
pci_iounmap(to_pci_dev(xe->drm.dev), xe->mmio.regs); pci_iounmap(to_pci_dev(xe->drm.dev), xe->mmio.regs);
xe->mmio.regs = NULL; xe->mmio.regs = NULL;
root_tile->mmio.regs = NULL;
} }
int xe_mmio_init(struct xe_device *xe) int xe_mmio_init(struct xe_device *xe)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment