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

drm/amdgpu: use the same HDP flush registers for all nbio 2.3.x

Align RDNA2.x with other asics. One HDP bit per SDMA instance,
aligned with firmware. This is effectively a revert of
commit 369b7d04baf3 ("drm/amdgpu/nbio2.3: don't use GPU_HDP_FLUSH bit 12").
On further discussions with the relevant hardware teams,
re-align the bits for SDMA.

Fixes: 369b7d04baf3 ("drm/amdgpu/nbio2.3: don't use GPU_HDP_FLUSH bit 12")
Reviewed-by: Kent Russell <kent.russell@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

+1 -26
+1 -4
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
··· 2222 2222 case IP_VERSION(2, 3, 0): 2223 2223 case IP_VERSION(2, 3, 1): 2224 2224 case IP_VERSION(2, 3, 2): 2225 - adev->nbio.funcs = &nbio_v2_3_funcs; 2226 - adev->nbio.hdp_flush_reg = &nbio_v2_3_hdp_flush_reg; 2227 - break; 2228 2225 case IP_VERSION(3, 3, 0): 2229 2226 case IP_VERSION(3, 3, 1): 2230 2227 case IP_VERSION(3, 3, 2): 2231 2228 case IP_VERSION(3, 3, 3): 2232 2229 adev->nbio.funcs = &nbio_v2_3_funcs; 2233 - adev->nbio.hdp_flush_reg = &nbio_v2_3_hdp_flush_reg_sc; 2230 + adev->nbio.hdp_flush_reg = &nbio_v2_3_hdp_flush_reg; 2234 2231 break; 2235 2232 case IP_VERSION(4, 3, 0): 2236 2233 case IP_VERSION(4, 3, 1):
-21
drivers/gpu/drm/amd/amdgpu/nbio_v2_3.c
··· 328 328 .ref_and_mask_sdma1 = BIF_BX_PF_GPU_HDP_FLUSH_DONE__SDMA1_MASK, 329 329 }; 330 330 331 - const struct nbio_hdp_flush_reg nbio_v2_3_hdp_flush_reg_sc = { 332 - .ref_and_mask_cp0 = BIF_BX_PF_GPU_HDP_FLUSH_DONE__CP0_MASK, 333 - .ref_and_mask_cp1 = BIF_BX_PF_GPU_HDP_FLUSH_DONE__CP1_MASK, 334 - .ref_and_mask_cp2 = BIF_BX_PF_GPU_HDP_FLUSH_DONE__CP2_MASK, 335 - .ref_and_mask_cp3 = BIF_BX_PF_GPU_HDP_FLUSH_DONE__CP3_MASK, 336 - .ref_and_mask_cp4 = BIF_BX_PF_GPU_HDP_FLUSH_DONE__CP4_MASK, 337 - .ref_and_mask_cp5 = BIF_BX_PF_GPU_HDP_FLUSH_DONE__CP5_MASK, 338 - .ref_and_mask_cp6 = BIF_BX_PF_GPU_HDP_FLUSH_DONE__CP6_MASK, 339 - .ref_and_mask_cp7 = BIF_BX_PF_GPU_HDP_FLUSH_DONE__CP7_MASK, 340 - .ref_and_mask_cp8 = BIF_BX_PF_GPU_HDP_FLUSH_DONE__CP8_MASK, 341 - .ref_and_mask_cp9 = BIF_BX_PF_GPU_HDP_FLUSH_DONE__CP9_MASK, 342 - .ref_and_mask_sdma0 = GPU_HDP_FLUSH_DONE__RSVD_ENG1_MASK, 343 - .ref_and_mask_sdma1 = GPU_HDP_FLUSH_DONE__RSVD_ENG2_MASK, 344 - .ref_and_mask_sdma2 = GPU_HDP_FLUSH_DONE__RSVD_ENG3_MASK, 345 - .ref_and_mask_sdma3 = GPU_HDP_FLUSH_DONE__RSVD_ENG4_MASK, 346 - .ref_and_mask_sdma4 = GPU_HDP_FLUSH_DONE__RSVD_ENG5_MASK, 347 - .ref_and_mask_sdma5 = GPU_HDP_FLUSH_DONE__RSVD_ENG6_MASK, 348 - .ref_and_mask_sdma6 = GPU_HDP_FLUSH_DONE__RSVD_ENG7_MASK, 349 - .ref_and_mask_sdma7 = GPU_HDP_FLUSH_DONE__RSVD_ENG8_MASK, 350 - }; 351 - 352 331 static void nbio_v2_3_init_registers(struct amdgpu_device *adev) 353 332 { 354 333 uint32_t def, data;
-1
drivers/gpu/drm/amd/amdgpu/nbio_v2_3.h
··· 27 27 #include "soc15_common.h" 28 28 29 29 extern const struct nbio_hdp_flush_reg nbio_v2_3_hdp_flush_reg; 30 - extern const struct nbio_hdp_flush_reg nbio_v2_3_hdp_flush_reg_sc; 31 30 extern const struct amdgpu_nbio_funcs nbio_v2_3_funcs; 32 31 33 32 #endif