Skip to content

Commit 8fe44c0

Browse files
committed
drm/amdgpu/display: fold DRM_AMD_DC_DCN3_1 into DRM_AMD_DC_DCN
No need for a separate flag now that DCN3.1 is not in bring up. Fold into DRM_AMD_DC_DCN like previous DCN IPs. Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent 519424d commit 8fe44c0

58 files changed

Lines changed: 45 additions & 319 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

drivers/gpu/drm/amd/display/Kconfig

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,6 @@ config DRM_AMD_DC_SI
3131
by default. This includes Tahiti, Pitcairn, Cape Verde, Oland.
3232
Hainan is not supported by AMD DC and it has no physical DCE6.
3333

34-
config DRM_AMD_DC_DCN3_1
35-
bool "DCN 3.1 family"
36-
depends on DRM_AMD_DC_DCN
37-
help
38-
Choose this option if you want to have
39-
DCN3.1 family support for display engine
40-
4134
config DEBUG_KERNEL_DC
4235
bool "Enable kgdb break in DC"
4336
depends on DRM_AMD_DC

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,8 @@ MODULE_FIRMWARE(FIRMWARE_VANGOGH_DMUB);
110110
MODULE_FIRMWARE(FIRMWARE_DIMGREY_CAVEFISH_DMUB);
111111
#define FIRMWARE_BEIGE_GOBY_DMUB "amdgpu/beige_goby_dmcub.bin"
112112
MODULE_FIRMWARE(FIRMWARE_BEIGE_GOBY_DMUB);
113-
#if defined(CONFIG_DRM_AMD_DC_DCN3_1)
114113
#define FIRMWARE_YELLOW_CARP_DMUB "amdgpu/yellow_carp_dmcub.bin"
115114
MODULE_FIRMWARE(FIRMWARE_YELLOW_CARP_DMUB);
116-
#endif
117115

118116
#define FIRMWARE_RAVEN_DMCU "amdgpu/raven_dmcu.bin"
119117
MODULE_FIRMWARE(FIRMWARE_RAVEN_DMCU);
@@ -1145,16 +1143,10 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
11451143
if (ASICREV_IS_GREEN_SARDINE(adev->external_rev_id))
11461144
init_data.flags.disable_dmcu = true;
11471145
break;
1148-
#if defined(CONFIG_DRM_AMD_DC_DCN)
11491146
case CHIP_VANGOGH:
1150-
init_data.flags.gpu_vm_support = true;
1151-
break;
1152-
#endif
1153-
#if defined(CONFIG_DRM_AMD_DC_DCN3_1)
11541147
case CHIP_YELLOW_CARP:
11551148
init_data.flags.gpu_vm_support = true;
11561149
break;
1157-
#endif
11581150
default:
11591151
break;
11601152
}
@@ -1411,9 +1403,7 @@ static int load_dmcu_fw(struct amdgpu_device *adev)
14111403
case CHIP_DIMGREY_CAVEFISH:
14121404
case CHIP_BEIGE_GOBY:
14131405
case CHIP_VANGOGH:
1414-
#if defined(CONFIG_DRM_AMD_DC_DCN3_1)
14151406
case CHIP_YELLOW_CARP:
1416-
#endif
14171407
return 0;
14181408
case CHIP_NAVI12:
14191409
fw_name_dmcu = FIRMWARE_NAVI12_DMCU;
@@ -1532,12 +1522,10 @@ static int dm_dmub_sw_init(struct amdgpu_device *adev)
15321522
dmub_asic = DMUB_ASIC_DCN303;
15331523
fw_name_dmub = FIRMWARE_BEIGE_GOBY_DMUB;
15341524
break;
1535-
#if defined(CONFIG_DRM_AMD_DC_DCN3_1)
15361525
case CHIP_YELLOW_CARP:
15371526
dmub_asic = DMUB_ASIC_DCN31;
15381527
fw_name_dmub = FIRMWARE_YELLOW_CARP_DMUB;
15391528
break;
1540-
#endif
15411529

