Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amdgpu: Add empty HDP flush function to JPEG v4.0.3

JPEG v4.0.3 doesn't support HDP flush when RRMT is enabled. Instead,
mmsch fw will do the flush.

This change is necessary for JPEG v4.0.3, no need for backward compatibility

Signed-off-by: Lijo Lazar <lijo.lazar@amd.com>
Signed-off-by: Jane Jian <Jane.Jian@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Lijo Lazar and committed by
Alex Deucher
585e3fdb fec5f8e8

+8
+8
drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_3.c
··· 621 621 ring->pipe ? (0x40 * ring->pipe - 0xc80) : 0); 622 622 } 623 623 624 + static void jpeg_v4_0_3_ring_emit_hdp_flush(struct amdgpu_ring *ring) 625 + { 626 + /* JPEG engine access for HDP flush doesn't work when RRMT is enabled. 627 + * This is a workaround to avoid any HDP flush through JPEG ring. 628 + */ 629 + } 630 + 624 631 /** 625 632 * jpeg_v4_0_3_dec_ring_set_wptr - set write pointer 626 633 * ··· 1079 1072 .emit_ib = jpeg_v4_0_3_dec_ring_emit_ib, 1080 1073 .emit_fence = jpeg_v4_0_3_dec_ring_emit_fence, 1081 1074 .emit_vm_flush = jpeg_v4_0_3_dec_ring_emit_vm_flush, 1075 + .emit_hdp_flush = jpeg_v4_0_3_ring_emit_hdp_flush, 1082 1076 .test_ring = amdgpu_jpeg_dec_ring_test_ring, 1083 1077 .test_ib = amdgpu_jpeg_dec_ring_test_ib, 1084 1078 .insert_nop = jpeg_v4_0_3_dec_ring_nop,