Skip to content

Commit 15939ca

Browse files
mbrost05rodrigovivi
authored andcommitted
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: dd08ebf ("drm/xe: Introduce a new DRM driver for Intel GPUs") Signed-off-by: Matthew Brost <[email protected]> Reviewed-by: Lucas De Marchi <[email protected]> Reviewed-by: Himal Prasad Ghimiray <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] (cherry picked from commit 3396900) Signed-off-by: Rodrigo Vivi <[email protected]>
1 parent 7090d7f commit 15939ca

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

drivers/gpu/drm/xe/xe_mmio.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ static void tiles_fini(void *arg)
3030
int id;
3131

3232
for_each_tile(tile, xe, id)
33-
tile->mmio.regs = NULL;
33+
if (tile != xe_device_get_root_tile(xe))
34+
tile->mmio.regs = NULL;
3435
}
3536

3637
int xe_mmio_probe_tiles(struct xe_device *xe)
@@ -91,9 +92,11 @@ int xe_mmio_probe_tiles(struct xe_device *xe)
9192
static void mmio_fini(void *arg)
9293
{
9394
struct xe_device *xe = arg;
95+
struct xe_tile *root_tile = xe_device_get_root_tile(xe);
9496

9597
pci_iounmap(to_pci_dev(xe->drm.dev), xe->mmio.regs);
9698
xe->mmio.regs = NULL;
99+
root_tile->mmio.regs = NULL;
97100
}
98101

99102
int xe_mmio_init(struct xe_device *xe)

0 commit comments

Comments
 (0)