diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2023-03-16 18:33:43 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2023-04-25 01:16:27 +0300 |
commit | 38be7796f310cd2bc84dcc40c4fd1964df39a5b0 (patch) | |
tree | 4f24e898ab247aac4c2458382fcd553bd9437780 /drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | |
parent | 46c1282e5a31c33a6973affbcc765eac1f3f5d1c (diff) | |
download | linux-38be7796f310cd2bc84dcc40c4fd1964df39a5b0.tar.xz |
drm/amdgpu: don't require a job for cond_exec and shadow
We need to reset the shadow state every time we submit an
IB and there needs to be a COND_EXEC packet after the
SET_Q_PREEMPTION_MODE packet for it to work properly, so
we should emit both of these packets regardless of whether
there is a job present or not.
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c index aebc0e5bddc6..c955c3f060cd 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c @@ -223,11 +223,11 @@ int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsigned num_ibs, amdgpu_ring_ib_begin(ring); - if (job && ring->funcs->emit_gfx_shadow) + if (ring->funcs->emit_gfx_shadow) amdgpu_ring_emit_gfx_shadow(ring, shadow_va, csa_va, gds_va, init_shadow, vmid); - if (job && ring->funcs->init_cond_exec) + if (ring->funcs->init_cond_exec) patch_offset = amdgpu_ring_init_cond_exec(ring); amdgpu_device_flush_hdp(adev, ring); |