[PATCH 3/8] drm/xe: Helper to get tile from memory region

Hellstrom, Thomas thomas.hellstrom at intel.com
Tue Mar 19 09:28:13 UTC 2024


On Mon, 2024-03-18 at 22:55 -0400, Oak Zeng wrote:
> A simple helper to retrieve tile from memory region

Again, Imperative language and kerneloc.

/Thomas


> 
> v1: move the function to xe_device.h (Matt)
> 
> Signed-off-by: Oak Zeng <oak.zeng at intel.com>
> ---
>  drivers/gpu/drm/xe/xe_device.h | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/gpu/drm/xe/xe_device.h
> b/drivers/gpu/drm/xe/xe_device.h
> index 14be34d9f543..4735268cf07f 100644
> --- a/drivers/gpu/drm/xe/xe_device.h
> +++ b/drivers/gpu/drm/xe/xe_device.h
> @@ -176,4 +176,9 @@ void xe_device_snapshot_print(struct xe_device
> *xe, struct drm_printer *p);
>  u64 xe_device_canonicalize_addr(struct xe_device *xe, u64 address);
>  u64 xe_device_uncanonicalize_addr(struct xe_device *xe, u64
> address);
>  
> +static inline struct xe_tile *xe_mem_region_to_tile(struct
> xe_mem_region *mr)
> +{
> +	return container_of(mr, struct xe_tile, mem.vram);
> +}
> +
>  #endif



More information about the Intel-xe mailing list