15421530
default:
15431531
/* ASIC doesn't support DMUB. */
@@ -2232,7 +2220,7 @@ static int dm_resume(void *handle)
22322220
= 0xffffffff;
22332221
}
22342222
}
2235-
#if defined(CONFIG_DRM_AMD_DC_DCN3_1)
2223+
#if defined(CONFIG_DRM_AMD_DC_DCN)
22362224
/*
22372225
* Resource allocation happens for link encoders for newer ASIC in
22382226
* dc_validate_global_state, so we need to revalidate it.
@@ -3786,9 +3774,7 @@ static int amdgpu_dm_initialize_drm_device(struct amdgpu_device *adev)
37863774
switch (adev->asic_type) {
37873775
case CHIP_SIENNA_CICHLID:
37883776
case CHIP_NAVY_FLOUNDER:
3789-
#if defined(CONFIG_DRM_AMD_DC_DCN3_1)
37903777
case CHIP_YELLOW_CARP:
3791-
#endif
37923778
case CHIP_RENOIR:
37933779
if (register_outbox_irq_handlers(dm->adev)) {
37943780
DRM_ERROR("DM: Failed to initialize IRQ\n");
@@ -3893,9 +3879,7 @@ static int amdgpu_dm_initialize_drm_device(struct amdgpu_device *adev)
38933879
case CHIP_DIMGREY_CAVEFISH:
38943880
case CHIP_BEIGE_GOBY:
38953881
case CHIP_VANGOGH:
3896-
#if defined(CONFIG_DRM_AMD_DC_DCN3_1)
38973882
case CHIP_YELLOW_CARP:
3898-
#endif
38993883
if (dcn10_register_irq_handlers(dm->adev)) {
39003884
DRM_ERROR("DM: Failed to initialize IRQ\n");
39013885
goto fail;
@@ -4067,13 +4051,11 @@ static int dm_early_init(void *handle)
40674051
adev->mode_info.num_hpd = 6;
40684052
adev->mode_info.num_dig = 6;
40694053
break;
4070-
#if defined(CONFIG_DRM_AMD_DC_DCN3_1)
40714054
case CHIP_YELLOW_CARP:
40724055
adev->mode_info.num_crtc = 4;
40734056
adev->mode_info.num_hpd = 4;
40744057
adev->mode_info.num_dig = 4;
40754058
break;
4076-
#endif
40774059
case CHIP_NAVI14:
40784060
case CHIP_DIMGREY_CAVEFISH:
40794061
adev->mode_info.num_crtc = 5;
@@ -4311,9 +4293,7 @@ fill_gfx9_tiling_info_from_device(const struct amdgpu_device *adev,
43114293
adev->asic_type == CHIP_NAVY_FLOUNDER ||
43124294
adev->asic_type == CHIP_DIMGREY_CAVEFISH ||
43134295
adev->asic_type == CHIP_BEIGE_GOBY ||
4314-
#if defined(CONFIG_DRM_AMD_DC_DCN3_1)
43154296
adev->asic_type == CHIP_YELLOW_CARP ||
4316-
#endif
43174297
adev->asic_type == CHIP_VANGOGH)
43184298
tiling_info->gfx9.num_pkrs = adev->gfx.config.gb_addr_config_fields.num_pkrs;
43194299
}

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -467,13 +467,11 @@ static void update_config(void *handle, struct cp_psp_stream_config *config)
467467
display->dig_fe = config->dig_fe;
468468
link->dig_be = config->dig_be;
469469
link->ddc_line = aconnector->dc_link->ddc_hw_inst + 1;
470-
#if defined(CONFIG_DRM_AMD_DC_DCN3_1)
471470
display->stream_enc_idx = config->stream_enc_idx;
472471
link->link_enc_idx = config->link_enc_idx;
473472
link->phy_idx = config->phy_idx;
474473
link->hdcp_supported_informational = dc_link_is_hdcp14(aconnector->dc_link,
475474
aconnector->dc_sink->sink_signal) ? 1 : 0;
476-
#endif
477475
link->dp.rev = aconnector->dc_link->dpcd_caps.dpcd_rev.raw;
478476
link->dp.assr_enabled = config->assr_enabled;
479477
link->dp.mst_enabled = config->mst_enabled;
@@ -657,12 +655,10 @@ struct hdcp_workqueue *hdcp_create_workqueue(struct amdgpu_device *adev, struct
657655
INIT_DELAYED_WORK(&hdcp_work[i].property_validate_dwork, event_property_validate);
658656

659657
hdcp_work[i].hdcp.config.psp.handle = &adev->psp;
660-
#if defined(CONFIG_DRM_AMD_DC_DCN3_1)
661658
if (dc->ctx->dce_version == DCN_VERSION_3_1) {
662659
hdcp_work[i].hdcp.config.psp.caps.dtm_v3_supported = 1;
663660
hdcp_work[i].hdcp.config.psp.caps.opm_state_query_supported = false;
664661
}
665-
#endif
666662
hdcp_work[i].hdcp.config.ddc.handle = dc_get_link_at_index(dc, i);
667663
hdcp_work[i].hdcp.config.ddc.funcs.write_i2c = lp_write_i2c;
668664
hdcp_work[i].hdcp.config.ddc.funcs.read_i2c = lp_read_i2c;

drivers/gpu/drm/amd/display/dc/Makefile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,8 @@ DC_LIBS += dcn30
3434
DC_LIBS += dcn301
3535
DC_LIBS += dcn302
3636
DC_LIBS += dcn303
37-
ifdef CONFIG_DRM_AMD_DC_DCN3_1
3837
DC_LIBS += dcn31
3938
endif
40-
endif
4139

4240
DC_LIBS += dce120
4341

drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -576,13 +576,11 @@ static struct device_id device_type_from_device_id(uint16_t device_id)
576576
result_device_id.device_type = DEVICE_TYPE_LCD;
577577
result_device_id.enum_id = 1;
578578
break;
579-
#if defined(CONFIG_DRM_AMD_DC_DCN3_1)
580579

581580
case ATOM_DISPLAY_LCD2_SUPPORT:
582581
result_device_id.device_type = DEVICE_TYPE_LCD;
583582
result_device_id.enum_id = 2;
584583
break;
585-
#endif
586584

587585
case ATOM_DISPLAY_DFP1_SUPPORT:
588586
result_device_id.device_type = DEVICE_TYPE_DFP;
@@ -2162,7 +2160,6 @@ static enum bp_result get_integrated_info_v2_1(
21622160
return BP_RESULT_OK;
21632161
}
21642162

2165-
#if defined(CONFIG_DRM_AMD_DC_DCN3_1)
21662163
static enum bp_result get_integrated_info_v2_2(
21672164
struct bios_parser *bp,
21682165
struct integrated_info *info)
@@ -2262,7 +2259,7 @@ static enum bp_result get_integrated_info_v2_2(
22622259

22632260
return BP_RESULT_OK;
22642261
}
2265-
#endif
2262+
22662263
/*
22672264
* construct_integrated_info
22682265
*
@@ -2310,11 +2307,9 @@ static enum bp_result construct_integrated_info(
23102307
case 1:
23112308
result = get_integrated_info_v2_1(bp, info);
23122309
break;
2313-
#if defined(CONFIG_DRM_AMD_DC_DCN3_1)
23142310
case 2:
23152311
result = get_integrated_info_v2_2(bp, info);
23162312
break;
2317-
#endif
23182313
default:
23192314
return result;
23202315
}

drivers/gpu/drm/amd/display/dc/bios/command_table_helper2.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,9 @@ bool dal_bios_parser_init_cmd_tbl_helper2(
7272
case DCN_VERSION_2_1:
7373
case DCN_VERSION_3_0:
7474
case DCN_VERSION_3_01:
75-
#if defined(CONFIG_DRM_AMD_DC_DCN3_1)
76-
case DCN_VERSION_3_1:
77-
*h = dal_cmd_tbl_helper_dce112_get_table2();
78-
return true;
79-
#endif
8075
case DCN_VERSION_3_02:
8176
case DCN_VERSION_3_03:
77+
case DCN_VERSION_3_1:
8278
*h = dal_cmd_tbl_helper_dce112_get_table2();
8379
return true;
8480
#endif

drivers/gpu/drm/amd/display/dc/clk_mgr/Makefile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,7 @@ endif
135135
AMD_DAL_CLK_MGR_DCN301 = $(addprefix $(AMDDALPATH)/dc/clk_mgr/dcn301/,$(CLK_MGR_DCN301))
136136

137137
AMD_DISPLAY_FILES += $(AMD_DAL_CLK_MGR_DCN301)
138-
endif
139138

140-
ifdef CONFIG_DRM_AMD_DC_DCN3_1
141139
###############################################################################
142140
# DCN31
143141
###############################################################################

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

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,7 @@
4141
#include "dcn21/rn_clk_mgr.h"
4242
#include "dcn30/dcn30_clk_mgr.h"
4343
#include "dcn301/vg_clk_mgr.h"
44-
#if defined(CONFIG_DRM_AMD_DC_DCN3_1)
4544
#include "dcn31/dcn31_clk_mgr.h"
46-
#endif
4745

4846

4947
int clk_mgr_helper_get_active_display_cnt(
@@ -273,9 +271,6 @@ struct clk_mgr *dc_clk_mgr_create(struct dc_context *ctx, struct pp_smu_funcs *p
273271
return &clk_mgr->base.base;
274272
}
275273
break;
276-
#endif
277-
278-
#if defined(CONFIG_DRM_AMD_DC_DCN3_1)
279274
case FAMILY_YELLOW_CARP: {
280275
struct clk_mgr_dcn31 *clk_mgr = kzalloc(sizeof(*clk_mgr), GFP_KERNEL);
281276

@@ -325,12 +320,10 @@ void dc_destroy_clk_mgr(struct clk_mgr *clk_mgr_base)
325320
vg_clk_mgr_destroy(clk_mgr);
326321
break;
327322

328-
#if defined(CONFIG_DRM_AMD_DC_DCN3_1)
329323
case FAMILY_YELLOW_CARP:
330324
if (ASICREV_IS_YELLOW_CARP(clk_mgr_base->ctx->asic_id.hw_internal_rev))
331325
dcn31_clk_mgr_destroy(clk_mgr);
332326
break;
333-
#endif
334327

335328
default:
336329
break;

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -386,10 +386,8 @@ void dcn2_update_clocks_fpga(struct clk_mgr *clk_mgr,
386386
// Both fclk and ref_dppclk run on the same scemi clock.
387387
clk_mgr_int->dccg->ref_dppclk = clk_mgr->clks.fclk_khz;
388388

389-
#if defined(CONFIG_DRM_AMD_DC_DCN3_1)
390389
/* TODO: set dtbclk in correct place */
391390
clk_mgr->clks.dtbclk_en = false;
392-
#endif
393391
dm_set_dcn_clocks(clk_mgr->ctx, &clk_mgr->clks);
394392
}
395393

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

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1524,7 +1524,7 @@ static uint8_t get_stream_mask(struct dc *dc, struct dc_state *context)
15241524
return stream_mask;
15251525
}
15261526

