Skip to content

Commit 1e88eb1

Browse files
Harry Wentlandalexdeucher
authored andcommitted
drm/amd/display: Drop CONFIG_DRM_AMD_DC_HDCP
[Why & How] There is no reason we still need a config option for this. Reviewed-by: Wenjing Liu <[email protected]> Acked-by: Qingqing Zhuo <[email protected]> Signed-off-by: Harry Wentland <[email protected]> Tested-by: Daniel Wheeler <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent ab487ea commit 1e88eb1

21 files changed

Lines changed: 3 additions & 114 deletions

drivers/gpu/drm/amd/display/Kconfig

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,6 @@ config DRM_AMD_DC_DCN
2525
help
2626
Raven, Navi, and newer family support for display engine
2727

28-
config DRM_AMD_DC_HDCP
29-
bool "Enable HDCP support in DC"
30-
depends on DRM_AMD_DC
31-
help
32-
Choose this option if you want to support HDCP authentication.
33-
3428
config DRM_AMD_DC_SI
3529
bool "AMD DC support for Southern Islands ASICs"
3630
depends on DRM_AMDGPU_SI

drivers/gpu/drm/amd/display/Makefile

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,18 +36,14 @@ subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/modules/info_packet
3636
subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/modules/power
3737
subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dmub/inc
3838

39-
ifdef CONFIG_DRM_AMD_DC_HDCP
4039
subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/modules/hdcp
41-
endif
4240

4341
#TODO: remove when Timing Sync feature is complete
4442
subdir-ccflags-y += -DBUILD_FEATURE_TIMING_SYNC=0
4543

4644
DAL_LIBS = amdgpu_dm dc modules/freesync modules/color modules/info_packet modules/power dmub/src
4745

48-
ifdef CONFIG_DRM_AMD_DC_HDCP
4946
DAL_LIBS += modules/hdcp
50-
endif
5147

5248
AMD_DAL = $(addsuffix /Makefile, $(addprefix $(FULL_AMD_DISPLAY_PATH)/,$(DAL_LIBS)))
5349

drivers/gpu/drm/amd/display/amdgpu_dm/Makefile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,7 @@ ifneq ($(CONFIG_DRM_AMD_DC),)
4141
AMDGPUDM += amdgpu_dm_services.o amdgpu_dm_helpers.o amdgpu_dm_pp_smu.o amdgpu_dm_psr.o
4242
endif
4343

44-
ifdef CONFIG_DRM_AMD_DC_HDCP
4544
AMDGPUDM += amdgpu_dm_hdcp.o
46-
endif
4745

4846
ifneq ($(CONFIG_DEBUG_FS),)
4947
AMDGPUDM += amdgpu_dm_crc.o amdgpu_dm_debugfs.o

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

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,8 @@
5252
#include "amdgpu_dm.h"
5353
#include "amdgpu_dm_plane.h"
5454
#include "amdgpu_dm_crtc.h"
55-
#ifdef CONFIG_DRM_AMD_DC_HDCP
5655
#include "amdgpu_dm_hdcp.h"
5756
#include <drm/display/drm_hdcp_helper.h>
58-
#endif
5957
#include "amdgpu_pm.h"
6058
#include "amdgpu_atombios.h"
6159

@@ -1488,19 +1486,15 @@ static void retrieve_dmi_info(struct amdgpu_display_manager *dm)
14881486
static int amdgpu_dm_init(struct amdgpu_device *adev)
14891487
{
14901488
struct dc_init_data init_data;
1491-
#ifdef CONFIG_DRM_AMD_DC_HDCP
14921489
struct dc_callback_init init_params;
1493-
#endif
14941490
int r;
14951491

14961492
adev->dm.ddev = adev_to_drm(adev);
14971493
adev->dm.adev = adev;
14981494

14991495
/* Zero all the fields */
15001496
memset(&init_data, 0, sizeof(init_data));
1501-
#ifdef CONFIG_DRM_AMD_DC_HDCP
15021497
memset(&init_params, 0, sizeof(init_params));
1503-
#endif
15041498

15051499
mutex_init(&adev->dm.dpia_aux_lock);
15061500
mutex_init(&adev->dm.dc_lock);
@@ -1726,7 +1720,6 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
17261720
DRM_ERROR("amdgpu: failed to initialize vblank_workqueue.\n");
17271721
}
17281722

