]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/amdgpu: bypass SRIOV check for shadow size info
authorShashank Sharma <shashank.sharma@amd.com>
Wed, 30 Oct 2024 14:32:27 +0000 (15:32 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 8 Apr 2025 20:48:17 +0000 (16:48 -0400)
commitd9e697f19bda777a7934e3bbdc67889b06d58019
tree2d582388e721014fe479d7ee71223971e1cb19b5
parent2e06b175fff5ba1415b74fed441c0d066b8c8dab
drm/amdgpu: bypass SRIOV check for shadow size info

Currently, the shadow FW space size and alignment information is
protected under a flag (adev->gfx.cp_gfx_shadow) which gets set
only in case of SRIOV setups.
if (amdgpu_sriov_vf(adev))
    adev->gfx.cp_gfx_shadow = true;

But we need this information for GFX Userqueues, so that user can
create these objects while creating userqueue. This patch series
creates a method to get this information bypassing the dependency
on this check.

This patch:
- adds a new input parameter flag to the gfx.funcs->get_gfx_shadow_info
fptr definition, so that it can accommodate the information without the
check (adev->gfx.cp_gfx_shadow) on request.
- updates the existing definition of amdgpu_gfx_get_gfx_shadow_info to
adjust with this new flag.

Next patch in the series is adding a UAPI which will consume this info.

V2: split this patch from the new UAPI patch

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Christian Koenig <christian.koenig@amd.com>
Cc: Arvind Yadav <arvind.yadav@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Shashank Sharma <shashank.sharma@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c