drm/amd/display: Drop CONFIG_DRM_AMD_DC_HDCP
authorHarry Wentland <harry.wentland@amd.com>
Mon, 13 Feb 2023 16:19:31 +0000 (11:19 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 7 Mar 2023 19:22:39 +0000 (14:22 -0500)
[Why & How]
There is no reason we still need a config option for this.

Reviewed-by: Wenjing Liu <Wenjing.Liu@amd.com>
Acked-by: Qingqing Zhuo <qingqing.zhuo@amd.com>
Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
22 files changed:
drivers/gpu/drm/amd/display/Kconfig
drivers/gpu/drm/amd/display/Makefile
drivers/gpu/drm/amd/display/amdgpu_dm/Makefile
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
drivers/gpu/drm/amd/display/dc/Makefile
drivers/gpu/drm/amd/display/dc/core/dc.c
drivers/gpu/drm/amd/display/dc/core/dc_link_exports.c
drivers/gpu/drm/amd/display/dc/dc.h
drivers/gpu/drm/amd/display/dc/dc_types.h
drivers/gpu/drm/amd/display/dc/dcn32/dcn32_dio_stream_encoder.c
drivers/gpu/drm/amd/display/dc/hdcp/hdcp_msg.c
drivers/gpu/drm/amd/display/dc/inc/core_types.h
drivers/gpu/drm/amd/display/dc/inc/link.h
drivers/gpu/drm/amd/display/dc/link/link_detection.c
drivers/gpu/drm/amd/display/dc/link/link_dpms.c
drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training.c
drivers/gpu/drm/amd/display/include/hdcp_msg_types.h [new file with mode: 0644]
drivers/gpu/drm/amd/display/include/hdcp_types.h [deleted file]
drivers/gpu/drm/amd/display/modules/hdcp/hdcp_log.h

index 0c9bd0a53e603f9674b1dd5877a3f8b45e4b49ef..578a8b547ddf634142ba58a74b0ffbb5b1f84dab 100644 (file)
@@ -25,12 +25,6 @@ config DRM_AMD_DC_DCN
        help
          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
        bool "AMD DC support for Southern Islands ASICs"
        depends on DRM_AMDGPU_SI
index 2633de77de5e4fe4c4e76950f2fe66a2161cf8a4..0d610cb376bb57d4c925d692668897de27332c36 100644 (file)
@@ -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)/dmub/inc
 
-ifdef CONFIG_DRM_AMD_DC_HDCP
 subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/modules/hdcp
-endif
 
 #TODO: remove when Timing Sync feature is complete
 subdir-ccflags-y += -DBUILD_FEATURE_TIMING_SYNC=0
 
 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
-endif
 
 AMD_DAL = $(addsuffix /Makefile, $(addprefix $(FULL_AMD_DISPLAY_PATH)/,$(DAL_LIBS)))
 
index 90fb0f3cdb6fd0bb08be19a27c9d30254e39bda2..aef782ca37069595b0c156ffc020da50d3a96a8e 100644 (file)
@@ -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
 endif
 
-ifdef CONFIG_DRM_AMD_DC_HDCP
 AMDGPUDM += amdgpu_dm_hdcp.o
-endif
 
 ifneq ($(CONFIG_DEBUG_FS),)
 AMDGPUDM += amdgpu_dm_crc.o amdgpu_dm_debugfs.o
index 7f627ab43a2934060509fdc728b5f4202fa6d71b..de270f0969f5d435f688dee6a9275b773f05f51b 100644 (file)
 #include "amdgpu_dm.h"
 #include "amdgpu_dm_plane.h"
 #include "amdgpu_dm_crtc.h"
-#ifdef CONFIG_DRM_AMD_DC_HDCP
 #include "amdgpu_dm_hdcp.h"
 #include <drm/display/drm_hdcp_helper.h>
-#endif
 #include "amdgpu_pm.h"
 #include "amdgpu_atombios.h"
 
@@ -1488,9 +1486,7 @@ static void retrieve_dmi_info(struct amdgpu_display_manager *dm)
 static int amdgpu_dm_init(struct amdgpu_device *adev)
 {
        struct dc_init_data init_data;
-#ifdef CONFIG_DRM_AMD_DC_HDCP
        struct dc_callback_init init_params;
-#endif
        int r;
 
        adev->dm.ddev = adev_to_drm(adev);
@@ -1498,9 +1494,7 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
 
        /* Zero all the fields */
        memset(&init_data, 0, sizeof(init_data));
-#ifdef CONFIG_DRM_AMD_DC_HDCP
        memset(&init_params, 0, sizeof(init_params));
-#endif
 
        mutex_init(&adev->dm.dpia_aux_lock);
        mutex_init(&adev->dm.dc_lock);
@@ -1726,7 +1720,6 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
                        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) {
                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)
 
                dc_init_callbacks(adev->dm.dc, &init_params);
        }
