]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
drm/amdgpu/psp: flush HDP write fifo after submitting cmds to the psp
authorAlex Deucher <alexander.deucher@amd.com>
Tue, 17 Sep 2019 20:12:18 +0000 (15:12 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 3 Oct 2019 14:10:59 +0000 (09:10 -0500)
We need to make sure the fifo is flushed before we ask the psp to
process the commands.

Reviewed-by: Feifei Xu <Feifei.Xu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/psp_v10_0.c
drivers/gpu/drm/amd/amdgpu/psp_v11_0.c
drivers/gpu/drm/amd/amdgpu/psp_v12_0.c
drivers/gpu/drm/amd/amdgpu/psp_v3_1.c

index 6ee33f368e2160ee2d814428455bdc580ab988c4..b96484a72535659cb02c76f3fa1e0f1b33ab665e 100644 (file)
@@ -266,6 +266,7 @@ static int psp_v10_0_cmd_submit(struct psp_context *psp,
        write_frame->fence_addr_hi = upper_32_bits(fence_mc_addr);
        write_frame->fence_addr_lo = lower_32_bits(fence_mc_addr);
        write_frame->fence_value = index;
+       amdgpu_asic_flush_hdp(adev, NULL);
 
        /* Update the write Pointer in DWORDs */
        psp_write_ptr_reg = (psp_write_ptr_reg + rb_frame_size_dw) % ring_size_dw;
index 64802e88a9a2fb80e4c7bcff37108711d66eea30..04318cfd50a8b643668b464f29674f80aa91d772 100644 (file)
@@ -549,6 +549,7 @@ static int psp_v11_0_cmd_submit(struct psp_context *psp,
        write_frame->fence_addr_hi = upper_32_bits(fence_mc_addr);
        write_frame->fence_addr_lo = lower_32_bits(fence_mc_addr);
        write_frame->fence_value = index;
+       amdgpu_asic_flush_hdp(adev, NULL);
 
        /* Update the write Pointer in DWORDs */
        psp_write_ptr_reg = (psp_write_ptr_reg + rb_frame_size_dw) % ring_size_dw;
index c72e43f8e0be3fafc5352207466503b43e132504..8f553f6f92d61b1a117b485e4a667fd0415d5f48 100644 (file)
@@ -378,6 +378,7 @@ static int psp_v12_0_cmd_submit(struct psp_context *psp,
        write_frame->fence_addr_hi = upper_32_bits(fence_mc_addr);
        write_frame->fence_addr_lo = lower_32_bits(fence_mc_addr);
        write_frame->fence_value = index;
+       amdgpu_asic_flush_hdp(adev, NULL);
 
        /* Update the write Pointer in DWORDs */
        psp_write_ptr_reg = (psp_write_ptr_reg + rb_frame_size_dw) % ring_size_dw;
index d2c727f6a8bd460c7f4baa02425d370535739070..fdc00938327b8b60e73c9e93429862f76dd64cb9 100644 (file)
@@ -454,6 +454,7 @@ static int psp_v3_1_cmd_submit(struct psp_context *psp,
        write_frame->fence_addr_hi = upper_32_bits(fence_mc_addr);
        write_frame->fence_addr_lo = lower_32_bits(fence_mc_addr);
        write_frame->fence_value = index;
+       amdgpu_asic_flush_hdp(adev, NULL);
 
        /* Update the write Pointer in DWORDs */
        psp_write_ptr_reg = (psp_write_ptr_reg + rb_frame_size_dw) % ring_size_dw;