Skip to content

Commit 1f62565

Browse files
mukjoshialexdeucher
authored andcommitted
drm/amdgpu: Query correct register for DF hashing on Aldebaran
For Aldebaran, driver needs to query DramMegaBaseAddress to check if DF hashing is enabled. Signed-off-by: Mukul Joshi <[email protected]> Acked-by: Alex Deucher <[email protected]> Reviewed-by: Harish Kasiviswanathan <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 295c4f5 commit 1f62565

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

drivers/gpu/drm/amd/amdgpu/df_v3_6.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -277,13 +277,14 @@ static u32 df_v3_6_get_fb_channel_number(struct amdgpu_device *adev)
277277
{
278278
u32 tmp;
279279

280-
tmp = RREG32_SOC15(DF, 0, mmDF_CS_UMC_AON0_DramBaseAddress0);
281-
if (adev->asic_type == CHIP_ALDEBARAN)
280+
if (adev->asic_type == CHIP_ALDEBARAN) {
281+
tmp = RREG32_SOC15(DF, 0, mmDF_GCM_AON0_DramMegaBaseAddress0);
282282
tmp &=
283283
ALDEBARAN_DF_CS_UMC_AON0_DramBaseAddress0__IntLvNumChan_MASK;
284-
else
284+
} else {
285+
tmp = RREG32_SOC15(DF, 0, mmDF_CS_UMC_AON0_DramBaseAddress0);
285286
tmp &= DF_CS_UMC_AON0_DramBaseAddress0__IntLvNumChan_MASK;
286-
287+
}
287288
tmp >>= DF_CS_UMC_AON0_DramBaseAddress0__IntLvNumChan__SHIFT;
288289

289290
return tmp;

drivers/gpu/drm/amd/include/asic_reg/df/df_3_6_offset.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@
3333
#define mmDF_CS_UMC_AON0_DramBaseAddress0 0x0044
3434
#define mmDF_CS_UMC_AON0_DramBaseAddress0_BASE_IDX 0
3535

36+
#define mmDF_GCM_AON0_DramMegaBaseAddress0 0x0064
37+
#define mmDF_GCM_AON0_DramMegaBaseAddress0_BASE_IDX 0
38+
3639
#define smnPerfMonCtlLo0 0x01d440UL
3740
#define smnPerfMonCtlHi0 0x01d444UL
3841
#define smnPerfMonCtlLo1 0x01d450UL

0 commit comments

Comments
 (0)