-#endif
 #if defined(CONFIG_DRM_AMD_SECURE_DISPLAY)
        adev->dm.secure_display_ctxs = amdgpu_dm_crtc_secure_display_create_contexts(adev);
        if (!adev->dm.secure_display_ctxs) {
@@ -1844,7 +1836,6 @@ static void amdgpu_dm_fini(struct amdgpu_device *adev)
                adev->dm.secure_display_ctxs = NULL;
        }
 #endif
-#ifdef CONFIG_DRM_AMD_DC_HDCP
        if (adev->dm.hdcp_workqueue) {
                hdcp_destroy(&adev->dev->kobj, adev->dm.hdcp_workqueue);
                adev->dm.hdcp_workqueue = NULL;
@@ -1852,7 +1843,6 @@ static void amdgpu_dm_fini(struct amdgpu_device *adev)
 
        if (adev->dm.dc)
                dc_deinit_callbacks(adev->dm.dc);
-#endif
 
        dc_dmub_srv_destroy(&adev->dm.dc->ctx->dmub_srv);
 
@@ -3111,11 +3101,9 @@ void amdgpu_dm_update_connector_after_detect(
                aconnector->edid = NULL;
                kfree(aconnector->timing_requested);
                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 */
                if (connector->state->content_protection == DRM_MODE_CONTENT_PROTECTION_ENABLED)
                        connector->state->content_protection = DRM_MODE_CONTENT_PROTECTION_DESIRED;
-#endif
        }
 
        mutex_unlock(&dev->mode_config.mutex);
@@ -3132,9 +3120,7 @@ static void handle_hpd_irq_helper(struct amdgpu_dm_connector *aconnector)
        struct drm_device *dev = connector->dev;
        enum dc_connection_type new_connection_type = dc_connection_none;
        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);
-#endif
        bool ret = false;
 
        if (adev->dm.disable_hpd_irq)
@@ -3146,12 +3132,10 @@ static void handle_hpd_irq_helper(struct amdgpu_dm_connector *aconnector)
         */
        mutex_lock(&aconnector->hpd_lock);
 
-#ifdef CONFIG_DRM_AMD_DC_HDCP
        if (adev->dm.hdcp_workqueue) {
                hdcp_reset_display(adev->dm.hdcp_workqueue, aconnector->dc_link->link_index);
                dm_con_state->update_hdcp = true;
        }
-#endif
        if (aconnector->fake_enable)
                aconnector->fake_enable = false;
 
@@ -3398,12 +3382,10 @@ out:
                        }
                }
        }
-#ifdef CONFIG_DRM_AMD_DC_HDCP
        if (hpd_irq_data.bytes.device_service_irq.bits.CP_IRQ) {
                if (adev->dm.hdcp_workqueue)
                        hdcp_handle_cpirq(adev->dm.hdcp_workqueue,  aconnector->base.index);
        }
-#endif
 
        if (dc_link->type != dc_connection_mst_branch)
                drm_dp_cec_irq(&aconnector->dm_dp_aux.aux);
@@ -7273,10 +7255,8 @@ void amdgpu_dm_connector_init_helper(struct amdgpu_display_manager *dm,
                if (!aconnector->mst_root)
                        drm_connector_attach_vrr_capable_property(&aconnector->base);
 
-#ifdef CONFIG_DRM_AMD_DC_HDCP
                if (adev->dm.hdcp_workqueue)
                        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,
        return false;
 }
 
-#ifdef CONFIG_DRM_AMD_DC_HDCP
 static bool is_content_protection_different(struct drm_crtc_state *new_crtc_state,
                                            struct drm_crtc_state *old_crtc_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
        pr_debug("[HDCP_DM] DESIRED->ENABLED %s :false\n", __func__);
        return false;
 }
-#endif
 
 static void remove_stream(struct amdgpu_device *adev,
                          struct amdgpu_crtc *acrtc,
@@ -8538,7 +8516,6 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state)
                                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) {
                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);
@@ -8649,7 +8626,6 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state)
                                new_con_state->hdcp_content_type, enable_encryption);
                }
        }
