Re: [PATCH 10/13] drm/amdgpu: add support for new GFX shadow size query

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ping?

On Thu, Mar 30, 2023 at 3:18 PM Alex Deucher <alexander.deucher@xxxxxxx> wrote:
>
> Use the new callback to fetch the data.  Return an error if
> not supported.  UMDs should use this query to check whether
> shadow buffers are supported and if so what size they
> should be.
>
> v2: return an error rather than a zerod structure.
> v3: drop GDS, move into dev_info structure.  Data will be
>     0 if not supported.
> v4: drop local variable r
>
> Signed-off-by: Alex Deucher <alexander.deucher@xxxxxxx>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
> index 0efb38539d70..fd735df92b9a 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
> @@ -876,6 +876,19 @@ int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file *filp)
>                 dev_info->gl2c_cache_size = adev->gfx.config.gc_gl2c_per_gpu;
>                 dev_info->mall_size = adev->gmc.mall_size;
>
> +
> +               if (adev->gfx.funcs->get_gfx_shadow_info) {
> +                       struct amdgpu_gfx_shadow_info shadow_info;
> +
> +                       ret = amdgpu_gfx_get_gfx_shadow_info(adev, &shadow_info);
> +                       if (!ret) {
> +                               dev_info->shadow_size = shadow_info.shadow_size;
> +                               dev_info->shadow_alignment = shadow_info.shadow_alignment;
> +                               dev_info->csa_size = shadow_info.csa_size;
> +                               dev_info->csa_alignment = shadow_info.csa_alignment;
> +                       }
> +               }
> +
>                 ret = copy_to_user(out, dev_info,
>                                    min((size_t)size, sizeof(*dev_info))) ? -EFAULT : 0;
>                 kfree(dev_info);
> --
> 2.39.2
>




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux