]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
drm/amdgpu: use the same HDP flush registers for all nbio 7.4.x
authorAlex Deucher <alexander.deucher@amd.com>
Tue, 12 Jul 2022 01:59:06 +0000 (21:59 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Aug 2022 12:41:06 +0000 (14:41 +0200)
[ Upstream commit 912db6a58738e8be502838eb6a88f207ba356cd7 ]

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

Fixes: a0f9f8546668 ("drm/amdgpu/nbio7.4: 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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
drivers/gpu/drm/amd/amdgpu/nbio_v7_4.c
drivers/gpu/drm/amd/amdgpu/nbio_v7_4.h

index e4fcbb385a62b6613d176b8209a2194fed6b421d..918bb7fef6ba587f0bc15ac52b5f3815376921fc 100644 (file)
@@ -1891,12 +1891,9 @@ int amdgpu_discovery_set_ip_blocks(struct amdgpu_device *adev)
                break;
        case IP_VERSION(7, 4, 0):
        case IP_VERSION(7, 4, 1):
-               adev->nbio.funcs = &nbio_v7_4_funcs;
-               adev->nbio.hdp_flush_reg = &nbio_v7_4_hdp_flush_reg;
-               break;
        case IP_VERSION(7, 4, 4):
                adev->nbio.funcs = &nbio_v7_4_funcs;
-               adev->nbio.hdp_flush_reg = &nbio_v7_4_hdp_flush_reg_ald;
+               adev->nbio.hdp_flush_reg = &nbio_v7_4_hdp_flush_reg;
                break;
        case IP_VERSION(7, 2, 0):
        case IP_VERSION(7, 2, 1):
index c2357e83a8c417dda74a510a7488a1cd71d4a4be..09c0def356a18bf54902a963e1f0064f78dd9681 100644 (file)
@@ -339,27 +339,6 @@ const struct nbio_hdp_flush_reg nbio_v7_4_hdp_flush_reg = {
        .ref_and_mask_sdma1 = GPU_HDP_FLUSH_DONE__SDMA1_MASK,
 };
 
-const struct nbio_hdp_flush_reg nbio_v7_4_hdp_flush_reg_ald = {
-       .ref_and_mask_cp0 = GPU_HDP_FLUSH_DONE__CP0_MASK,
-       .ref_and_mask_cp1 = GPU_HDP_FLUSH_DONE__CP1_MASK,
-       .ref_and_mask_cp2 = GPU_HDP_FLUSH_DONE__CP2_MASK,
-       .ref_and_mask_cp3 = GPU_HDP_FLUSH_DONE__CP3_MASK,
-       .ref_and_mask_cp4 = GPU_HDP_FLUSH_DONE__CP4_MASK,
-       .ref_and_mask_cp5 = GPU_HDP_FLUSH_DONE__CP5_MASK,
-       .ref_and_mask_cp6 = GPU_HDP_FLUSH_DONE__CP6_MASK,
-       .ref_and_mask_cp7 = GPU_HDP_FLUSH_DONE__CP7_MASK,
-       .ref_and_mask_cp8 = GPU_HDP_FLUSH_DONE__CP8_MASK,
-       .ref_and_mask_cp9 = GPU_HDP_FLUSH_DONE__CP9_MASK,
-       .ref_and_mask_sdma0 = GPU_HDP_FLUSH_DONE__RSVD_ENG1_MASK,
-       .ref_and_mask_sdma1 = GPU_HDP_FLUSH_DONE__RSVD_ENG2_MASK,
-       .ref_and_mask_sdma2 = GPU_HDP_FLUSH_DONE__RSVD_ENG3_MASK,
-       .ref_and_mask_sdma3 = GPU_HDP_FLUSH_DONE__RSVD_ENG4_MASK,
-       .ref_and_mask_sdma4 = GPU_HDP_FLUSH_DONE__RSVD_ENG5_MASK,
-       .ref_and_mask_sdma5 = GPU_HDP_FLUSH_DONE__RSVD_ENG6_MASK,
-       .ref_and_mask_sdma6 = GPU_HDP_FLUSH_DONE__RSVD_ENG7_MASK,
-       .ref_and_mask_sdma7 = GPU_HDP_FLUSH_DONE__RSVD_ENG8_MASK,
-};
-
 static void nbio_v7_4_init_registers(struct amdgpu_device *adev)
 {
        uint32_t baco_cntl;
index 7490022d79d4f799e8f26020a42db234c9989200..f27c417288224d060b6203bbc122bffc69b46f21 100644 (file)
@@ -27,7 +27,6 @@
 #include "soc15_common.h"
 
 extern const struct nbio_hdp_flush_reg nbio_v7_4_hdp_flush_reg;
-extern const struct nbio_hdp_flush_reg nbio_v7_4_hdp_flush_reg_ald;
 extern const struct amdgpu_nbio_funcs nbio_v7_4_funcs;
 extern struct amdgpu_nbio_ras nbio_v7_4_ras;