drm/amdgpu: add gfx11 emit shadow callback
authorChristian König <christian.koenig@amd.com>
Wed, 8 Mar 2023 20:17:59 +0000 (21:17 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 24 Apr 2023 22:16:23 +0000 (18:16 -0400)
commit46c1282e5a31c33a6973affbcc765eac1f3f5d1c
treed60b80035b8b946e766517e41eb841271b7c982c
parentac9287055ff16a092416c76a19006764e4c6a978
drm/amdgpu: add gfx11 emit shadow callback

Add ring callback for gfx to update the CP firmware
with the new shadow information before we process the
IB.

v2: add implementation for new packet (Alex)
v3: add current FW version checks (Alex)
v4: only initialize shadow on first use
    Only set IB_VMID when a valid shadow buffer is present
    (Alex)
v5: Pass parameters rather than job to new ring callback (Alex)

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c
drivers/gpu/drm/amd/amdgpu/nvd.h