[PATCH 1/4] drm/xe: Move xe_root_tile_mmio() to xe_device.h

Summers, Stuart stuart.summers at intel.com
Wed Jun 4 00:12:49 UTC 2025


On Tue, 2025-06-03 at 22:28 +0200, Michal Wajdeczko wrote:
> It seems to be a better place for this helper function.
> 
> Signed-off-by: Michal Wajdeczko <michal.wajdeczko at intel.com>
> Cc: Lucas De Marchi <lucas.demarchi at intel.com>
> Cc: Matt Roper <matthew.d.roper at intel.com>

Would be nice in the commit message to mention this is because the rest
of the mmio structures are per-tile. That said, why not move
xe_mmio_probe_early and xe_mmio_probe_tiles at the same time for a
similar reason?

Reviewed-by: Stuart Summers <stuart.summers at intel.com>

> ---
>  drivers/gpu/drm/xe/xe_device.h | 5 +++++
>  drivers/gpu/drm/xe/xe_mmio.h   | 5 -----
>  2 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_device.h
> b/drivers/gpu/drm/xe/xe_device.h
> index 0bc3bc8e6803..884e8e4fddbf 100644
> --- a/drivers/gpu/drm/xe/xe_device.h
> +++ b/drivers/gpu/drm/xe/xe_device.h
> @@ -117,6 +117,11 @@ static inline struct xe_gt
> *xe_root_mmio_gt(struct xe_device *xe)
>         return xe_device_get_root_tile(xe)->primary_gt;
>  }
>  
> +static inline struct xe_mmio *xe_root_tile_mmio(struct xe_device
> *xe)
> +{
> +       return &xe->tiles[0].mmio;
> +}
> +
>  static inline bool xe_device_uc_enabled(struct xe_device *xe)
>  {
>         return !xe->info.force_execlist;
> diff --git a/drivers/gpu/drm/xe/xe_mmio.h
> b/drivers/gpu/drm/xe/xe_mmio.h
> index c151ba569003..540bade24790 100644
> --- a/drivers/gpu/drm/xe/xe_mmio.h
> +++ b/drivers/gpu/drm/xe/xe_mmio.h
> @@ -37,9 +37,4 @@ static inline u32 xe_mmio_adjusted_addr(const
> struct xe_mmio *mmio, u32 addr)
>         return addr;
>  }
>  
> -static inline struct xe_mmio *xe_root_tile_mmio(struct xe_device
> *xe)
> -{
> -       return &xe->tiles[0].mmio;
> -}
> -
>  #endif



More information about the Intel-xe mailing list