[Intel-xe] [PATCH v3 05/20] drm/xe: Move xe_mmio_probe_tiles outside of MMIO setup
Michał Winiarski
michal.winiarski at intel.com
Tue Nov 14 13:02:16 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>
Reviewed-by: Matthew Brost <matthew.brost 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 ef5099eabde0a..e9dfbf44f7534 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 1076ffdb3f92b..5a6053a61f301 100644
--- a/drivers/gpu/drm/xe/xe_mmio.c
+++ b/drivers/gpu/drm/xe/xe_mmio.c
@@ -294,7 +294,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;
@@ -408,8 +408,6 @@ int xe_mmio_init(struct xe_device *xe)
if (err)
return err;
- 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.1
More information about the Intel-xe
mailing list