Commit 1e88eb1b authored by Harry Wentland's avatar Harry Wentland Committed by Alex Deucher

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: default avatarWenjing Liu <Wenjing.Liu@amd.com>
Acked-by: default avatarQingqing Zhuo <qingqing.zhuo@amd.com>
Signed-off-by: default avatarHarry Wentland <harry.wentland@amd.com>
Tested-by: default avatarDaniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent ab487ea8
...@@ -25,12 +25,6 @@ config DRM_AMD_DC_DCN ...@@ -25,12 +25,6 @@ config DRM_AMD_DC_DCN
help help
Raven, Navi, and newer family support for display engine Raven, Navi, and newer family support for display engine
config DRM_AMD_DC_HDCP
bool "Enable HDCP support in DC"
depends on DRM_AMD_DC
help
Choose this option if you want to support HDCP authentication.
config DRM_AMD_DC_SI config DRM_AMD_DC_SI
bool "AMD DC support for Southern Islands ASICs" bool "AMD DC support for Southern Islands ASICs"
depends on DRM_AMDGPU_SI depends on DRM_AMDGPU_SI
......
...@@ -36,18 +36,14 @@ subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/modules/info_packet ...@@ -36,18 +36,14 @@ subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/modules/info_packet
subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/modules/power subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/modules/power
subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dmub/inc subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dmub/inc
ifdef CONFIG_DRM_AMD_DC_HDCP
subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/modules/hdcp subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/modules/hdcp
endif
#TODO: remove when Timing Sync feature is complete #TODO: remove when Timing Sync feature is complete
subdir-ccflags-y += -DBUILD_FEATURE_TIMING_SYNC=0 subdir-ccflags-y += -DBUILD_FEATURE_TIMING_SYNC=0
DAL_LIBS = amdgpu_dm dc modules/freesync modules/color modules/info_packet modules/power dmub/src DAL_LIBS = amdgpu_dm dc modules/freesync modules/color modules/info_packet modules/power dmub/src
ifdef CONFIG_DRM_AMD_DC_HDCP
DAL_LIBS += modules/hdcp DAL_LIBS += modules/hdcp
endif
AMD_DAL = $(addsuffix /Makefile, $(addprefix $(FULL_AMD_DISPLAY_PATH)/,$(DAL_LIBS))) AMD_DAL = $(addsuffix /Makefile, $(addprefix $(FULL_AMD_DISPLAY_PATH)/,$(DAL_LIBS)))
......
...@@ -41,9 +41,7 @@ ifneq ($(CONFIG_DRM_AMD_DC),) ...@@ -41,9 +41,7 @@ ifneq ($(CONFIG_DRM_AMD_DC),)
AMDGPUDM += amdgpu_dm_services.o amdgpu_dm_helpers.o amdgpu_dm_pp_smu.o amdgpu_dm_psr.o AMDGPUDM += amdgpu_dm_services.o amdgpu_dm_helpers.o amdgpu_dm_pp_smu.o amdgpu_dm_psr.o
endif endif
ifdef CONFIG_DRM_AMD_DC_HDCP
AMDGPUDM += amdgpu_dm_hdcp.o AMDGPUDM += amdgpu_dm_hdcp.o
endif
ifneq ($(CONFIG_DEBUG_FS),) ifneq ($(CONFIG_DEBUG_FS),)
AMDGPUDM += amdgpu_dm_crc.o amdgpu_dm_debugfs.o AMDGPUDM += amdgpu_dm_crc.o amdgpu_dm_debugfs.o
......
...@@ -52,10 +52,8 @@ ...@@ -52,10 +52,8 @@
#include "amdgpu_dm.h" #include "amdgpu_dm.h"
#include "amdgpu_dm_plane.h" #include "amdgpu_dm_plane.h"
#include "amdgpu_dm_crtc.h" #include "amdgpu_dm_crtc.h"
#ifdef CONFIG_DRM_AMD_DC_HDCP
#include "amdgpu_dm_hdcp.h" #include "amdgpu_dm_hdcp.h"
#include <drm/display/drm_hdcp_helper.h> #include <drm/display/drm_hdcp_helper.h>
#endif
#include "amdgpu_pm.h" #include "amdgpu_pm.h"
#include "amdgpu_atombios.h" #include "amdgpu_atombios.h"
...@@ -1488,9 +1486,7 @@ static void retrieve_dmi_info(struct amdgpu_display_manager *dm) ...@@ -1488,9 +1486,7 @@ static void retrieve_dmi_info(struct amdgpu_display_manager *dm)
static int amdgpu_dm_init(struct amdgpu_device *adev) static int amdgpu_dm_init(struct amdgpu_device *adev)
{ {
struct dc_init_data init_data; struct dc_init_data init_data;
#ifdef CONFIG_DRM_AMD_DC_HDCP
struct dc_callback_init init_params; struct dc_callback_init init_params;
#endif
int r; int r;
adev->dm.ddev = adev_to_drm(adev); adev->dm.ddev = adev_to_drm(adev);
...@@ -1498,9 +1494,7 @@ static int amdgpu_dm_init(struct amdgpu_device *adev) ...@@ -1498,9 +1494,7 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
/* Zero all the fields */ /* Zero all the fields */
memset(&init_data, 0, sizeof(init_data)); memset(&init_data, 0, sizeof(init_data));
#ifdef CONFIG_DRM_AMD_DC_HDCP
memset(&init_params, 0, sizeof(init_params)); memset(&init_params, 0, sizeof(init_params));
#endif
mutex_init(&adev->dm.dpia_aux_lock); mutex_init(&adev->dm.dpia_aux_lock);
mutex_init(&adev->dm.dc_lock); mutex_init(&adev->dm.dc_lock);
...@@ -1726,7 +1720,6 @@ static int amdgpu_dm_init(struct amdgpu_device *adev) ...@@ -1726,7 +1720,6 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
DRM_ERROR("amdgpu: failed to initialize vblank_workqueue.\n"); DRM_ERROR("amdgpu: failed to initialize vblank_workqueue.\n");
} }
#ifdef CONFIG_DRM_AMD_DC_HDCP
if (adev->dm.dc->caps.max_links > 0 && adev->family >= AMDGPU_FAMILY_RV) { if (adev->dm.dc->caps.max_links > 0 && adev->family >= AMDGPU_FAMILY_RV) {
adev->dm.hdcp_workqueue = hdcp_create_workqueue(adev, &init_params.cp_psp, adev->dm.dc); adev->dm.hdcp_workqueue = hdcp_create_workqueue(adev, &init_params.cp_psp, adev->dm.dc);
...@@ -1737,7 +1730,6 @@ static int amdgpu_dm_init(struct amdgpu_device *adev) ...@@ -1737,7 +1730,6 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
dc_init_callbacks(adev->dm.dc, &init_params); dc_init_callbacks(adev->dm.dc, &init_params);
} }
#endif
#if defined(CONFIG_DRM_AMD_SECURE_DISPLAY) #if defined(CONFIG_DRM_AMD_SECURE_DISPLAY)
adev->dm.secure_display_ctxs = amdgpu_dm_crtc_secure_display_create_contexts(adev); adev->dm.secure_display_ctxs = amdgpu_dm_crtc_secure_display_create_contexts(adev);
if (!adev->dm.secure_display_ctxs) { if (!adev->dm.secure_display_ctxs) {
...@@ -1844,7 +1836,6 @@ static void amdgpu_dm_fini(struct amdgpu_device *adev) ...@@ -1844,7 +1836,6 @@ static void amdgpu_dm_fini(struct amdgpu_device *adev)
adev->dm.secure_display_ctxs = NULL; adev->dm.secure_display_ctxs = NULL;
} }
#endif #endif
#ifdef CONFIG_DRM_AMD_DC_HDCP
if (adev->dm.hdcp_workqueue) { if (adev->dm.hdcp_workqueue) {
hdcp_destroy(&adev->dev->kobj, adev->dm.hdcp_workqueue); hdcp_destroy(&adev->dev->kobj, adev->dm.hdcp_workqueue);
adev->dm.hdcp_workqueue = NULL; adev->dm.hdcp_workqueue = NULL;
...@@ -1852,7 +1843,6 @@ static void amdgpu_dm_fini(struct amdgpu_device *adev) ...@@ -1852,7 +1843,6 @@ static void amdgpu_dm_fini(struct amdgpu_device *adev)
if (adev->dm.dc) if (adev->dm.dc)
dc_deinit_callbacks(adev->dm.dc); dc_deinit_callbacks(adev->dm.dc);
#endif
dc_dmub_srv_destroy(&adev->dm.dc->ctx->dmub_srv); dc_dmub_srv_destroy(&adev->dm.dc->ctx->dmub_srv);
...@@ -3111,11 +3101,9 @@ void amdgpu_dm_update_connector_after_detect( ...@@ -3111,11 +3101,9 @@ void amdgpu_dm_update_connector_after_detect(
aconnector->edid = NULL; aconnector->edid = NULL;
kfree(aconnector->timing_requested); kfree(aconnector->timing_requested);
aconnector->timing_requested = NULL; aconnector->timing_requested = NULL;
#ifdef CONFIG_DRM_AMD_DC_HDCP
/* Set CP to DESIRED if it was ENABLED, so we can re-enable it again on hotplug */ /* Set CP to DESIRED if it was ENABLED, so we can re-enable it again on hotplug */
if (connector->state->content_protection == DRM_MODE_CONTENT_PROTECTION_ENABLED) if (connector->state->content_protection == DRM_MODE_CONTENT_PROTECTION_ENABLED)
connector->state->content_protection = DRM_MODE_CONTENT_PROTECTION_DESIRED; connector->state->content_protection = DRM_MODE_CONTENT_PROTECTION_DESIRED;
#endif
} }
mutex_unlock(&dev->mode_config.mutex); mutex_unlock(&dev->mode_config.mutex);
...@@ -3132,9 +3120,7 @@ static void handle_hpd_irq_helper(struct amdgpu_dm_connector *aconnector) ...@@ -3132,9 +3120,7 @@ static void handle_hpd_irq_helper(struct amdgpu_dm_connector *aconnector)
struct drm_device *dev = connector->dev; struct drm_device *dev = connector->dev;
enum dc_connection_type new_connection_type = dc_connection_none; enum dc_connection_type new_connection_type = dc_connection_none;
struct amdgpu_device *adev = drm_to_adev(dev); struct amdgpu_device *adev = drm_to_adev(dev);
#ifdef CONFIG_DRM_AMD_DC_HDCP
struct dm_connector_state *dm_con_state = to_dm_connector_state(connector->state); struct dm_connector_state *dm_con_state = to_dm_connector_state(connector->state);
#endif
bool ret = false; bool ret = false;
if (adev->dm.disable_hpd_irq) if (adev->dm.disable_hpd_irq)
...@@ -3146,12 +3132,10 @@ static void handle_hpd_irq_helper(struct amdgpu_dm_connector *aconnector) ...@@ -3146,12 +3132,10 @@ static void handle_hpd_irq_helper(struct amdgpu_dm_connector *aconnector)
*/ */
mutex_lock(&aconnector->hpd_lock); mutex_lock(&aconnector->hpd_lock);
#ifdef CONFIG_DRM_AMD_DC_HDCP
if (adev->dm.hdcp_workqueue) { if (adev->dm.hdcp_workqueue) {
hdcp_reset_display(adev->dm.hdcp_workqueue, aconnector->dc_link->link_index); hdcp_reset_display(adev->dm.hdcp_workqueue, aconnector->dc_link->link_index);
dm_con_state->update_hdcp = true; dm_con_state->update_hdcp = true;
} }
#endif
if (aconnector->fake_enable) if (aconnector->fake_enable)
aconnector->fake_enable = false; aconnector->fake_enable = false;
...@@ -3398,12 +3382,10 @@ static void handle_hpd_rx_irq(void *param) ...@@ -3398,12 +3382,10 @@ static void handle_hpd_rx_irq(void *param)
} }
} }
} }
#ifdef CONFIG_DRM_AMD_DC_HDCP
if (hpd_irq_data.bytes.device_service_irq.bits.CP_IRQ) { if (hpd_irq_data.bytes.device_service_irq.bits.CP_IRQ) {
if (adev->dm.hdcp_workqueue) if (adev->dm.hdcp_workqueue)
hdcp_handle_cpirq(adev->dm.hdcp_workqueue, aconnector->base.index); hdcp_handle_cpirq(adev->dm.hdcp_workqueue, aconnector->base.index);
} }
#endif
if (dc_link->type != dc_connection_mst_branch) if (dc_link->type != dc_connection_mst_branch)
drm_dp_cec_irq(&aconnector->dm_dp_aux.aux); drm_dp_cec_irq(&aconnector->dm_dp_aux.aux);
...@@ -7273,10 +7255,8 @@ void amdgpu_dm_connector_init_helper(struct amdgpu_display_manager *dm, ...@@ -7273,10 +7255,8 @@ void amdgpu_dm_connector_init_helper(struct amdgpu_display_manager *dm,
if (!aconnector->mst_root) if (!aconnector->mst_root)
drm_connector_attach_vrr_capable_property(&aconnector->base); drm_connector_attach_vrr_capable_property(&aconnector->base);
#ifdef CONFIG_DRM_AMD_DC_HDCP
if (adev->dm.hdcp_workqueue) if (adev->dm.hdcp_workqueue)
drm_connector_attach_content_protection_property(&aconnector->base, true); drm_connector_attach_content_protection_property(&aconnector->base, true);
#endif
} }
} }
...@@ -7538,7 +7518,6 @@ is_scaling_state_different(const struct dm_connector_state *dm_state, ...@@ -7538,7 +7518,6 @@ is_scaling_state_different(const struct dm_connector_state *dm_state,
return false; return false;
} }
#ifdef CONFIG_DRM_AMD_DC_HDCP
static bool is_content_protection_different(struct drm_crtc_state *new_crtc_state, static bool is_content_protection_different(struct drm_crtc_state *new_crtc_state,
struct drm_crtc_state *old_crtc_state, struct drm_crtc_state *old_crtc_state,
struct drm_connector_state *new_conn_state, struct drm_connector_state *new_conn_state,
...@@ -7658,7 +7637,6 @@ static bool is_content_protection_different(struct drm_crtc_state *new_crtc_stat ...@@ -7658,7 +7637,6 @@ static bool is_content_protection_different(struct drm_crtc_state *new_crtc_stat
pr_debug("[HDCP_DM] DESIRED->ENABLED %s :false\n", __func__); pr_debug("[HDCP_DM] DESIRED->ENABLED %s :false\n", __func__);
return false; return false;
} }
#endif
static void remove_stream(struct amdgpu_device *adev, static void remove_stream(struct amdgpu_device *adev,
struct amdgpu_crtc *acrtc, struct amdgpu_crtc *acrtc,
...@@ -8538,7 +8516,6 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state) ...@@ -8538,7 +8516,6 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state)
acrtc->otg_inst = status->primary_otg_inst; acrtc->otg_inst = status->primary_otg_inst;
} }
} }
#ifdef CONFIG_DRM_AMD_DC_HDCP
for_each_oldnew_connector_in_state(state, connector, old_con_state, new_con_state, i) { for_each_oldnew_connector_in_state(state, connector, old_con_state, new_con_state, i) {
struct dm_connector_state *dm_new_con_state = to_dm_connector_state(new_con_state); struct dm_connector_state *dm_new_con_state = to_dm_connector_state(new_con_state);
struct amdgpu_crtc *acrtc = to_amdgpu_crtc(dm_new_con_state->base.crtc); 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) ...@@ -8649,7 +8626,6 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state)
new_con_state->hdcp_content_type, enable_encryption); new_con_state->hdcp_content_type, enable_encryption);
} }
} }
#endif
/* Handle connector state changes */ /* Handle connector state changes */
for_each_oldnew_connector_in_state(state, connector, old_con_state, new_con_state, i) { for_each_oldnew_connector_in_state(state, connector, old_con_state, new_con_state, i) {
......
...@@ -461,9 +461,7 @@ struct amdgpu_display_manager { ...@@ -461,9 +461,7 @@ struct amdgpu_display_manager {
struct amdgpu_dm_backlight_caps backlight_caps[AMDGPU_DM_MAX_NUM_EDP]; struct amdgpu_dm_backlight_caps backlight_caps[AMDGPU_DM_MAX_NUM_EDP];
struct mod_freesync *freesync_module; struct mod_freesync *freesync_module;
#ifdef CONFIG_DRM_AMD_DC_HDCP
struct hdcp_workqueue *hdcp_workqueue; struct hdcp_workqueue *hdcp_workqueue;
#endif
/** /**
* @vblank_control_workqueue: * @vblank_control_workqueue:
...@@ -747,9 +745,7 @@ struct dm_connector_state { ...@@ -747,9 +745,7 @@ struct dm_connector_state {
uint8_t underscan_hborder; uint8_t underscan_hborder;
bool underscan_enable; bool underscan_enable;
bool freesync_capable; bool freesync_capable;
#ifdef CONFIG_DRM_AMD_DC_HDCP
bool update_hdcp; bool update_hdcp;
#endif
uint8_t abm_level; uint8_t abm_level;
int vcpi_slots; int vcpi_slots;
uint64_t pbn; uint64_t pbn;
......
...@@ -947,7 +947,6 @@ static ssize_t dp_dsc_passthrough_set(struct file *f, const char __user *buf, ...@@ -947,7 +947,6 @@ static ssize_t dp_dsc_passthrough_set(struct file *f, const char __user *buf,
return 0; return 0;
} }
#ifdef CONFIG_DRM_AMD_DC_HDCP
/* /*
* Returns the HDCP capability of the Display (1.4 for now). * Returns the HDCP capability of the Display (1.4 for now).
* *
...@@ -984,7 +983,6 @@ static int hdcp_sink_capability_show(struct seq_file *m, void *data) ...@@ -984,7 +983,6 @@ static int hdcp_sink_capability_show(struct seq_file *m, void *data)
return 0; return 0;
} }
#endif
/* /*
* Returns whether the connected display is internal and not hotpluggable. * Returns whether the connected display is internal and not hotpluggable.
...@@ -2593,9 +2591,7 @@ DEFINE_SHOW_ATTRIBUTE(dp_dsc_fec_support); ...@@ -2593,9 +2591,7 @@ DEFINE_SHOW_ATTRIBUTE(dp_dsc_fec_support);
DEFINE_SHOW_ATTRIBUTE(dmub_fw_state); DEFINE_SHOW_ATTRIBUTE(dmub_fw_state);
DEFINE_SHOW_ATTRIBUTE(dmub_tracebuffer); DEFINE_SHOW_ATTRIBUTE(dmub_tracebuffer);
DEFINE_SHOW_ATTRIBUTE(dp_lttpr_status); DEFINE_SHOW_ATTRIBUTE(dp_lttpr_status);
#ifdef CONFIG_DRM_AMD_DC_HDCP
DEFINE_SHOW_ATTRIBUTE(hdcp_sink_capability); DEFINE_SHOW_ATTRIBUTE(hdcp_sink_capability);
#endif
DEFINE_SHOW_ATTRIBUTE(internal_display); DEFINE_SHOW_ATTRIBUTE(internal_display);
DEFINE_SHOW_ATTRIBUTE(psr_capability); DEFINE_SHOW_ATTRIBUTE(psr_capability);
DEFINE_SHOW_ATTRIBUTE(dp_is_mst_connector); DEFINE_SHOW_ATTRIBUTE(dp_is_mst_connector);
...@@ -2726,9 +2722,7 @@ static const struct { ...@@ -2726,9 +2722,7 @@ static const struct {
{"phy_settings", &dp_phy_settings_debugfs_fop}, {"phy_settings", &dp_phy_settings_debugfs_fop},
{"lttpr_status", &dp_lttpr_status_fops}, {"lttpr_status", &dp_lttpr_status_fops},
{"test_pattern", &dp_phy_test_pattern_fops}, {"test_pattern", &dp_phy_test_pattern_fops},
#ifdef CONFIG_DRM_AMD_DC_HDCP
{"hdcp_sink_capability", &hdcp_sink_capability_fops}, {"hdcp_sink_capability", &hdcp_sink_capability_fops},
#endif
{"sdp_message", &sdp_message_fops}, {"sdp_message", &sdp_message_fops},
{"aux_dpcd_address", &dp_dpcd_address_debugfs_fops}, {"aux_dpcd_address", &dp_dpcd_address_debugfs_fops},
{"aux_dpcd_size", &dp_dpcd_size_debugfs_fops}, {"aux_dpcd_size", &dp_dpcd_size_debugfs_fops},
...@@ -2749,14 +2743,13 @@ static const struct { ...@@ -2749,14 +2743,13 @@ static const struct {
{"is_dpia_link", &is_dpia_link_fops} {"is_dpia_link", &is_dpia_link_fops}
}; };
#ifdef CONFIG_DRM_AMD_DC_HDCP
static const struct { static const struct {
char *name; char *name;
const struct file_operations *fops; const struct file_operations *fops;
} hdmi_debugfs_entries[] = { } hdmi_debugfs_entries[] = {
{"hdcp_sink_capability", &hdcp_sink_capability_fops} {"hdcp_sink_capability", &hdcp_sink_capability_fops}
}; };
#endif
/* /*
* Force YUV420 output if available from the given mode * Force YUV420 output if available from the given mode
*/ */
...@@ -3015,7 +3008,6 @@ void connector_debugfs_init(struct amdgpu_dm_connector *connector) ...@@ -3015,7 +3008,6 @@ void connector_debugfs_init(struct amdgpu_dm_connector *connector)
connector->debugfs_dpcd_address = 0; connector->debugfs_dpcd_address = 0;
connector->debugfs_dpcd_size = 0; connector->debugfs_dpcd_size = 0;
#ifdef CONFIG_DRM_AMD_DC_HDCP
if (connector->base.connector_type == DRM_MODE_CONNECTOR_HDMIA) { if (connector->base.connector_type == DRM_MODE_CONNECTOR_HDMIA) {
for (i = 0; i < ARRAY_SIZE(hdmi_debugfs_entries); i++) { for (i = 0; i < ARRAY_SIZE(hdmi_debugfs_entries); i++) {
debugfs_create_file(hdmi_debugfs_entries[i].name, debugfs_create_file(hdmi_debugfs_entries[i].name,
...@@ -3023,7 +3015,6 @@ void connector_debugfs_init(struct amdgpu_dm_connector *connector) ...@@ -3023,7 +3015,6 @@ void connector_debugfs_init(struct amdgpu_dm_connector *connector)
hdmi_debugfs_entries[i].fops); hdmi_debugfs_entries[i].fops);
} }
} }
#endif
} }
#ifdef CONFIG_DRM_AMD_SECURE_DISPLAY #ifdef CONFIG_DRM_AMD_SECURE_DISPLAY
......
...@@ -31,10 +31,7 @@ ...@@ -31,10 +31,7 @@
#include "amdgpu.h" #include "amdgpu.h"
#include "amdgpu_dm.h" #include "amdgpu_dm.h"
#include "amdgpu_dm_mst_types.h" #include "amdgpu_dm_mst_types.h"
#ifdef CONFIG_DRM_AMD_DC_HDCP
#include "amdgpu_dm_hdcp.h" #include "amdgpu_dm_hdcp.h"
#endif
#include "dc.h" #include "dc.h"
#include "dm_helpers.h" #include "dm_helpers.h"
...@@ -362,7 +359,6 @@ static int dm_dp_mst_get_modes(struct drm_connector *connector) ...@@ -362,7 +359,6 @@ static int dm_dp_mst_get_modes(struct drm_connector *connector)
* plugged back with same display index, its hdcp properties * plugged back with same display index, its hdcp properties
* will be retrieved from hdcp_work within dm_dp_mst_get_modes * will be retrieved from hdcp_work within dm_dp_mst_get_modes
*/ */
#ifdef CONFIG_DRM_AMD_DC_HDCP
if (aconnector->dc_sink && connector->state) { if (aconnector->dc_sink && connector->state) {
struct drm_device *dev = connector->dev; struct drm_device *dev = connector->dev;
struct amdgpu_device *adev = drm_to_adev(dev); struct amdgpu_device *adev = drm_to_adev(dev);
...@@ -374,7 +370,6 @@ static int dm_dp_mst_get_modes(struct drm_connector *connector) ...@@ -374,7 +370,6 @@ static int dm_dp_mst_get_modes(struct drm_connector *connector)
connector->state->content_protection = connector->state->content_protection =
hdcp_w->content_protection[connector->index]; hdcp_w->content_protection[connector->index];
} }
#endif
if (aconnector->dc_sink) { if (aconnector->dc_sink) {
amdgpu_dm_update_freesync_caps( amdgpu_dm_update_freesync_caps(
......
...@@ -56,9 +56,7 @@ ifdef CONFIG_DRM_AMD_DC_SI ...@@ -56,9 +56,7 @@ ifdef CONFIG_DRM_AMD_DC_SI
DC_LIBS += dce60 DC_LIBS += dce60
endif endif
ifdef CONFIG_DRM_AMD_DC_HDCP
DC_LIBS += hdcp DC_LIBS += hdcp
endif
AMD_DC = $(addsuffix /Makefile, $(addprefix $(FULL_AMD_DISPLAY_PATH)/dc/,$(DC_LIBS))) AMD_DC = $(addsuffix /Makefile, $(addprefix $(FULL_AMD_DISPLAY_PATH)/dc/,$(DC_LIBS)))
......
...@@ -1377,16 +1377,12 @@ void dc_hardware_init(struct dc *dc) ...@@ -1377,16 +1377,12 @@ void dc_hardware_init(struct dc *dc)
void dc_init_callbacks(struct dc *dc, void dc_init_callbacks(struct dc *dc,
const struct dc_callback_init *init_params) const struct dc_callback_init *init_params)
{ {
#ifdef CONFIG_DRM_AMD_DC_HDCP
dc->ctx->cp_psp = init_params->cp_psp; dc->ctx->cp_psp = init_params->cp_psp;
#endif
} }
void dc_deinit_callbacks(struct dc *dc) void dc_deinit_callbacks(struct dc *dc)
{ {
#ifdef CONFIG_DRM_AMD_DC_HDCP
memset(&dc->ctx->cp_psp, 0, sizeof(dc->ctx->cp_psp)); memset(&dc->ctx->cp_psp, 0, sizeof(dc->ctx->cp_psp));
#endif
} }
void dc_destroy(struct dc **dc) void dc_destroy(struct dc **dc)
......
...@@ -93,7 +93,6 @@ const struct dc_link_status *dc_link_get_status(const struct dc_link *link) ...@@ -93,7 +93,6 @@ const struct dc_link_status *dc_link_get_status(const struct dc_link *link)
{ {
return link_get_status(link); return link_get_status(link);
} }
#ifdef CONFIG_DRM_AMD_DC_HDCP
/* return true if the connected receiver supports the hdcp version */ /* return true if the connected receiver supports the hdcp version */
bool dc_link_is_hdcp14(struct dc_link *link, enum signal_type signal) 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) ...@@ -105,7 +104,6 @@ bool dc_link_is_hdcp22(struct dc_link *link, enum signal_type signal)
{ {
return link_is_hdcp22(link, signal); return link_is_hdcp22(link, signal);
} }
#endif
void dc_link_clear_dprx_states(struct dc_link *link) void dc_link_clear_dprx_states(struct dc_link *link)
{ {
......
...@@ -29,9 +29,7 @@ ...@@ -29,9 +29,7 @@
#include "dc_types.h" #include "dc_types.h"
#include "grph_object_defs.h" #include "grph_object_defs.h"
#include "logger_types.h" #include "logger_types.h"
#if defined(CONFIG_DRM_AMD_DC_HDCP) #include "hdcp_msg_types.h"
#include "hdcp_types.h"
#endif
#include "gpio_types.h" #include "gpio_types.h"
#include "link_service_types.h" #include "link_service_types.h"
#include "grph_object_ctrl_defs.h" #include "grph_object_ctrl_defs.h"
...@@ -993,11 +991,7 @@ struct dc_init_data { ...@@ -993,11 +991,7 @@ struct dc_init_data {
}; };
struct dc_callback_init { struct dc_callback_init {
#ifdef CONFIG_DRM_AMD_DC_HDCP
struct cp_psp cp_psp; struct cp_psp cp_psp;
#else
uint8_t reserved;
#endif
}; };
struct dc *dc_create(const struct dc_init_data *init_params); struct dc *dc_create(const struct dc_init_data *init_params);
...@@ -1475,9 +1469,7 @@ struct dc_link { ...@@ -1475,9 +1469,7 @@ struct dc_link {
uint32_t dongle_max_pix_clk; uint32_t dongle_max_pix_clk;
unsigned short chip_caps; unsigned short chip_caps;
unsigned int dpcd_sink_count; unsigned int dpcd_sink_count;
#if defined(CONFIG_DRM_AMD_DC_HDCP)
struct hdcp_caps hdcp_caps; struct hdcp_caps hdcp_caps;
#endif
enum edp_revision edp_revision; enum edp_revision edp_revision;
union dpcd_sink_ext_caps dpcd_sink_ext_caps; union dpcd_sink_ext_caps dpcd_sink_ext_caps;
...@@ -1661,12 +1653,9 @@ bool dc_is_oem_i2c_device_present( ...@@ -1661,12 +1653,9 @@ bool dc_is_oem_i2c_device_present(
size_t slave_address size_t slave_address
); );
#ifdef CONFIG_DRM_AMD_DC_HDCP
/* return true if the connected receiver supports the hdcp version */ /* return true if the connected receiver supports the hdcp version */
bool dc_link_is_hdcp14(struct dc_link *link, enum signal_type signal); bool dc_link_is_hdcp14(struct dc_link *link, enum signal_type signal);
bool dc_link_is_hdcp22(struct dc_link *link, enum signal_type signal); bool dc_link_is_hdcp22(struct dc_link *link, enum signal_type signal);
#endif
/* Notify DC about DP RX Interrupt (aka DP IRQ_HPD). /* Notify DC about DP RX Interrupt (aka DP IRQ_HPD).
* *
...@@ -2154,7 +2143,6 @@ void dc_resume(struct dc *dc); ...@@ -2154,7 +2143,6 @@ void dc_resume(struct dc *dc);
void dc_power_down_on_boot(struct dc *dc); void dc_power_down_on_boot(struct dc *dc);
#if defined(CONFIG_DRM_AMD_DC_HDCP)
/* /*
* HDCP Interfaces * HDCP Interfaces
*/ */
...@@ -2162,7 +2150,6 @@ enum hdcp_message_status dc_process_hdcp_msg( ...@@ -2162,7 +2150,6 @@ enum hdcp_message_status dc_process_hdcp_msg(
enum signal_type signal, enum signal_type signal,
struct dc_link *link, struct dc_link *link,
struct hdcp_protection_message *message_info); struct hdcp_protection_message *message_info);
#endif
bool dc_is_dmcu_initialized(struct dc *dc); bool dc_is_dmcu_initialized(struct dc *dc);
enum dc_status dc_set_clock(struct dc *dc, enum dc_clock_type clock_type, uint32_t clk_khz, uint32_t stepping); enum dc_status dc_set_clock(struct dc *dc, enum dc_clock_type clock_type, uint32_t clk_khz, uint32_t stepping);
......
...@@ -40,9 +40,7 @@ ...@@ -40,9 +40,7 @@
#include "grph_object_defs.h" #include "grph_object_defs.h"
#include "grph_object_ctrl_defs.h" #include "grph_object_ctrl_defs.h"
#ifdef CONFIG_DRM_AMD_DC_HDCP
#include "dm_cp_psp.h" #include "dm_cp_psp.h"
#endif
/* forward declarations */ /* forward declarations */
struct dc_plane_state; struct dc_plane_state;
...@@ -813,9 +811,7 @@ struct dc_context { ...@@ -813,9 +811,7 @@ struct dc_context {
uint32_t dc_edp_id_count; uint32_t dc_edp_id_count;
uint64_t fbc_gpu_addr; uint64_t fbc_gpu_addr;
struct dc_dmub_srv *dmub_srv; struct dc_dmub_srv *dmub_srv;
#ifdef CONFIG_DRM_AMD_DC_HDCP
struct cp_psp cp_psp; struct cp_psp cp_psp;
#endif
uint32_t *dcn_reg_offsets; uint32_t *dcn_reg_offsets;
uint32_t *nbio_reg_offsets; uint32_t *nbio_reg_offsets;
}; };
...@@ -955,7 +951,6 @@ struct dc_link_status { ...@@ -955,7 +951,6 @@ struct dc_link_status {
struct dpcd_caps *dpcd_caps; struct dpcd_caps *dpcd_caps;
}; };
#if defined(CONFIG_DRM_AMD_DC_HDCP)
union hdcp_rx_caps { union hdcp_rx_caps {
struct { struct {
uint8_t version; uint8_t version;
...@@ -982,7 +977,6 @@ struct hdcp_caps { ...@@ -982,7 +977,6 @@ struct hdcp_caps {
union hdcp_rx_caps rx_caps; union hdcp_rx_caps rx_caps;
union hdcp_bcaps bcaps; union hdcp_bcaps bcaps;
}; };
#endif
/* DP MST stream allocation (payload bandwidth number) */ /* DP MST stream allocation (payload bandwidth number) */
struct link_mst_stream_allocation { struct link_mst_stream_allocation {
......
...@@ -211,10 +211,8 @@ static void enc32_stream_encoder_hdmi_set_stream_attribute( ...@@ -211,10 +211,8 @@ static void enc32_stream_encoder_hdmi_set_stream_attribute(
HDMI_GC_SEND, 1, HDMI_GC_SEND, 1,
HDMI_NULL_SEND, 1); HDMI_NULL_SEND, 1);
#if defined(CONFIG_DRM_AMD_DC_HDCP)
/* Disable Audio Content Protection packet transmission */ /* Disable Audio Content Protection packet transmission */
REG_UPDATE(HDMI_VBI_PACKET_CONTROL, HDMI_ACP_SEND, 0); REG_UPDATE(HDMI_VBI_PACKET_CONTROL, HDMI_ACP_SEND, 0);
#endif
/* following belongs to audio */ /* following belongs to audio */
/* Enable Audio InfoFrame packet transmission. */ /* Enable Audio InfoFrame packet transmission. */
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#include "dm_services.h" #include "dm_services.h"
#include "dm_helpers.h" #include "dm_helpers.h"
#include "include/hdcp_types.h" #include "include/hdcp_msg_types.h"
#include "include/signal_types.h" #include "include/signal_types.h"
#include "core_types.h" #include "core_types.h"
#include "link.h" #include "link.h"
......
...@@ -51,9 +51,7 @@ void enable_surface_flip_reporting(struct dc_plane_state *plane_state, ...@@ -51,9 +51,7 @@ void enable_surface_flip_reporting(struct dc_plane_state *plane_state,
#include "clock_source.h" #include "clock_source.h"
#include "audio.h" #include "audio.h"
#include "dm_pp_smu.h" #include "dm_pp_smu.h"
#ifdef CONFIG_DRM_AMD_DC_HDCP
#include "dm_cp_psp.h" #include "dm_cp_psp.h"
#endif
#include "link_hwss.h" #include "link_hwss.h"
/********** DAL Core*********************/ /********** DAL Core*********************/
......
...@@ -139,11 +139,9 @@ bool link_detect(struct dc_link *link, enum dc_detect_reason reason); ...@@ -139,11 +139,9 @@ bool link_detect(struct dc_link *link, enum dc_detect_reason reason);
bool link_detect_connection_type(struct dc_link *link, bool link_detect_connection_type(struct dc_link *link,
enum dc_connection_type *type); enum dc_connection_type *type);
const struct dc_link_status *link_get_status(const struct dc_link *link); const struct dc_link_status *link_get_status(const struct dc_link *link);
#ifdef CONFIG_DRM_AMD_DC_HDCP
/* return true if the connected receiver supports the hdcp version */ /* return true if the connected receiver supports the hdcp version */
bool link_is_hdcp14(struct dc_link *link, enum signal_type signal); bool link_is_hdcp14(struct dc_link *link, enum signal_type signal);
bool link_is_hdcp22(struct dc_link *link, enum signal_type signal); bool link_is_hdcp22(struct dc_link *link, enum signal_type signal);
#endif
void link_clear_dprx_states(struct dc_link *link); void link_clear_dprx_states(struct dc_link *link);
bool link_reset_cur_dp_mst_topology(struct dc_link *link); bool link_reset_cur_dp_mst_topology(struct dc_link *link);
uint32_t dp_link_bandwidth_kbps( uint32_t dp_link_bandwidth_kbps(
......
...@@ -466,7 +466,6 @@ static void link_disconnect_remap(struct dc_sink *prev_sink, struct dc_link *lin ...@@ -466,7 +466,6 @@ static void link_disconnect_remap(struct dc_sink *prev_sink, struct dc_link *lin
link->local_sink = prev_sink; link->local_sink = prev_sink;
} }
#if defined(CONFIG_DRM_AMD_DC_HDCP)
static void query_hdcp_capability(enum signal_type signal, struct dc_link *link) static void query_hdcp_capability(enum signal_type signal, struct dc_link *link)
{ {
struct hdcp_protection_message msg22; struct hdcp_protection_message msg22;
...@@ -508,7 +507,6 @@ static void query_hdcp_capability(enum signal_type signal, struct dc_link *link) ...@@ -508,7 +507,6 @@ static void query_hdcp_capability(enum signal_type signal, struct dc_link *link)
} }
} }
#endif // CONFIG_DRM_AMD_DC_HDCP
static void read_current_link_settings_on_detect(struct dc_link *link) static void read_current_link_settings_on_detect(struct dc_link *link)
{ {
union lane_count_set lane_count_set = {0}; union lane_count_set lane_count_set = {0};
...@@ -1084,9 +1082,7 @@ static bool detect_link_and_local_sink(struct dc_link *link, ...@@ -1084,9 +1082,7 @@ static bool detect_link_and_local_sink(struct dc_link *link,
* TODO debug why certain monitors don't like * TODO debug why certain monitors don't like
* two link trainings * two link trainings
*/ */
#if defined(CONFIG_DRM_AMD_DC_HDCP)
query_hdcp_capability(sink->sink_signal, link); query_hdcp_capability(sink->sink_signal, link);
#endif
} else { } else {
// If edid is the same, then discard new sink and revert back to original sink // If edid is the same, then discard new sink and revert back to original sink
if (same_edid) { if (same_edid) {
...@@ -1094,9 +1090,7 @@ static bool detect_link_and_local_sink(struct dc_link *link, ...@@ -1094,9 +1090,7 @@ static bool detect_link_and_local_sink(struct dc_link *link,
sink = prev_sink; sink = prev_sink;
prev_sink = NULL; prev_sink = NULL;
} }
#if defined(CONFIG_DRM_AMD_DC_HDCP)
query_hdcp_capability(sink->sink_signal, link); query_hdcp_capability(sink->sink_signal, link);
#endif
} }
/* HDMI-DVI Dongle */ /* HDMI-DVI Dongle */
...@@ -1162,9 +1156,7 @@ static bool detect_link_and_local_sink(struct dc_link *link, ...@@ -1162,9 +1156,7 @@ static bool detect_link_and_local_sink(struct dc_link *link,
/* From Connected-to-Disconnected. */ /* From Connected-to-Disconnected. */
link->type = dc_connection_none; link->type = dc_connection_none;
sink_caps.signal = SIGNAL_TYPE_NONE; sink_caps.signal = SIGNAL_TYPE_NONE;
#if defined(CONFIG_DRM_AMD_DC_HDCP)
memset(&link->hdcp_caps, 0, sizeof(struct hdcp_caps)); memset(&link->hdcp_caps, 0, sizeof(struct hdcp_caps));
#endif
/* When we unplug a passive DP-HDMI dongle connection, dongle_max_pix_clk /* When we unplug a passive DP-HDMI dongle connection, dongle_max_pix_clk
* is not cleared. If we emulate a DP signal on this connection, it thinks * is not cleared. If we emulate a DP signal on this connection, it thinks
* the dongle is still there and limits the number of modes we can emulate. * the dongle is still there and limits the number of modes we can emulate.
...@@ -1266,7 +1258,6 @@ void link_clear_dprx_states(struct dc_link *link) ...@@ -1266,7 +1258,6 @@ void link_clear_dprx_states(struct dc_link *link)
{ {
memset(&link->dprx_states, 0, sizeof(link->dprx_states)); memset(&link->dprx_states, 0, sizeof(link->dprx_states));
} }
#if defined(CONFIG_DRM_AMD_DC_HDCP)
bool link_is_hdcp14(struct dc_link *link, enum signal_type signal) bool link_is_hdcp14(struct dc_link *link, enum signal_type signal)
{ {
...@@ -1314,7 +1305,6 @@ bool link_is_hdcp22(struct dc_link *link, enum signal_type signal) ...@@ -1314,7 +1305,6 @@ bool link_is_hdcp22(struct dc_link *link, enum signal_type signal)
return ret; return ret;
} }
#endif // CONFIG_DRM_AMD_DC_HDCP
const struct dc_link_status *link_get_status(const struct dc_link *link) const struct dc_link_status *link_get_status(const struct dc_link *link)
{ {
......
...@@ -647,7 +647,6 @@ static void write_i2c_redriver_setting( ...@@ -647,7 +647,6 @@ static void write_i2c_redriver_setting(
if (!i2c_success) if (!i2c_success)
DC_LOG_DEBUG("Set redriver failed"); DC_LOG_DEBUG("Set redriver failed");
} }
#if defined(CONFIG_DRM_AMD_DC_HDCP)
static void update_psp_stream_config(struct pipe_ctx *pipe_ctx, bool dpms_off) static void update_psp_stream_config(struct pipe_ctx *pipe_ctx, bool dpms_off)
{ {
...@@ -713,7 +712,6 @@ static void update_psp_stream_config(struct pipe_ctx *pipe_ctx, bool dpms_off) ...@@ -713,7 +712,6 @@ static void update_psp_stream_config(struct pipe_ctx *pipe_ctx, bool dpms_off)
cp_psp->funcs.update_stream_config(cp_psp->handle, &config); cp_psp->funcs.update_stream_config(cp_psp->handle, &config);
} }
#endif
static void set_avmute(struct pipe_ctx *pipe_ctx, bool enable) static void set_avmute(struct pipe_ctx *pipe_ctx, bool enable)
{ {
...@@ -2269,9 +2267,7 @@ void link_set_dpms_off(struct pipe_ctx *pipe_ctx) ...@@ -2269,9 +2267,7 @@ void link_set_dpms_off(struct pipe_ctx *pipe_ctx)
dc->hwss.disable_audio_stream(pipe_ctx); dc->hwss.disable_audio_stream(pipe_ctx);
#if defined(CONFIG_DRM_AMD_DC_HDCP)
update_psp_stream_config(pipe_ctx, true); update_psp_stream_config(pipe_ctx, true);
#endif
dc->hwss.blank_stream(pipe_ctx); dc->hwss.blank_stream(pipe_ctx);
if (pipe_ctx->stream->signal == SIGNAL_TYPE_DISPLAY_PORT_MST) if (pipe_ctx->stream->signal == SIGNAL_TYPE_DISPLAY_PORT_MST)
...@@ -2417,9 +2413,7 @@ void link_set_dpms_on( ...@@ -2417,9 +2413,7 @@ void link_set_dpms_on(
dc->hwss.enable_audio_stream(pipe_ctx); dc->hwss.enable_audio_stream(pipe_ctx);
} }
#if defined(CONFIG_DRM_AMD_DC_HDCP)
update_psp_stream_config(pipe_ctx, false); update_psp_stream_config(pipe_ctx, false);
#endif
return; return;
} }
...@@ -2429,9 +2423,7 @@ void link_set_dpms_on( ...@@ -2429,9 +2423,7 @@ void link_set_dpms_on(
!pipe_ctx->stream->timing.flags.DSC && !pipe_ctx->stream->timing.flags.DSC &&
!pipe_ctx->next_odm_pipe) { !pipe_ctx->next_odm_pipe) {
pipe_ctx->stream->dpms_off = false; pipe_ctx->stream->dpms_off = false;
#if defined(CONFIG_DRM_AMD_DC_HDCP)
update_psp_stream_config(pipe_ctx, false); update_psp_stream_config(pipe_ctx, false);
#endif
return; return;
} }
...@@ -2515,9 +2507,7 @@ void link_set_dpms_on( ...@@ -2515,9 +2507,7 @@ void link_set_dpms_on(
if (dc_is_dp_signal(pipe_ctx->stream->signal)) if (dc_is_dp_signal(pipe_ctx->stream->signal))
enable_stream_features(pipe_ctx); enable_stream_features(pipe_ctx);
#if defined(CONFIG_DRM_AMD_DC_HDCP)
update_psp_stream_config(pipe_ctx, false); update_psp_stream_config(pipe_ctx, false);
#endif
dc->hwss.enable_audio_stream(pipe_ctx); dc->hwss.enable_audio_stream(pipe_ctx);
......
...@@ -1570,7 +1570,6 @@ bool perform_link_training_with_retries( ...@@ -1570,7 +1570,6 @@ bool perform_link_training_with_retries(
msleep(delay_dp_power_up_in_ms); msleep(delay_dp_power_up_in_ms);
} }
#ifdef CONFIG_DRM_AMD_DC_HDCP
if (panel_mode == DP_PANEL_MODE_EDP) { if (panel_mode == DP_PANEL_MODE_EDP) {
struct cp_psp *cp_psp = &stream->ctx->cp_psp; struct cp_psp *cp_psp = &stream->ctx->cp_psp;
...@@ -1584,7 +1583,6 @@ bool perform_link_training_with_retries( ...@@ -1584,7 +1583,6 @@ bool perform_link_training_with_retries(
result = cp_psp->funcs.enable_assr(cp_psp->handle, link); result = cp_psp->funcs.enable_assr(cp_psp->handle, link);
} }
} }
#endif
dp_set_panel_mode(link, panel_mode); dp_set_panel_mode(link, panel_mode);
......
...@@ -26,13 +26,11 @@ ...@@ -26,13 +26,11 @@
#ifndef MOD_HDCP_LOG_H_ #ifndef MOD_HDCP_LOG_H_
#define MOD_HDCP_LOG_H_ #define MOD_HDCP_LOG_H_
#ifdef CONFIG_DRM_AMD_DC_HDCP
#define HDCP_LOG_ERR(hdcp, ...) DRM_DEBUG_KMS(__VA_ARGS__) #define HDCP_LOG_ERR(hdcp, ...) DRM_DEBUG_KMS(__VA_ARGS__)
#define HDCP_LOG_VER(hdcp, ...) DRM_DEBUG_KMS(__VA_ARGS__) #define HDCP_LOG_VER(hdcp, ...) DRM_DEBUG_KMS(__VA_ARGS__)
#define HDCP_LOG_FSM(hdcp, ...) DRM_DEBUG_KMS(__VA_ARGS__) #define HDCP_LOG_FSM(hdcp, ...) DRM_DEBUG_KMS(__VA_ARGS__)
#define HDCP_LOG_TOP(hdcp, ...) pr_debug("[HDCP_TOP]:"__VA_ARGS__) #define HDCP_LOG_TOP(hdcp, ...) pr_debug("[HDCP_TOP]:"__VA_ARGS__)
#define HDCP_LOG_DDC(hdcp, ...) pr_debug("[HDCP_DDC]:"__VA_ARGS__) #define HDCP_LOG_DDC(hdcp, ...) pr_debug("[HDCP_DDC]:"__VA_ARGS__)
#endif
/* default logs */ /* default logs */
#define HDCP_ERROR_TRACE(hdcp, status) \ #define HDCP_ERROR_TRACE(hdcp, status) \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment