drm/amdgpu/nbio2.3: use original HDP_FLUSH bits for navi1x
Subsystems (2)
Alex Deucher
maintainerPATCH 1/1 drm/amdgpu/nbio2.3: use original HDP_FLUSH bits for navi1x
The extended bits were not available for use on navi1x, but navi2x only have 2 sdma instances so we won't conflict with firmware anyway.
Fixes 468e994c41ecb3 ("drm/amdgpu/nbio2.3: don't use GPU_HDP_FLUSH bit 12")
Signed-off-by Alex Deucher <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 5 ++++- drivers/gpu/drm/amd/amdgpu/nbio_v2_3.c | 15 +++++++++++++++ drivers/gpu/drm/amd/amdgpu/nbio_v2_3.h | 1 + 3 files changed, 20 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c +4 -1
@@ -1133,12 +1133,15 @@ int amdgpu_discovery_set_ip_blocks(struct amdgpu_device *adev)case IP_VERSION (2 ,3 ,0 ):case IP_VERSION (2 ,3 ,1 ):case IP_VERSION (2 ,3 ,2 ): + adev->nbio.funcs = &nbio_v2_3_funcs; + adev->nbio.hdp_flush_reg = &nbio_v2_3_hdp_flush_reg; +break ;case IP_VERSION (3 ,3 ,0 ):case IP_VERSION (3 ,3 ,1 ):case IP_VERSION (3 ,3 ,2 ):case IP_VERSION (3 ,3 ,3 ): adev->nbio.funcs = &nbio_v2_3_funcs; - adev->nbio.hdp_flush_reg = &nbio_v2_3_hdp_flush_reg; + adev->nbio.hdp_flush_reg = &nbio_v2_3_hdp_flush_reg_sc;break ;default :break ;
drivers/gpu/drm/amd/amdgpu/nbio_v2_3.c +15 -0
@@ -314,6 +314,21 @@ static u32 nbio_v2_3_get_pcie_data_offset(struct amdgpu_device *adev) }const struct nbio_hdp_flush_reg nbio_v2_3_hdp_flush_reg = { + .ref_and_mask_cp0 =BIF_BX_PF_GPU_HDP_FLUSH_DONE__CP0_MASK , + .ref_and_mask_cp1 =BIF_BX_PF_GPU_HDP_FLUSH_DONE__CP1_MASK , + .ref_and_mask_cp2 =BIF_BX_PF_GPU_HDP_FLUSH_DONE__CP2_MASK , + .ref_and_mask_cp3 =BIF_BX_PF_GPU_HDP_FLUSH_DONE__CP3_MASK , + .ref_and_mask_cp4 =BIF_BX_PF_GPU_HDP_FLUSH_DONE__CP4_MASK , + .ref_and_mask_cp5 =BIF_BX_PF_GPU_HDP_FLUSH_DONE__CP5_MASK , + .ref_and_mask_cp6 =BIF_BX_PF_GPU_HDP_FLUSH_DONE__CP6_MASK , + .ref_and_mask_cp7 =BIF_BX_PF_GPU_HDP_FLUSH_DONE__CP7_MASK , + .ref_and_mask_cp8 =BIF_BX_PF_GPU_HDP_FLUSH_DONE__CP8_MASK , + .ref_and_mask_cp9 =BIF_BX_PF_GPU_HDP_FLUSH_DONE__CP9_MASK , + .ref_and_mask_sdma0 =BIF_BX_PF_GPU_HDP_FLUSH_DONE__SDMA0_MASK , + .ref_and_mask_sdma1 =BIF_BX_PF_GPU_HDP_FLUSH_DONE__SDMA1_MASK , +}; + +const struct nbio_hdp_flush_reg nbio_v2_3_hdp_flush_reg_sc = { .ref_and_mask_cp0 =BIF_BX_PF_GPU_HDP_FLUSH_DONE__CP0_MASK , .ref_and_mask_cp1 =BIF_BX_PF_GPU_HDP_FLUSH_DONE__CP1_MASK , .ref_and_mask_cp2 =BIF_BX_PF_GPU_HDP_FLUSH_DONE__CP2_MASK ,
drivers/gpu/drm/amd/amdgpu/nbio_v2_3.h +1 -0
@@ -27,6 +27,7 @@#include "soc15_common.h" extern const struct nbio_hdp_flush_reg nbio_v2_3_hdp_flush_reg; +extern const struct nbio_hdp_flush_reg nbio_v2_3_hdp_flush_reg_sc;extern const struct amdgpu_nbio_funcs nbio_v2_3_funcs;#endif
Signature · 1 line
2.31.1
Quoted 3 lines · Alex Deucher
The extended bits were not available for use on navi1x, but navi2x only have 2 sdma instances so we won't conflict with
This should say navi1x. Fixed locally.
Alex
Quoted 72 lines
firmware anyway.
Fixes 468e994c41ecb3 ("drm/amdgpu/nbio2.3: don't use GPU_HDP_FLUSH bit 12")Signed-off-by Alex Deucher <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 5 ++++- drivers/gpu/drm/amd/amdgpu/nbio_v2_3.c | 15 +++++++++++++++ drivers/gpu/drm/amd/amdgpu/nbio_v2_3.h | 1 + 3 files changed, 20 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c +4
-1@@ -1133,12 +1133,15 @@ int amdgpu_discovery_set_ip_blocks(struct amdgpu_device *adev)case IP_VERSION (2 ,3 ,0 ):case IP_VERSION (2 ,3 ,1 ):case IP_VERSION (2 ,3 ,2 ): + adev->nbio.funcs = &nbio_v2_3_funcs; + adev->nbio.hdp_flush_reg = &nbio_v2_3_hdp_flush_reg; +break ;case IP_VERSION (3 ,3 ,0 ):case IP_VERSION (3 ,3 ,1 ):case IP_VERSION (3 ,3 ,2 ):case IP_VERSION (3 ,3 ,3 ): adev->nbio.funcs = &nbio_v2_3_funcs; - adev->nbio.hdp_flush_reg = &nbio_v2_3_hdp_flush_reg; + adev->nbio.hdp_flush_reg = &nbio_v2_3_hdp_flush_reg_sc;break ;default :break ;drivers/gpu/drm/amd/amdgpu/nbio_v2_3.c +15
-0@@ -314,6 +314,21 @@ static u32 nbio_v2_3_get_pcie_data_offset(struct amdgpu_device *adev) }const struct nbio_hdp_flush_reg nbio_v2_3_hdp_flush_reg = { + .ref_and_mask_cp0 =BIF_BX_PF_GPU_HDP_FLUSH_DONE__CP0_MASK , + .ref_and_mask_cp1 =BIF_BX_PF_GPU_HDP_FLUSH_DONE__CP1_MASK , + .ref_and_mask_cp2 =BIF_BX_PF_GPU_HDP_FLUSH_DONE__CP2_MASK , + .ref_and_mask_cp3 =BIF_BX_PF_GPU_HDP_FLUSH_DONE__CP3_MASK , + .ref_and_mask_cp4 =BIF_BX_PF_GPU_HDP_FLUSH_DONE__CP4_MASK , + .ref_and_mask_cp5 =BIF_BX_PF_GPU_HDP_FLUSH_DONE__CP5_MASK , + .ref_and_mask_cp6 =BIF_BX_PF_GPU_HDP_FLUSH_DONE__CP6_MASK , + .ref_and_mask_cp7 =BIF_BX_PF_GPU_HDP_FLUSH_DONE__CP7_MASK , + .ref_and_mask_cp8 =BIF_BX_PF_GPU_HDP_FLUSH_DONE__CP8_MASK , + .ref_and_mask_cp9 =BIF_BX_PF_GPU_HDP_FLUSH_DONE__CP9_MASK , + .ref_and_mask_sdma0 =BIF_BX_PF_GPU_HDP_FLUSH_DONE__SDMA0_MASK , + .ref_and_mask_sdma1 =BIF_BX_PF_GPU_HDP_FLUSH_DONE__SDMA1_MASK , +}; + +const struct nbio_hdp_flush_reg nbio_v2_3_hdp_flush_reg_sc = { .ref_and_mask_cp0 =BIF_BX_PF_GPU_HDP_FLUSH_DONE__CP0_MASK , .ref_and_mask_cp1 =BIF_BX_PF_GPU_HDP_FLUSH_DONE__CP1_MASK , .ref_and_mask_cp2 =BIF_BX_PF_GPU_HDP_FLUSH_DONE__CP2_MASK ,drivers/gpu/drm/amd/amdgpu/nbio_v2_3.h +1
-1@@ -27,6 +27,7 @@#include "soc15_common.h" extern const struct nbio_hdp_flush_reg nbio_v2_3_hdp_flush_reg; +extern const struct nbio_hdp_flush_reg nbio_v2_3_hdp_flush_reg_sc;extern const struct amdgpu_nbio_funcs nbio_v2_3_funcs;#endif --2.31.1