drm/amdgpu: Avoid HDP flush on JPEG v5.0.1
authorLijo Lazar <lijo.lazar@amd.com>
Thu, 20 Feb 2025 08:08:06 +0000 (13:38 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 5 Mar 2025 15:38:01 +0000 (10:38 -0500)
Similar to JPEG v4.0.3, HDP flush shouldn't be performed by JPEG engine.
Keep it empty.

Signed-off-by: Lijo Lazar <lijo.lazar@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_3.c
drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_3.h
drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_1.c

index 1fcab0e..de46dbf 100644 (file)
@@ -686,7 +686,7 @@ static uint64_t jpeg_v4_0_3_dec_ring_get_wptr(struct amdgpu_ring *ring)
                                   jpeg_v4_0_3_core_reg_offset(ring->pipe));
 }
 
-static void jpeg_v4_0_3_ring_emit_hdp_flush(struct amdgpu_ring *ring)
+void jpeg_v4_0_3_ring_emit_hdp_flush(struct amdgpu_ring *ring)
 {
        /* JPEG engine access for HDP flush doesn't work when RRMT is enabled.
         * This is a workaround to avoid any HDP flush through JPEG ring.
index 747a3e5..a90bf37 100644 (file)
@@ -56,6 +56,7 @@ void jpeg_v4_0_3_dec_ring_emit_fence(struct amdgpu_ring *ring, u64 addr, u64 seq
                                unsigned int flags);
 void jpeg_v4_0_3_dec_ring_emit_vm_flush(struct amdgpu_ring *ring,
                                        unsigned int vmid, uint64_t pd_addr);
+void jpeg_v4_0_3_ring_emit_hdp_flush(struct amdgpu_ring *ring);
 void jpeg_v4_0_3_dec_ring_nop(struct amdgpu_ring *ring, uint32_t count);
 void jpeg_v4_0_3_dec_ring_insert_start(struct amdgpu_ring *ring);
 void jpeg_v4_0_3_dec_ring_insert_end(struct amdgpu_ring *ring);
index daa982b..56c01d2 100644 (file)
@@ -740,6 +740,7 @@ static const struct amdgpu_ring_funcs jpeg_v5_0_1_dec_ring_vm_funcs = {
        .emit_ib = jpeg_v4_0_3_dec_ring_emit_ib,
        .emit_fence = jpeg_v4_0_3_dec_ring_emit_fence,
        .emit_vm_flush = jpeg_v4_0_3_dec_ring_emit_vm_flush,
+       .emit_hdp_flush = jpeg_v4_0_3_ring_emit_hdp_flush,
        .test_ring = amdgpu_jpeg_dec_ring_test_ring,
        .test_ib = amdgpu_jpeg_dec_ring_test_ib,
        .insert_nop = jpeg_v4_0_3_dec_ring_nop,