Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 41055311 authored by Abhijit Kulkarni's avatar Abhijit Kulkarni
Browse files

drm/msm/dp: disable hdcp if config is not enabled



This change is required to allow the compilation of dp driver
without the dependency of qseecom libraries.

Change-Id: Ie7fdc4644249f93eb673ab8eee244b49e96d1ad1
Signed-off-by: default avatarAbhijit Kulkarni <kabhijit@codeaurora.org>
parent 2427565f
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -14,7 +14,6 @@ config DRM_MSM
	select QCOM_SCM
	select SND_SOC_HDMI_CODEC if SND_SOC
	select SYNC_FILE
	select HDCP_QSEECOM
	select MSM_EXT_DISPLAY
	default y
	help
+3 −2
Original line number Diff line number Diff line
@@ -237,8 +237,9 @@ static void dp_display_update_hdcp_info(struct dp_display_private *dp)
	pr_debug("hdcp2p2: %s\n",
			dp->hdcp.hdcp2_present ? "supported" : "not supported");

	if (!dp->hdcp.hdcp2_present) {
		dp->hdcp.hdcp1_present = hdcp1_check_if_supported_load_app();
	if (IS_ENABLED(CONFIG_HDCP_QSEECOM) && !dp->hdcp.hdcp2_present) {
		dp->hdcp.hdcp1_present =
			hdcp1_check_if_supported_load_app();

		if (dp->hdcp.hdcp1_present) {
			fd = dp->hdcp.hdcp1;
+9 −4
Original line number Diff line number Diff line
/* Copyright (c) 2016-2017, The Linux Foundation. All rights reserved.
/* Copyright (c) 2016-2018, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -861,11 +861,16 @@ void *sde_dp_hdcp2p2_init(struct sde_hdcp_init_data *init_data)
	register_data.device_type = HDCP_TXMTR_DP;
	register_data.client_ctx = ctrl;


	if (IS_ENABLED(CONFIG_HDCP_QSEECOM)) {
		rc = hdcp_library_register(&register_data);
		if (rc) {
			pr_err("Unable to register with HDCP 2.2 library\n");
			goto error;
		}
	} else {
		goto error;
	}

	kthread_init_worker(&ctrl->worker);

+10 −5
Original line number Diff line number Diff line
@@ -280,7 +280,8 @@ static int sde_hdcp_1x_load_keys(void *input)
	dp_link = hdcp->init_data.dp_link;
	reg_set = &hdcp->reg_set;

	if (hdcp1_set_keys(&aksv_msb, &aksv_lsb)) {
	if (IS_ENABLED(CONFIG_HDCP_QSEECOM)  &&
	    hdcp1_set_keys(&aksv_msb, &aksv_lsb)) {
		pr_err("setting hdcp SW keys failed\n");
		rc = -EINVAL;
		goto end;
@@ -1073,11 +1074,13 @@ static void sde_hdcp_1x_cache_topology(struct sde_hdcp_1x *hdcp)
	memcpy((void *)&hdcp->cached_tp,
		(void *) &hdcp->current_tp,
		sizeof(hdcp->cached_tp));
	if (IS_ENABLED(CONFIG_HDCP_QSEECOM))
		hdcp1_cache_repeater_topology((void *)&hdcp->cached_tp);
}

static void sde_hdcp_1x_notify_topology(void)
{
	if (IS_ENABLED(CONFIG_HDCP_QSEECOM))
		hdcp1_notify_topology();
}

@@ -1132,6 +1135,7 @@ static void sde_hdcp_1x_auth_work(struct work_struct *work)
	 * program hw to enable encryption as soon as
	 * authentication is successful.
	 */
	if (IS_ENABLED(CONFIG_HDCP_QSEECOM))
		hdcp1_set_enc(true);

	rc = sde_hdcp_1x_authentication_part1(hdcp);
@@ -1282,6 +1286,7 @@ static void sde_hdcp_1x_off(void *input)
		pr_debug("%s: Deleted hdcp auth work\n",
			SDE_HDCP_STATE_NAME);

	if (IS_ENABLED(CONFIG_HDCP_QSEECOM))
		hdcp1_set_enc(false);

	reg = DSS_REG_R(io, reg_set->reset);