|
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 |
| - /* We just need to read back a register to post the write. |
45 |
| - * Reading back the remapped register causes problems on |
46 |
| - * some platforms so just read back the memory size register. |
47 |
| - */ |
48 |
| - if (adev->nbio.funcs->get_memsize) |
49 |
| - adev->nbio.funcs->get_memsize(adev); |
50 |
| - } else { |
51 |
| - amdgpu_ring_emit_wreg(ring, (adev->rmmio_remap.reg_offset + KFD_MMIO_REMAP_HDP_MEM_FLUSH_CNTL) >> 2, 0); |
52 |
| - } |
53 |
| -} |
54 |
| - |
55 | 39 | static void hdp_v4_0_invalidate_hdp(struct amdgpu_device *adev,
|
56 | 40 | struct amdgpu_ring *ring)
|
57 | 41 | {
|
@@ -185,7 +169,7 @@ struct amdgpu_hdp_ras hdp_v4_0_ras = {
|
185 | 169 | };
|
186 | 170 |
|
187 | 171 | const struct amdgpu_hdp_funcs hdp_v4_0_funcs = {
|
188 |
| - .flush_hdp = hdp_v4_0_flush_hdp, |
| 172 | + .flush_hdp = amdgpu_hdp_generic_flush, |
189 | 173 | .invalidate_hdp = hdp_v4_0_invalidate_hdp,
|
190 | 174 | .update_clock_gating = hdp_v4_0_update_clock_gating,
|
191 | 175 | .get_clock_gating_state = hdp_v4_0_get_clockgating_state,
|
|
0 commit comments