-#endif
 
        /* Handle connector state changes */
        for_each_oldnew_connector_in_state(state, connector, old_con_state, new_con_state, i) {
index ed5cbe9da40cdf4c4ddca01b5c5acf8b419d670c..904f9e2fd35b5c661db26fd1e550ff0812fc3199 100644 (file)
@@ -461,9 +461,7 @@ struct amdgpu_display_manager {
        struct amdgpu_dm_backlight_caps backlight_caps[AMDGPU_DM_MAX_NUM_EDP];
 
        struct mod_freesync *freesync_module;
-#ifdef CONFIG_DRM_AMD_DC_HDCP
        struct hdcp_workqueue *hdcp_workqueue;
-#endif
 
        /**
         * @vblank_control_workqueue:
@@ -747,9 +745,7 @@ struct dm_connector_state {
        uint8_t underscan_hborder;
        bool underscan_enable;
        bool freesync_capable;
-#ifdef CONFIG_DRM_AMD_DC_HDCP
        bool update_hdcp;
-#endif
        uint8_t abm_level;
        int vcpi_slots;
        uint64_t pbn;
index 4a5dae578d970d14b131716c07d4af9c66163297..abf7895d1608b44d5ac5f62d68e1be5c247cc428 100644 (file)
@@ -947,7 +947,6 @@ static ssize_t dp_dsc_passthrough_set(struct file *f, const char __user *buf,
        return 0;
 }
 
-#ifdef CONFIG_DRM_AMD_DC_HDCP
 /*
  * 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)
 
        return 0;
 }
-#endif
 
 /*
  * Returns whether the connected display is internal and not hotpluggable.
@@ -2593,9 +2591,7 @@ DEFINE_SHOW_ATTRIBUTE(dp_dsc_fec_support);
 DEFINE_SHOW_ATTRIBUTE(dmub_fw_state);
 DEFINE_SHOW_ATTRIBUTE(dmub_tracebuffer);
 DEFINE_SHOW_ATTRIBUTE(dp_lttpr_status);
-#ifdef CONFIG_DRM_AMD_DC_HDCP
 DEFINE_SHOW_ATTRIBUTE(hdcp_sink_capability);
-#endif
 DEFINE_SHOW_ATTRIBUTE(internal_display);
 DEFINE_SHOW_ATTRIBUTE(psr_capability);
 DEFINE_SHOW_ATTRIBUTE(dp_is_mst_connector);
@@ -2726,9 +2722,7 @@ static const struct {
                {"phy_settings", &dp_phy_settings_debugfs_fop},
                {"lttpr_status", &dp_lttpr_status_fops},
                {"test_pattern", &dp_phy_test_pattern_fops},
-#ifdef CONFIG_DRM_AMD_DC_HDCP
                {"hdcp_sink_capability", &hdcp_sink_capability_fops},
-#endif
                {"sdp_message", &sdp_message_fops},
                {"aux_dpcd_address", &dp_dpcd_address_debugfs_fops},
                {"aux_dpcd_size", &dp_dpcd_size_debugfs_fops},
@@ -2749,14 +2743,13 @@ static const struct {
                {"is_dpia_link", &is_dpia_link_fops}
 };
 
-#ifdef CONFIG_DRM_AMD_DC_HDCP
 static const struct {
        char *name;
        const struct file_operations *fops;
 } hdmi_debugfs_entries[] = {
                {"hdcp_sink_capability", &hdcp_sink_capability_fops}
 };
-#endif
+
 /*
  * Force YUV420 output if available from the given mode
  */
@@ -3015,7 +3008,6 @@ void connector_debugfs_init(struct amdgpu_dm_connector *connector)
        connector->debugfs_dpcd_address = 0;
        connector->debugfs_dpcd_size = 0;
 
-#ifdef CONFIG_DRM_AMD_DC_HDCP
        if (connector->base.connector_type == DRM_MODE_CONNECTOR_HDMIA) {
                for (i = 0; i < ARRAY_SIZE(hdmi_debugfs_entries); i++) {
                        debugfs_create_file(hdmi_debugfs_entries[i].name,
@@ -3023,7 +3015,6 @@ void connector_debugfs_init(struct amdgpu_dm_connector *connector)
                                            hdmi_debugfs_entries[i].fops);
                }
        }
-#endif
 }
 
 #ifdef CONFIG_DRM_AMD_SECURE_DISPLAY
index 19721941b0693ad7b989fe958c9723bdbea1f06c..1579c2839ce3200948b9097acbe24e561bdc9a73 100644 (file)
 #include "amdgpu.h"
 #include "amdgpu_dm.h"
 #include "amdgpu_dm_mst_types.h"
-
-#ifdef CONFIG_DRM_AMD_DC_HDCP
 #include "amdgpu_dm_hdcp.h"
-#endif
 
 #include "dc.h"
 #include "dm_helpers.h"
@@ -362,7 +359,6 @@ static int dm_dp_mst_get_modes(struct drm_connector *connector)
                 * plugged back with same display index, its hdcp properties
                 * will be retrieved from hdcp_work within dm_dp_mst_get_modes
                 */
-#ifdef CONFIG_DRM_AMD_DC_HDCP
                if (aconnector->dc_sink && connector->state) {
                        struct drm_device *dev = connector->dev;
                        struct amdgpu_device *adev = drm_to_adev(dev);
@@ -374,7 +370,6 @@ static int dm_dp_mst_get_modes(struct drm_connector *connector)
                        connector->state->content_protection =
                        hdcp_w->content_protection[connector->index];
                }
-#endif
 
                if (aconnector->dc_sink) {
                        amdgpu_dm_update_freesync_caps(
index 94f156d572208a6343d22d76e5d6cb2c7680df8a..ba75e91ef62bc8478d94123d4423f831213f1d16 100644 (file)
@@ -56,9 +56,7 @@ ifdef CONFIG_DRM_AMD_DC_SI
 DC_LIBS += dce60
 endif
 
-ifdef CONFIG_DRM_AMD_DC_HDCP
 DC_LIBS += hdcp
-endif
 
 AMD_DC = $(addsuffix /Makefile, $(addprefix $(FULL_AMD_DISPLAY_PATH)/dc/,$(DC_LIBS)))
 
index 9b821d78aaaa43f21a573dec02c387e692125bbb..8be7a1fc5295267432e92ab9da6a9f68eed24831 100644 (file)
@@ -1377,16 +1377,12 @@ void dc_hardware_init(struct dc *dc)
 void dc_init_callbacks(struct dc *dc,
                const struct dc_callback_init *init_params)
 {
-#ifdef CONFIG_DRM_AMD_DC_HDCP
        dc->ctx->cp_psp = init_params->cp_psp;
-#endif
 }
 
 void dc_deinit_callbacks(struct dc *dc)
 {
-#ifdef CONFIG_DRM_AMD_DC_HDCP
        memset(&dc->ctx->cp_psp, 0, sizeof(dc->ctx->cp_psp));
-#endif
 }
 
 void dc_destroy(struct dc **dc)
index 862cb0f93b7d9fb8ea8e7e42e67c844aca8d9113..565c62a272d66e3bee4514a9c7cf003a95ee8c82 100644 (file)
@@ -93,7 +93,6 @@ const struct dc_link_status *dc_link_get_status(const struct dc_link *link)
 {
        return link_get_status(link);
 }
-#ifdef CONFIG_DRM_AMD_DC_HDCP
 
 /* return true if the connected receiver supports the hdcp version */
 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)
 {
        return link_is_hdcp22(link, signal);
 }
-#endif
 
 void dc_link_clear_dprx_states(struct dc_link *link)
 {
index f1ea9031a191a7ef354d02db875f2683813f7386..ae9d31cf9a23dd00c968d7fc46ac3016106f09a3 100644 (file)
@@ -29,9 +29,7 @@
 #include "dc_types.h"
 #include "grph_object_defs.h"
 #include "logger_types.h"
-#if defined(CONFIG_DRM_AMD_DC_HDCP)
-#include "hdcp_types.h"
-#endif
+#include "hdcp_msg_types.h"
 #include "gpio_types.h"
 #include "link_service_types.h"
 #include "grph_object_ctrl_defs.h"
@@ -993,11 +991,7 @@ struct dc_init_data {
 };
 
 struct dc_callback_init {
-#ifdef CONFIG_DRM_AMD_DC_HDCP
        struct cp_psp cp_psp;
-#else
-       uint8_t reserved;
-#endif
 };
 
 struct dc *dc_create(const struct dc_init_data *init_params);
@@ -1475,9 +1469,7 @@ struct dc_link {
        uint32_t dongle_max_pix_clk;
        unsigned short chip_caps;
        unsigned int dpcd_sink_count;
-#if defined(CONFIG_DRM_AMD_DC_HDCP)
        struct hdcp_caps hdcp_caps;
-#endif
        enum edp_revision edp_revision;
        union dpcd_sink_ext_caps dpcd_sink_ext_caps;
 
@@ -1661,12 +1653,9 @@ bool dc_is_oem_i2c_device_present(
        size_t slave_address
 );
 
-#ifdef CONFIG_DRM_AMD_DC_HDCP
-
 /* 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_hdcp22(struct dc_link *link, enum signal_type signal);
-#endif
 
 /* Notify DC about DP RX Interrupt (aka DP IRQ_HPD).
  *
@@ -2154,7 +2143,6 @@ void dc_resume(struct dc *dc);
 
 void dc_power_down_on_boot(struct dc *dc);
 
-#if defined(CONFIG_DRM_AMD_DC_HDCP)
 /*
  * HDCP Interfaces
  */
@@ -2162,7 +2150,6 @@ enum hdcp_message_status dc_process_hdcp_msg(
                enum signal_type signal,
                struct dc_link *link,
                struct hdcp_protection_message *message_info);
-#endif
 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);
index f28b8597cc1e6a7ade12284e1bb2164fc07baad7..4b47fa00610b4b2c9b8ac5c5efc3ea9f8496db0e 100644 (file)
@@ -40,9 +40,7 @@
 #include "grph_object_defs.h"
 #include "grph_object_ctrl_defs.h"
 
-#ifdef CONFIG_DRM_AMD_DC_HDCP
 #include "dm_cp_psp.h"
-#endif
 
 /* forward declarations */
 struct dc_plane_state;
@@ -813,9 +811,7 @@ struct dc_context {
        uint32_t dc_edp_id_count;
        uint64_t fbc_gpu_addr;
        struct dc_dmub_srv *dmub_srv;
-#ifdef CONFIG_DRM_AMD_DC_HDCP
        struct cp_psp cp_psp;
-#endif
        uint32_t *dcn_reg_offsets;
        uint32_t *nbio_reg_offsets;
 };
@@ -955,7 +951,6 @@ struct dc_link_status {
        struct dpcd_caps *dpcd_caps;
 };
 
-#if defined(CONFIG_DRM_AMD_DC_HDCP)
 union hdcp_rx_caps {
        struct {
                uint8_t version;
@@ -982,7 +977,6 @@ struct hdcp_caps {
        union hdcp_rx_caps rx_caps;
        union hdcp_bcaps bcaps;
 };
-#endif
 
 /* DP MST stream allocation (payload bandwidth number) */
 struct link_mst_stream_allocation {
index 36e6f5657942066302c87d37a259f6e4d24113d9..ccf6b181c349ab28eb72231ce0545dadf969808d 100644 (file)
@@ -211,10 +211,8 @@ static void enc32_stream_encoder_hdmi_set_stream_attribute(
                HDMI_GC_SEND, 1,
                HDMI_NULL_SEND, 1);
 
-#if defined(CONFIG_DRM_AMD_DC_HDCP)
        /* Disable Audio Content Protection packet transmission */
        REG_UPDATE(HDMI_VBI_PACKET_CONTROL, HDMI_ACP_SEND, 0);
-#endif
 
        /* following belongs to audio */
        /* Enable Audio InfoFrame packet transmission. */
index e1422e5e86c92e57573ddc43de405b90caa3c492..25ffc052d53be93b4ac49f7bdeeec16741efb59e 100644 (file)
@@ -27,7 +27,7 @@
 
 #include "dm_services.h"
 #include "dm_helpers.h"
-#include "include/hdcp_types.h"
+#include "include/hdcp_msg_types.h"
 #include "include/signal_types.h"
 #include "core_types.h"
 #include "link.h"
index ed3c03108da6268949886e24d7ae5390bb43ee72..2eb597a24425e9cd666926474501b8071421c125 100644 (file)
@@ -51,9 +51,7 @@ void enable_surface_flip_reporting(struct dc_plane_state *plane_state,
 #include "clock_source.h"
 #include "audio.h"
 #include "dm_pp_smu.h"
-#ifdef CONFIG_DRM_AMD_DC_HDCP
 #include "dm_cp_psp.h"
-#endif
 #include "link_hwss.h"
 
 /********** DAL Core*********************/
index 6a346a41f07b244ca4485ceae03e7a8e15782fa8..a3fcfa918a8fba04be2ccd904cbd9e5739beeaaa 100644 (file)
@@ -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,
                enum dc_connection_type *type);
 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 */
 bool link_is_hdcp14(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);
 bool link_reset_cur_dp_mst_topology(struct dc_link *link);
 uint32_t dp_link_bandwidth_kbps(
index 393bdefba0ba21b7d63e2dfa1d4709fcf73e131c..99279e1e7330eb71ad0a39477cfa1ae39a9089cd 100644 (file)
@@ -466,7 +466,6 @@ static void link_disconnect_remap(struct dc_sink *prev_sink, struct dc_link *lin
        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)
 {
        struct hdcp_protection_message msg22;
@@ -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)
 {
        union lane_count_set lane_count_set = {0};
@@ -1084,9 +1082,7 @@ static bool detect_link_and_local_sink(struct dc_link *link,
                         * TODO debug why certain monitors don't like
                         *  two link trainings
                         */
-#if defined(CONFIG_DRM_AMD_DC_HDCP)
                        query_hdcp_capability(sink->sink_signal, link);
-#endif
                } else {
                        // If edid is the same, then discard new sink and revert back to original sink
                        if (same_edid) {
@@ -1094,9 +1090,7 @@ static bool detect_link_and_local_sink(struct dc_link *link,
                                sink = prev_sink;
                                prev_sink = NULL;
                        }
-#if defined(CONFIG_DRM_AMD_DC_HDCP)
                        query_hdcp_capability(sink->sink_signal, link);
-#endif
                }
 
                /* HDMI-DVI Dongle */
@@ -1162,9 +1156,7 @@ static bool detect_link_and_local_sink(struct dc_link *link,
                /* From Connected-to-Disconnected. */
                link->type = dc_connection_none;
                sink_caps.signal = SIGNAL_TYPE_NONE;
-#if defined(CONFIG_DRM_AMD_DC_HDCP)
                memset(&link->hdcp_caps, 0, sizeof(struct hdcp_caps));
-#endif
                /* 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
                 *  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)
 {
        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)
 {
@@ -1314,7 +1305,6 @@ bool link_is_hdcp22(struct dc_link *link, enum signal_type signal)
 
        return ret;
 }
-#endif // CONFIG_DRM_AMD_DC_HDCP
 
 const struct dc_link_status *link_get_status(const struct dc_link *link)
 {
index a1214e5606dd4162eb7f1efa0daac352fb4f7438..0039928186ffc89577cc3cd81adee25211618c31 100644 (file)
@@ -647,7 +647,6 @@ static void write_i2c_redriver_setting(
        if (!i2c_success)
                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)
 {
@@ -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);
 }
-#endif
 
 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)
 
        dc->hwss.disable_audio_stream(pipe_ctx);
 
-#if defined(CONFIG_DRM_AMD_DC_HDCP)
        update_psp_stream_config(pipe_ctx, true);
-#endif
        dc->hwss.blank_stream(pipe_ctx);
 
        if (pipe_ctx->stream->signal == SIGNAL_TYPE_DISPLAY_PORT_MST)
@@ -2417,9 +2413,7 @@ void link_set_dpms_on(
                                dc->hwss.enable_audio_stream(pipe_ctx);
                        }
 
-#if defined(CONFIG_DRM_AMD_DC_HDCP)
                        update_psp_stream_config(pipe_ctx, false);
-#endif
                        return;
                }
 
@@ -2429,9 +2423,7 @@ void link_set_dpms_on(
                                        !pipe_ctx->stream->timing.flags.DSC &&
                                        !pipe_ctx->next_odm_pipe) {
                        pipe_ctx->stream->dpms_off = false;
-#if defined(CONFIG_DRM_AMD_DC_HDCP)
                        update_psp_stream_config(pipe_ctx, false);
-#endif
                        return;
                }
 
@@ -2515,9 +2507,7 @@ void link_set_dpms_on(
 
                if (dc_is_dp_signal(pipe_ctx->stream->signal))
                        enable_stream_features(pipe_ctx);
-#if defined(CONFIG_DRM_AMD_DC_HDCP)
                update_psp_stream_config(pipe_ctx, false);
-#endif
 
                dc->hwss.enable_audio_stream(pipe_ctx);
 
index 5e613ea2cd3f612e47a0b1bbf402fae48b9e31d9..cb0049cd1133145ed104a09343114ca0f5d23d78 100644 (file)
@@ -1570,7 +1570,6 @@ bool perform_link_training_with_retries(
                        msleep(delay_dp_power_up_in_ms);
                }
 
-#ifdef CONFIG_DRM_AMD_DC_HDCP
                if (panel_mode == DP_PANEL_MODE_EDP) {
                        struct cp_psp *cp_psp = &stream->ctx->cp_psp;
 
@@ -1584,7 +1583,6 @@ bool perform_link_training_with_retries(
                                result = cp_psp->funcs.enable_assr(cp_psp->handle, link);
                        }
                }
-#endif
 
                dp_set_panel_mode(link, panel_mode);
 
diff --git a/drivers/gpu/drm/amd/display/include/hdcp_msg_types.h b/drivers/gpu/drm/amd/display/include/hdcp_msg_types.h
new file mode 100644 (file)
index 0000000..42229b4
--- /dev/null
@@ -0,0 +1,103 @@
+/*
+* Copyright 2019 Advanced Micro Devices, Inc.
+*
+* Permission is hereby granted, free of charge, to any person obtaining a
+* copy of this software and associated documentation files (the "Software"),
+* to deal in the Software without restriction, including without limitation
+* the rights to use, copy, modify, merge, publish, distribute, sublicense,
+* and/or sell copies of the Software, and to permit persons to whom the
+* Software is furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice shall be included in
+* all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+* THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+* OTHER DEALINGS IN THE SOFTWARE.
+*
+* Authors: AMD
+*
+*/
+
+#ifndef __DC_HDCP_TYPES_H__
+#define __DC_HDCP_TYPES_H__
+
+enum hdcp_message_id {
+       HDCP_MESSAGE_ID_INVALID = -1,
+
+       /* HDCP 1.4 */
+
+       HDCP_MESSAGE_ID_READ_BKSV = 0,
+       /* HDMI is called Ri', DP is called R0' */
+       HDCP_MESSAGE_ID_READ_RI_R0,
+       HDCP_MESSAGE_ID_READ_PJ,
+       HDCP_MESSAGE_ID_WRITE_AKSV,
+       HDCP_MESSAGE_ID_WRITE_AINFO,
+       HDCP_MESSAGE_ID_WRITE_AN,
+       HDCP_MESSAGE_ID_READ_VH_X,
+       HDCP_MESSAGE_ID_READ_VH_0,
+       HDCP_MESSAGE_ID_READ_VH_1,
+       HDCP_MESSAGE_ID_READ_VH_2,
+       HDCP_MESSAGE_ID_READ_VH_3,
+       HDCP_MESSAGE_ID_READ_VH_4,
+       HDCP_MESSAGE_ID_READ_BCAPS,
+       HDCP_MESSAGE_ID_READ_BSTATUS,
+       HDCP_MESSAGE_ID_READ_KSV_FIFO,
+       HDCP_MESSAGE_ID_READ_BINFO,
+
+       /* HDCP 2.2 */
+
+       HDCP_MESSAGE_ID_HDCP2VERSION,
+       HDCP_MESSAGE_ID_RX_CAPS,
+       HDCP_MESSAGE_ID_WRITE_AKE_INIT,
+       HDCP_MESSAGE_ID_READ_AKE_SEND_CERT,
+       HDCP_MESSAGE_ID_WRITE_AKE_NO_STORED_KM,
+       HDCP_MESSAGE_ID_WRITE_AKE_STORED_KM,
+       HDCP_MESSAGE_ID_READ_AKE_SEND_H_PRIME,
+       HDCP_MESSAGE_ID_READ_AKE_SEND_PAIRING_INFO,
+       HDCP_MESSAGE_ID_WRITE_LC_INIT,
+       HDCP_MESSAGE_ID_READ_LC_SEND_L_PRIME,
+       HDCP_MESSAGE_ID_WRITE_SKE_SEND_EKS,
+       HDCP_MESSAGE_ID_READ_REPEATER_AUTH_SEND_RECEIVERID_LIST,
+       HDCP_MESSAGE_ID_WRITE_REPEATER_AUTH_SEND_ACK,
+       HDCP_MESSAGE_ID_WRITE_REPEATER_AUTH_STREAM_MANAGE,
+       HDCP_MESSAGE_ID_READ_REPEATER_AUTH_STREAM_READY,
+       HDCP_MESSAGE_ID_READ_RXSTATUS,
+       HDCP_MESSAGE_ID_WRITE_CONTENT_STREAM_TYPE,
+
+       HDCP_MESSAGE_ID_MAX
+};
+
+enum hdcp_version {
+       HDCP_Unknown = 0,
+       HDCP_VERSION_14,
+       HDCP_VERSION_22,
+};
+
+enum hdcp_link {
+       HDCP_LINK_PRIMARY,
+       HDCP_LINK_SECONDARY
+};
+
+enum hdcp_message_status {
+       HDCP_MESSAGE_SUCCESS,
+       HDCP_MESSAGE_FAILURE,
+       HDCP_MESSAGE_UNSUPPORTED
+};
+
+struct hdcp_protection_message {
+       enum hdcp_version version;
+       /* relevant only for DVI */
+       enum hdcp_link link;
+       enum hdcp_message_id msg_id;
+       uint32_t length;
+       uint8_t max_retries;
+       uint8_t *data;
+       enum hdcp_message_status status;
+};
+
+#endif
diff --git a/drivers/gpu/drm/amd/display/include/hdcp_types.h b/drivers/gpu/drm/amd/display/include/hdcp_types.h
deleted file mode 100644 (file)
index 42229b4..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
-* Copyright 2019 Advanced Micro Devices, Inc.
-*
-* Permission is hereby granted, free of charge, to any person obtaining a
-* copy of this software and associated documentation files (the "Software"),
-* to deal in the Software without restriction, including without limitation
-* the rights to use, copy, modify, merge, publish, distribute, sublicense,
-* and/or sell copies of the Software, and to permit persons to whom the
-* Software is furnished to do so, subject to the following conditions:
-*
-* The above copyright notice and this permission notice shall be included in
-* all copies or substantial portions of the Software.
-*
-* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
-* THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
-* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-* OTHER DEALINGS IN THE SOFTWARE.
-*
-* Authors: AMD
-*
-*/
-
-#ifndef __DC_HDCP_TYPES_H__
-#define __DC_HDCP_TYPES_H__
-
-enum hdcp_message_id {
-       HDCP_MESSAGE_ID_INVALID = -1,
-
-       /* HDCP 1.4 */
-
-       HDCP_MESSAGE_ID_READ_BKSV = 0,
-       /* HDMI is called Ri', DP is called R0' */
-       HDCP_MESSAGE_ID_READ_RI_R0,
-       HDCP_MESSAGE_ID_READ_PJ,
-       HDCP_MESSAGE_ID_WRITE_AKSV,
-       HDCP_MESSAGE_ID_WRITE_AINFO,
-       HDCP_MESSAGE_ID_WRITE_AN,
-       HDCP_MESSAGE_ID_READ_VH_X,
-       HDCP_MESSAGE_ID_READ_VH_0,
-       HDCP_MESSAGE_ID_READ_VH_1,
-       HDCP_MESSAGE_ID_READ_VH_2,
-       HDCP_MESSAGE_ID_READ_VH_3,
-       HDCP_MESSAGE_ID_READ_VH_4,
-       HDCP_MESSAGE_ID_READ_BCAPS,
-       HDCP_MESSAGE_ID_READ_BSTATUS,
-       HDCP_MESSAGE_ID_READ_KSV_FIFO,
-       HDCP_MESSAGE_ID_READ_BINFO,
-
-       /* HDCP 2.2 */
-
-       HDCP_MESSAGE_ID_HDCP2VERSION,
-       HDCP_MESSAGE_ID_RX_CAPS,
-       HDCP_MESSAGE_ID_WRITE_AKE_INIT,
-       HDCP_MESSAGE_ID_READ_AKE_SEND_CERT,
-       HDCP_MESSAGE_ID_WRITE_AKE_NO_STORED_KM,
-       HDCP_MESSAGE_ID_WRITE_AKE_STORED_KM,
-       HDCP_MESSAGE_ID_READ_AKE_SEND_H_PRIME,
-       HDCP_MESSAGE_ID_READ_AKE_SEND_PAIRING_INFO,
-       HDCP_MESSAGE_ID_WRITE_LC_INIT,
-       HDCP_MESSAGE_ID_READ_LC_SEND_L_PRIME,
-       HDCP_MESSAGE_ID_WRITE_SKE_SEND_EKS,
-       HDCP_MESSAGE_ID_READ_REPEATER_AUTH_SEND_RECEIVERID_LIST,
-       HDCP_MESSAGE_ID_WRITE_REPEATER_AUTH_SEND_ACK,
-       HDCP_MESSAGE_ID_WRITE_REPEATER_AUTH_STREAM_MANAGE,
-       HDCP_MESSAGE_ID_READ_REPEATER_AUTH_STREAM_READY,
-       HDCP_MESSAGE_ID_READ_RXSTATUS,
-       HDCP_MESSAGE_ID_WRITE_CONTENT_STREAM_TYPE,
-
-       HDCP_MESSAGE_ID_MAX
-};
-
-enum hdcp_version {
-       HDCP_Unknown = 0,
-       HDCP_VERSION_14,
-       HDCP_VERSION_22,
-};
-
-enum hdcp_link {
-       HDCP_LINK_PRIMARY,
-       HDCP_LINK_SECONDARY
-};
-
-enum hdcp_message_status {
-       HDCP_MESSAGE_SUCCESS,
-       HDCP_MESSAGE_FAILURE,
-       HDCP_MESSAGE_UNSUPPORTED
-};
-
-struct hdcp_protection_message {
-       enum hdcp_version version;
-       /* relevant only for DVI */
-       enum hdcp_link link;
-       enum hdcp_message_id msg_id;
-       uint32_t length;
-       uint8_t max_retries;
-       uint8_t *data;
-       enum hdcp_message_status status;
-};
-
-#endif
index eb6f9b9c504a251e7e0c0da0d42dffb9ee518133..c62df3bcc7cb3c45952c3510377355ae003e00ff 100644 (file)
 #ifndef 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_VER(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_DDC(hdcp, ...) pr_debug("[HDCP_DDC]:"__VA_ARGS__)
-#endif
 
 /* default logs */
 #define HDCP_ERROR_TRACE(hdcp, status) \