On Tue, Sep 30, 2025 at 11:18:18AM +0530, Akhil P Oommen wrote:
> AQE (Applicaton Qrisc Engine) is a dedicated core inside CP which aides
> in Raytracing related workloads. Add support for loading the AQE firmware
> and initialize the necessary registers.
> 
> Signed-off-by: Akhil P Oommen <[email protected]>
> ---
>  drivers/gpu/drm/msm/adreno/a6xx_gpu.c   | 24 ++++++++++++++++++++++++
>  drivers/gpu/drm/msm/adreno/a6xx_gpu.h   |  2 ++
>  drivers/gpu/drm/msm/adreno/a8xx_gpu.c   |  3 +++
>  drivers/gpu/drm/msm/adreno/adreno_gpu.h |  1 +
>  4 files changed, 30 insertions(+)
> 
> diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c 
> b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
> index 
> 4aeeaceb1fb30a9d68ac636c14249e3853ef73ac..07ac5be9d0bccf4d2345eb76b08851a94187e861
>  100644
> --- a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
> +++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
> @@ -1093,6 +1093,30 @@ static int a6xx_ucode_load(struct msm_gpu *gpu)
>               }
>       }
>  
> +     if (!a6xx_gpu->aqe_bo && adreno_gpu->fw[ADRENO_FW_AQE]) {
> +             a6xx_gpu->aqe_bo = adreno_fw_create_bo(gpu,
> +                     adreno_gpu->fw[ADRENO_FW_AQE], &a6xx_gpu->aqe_iova);
> +
> +             if (IS_ERR(a6xx_gpu->aqe_bo)) {
> +                     int ret = PTR_ERR(a6xx_gpu->aqe_bo);
> +
> +                     a6xx_gpu->aqe_bo = NULL;
> +                     DRM_DEV_ERROR(&gpu->pdev->dev,
> +                             "Could not allocate AQE ucode: %d\n", ret);
> +
> +                     return ret;
> +             }
> +
> +             msm_gem_object_set_name(a6xx_gpu->aqe_bo, "aqefw");
> +             if (!a6xx_ucode_check_version(a6xx_gpu, a6xx_gpu->aqe_bo)) {

Should this firmware be handled by a separate function?

> +                     msm_gem_unpin_iova(a6xx_gpu->aqe_bo, gpu->vm);
> +                     drm_gem_object_put(a6xx_gpu->aqe_bo);
> +
> +                     a6xx_gpu->aqe_bo = NULL;
> +                     return -EPERM;
> +             }
> +     }
> +
>       /*
>        * Expanded APRIV and targets that support WHERE_AM_I both need a
>        * privileged buffer to store the RPTR shadow

-- 
With best wishes
Dmitry

Reply via email to