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

Configure Feed

Select the types of activity you want to include in your feed.

Revert "drm/amdgpu: Use generic hdp flush function"

This reverts commit 18a878fd8aef0ec21648a3782f55a79790cd4073.

Revert this temporarily to make it easier to fix a regression
in the HDP handling.

Reviewed-by: Felix Kuehling <felix.kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

+48 -27
-21
drivers/gpu/drm/amd/amdgpu/amdgpu_hdp.c
··· 22 22 */ 23 23 #include "amdgpu.h" 24 24 #include "amdgpu_ras.h" 25 - #include <uapi/linux/kfd_ioctl.h> 26 25 27 26 int amdgpu_hdp_ras_sw_init(struct amdgpu_device *adev) 28 27 { ··· 45 46 46 47 /* hdp ras follows amdgpu_ras_block_late_init_default for late init */ 47 48 return 0; 48 - } 49 - 50 - void amdgpu_hdp_generic_flush(struct amdgpu_device *adev, 51 - struct amdgpu_ring *ring) 52 - { 53 - if (!ring || !ring->funcs->emit_wreg) { 54 - WREG32((adev->rmmio_remap.reg_offset + 55 - KFD_MMIO_REMAP_HDP_MEM_FLUSH_CNTL) >> 56 - 2, 57 - 0); 58 - RREG32((adev->rmmio_remap.reg_offset + 59 - KFD_MMIO_REMAP_HDP_MEM_FLUSH_CNTL) >> 60 - 2); 61 - } else { 62 - amdgpu_ring_emit_wreg(ring, 63 - (adev->rmmio_remap.reg_offset + 64 - KFD_MMIO_REMAP_HDP_MEM_FLUSH_CNTL) >> 65 - 2, 66 - 0); 67 - } 68 49 }
-2
drivers/gpu/drm/amd/amdgpu/amdgpu_hdp.h
··· 44 44 }; 45 45 46 46 int amdgpu_hdp_ras_sw_init(struct amdgpu_device *adev); 47 - void amdgpu_hdp_generic_flush(struct amdgpu_device *adev, 48 - struct amdgpu_ring *ring); 49 47 #endif /* __AMDGPU_HDP_H__ */
+12 -1
drivers/gpu/drm/amd/amdgpu/hdp_v4_0.c
··· 36 36 #define HDP_MEM_POWER_CTRL__RC_MEM_POWER_LS_EN_MASK 0x00020000L 37 37 #define mmHDP_MEM_POWER_CTRL_BASE_IDX 0 38 38 39 + static void hdp_v4_0_flush_hdp(struct amdgpu_device *adev, 40 + struct amdgpu_ring *ring) 41 + { 42 + if (!ring || !ring->funcs->emit_wreg) { 43 + WREG32((adev->rmmio_remap.reg_offset + KFD_MMIO_REMAP_HDP_MEM_FLUSH_CNTL) >> 2, 0); 44 + RREG32((adev->rmmio_remap.reg_offset + KFD_MMIO_REMAP_HDP_MEM_FLUSH_CNTL) >> 2); 45 + } else { 46 + amdgpu_ring_emit_wreg(ring, (adev->rmmio_remap.reg_offset + KFD_MMIO_REMAP_HDP_MEM_FLUSH_CNTL) >> 2, 0); 47 + } 48 + } 49 + 39 50 static void hdp_v4_0_invalidate_hdp(struct amdgpu_device *adev, 40 51 struct amdgpu_ring *ring) 41 52 { ··· 180 169 }; 181 170 182 171 const struct amdgpu_hdp_funcs hdp_v4_0_funcs = { 183 - .flush_hdp = amdgpu_hdp_generic_flush, 172 + .flush_hdp = hdp_v4_0_flush_hdp, 184 173 .invalidate_hdp = hdp_v4_0_invalidate_hdp, 185 174 .update_clock_gating = hdp_v4_0_update_clock_gating, 186 175 .get_clock_gating_state = hdp_v4_0_get_clockgating_state,
+12 -1
drivers/gpu/drm/amd/amdgpu/hdp_v5_0.c
··· 27 27 #include "hdp/hdp_5_0_0_sh_mask.h" 28 28 #include <uapi/linux/kfd_ioctl.h> 29 29 30 + static void hdp_v5_0_flush_hdp(struct amdgpu_device *adev, 31 + struct amdgpu_ring *ring) 32 + { 33 + if (!ring || !ring->funcs->emit_wreg) { 34 + WREG32((adev->rmmio_remap.reg_offset + KFD_MMIO_REMAP_HDP_MEM_FLUSH_CNTL) >> 2, 0); 35 + RREG32((adev->rmmio_remap.reg_offset + KFD_MMIO_REMAP_HDP_MEM_FLUSH_CNTL) >> 2); 36 + } else { 37 + amdgpu_ring_emit_wreg(ring, (adev->rmmio_remap.reg_offset + KFD_MMIO_REMAP_HDP_MEM_FLUSH_CNTL) >> 2, 0); 38 + } 39 + } 40 + 30 41 static void hdp_v5_0_invalidate_hdp(struct amdgpu_device *adev, 31 42 struct amdgpu_ring *ring) 32 43 { ··· 217 206 } 218 207 219 208 const struct amdgpu_hdp_funcs hdp_v5_0_funcs = { 220 - .flush_hdp = amdgpu_hdp_generic_flush, 209 + .flush_hdp = hdp_v5_0_flush_hdp, 221 210 .invalidate_hdp = hdp_v5_0_invalidate_hdp, 222 211 .update_clock_gating = hdp_v5_0_update_clock_gating, 223 212 .get_clock_gating_state = hdp_v5_0_get_clockgating_state,
+12 -1
drivers/gpu/drm/amd/amdgpu/hdp_v6_0.c
··· 30 30 #define regHDP_CLK_CNTL_V6_1 0xd5 31 31 #define regHDP_CLK_CNTL_V6_1_BASE_IDX 0 32 32 33 + static void hdp_v6_0_flush_hdp(struct amdgpu_device *adev, 34 + struct amdgpu_ring *ring) 35 + { 36 + if (!ring || !ring->funcs->emit_wreg) { 37 + WREG32((adev->rmmio_remap.reg_offset + KFD_MMIO_REMAP_HDP_MEM_FLUSH_CNTL) >> 2, 0); 38 + RREG32((adev->rmmio_remap.reg_offset + KFD_MMIO_REMAP_HDP_MEM_FLUSH_CNTL) >> 2); 39 + } else { 40 + amdgpu_ring_emit_wreg(ring, (adev->rmmio_remap.reg_offset + KFD_MMIO_REMAP_HDP_MEM_FLUSH_CNTL) >> 2, 0); 41 + } 42 + } 43 + 33 44 static void hdp_v6_0_update_clock_gating(struct amdgpu_device *adev, 34 45 bool enable) 35 46 { ··· 149 138 } 150 139 151 140 const struct amdgpu_hdp_funcs hdp_v6_0_funcs = { 152 - .flush_hdp = amdgpu_hdp_generic_flush, 141 + .flush_hdp = hdp_v6_0_flush_hdp, 153 142 .update_clock_gating = hdp_v6_0_update_clock_gating, 154 143 .get_clock_gating_state = hdp_v6_0_get_clockgating_state, 155 144 };
+12 -1
drivers/gpu/drm/amd/amdgpu/hdp_v7_0.c
··· 27 27 #include "hdp/hdp_7_0_0_sh_mask.h" 28 28 #include <uapi/linux/kfd_ioctl.h> 29 29 30 + static void hdp_v7_0_flush_hdp(struct amdgpu_device *adev, 31 + struct amdgpu_ring *ring) 32 + { 33 + if (!ring || !ring->funcs->emit_wreg) { 34 + WREG32((adev->rmmio_remap.reg_offset + KFD_MMIO_REMAP_HDP_MEM_FLUSH_CNTL) >> 2, 0); 35 + RREG32((adev->rmmio_remap.reg_offset + KFD_MMIO_REMAP_HDP_MEM_FLUSH_CNTL) >> 2); 36 + } else { 37 + amdgpu_ring_emit_wreg(ring, (adev->rmmio_remap.reg_offset + KFD_MMIO_REMAP_HDP_MEM_FLUSH_CNTL) >> 2, 0); 38 + } 39 + } 40 + 30 41 static void hdp_v7_0_update_clock_gating(struct amdgpu_device *adev, 31 42 bool enable) 32 43 { ··· 137 126 } 138 127 139 128 const struct amdgpu_hdp_funcs hdp_v7_0_funcs = { 140 - .flush_hdp = amdgpu_hdp_generic_flush, 129 + .flush_hdp = hdp_v7_0_flush_hdp, 141 130 .update_clock_gating = hdp_v7_0_update_clock_gating, 142 131 .get_clock_gating_state = hdp_v7_0_get_clockgating_state, 143 132 };