Skip to content

Commit 853eebe

Browse files
Tong Liu01alexdeucher
authored andcommitted
drm/amdgpu: add unmap latency when gfx11 set kiq resources
[why] If driver does not set unmap latency for KIQ, the default value of KIQ unmap latency is zero. When do unmap queue, KIQ will return that almost immediately after receiving unmap command. So, the queue status will be saved to MQD incorrectly or lost in some chance. [how] Set unmap latency when do kiq set resources. The unmap latency is set to be 1 second that is synchronized with Windows driver. Acked-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Tong Liu01 <Tong.Liu01@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent 5f38ac5 commit 853eebe

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ static void gfx11_kiq_set_resources(struct amdgpu_ring *kiq_ring, uint64_t queue
155155
{
156156
amdgpu_ring_write(kiq_ring, PACKET3(PACKET3_SET_RESOURCES, 6));
157157
amdgpu_ring_write(kiq_ring, PACKET3_SET_RESOURCES_VMID_MASK(0) |
158+
PACKET3_SET_RESOURCES_UNMAP_LATENTY(0xa) | /* unmap_latency: 0xa (~ 1s) */
158159
PACKET3_SET_RESOURCES_QUEUE_TYPE(0)); /* vmid_mask:0 queue_type:0 (KIQ) */
159160
amdgpu_ring_write(kiq_ring, lower_32_bits(queue_mask)); /* queue mask lo */
160161
amdgpu_ring_write(kiq_ring, upper_32_bits(queue_mask)); /* queue mask hi */

0 commit comments

Comments
 (0)