[Intel-xe] [PATCH 07/12] drm/xe: Move xe_mmio_probe_tiles outside of MMIO setup
Michał Winiarski
michal.winiarski at intel.com
Wed Nov 8 00:33:39 UTC 2023
MMIO is going to be setup earlier during probe. Move xe_mmio_probe_tiles
outside of MMIO setup.
Signed-off-by: Michał Winiarski <michal.winiarski at intel.com>
---
drivers/gpu/drm/xe/xe_device.c | 2 ++
drivers/gpu/drm/xe/xe_mmio.c | 4 +---
drivers/gpu/drm/xe/xe_mmio.h | 1 +
3 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/xe/xe_device.c b/drivers/gpu/drm/xe/xe_device.c
index 3bcda5626493a..53be4f0424c21 100644
--- a/drivers/gpu/drm/xe/xe_device.c
+++ b/drivers/gpu/drm/xe/xe_device.c
@@ -392,6 +392,8 @@ int xe_device_probe(struct xe_device *xe)
if (err)
return err;
+ xe_mmio_probe_tiles(xe);
+
err = drmm_add_action_or_reset(&xe->drm, xe_driver_flr_fini, xe);
if (err)
return err;
diff --git a/drivers/gpu/drm/xe/xe_mmio.c b/drivers/gpu/drm/xe/xe_mmio.c
index 7329ca73e64ad..ff968ef611cac 100644
--- a/drivers/gpu/drm/xe/xe_mmio.c
+++ b/drivers/gpu/drm/xe/xe_mmio.c
@@ -306,7 +306,7 @@ int xe_mmio_probe_vram(struct xe_device *xe)
return 0;
}
-static void xe_mmio_probe_tiles(struct xe_device *xe)
+void xe_mmio_probe_tiles(struct xe_device *xe)
{
size_t tile_mmio_size = SZ_16M, tile_mmio_ext_size = xe->info.tile_mmio_ext_size;
u8 id, tile_count = xe->info.tile_count;
@@ -398,8 +398,6 @@ int xe_mmio_init(struct xe_device *xe)
root_tile->mmio.size = xe->mmio.size;
root_tile->mmio.regs = xe->mmio.regs;
- xe_mmio_probe_tiles(xe);
-
return 0;
}
diff --git a/drivers/gpu/drm/xe/xe_mmio.h b/drivers/gpu/drm/xe/xe_mmio.h
index ae09f777d711d..9f1a25cfd2cf0 100644
--- a/drivers/gpu/drm/xe/xe_mmio.h
+++ b/drivers/gpu/drm/xe/xe_mmio.h
@@ -21,6 +21,7 @@ struct xe_device;
#define GEN12_LMEM_BAR 2
int xe_mmio_init(struct xe_device *xe);
+void xe_mmio_probe_tiles(struct xe_device *xe);
static inline u8 xe_mmio_read8(struct xe_gt *gt, struct xe_reg reg)
{
--
2.42.0
More information about the Intel-xe
mailing list