[PATCH v1 1/2] drm/xe: Rename wait_for_lmem_ready and make it non-static

Riana Tauro riana.tauro at intel.com
Tue Apr 22 14:44:25 UTC 2025


Hi Karthik

On 4/21/2025 7:20 PM, Karthik Poosa wrote:
> Rename wait_for_lmem_ready to wait_for_vram_ready.
> Convert it to non-static to enable calls from other functions.
> 
> Signed-off-by: Karthik Poosa <karthik.poosa at intel.com>
> ---
>   drivers/gpu/drm/xe/xe_device.c | 6 +++---
>   drivers/gpu/drm/xe/xe_device.h | 1 +
>   2 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 75e753e0a682..fb178315d3df 100644
> --- a/drivers/gpu/drm/xe/xe_device.c
> +++ b/drivers/gpu/drm/xe/xe_device.c
> @@ -630,7 +630,7 @@ static bool verify_lmem_ready(struct xe_device *xe)
Since you are renaming to vram, rename this method too>   	return !!val;
>   }
>   
> -static int wait_for_lmem_ready(struct xe_device *xe)
> +int wait_for_vram_ready(struct xe_device *xe)
use xe_device prefix, all functions in this file follow this convention>   {
>   	unsigned long timeout, start;
>   
> @@ -676,7 +676,7 @@ static int wait_for_lmem_ready(struct xe_device *xe)
>   
>   	return 0;
>   }
> -ALLOW_ERROR_INJECTION(wait_for_lmem_ready, ERRNO); /* See xe_pci_probe() */
> +ALLOW_ERROR_INJECTION(wait_for_vram_ready, ERRNO); /* See xe_pci_probe() */
Also send a patch modifying xe_fault_injection igt

Thanks
Riana>
>   static void sriov_update_device_info(struct xe_device *xe)
>   {
> @@ -727,7 +727,7 @@ int xe_device_probe_early(struct xe_device *xe)
>   		return save_err;
>   	}
>   
> -	err = wait_for_lmem_ready(xe);
> +	err = wait_for_vram_ready(xe);
>   	if (err)
>   		return err;
>   
> diff --git a/drivers/gpu/drm/xe/xe_device.h b/drivers/gpu/drm/xe/xe_device.h
> index 0bc3bc8e6803..dc79b3812d66 100644
> --- a/drivers/gpu/drm/xe/xe_device.h
> +++ b/drivers/gpu/drm/xe/xe_device.h
> @@ -47,6 +47,7 @@ int xe_device_probe_early(struct xe_device *xe);
>   int xe_device_probe(struct xe_device *xe);
>   void xe_device_remove(struct xe_device *xe);
>   void xe_device_shutdown(struct xe_device *xe);
> +int wait_for_vram_ready(struct xe_device *xe);
>   
>   void xe_device_wmb(struct xe_device *xe);
>   



More information about the Intel-xe mailing list