Skip to content

Commit 4a5346d

Browse files
Roman Lialexdeucher
authored andcommitted
drm/amd/display: Add green_sardine support to DC
Display Core support for green_sardine Signed-off-by: Roman Li <Roman.Li@amd.com> Acked-by: Hersen Wu <hersenxs.wu@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent d83d3ad commit 4a5346d

4 files changed

Lines changed: 25 additions & 0 deletions

File tree

drivers/gpu/drm/amd/display/Kconfig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,14 @@ config DRM_AMD_DC_DCN
1717
help
1818
Raven, Navi and Renoir family support for display engine
1919

20+
config DRM_AMD_DC_GREEN_SARDINE
21+
bool "Green Sardine support"
22+
default y
23+
depends on DRM_AMD_DC_DCN
24+
help
25+
Choose this option if you want to have
26+
Green Sardine support for display engine
27+
2028
config DRM_AMD_DC_DCN3_0
2129
bool "DCN 3.0 family"
2230
depends on DRM_AMD_DC && X86

drivers/gpu/drm/amd/display/dc/clk_mgr/clk_mgr.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,13 @@ struct clk_mgr *dc_clk_mgr_create(struct dc_context *ctx, struct pp_smu_funcs *p
166166
rn_clk_mgr_construct(ctx, clk_mgr, pp_smu, dccg);
167167
break;
168168
}
169+
170+
#if defined(CONFIG_DRM_AMD_DC_GREEN_SARDINE)
171+
if (ASICREV_IS_GREEN_SARDINE(asic_id.hw_internal_rev)) {
172+
rn_clk_mgr_construct(ctx, clk_mgr, pp_smu, dccg);
173+
break;
174+
}
175+
#endif
169176
if (ASICREV_IS_RAVEN2(asic_id.hw_internal_rev)) {
170177
rv2_clk_mgr_construct(ctx, clk_mgr, pp_smu);
171178
break;

drivers/gpu/drm/amd/display/dc/core/dc_resource.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,10 @@ enum dce_version resource_parse_asic_id(struct hw_asic_id asic_id)
120120
dc_version = DCN_VERSION_1_01;
121121
if (ASICREV_IS_RENOIR(asic_id.hw_internal_rev))
122122
dc_version = DCN_VERSION_2_1;
123+
#if defined(CONFIG_DRM_AMD_DC_GREEN_SARDINE)
124+
if (ASICREV_IS_GREEN_SARDINE(asic_id.hw_internal_rev))
125+
dc_version = DCN_VERSION_2_1;
126+
#endif
123127
break;
124128
#endif
125129

drivers/gpu/drm/amd/display/include/dal_asic_id.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,12 @@ enum {
205205
#if defined(CONFIG_DRM_AMD_DC_DCN3_0)
206206
#define ASICREV_IS_SIENNA_CICHLID_P(eChipRev) ((eChipRev >= NV_SIENNA_CICHLID_P_A0))
207207
#endif
208+
#if defined(CONFIG_DRM_AMD_DC_GREEN_SARDINE)
209+
#define GREEN_SARDINE_A0 0xA1
210+
#ifndef ASICREV_IS_GREEN_SARDINE
211+
#define ASICREV_IS_GREEN_SARDINE(eChipRev) ((eChipRev >= GREEN_SARDINE_A0) && (eChipRev < 0xFF))
212+
#endif
213+
#endif
208214

209215
/*
210216
* ASIC chip ID

0 commit comments

Comments
 (0)