mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-03-11 23:27:42 +07:00
drm/amd/display: Fix Dali clk mgr construct
[WHY] Dali is currently being misinterpreted as Renoir, as a result uses wrong clk mgr constructor [HOW] Add check to init Dali as Raven2 before it can be misidentified Clean up & fix Raven2 & Dali ASIC checks Signed-off-by: Michael Strauss <michael.strauss@amd.com> Reviewed-by: Eric Yang <eric.yang2@amd.com> Acked-by: Leo Li <sunpeng.li@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
f42ea55be1
commit
10f51857b7
@ -134,6 +134,13 @@ struct clk_mgr *dc_clk_mgr_create(struct dc_context *ctx, struct pp_smu_funcs *p
|
||||
|
||||
#if defined(CONFIG_DRM_AMD_DC_DCN)
|
||||
case FAMILY_RV:
|
||||
if (ASICREV_IS_DALI(asic_id.hw_internal_rev)) {
|
||||
/* TEMP: this check has to come before ASICREV_IS_RENOIR */
|
||||
/* which also incorrectly returns true for Dali */
|
||||
rv2_clk_mgr_construct(ctx, clk_mgr, pp_smu);
|
||||
break;
|
||||
}
|
||||
|
||||
if (ASICREV_IS_RENOIR(asic_id.hw_internal_rev)) {
|
||||
rn_clk_mgr_construct(ctx, clk_mgr, pp_smu, dccg);
|
||||
break;
|
||||
|
@ -134,19 +134,17 @@
|
||||
#define PICASSO_A0 0x41
|
||||
/* DCN1_01 */
|
||||
#define RAVEN2_A0 0x81
|
||||
#define RAVEN2_15D8_REV_E3 0xE3
|
||||
#define RAVEN2_15D8_REV_E4 0xE4
|
||||
#define RAVEN1_F0 0xF0
|
||||
#define RAVEN_UNKNOWN 0xFF
|
||||
|
||||
#define PICASSO_15D8_REV_E3 0xE3
|
||||
#define PICASSO_15D8_REV_E4 0xE4
|
||||
|
||||
#define ASICREV_IS_RAVEN(eChipRev) ((eChipRev >= RAVEN_A0) && eChipRev < RAVEN_UNKNOWN)
|
||||
#define ASICREV_IS_PICASSO(eChipRev) ((eChipRev >= PICASSO_A0) && (eChipRev < RAVEN2_A0))
|
||||
#define ASICREV_IS_RAVEN2(eChipRev) ((eChipRev >= RAVEN2_A0) && (eChipRev < PICASSO_15D8_REV_E3))
|
||||
#define ASICREV_IS_DALI(eChipRev) ((eChipRev >= PICASSO_15D8_REV_E3) && (eChipRev < RAVEN1_F0))
|
||||
|
||||
#define ASICREV_IS_RAVEN2(eChipRev) ((eChipRev >= RAVEN2_A0) && (eChipRev < RAVEN1_F0))
|
||||
#define ASICREV_IS_RV1_F0(eChipRev) ((eChipRev >= RAVEN1_F0) && (eChipRev < RAVEN_UNKNOWN))
|
||||
|
||||
#define ASICREV_IS_DALI(eChipRev) ((eChipRev == RAVEN2_15D8_REV_E3) \
|
||||
|| (eChipRev == RAVEN2_15D8_REV_E4))
|
||||
|
||||
#define FAMILY_RV 142 /* DCN 1*/
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user