1729-
#ifdef CONFIG_DRM_AMD_DC_HDCP
17301723
if (adev->dm.dc->caps.max_links > 0 && adev->family >= AMDGPU_FAMILY_RV) {
17311724
adev->dm.hdcp_workqueue = hdcp_create_workqueue(adev, &init_params.cp_psp, adev->dm.dc);
17321725

@@ -1737,7 +1730,6 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
17371730

17381731
dc_init_callbacks(adev->dm.dc, &init_params);
17391732
}
1740-
#endif
17411733
#if defined(CONFIG_DRM_AMD_SECURE_DISPLAY)
17421734
adev->dm.secure_display_ctxs = amdgpu_dm_crtc_secure_display_create_contexts(adev);
17431735
if (!adev->dm.secure_display_ctxs) {
@@ -1844,15 +1836,13 @@ static void amdgpu_dm_fini(struct amdgpu_device *adev)
18441836
adev->dm.secure_display_ctxs = NULL;
18451837
}
18461838
#endif
1847-
#ifdef CONFIG_DRM_AMD_DC_HDCP
18481839
if (adev->dm.hdcp_workqueue) {
18491840
hdcp_destroy(&adev->dev->kobj, adev->dm.hdcp_workqueue);
18501841
adev->dm.hdcp_workqueue = NULL;
18511842
}
18521843

18531844
if (adev->dm.dc)
18541845
dc_deinit_callbacks(adev->dm.dc);
1855-
#endif
18561846

18571847
dc_dmub_srv_destroy(&adev->dm.dc->ctx->dmub_srv);
18581848

@@ -3111,11 +3101,9 @@ void amdgpu_dm_update_connector_after_detect(
31113101
aconnector->edid = NULL;
31123102
kfree(aconnector->timing_requested);
31133103
aconnector->timing_requested = NULL;
3114-
#ifdef CONFIG_DRM_AMD_DC_HDCP
31153104
/* Set CP to DESIRED if it was ENABLED, so we can re-enable it again on hotplug */
31163105
if (connector->state->content_protection == DRM_MODE_CONTENT_PROTECTION_ENABLED)
31173106
connector->state->content_protection = DRM_MODE_CONTENT_PROTECTION_DESIRED;
3118-
#endif
31193107
}
31203108

31213109
mutex_unlock(&dev->mode_config.mutex);
@@ -3132,9 +3120,7 @@ static void handle_hpd_irq_helper(struct amdgpu_dm_connector *aconnector)
31323120
struct drm_device *dev = connector->dev;
31333121
enum dc_connection_type new_connection_type = dc_connection_none;
31343122
struct amdgpu_device *adev = drm_to_adev(dev);
3135-
#ifdef CONFIG_DRM_AMD_DC_HDCP
31363123
struct dm_connector_state *dm_con_state = to_dm_connector_state(connector->state);
3137-
#endif
31383124
bool ret = false;
31393125

31403126
if (adev->dm.disable_hpd_irq)
@@ -3146,12 +3132,10 @@ static void handle_hpd_irq_helper(struct amdgpu_dm_connector *aconnector)
31463132
*/
31473133
mutex_lock(&aconnector->hpd_lock);
31483134

3149-
#ifdef CONFIG_DRM_AMD_DC_HDCP
31503135
if (adev->dm.hdcp_workqueue) {
31513136
hdcp_reset_display(adev->dm.hdcp_workqueue, aconnector->dc_link->link_index);
31523137
dm_con_state->update_hdcp = true;
31533138
}
3154-
#endif
31553139
if (aconnector->fake_enable)
31563140
aconnector->fake_enable = false;
31573141

@@ -3398,12 +3382,10 @@ static void handle_hpd_rx_irq(void *param)
33983382
}
33993383
}
34003384
}
3401-
#ifdef CONFIG_DRM_AMD_DC_HDCP
34023385
if (hpd_irq_data.bytes.device_service_irq.bits.CP_IRQ) {
34033386
if (adev->dm.hdcp_workqueue)
34043387
hdcp_handle_cpirq(adev->dm.hdcp_workqueue, aconnector->base.index);
34053388
}
3406-
#endif
34073389

34083390
if (dc_link->type != dc_connection_mst_branch)
34093391
drm_dp_cec_irq(&aconnector->dm_dp_aux.aux);
@@ -7273,10 +7255,8 @@ void amdgpu_dm_connector_init_helper(struct amdgpu_display_manager *dm,
72737255
if (!aconnector->mst_root)
72747256
drm_connector_attach_vrr_capable_property(&aconnector->base);
72757257

7276-
#ifdef CONFIG_DRM_AMD_DC_HDCP
72777258
if (adev->dm.hdcp_workqueue)
72787259
drm_connector_attach_content_protection_property(&aconnector->base, true);
7279-
#endif
72807260
}
72817261
}
72827262

@@ -7538,7 +7518,6 @@ is_scaling_state_different(const struct dm_connector_state *dm_state,
75387518
return false;
75397519
}
75407520

