[PATCH v11 27/28] Revert "drm/amdgpu/gfx11: only enable CP GFX shadowing on SR-IOV"
Sharma, Shashank
shashank.sharma at amd.com
Wed Sep 11 09:20:17 UTC 2024
Hello Alex
On 09/09/2024 22:31, Alex Deucher wrote:
> On Mon, Sep 9, 2024 at 4:18 PM Shashank Sharma <shashank.sharma at amd.com> wrote:
>> From: Shashank Sharma <contactshashanksharma at gmail.com>
>>
>> This reverts commit 81af32520e7aaa337fe132f16c12ce54170187ea.
>>
>> This commit prevents a usermode queue client to get the shadow related
>> information.
>>
>> Signed-off-by: Shashank Sharma <contactshashanksharma at gmail.com>
>> ---
>> drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 8 ++------
>> 1 file changed, 2 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c
>> index dbf3bcadee32..1f0f7ec0facc 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c
>> @@ -661,12 +661,8 @@ static void gfx_v11_0_check_fw_cp_gfx_shadow(struct amdgpu_device *adev)
>> case IP_VERSION(11, 0, 3):
>> if ((adev->gfx.me_fw_version >= 1505) &&
>> (adev->gfx.pfp_fw_version >= 1600) &&
>> - (adev->gfx.mec_fw_version >= 512)) {
>> - if (amdgpu_sriov_vf(adev))
>> - adev->gfx.cp_gfx_shadow = true;
>> - else
>> - adev->gfx.cp_gfx_shadow = false;
>> - }
>> + (adev->gfx.mec_fw_version >= 512))
>> + adev->gfx.cp_gfx_shadow = true;
> We need to be a bit more surgical about this. Setting
> adev->gfx.cp_gfx_shadow = true, will also enable
> gfx_v11_0_ring_emit_gfx_shadow() to execute on kernel queues which we
> don't want. We just want to enable the query for the shadow and csa
> sizes. Probably easiest to just add a new INFO IOCTL query for that
> so we don't break the old query. I.e., userspace looks for non-0
> shadow and csa sizes to determine whether or not to enable shadowing
> with kernel queues.
I agree, I will fine tune this approach instead of reverting the patch.
Shashank
> Alex
>
>> break;
>> default:
>> adev->gfx.cp_gfx_shadow = false;
>> --
>> 2.45.1
>>
More information about the amd-gfx
mailing list