1527-
#if defined(CONFIG_DRM_AMD_DC_DCN3_1)
1527+
#if defined(CONFIG_DRM_AMD_DC_DCN)
15281528
void dc_z10_restore(struct dc *dc)
15291529
{
15301530
if (dc->hwss.z10_restore)
@@ -1544,9 +1544,7 @@ static enum dc_status dc_commit_state_no_check(struct dc *dc, struct dc_state *c
15441544
struct dc_stream_state *dc_streams[MAX_STREAMS] = {0};
15451545

15461546
#if defined(CONFIG_DRM_AMD_DC_DCN)
1547-
#if defined(CONFIG_DRM_AMD_DC_DCN3_1)
15481547
dc_z10_restore(dc);
1549-
#endif
15501548
dc_allow_idle_optimizations(dc, false);
15511549
#endif
15521550

@@ -2626,7 +2624,7 @@ static void commit_planes_for_stream(struct dc *dc,
26262624
int i, j;
26272625
struct pipe_ctx *top_pipe_to_program = NULL;
26282626

2629-
#if defined(CONFIG_DRM_AMD_DC_DCN3_1)
2627+
#if defined(CONFIG_DRM_AMD_DC_DCN)
26302628
dc_z10_restore(dc);
26312629
#endif
26322630

@@ -3085,7 +3083,7 @@ void dc_set_power_state(
30853083
case DC_ACPI_CM_POWER_STATE_D0:
30863084
dc_resource_state_construct(dc, dc->current_state);
30873085

3088-
#if defined(CONFIG_DRM_AMD_DC_DCN3_1)
3086+
#if defined(CONFIG_DRM_AMD_DC_DCN)
30893087
dc_z10_restore(dc);
30903088
#endif
30913089
if (dc->ctx->dmub_srv)

0 commit comments

Comments
 (0)