7541-
#ifdef CONFIG_DRM_AMD_DC_HDCP
75427521
static bool is_content_protection_different(struct drm_crtc_state *new_crtc_state,
75437522
struct drm_crtc_state *old_crtc_state,
75447523
struct drm_connector_state *new_conn_state,
@@ -7658,7 +7637,6 @@ static bool is_content_protection_different(struct drm_crtc_state *new_crtc_stat
76587637
pr_debug("[HDCP_DM] DESIRED->ENABLED %s :false\n", __func__);
76597638
return false;
76607639
}
7661-
#endif
76627640

76637641
static void remove_stream(struct amdgpu_device *adev,
76647642
struct amdgpu_crtc *acrtc,
@@ -8538,7 +8516,6 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state)
85388516
acrtc->otg_inst = status->primary_otg_inst;
85398517
}
85408518
}
8541-
#ifdef CONFIG_DRM_AMD_DC_HDCP
85428519
for_each_oldnew_connector_in_state(state, connector, old_con_state, new_con_state, i) {
85438520
struct dm_connector_state *dm_new_con_state = to_dm_connector_state(new_con_state);
85448521
struct amdgpu_crtc *acrtc = to_amdgpu_crtc(dm_new_con_state->base.crtc);
@@ -8649,7 +8626,6 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state)
86498626
new_con_state->hdcp_content_type, enable_encryption);
86508627
}
86518628
}
8652-
#endif
86538629

86548630
/* Handle connector state changes */
86558631
for_each_oldnew_connector_in_state(state, connector, old_con_state, new_con_state, i) {

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -461,9 +461,7 @@ struct amdgpu_display_manager {
461461
struct amdgpu_dm_backlight_caps backlight_caps[AMDGPU_DM_MAX_NUM_EDP];
462462

463463
struct mod_freesync *freesync_module;
464-
#ifdef CONFIG_DRM_AMD_DC_HDCP
465464
struct hdcp_workqueue *hdcp_workqueue;
466-
#endif
467465

468466
/**
469467
* @vblank_control_workqueue:
@@ -747,9 +745,7 @@ struct dm_connector_state {
747745
uint8_t underscan_hborder;
748746
bool underscan_enable;
749747
bool freesync_capable;
750-
#ifdef CONFIG_DRM_AMD_DC_HDCP
751748
bool update_hdcp;
752-
#endif
753749
uint8_t abm_level;
754750
int vcpi_slots;
755751
uint64_t pbn;

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

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -947,7 +947,6 @@ static ssize_t dp_dsc_passthrough_set(struct file *f, const char __user *buf,
947947
return 0;
948948
}
949949

950-
#ifdef CONFIG_DRM_AMD_DC_HDCP
951950
/*
952951
* Returns the HDCP capability of the Display (1.4 for now).
953952
*
@@ -984,7 +983,6 @@ static int hdcp_sink_capability_show(struct seq_file *m, void *data)
984983

985984
return 0;
986985
}
987-
#endif
988986

989987
/*
990988
* Returns whether the connected display is internal and not hotpluggable.
@@ -2593,9 +2591,7 @@ DEFINE_SHOW_ATTRIBUTE(dp_dsc_fec_support);
25932591
DEFINE_SHOW_ATTRIBUTE(dmub_fw_state);
25942592
DEFINE_SHOW_ATTRIBUTE(dmub_tracebuffer);
25952593
DEFINE_SHOW_ATTRIBUTE(dp_lttpr_status);
2596-
#ifdef CONFIG_DRM_AMD_DC_HDCP
25972594
DEFINE_SHOW_ATTRIBUTE(hdcp_sink_capability);
2598-
#endif
25992595
DEFINE_SHOW_ATTRIBUTE(internal_display);
26002596
DEFINE_SHOW_ATTRIBUTE(psr_capability);
26012597
DEFINE_SHOW_ATTRIBUTE(dp_is_mst_connector);
@@ -2726,9 +2722,7 @@ static const struct {
27262722
{"phy_settings", &dp_phy_settings_debugfs_fop},
27272723
{"lttpr_status", &dp_lttpr_status_fops},
27282724
{"test_pattern", &dp_phy_test_pattern_fops},
2729-
#ifdef CONFIG_DRM_AMD_DC_HDCP
27302725
{"hdcp_sink_capability", &hdcp_sink_capability_fops},
2731-
#endif
27322726
{"sdp_message", &sdp_message_fops},
27332727
{"aux_dpcd_address", &dp_dpcd_address_debugfs_fops},
27342728
{"aux_dpcd_size", &dp_dpcd_size_debugfs_fops},
@@ -2749,14 +2743,13 @@ static const struct {
27492743
{"is_dpia_link", &is_dpia_link_fops}
27502744
};
27512745

2752-
#ifdef CONFIG_DRM_AMD_DC_HDCP
27532746
static const struct {
27542747
char *name;
27552748
const struct file_operations *fops;
27562749
} hdmi_debugfs_entries[] = {
27572750
{"hdcp_sink_capability", &hdcp_sink_capability_fops}
27582751
};
2759-
#endif
2752+
27602753
/*
27612754
* Force YUV420 output if available from the given mode
27622755
*/
@@ -3015,15 +3008,13 @@ void connector_debugfs_init(struct amdgpu_dm_connector *connector)
30153008
connector->debugfs_dpcd_address = 0;
30163009
connector->debugfs_dpcd_size = 0;
30173010

3018-
#ifdef CONFIG_DRM_AMD_DC_HDCP
30193011
if (connector->base.connector_type == DRM_MODE_CONNECTOR_HDMIA) {
30203012
for (i = 0; i < ARRAY_SIZE(hdmi_debugfs_entries); i++) {
30213013
debugfs_create_file(hdmi_debugfs_entries[i].name,
30223014
0644, dir, connector,
30233015
hdmi_debugfs_entries[i].fops);
30243016
}
30253017
}
3026-
#endif
30273018
}
30283019

30293020
#ifdef CONFIG_DRM_AMD_SECURE_DISPLAY

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,7 @@
3131
#include "amdgpu.h"
3232
#include "amdgpu_dm.h"
3333
#include "amdgpu_dm_mst_types.h"
34-
35-
#ifdef CONFIG_DRM_AMD_DC_HDCP
3634
#include "amdgpu_dm_hdcp.h"
37-
#endif
3835

3936
#include "dc.h"
4037
#include "dm_helpers.h"
@@ -362,7 +359,6 @@ static int dm_dp_mst_get_modes(struct drm_connector *connector)
362359
* plugged back with same display index, its hdcp properties
363360
* will be retrieved from hdcp_work within dm_dp_mst_get_modes
364361
*/
365-
#ifdef CONFIG_DRM_AMD_DC_HDCP
366362
if (aconnector->dc_sink && connector->state) {
367363
struct drm_device *dev = connector->dev;
368364
struct amdgpu_device *adev = drm_to_adev(dev);
@@ -374,7 +370,6 @@ static int dm_dp_mst_get_modes(struct drm_connector *connector)
374370
connector->state->content_protection =
375371
hdcp_w->content_protection[connector->index];
376372
}
377-
#endif
378373

379374
if (aconnector->dc_sink) {
380375
amdgpu_dm_update_freesync_caps(

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,7 @@ ifdef CONFIG_DRM_AMD_DC_SI
5656
DC_LIBS += dce60
5757
endif
5858

59-
ifdef CONFIG_DRM_AMD_DC_HDCP
6059
DC_LIBS += hdcp
61-
endif
6260

6361
AMD_DC = $(addsuffix /Makefile, $(addprefix $(FULL_AMD_DISPLAY_PATH)/dc/,$(DC_LIBS)))
6462

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1377,16 +1377,12 @@ void dc_hardware_init(struct dc *dc)
13771377
void dc_init_callbacks(struct dc *dc,
13781378
const struct dc_callback_init *init_params)
13791379
{
1380-
#ifdef CONFIG_DRM_AMD_DC_HDCP
13811380
dc->ctx->cp_psp = init_params->cp_psp;
1382-
#endif
13831381
}
13841382

13851383
void dc_deinit_callbacks(struct dc *dc)
13861384
{
1387-
#ifdef CONFIG_DRM_AMD_DC_HDCP
13881385
memset(&dc->ctx->cp_psp, 0, sizeof(dc->ctx->cp_psp));
1389-
#endif
13901386
}
13911387

13921388
void dc_destroy(struct dc **dc)

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ const struct dc_link_status *dc_link_get_status(const struct dc_link *link)
9393
{
9494
return link_get_status(link);
9595
}
96-
#ifdef CONFIG_DRM_AMD_DC_HDCP
9796

9897
/* return true if the connected receiver supports the hdcp version */
9998
bool dc_link_is_hdcp14(struct dc_link *link, enum signal_type signal)
@@ -105,7 +104,6 @@ bool dc_link_is_hdcp22(struct dc_link *link, enum signal_type signal)
105104
{
106105
return link_is_hdcp22(link, signal);
107106
}
108-
#endif
109107

110108
void dc_link_clear_dprx_states(struct dc_link *link)
111109
{

0 commit comments

Comments
 (0)