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

Commit 68b90105 authored by Ajay Singh Parmar's avatar Ajay Singh Parmar
Browse files

msm: mdss: hdcp: change the name of hdmi_hdcp to generic one



Currently hdcp 1.x is being used by HDMI only. But it can be
used by other interfaces like DP (Display Port). Change the
name of the hdmi_hdcp module to hdcp_1x so that different
interfaces uses more generic name for hdcp 1.x instead of
the interface specific name.

Change-Id: I0cb88c5715dd10c4fad5491e5f05ea489a7ab175
Signed-off-by: default avatarAjay Singh Parmar <aparmar@codeaurora.org>
parent 7038f0a6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -43,6 +43,7 @@ obj-$(CONFIG_FB_MSM_MDSS) += mdss_hdmi_util.o
obj-$(CONFIG_FB_MSM_MDSS) += mdss_hdmi_edid.o
obj-$(CONFIG_FB_MSM_MDSS) += mdss_cec_core.o
obj-$(CONFIG_FB_MSM_MDSS) += mdss_dba_utils.o
obj-$(CONFIG_FB_MSM_MDSS) += mdss_hdcp_1x.o
obj-$(CONFIG_FB_MSM_MDSS_DP_PANEL) += mdss_dp.o mdss_dp_util.o
obj-$(CONFIG_FB_MSM_MDSS_DP_PANEL) += mdss_dp_aux.o

@@ -50,7 +51,6 @@ obj-$(CONFIG_FB_MSM_MDSS) += mdss_io_util.o
obj-$(CONFIG_FB_MSM_MDSS) += msm_ext_display.o
obj-$(CONFIG_FB_MSM_MDSS_HDMI_PANEL) += mdss_hdmi_tx.o
obj-$(CONFIG_FB_MSM_MDSS_HDMI_PANEL) += mdss_hdmi_panel.o
obj-$(CONFIG_FB_MSM_MDSS_HDMI_PANEL) += mdss_hdmi_hdcp.o
obj-$(CONFIG_FB_MSM_MDSS_HDMI_PANEL) += mdss_hdmi_hdcp2p2.o
obj-$(CONFIG_FB_MSM_MDSS_HDMI_PANEL) += mdss_hdmi_cec.o
obj-$(CONFIG_FB_MSM_MDSS_HDMI_PANEL) += mdss_hdmi_audio.o
+16 −17
Original line number Diff line number Diff line
@@ -35,7 +35,7 @@
#include "mdss_dp_util.h"
#include "mdss_hdmi_panel.h"
#include <linux/hdcp_qseecom.h>
#include "mdss_hdmi_hdcp.h"
#include "mdss_hdcp_1x.h"
#include "mdss_debug.h"

#define RGB_COMPONENTS		3
@@ -1219,10 +1219,10 @@ end:
	return rc;
}

static void mdss_dp_hdcp_cb(void *ptr, enum hdmi_hdcp_state status)
static void mdss_dp_hdcp_cb(void *ptr, enum hdcp_states status)
{
	struct mdss_dp_drv_pdata *dp = ptr;
	struct hdmi_hdcp_ops *ops;
	struct hdcp_ops *ops;
	int rc = 0;

	if (!dp) {
@@ -1241,9 +1241,8 @@ static void mdss_dp_hdcp_cb(void *ptr, enum hdmi_hdcp_state status)
	case HDCP_STATE_AUTH_FAIL:
		if (dp->power_on) {
			pr_debug("Reauthenticating\n");
			if (ops && ops->hdmi_hdcp_reauthenticate) {
				rc = ops->hdmi_hdcp_reauthenticate(
					dp->hdcp_data);
			if (ops && ops->reauthenticate) {
				rc = ops->reauthenticate(dp->hdcp_data);
				if (rc)
					pr_err("HDCP reauth failed. rc=%d\n",
						rc);
@@ -1262,7 +1261,7 @@ static void mdss_dp_hdcp_cb(void *ptr, enum hdmi_hdcp_state status)

static int mdss_dp_hdcp_init(struct mdss_panel_data *pdata)
{
	struct hdmi_hdcp_init_data hdcp_init_data = {0};
	struct hdcp_init_data hdcp_init_data = {0};
	struct mdss_dp_drv_pdata *dp_drv = NULL;
	struct resource *res;
	int rc = 0;
@@ -1295,7 +1294,7 @@ static int mdss_dp_hdcp_init(struct mdss_panel_data *pdata)
	hdcp_init_data.sec_access    = true;
	hdcp_init_data.client_id     = HDCP_CLIENT_DP;

	dp_drv->hdcp_data = hdmi_hdcp_init(&hdcp_init_data);
	dp_drv->hdcp_data = hdcp_1x_init(&hdcp_init_data);
	if (IS_ERR_OR_NULL(dp_drv->hdcp_data)) {
		pr_err("Error hdcp init\n");
		rc = -EINVAL;
@@ -1304,7 +1303,7 @@ static int mdss_dp_hdcp_init(struct mdss_panel_data *pdata)

	pr_debug("HDCP 1.3 initialized\n");

	dp_drv->hdcp_ops = hdmi_hdcp_start(dp_drv->hdcp_data);
	dp_drv->hdcp_ops = hdcp_1x_start(dp_drv->hdcp_data);

	return 0;
error:
@@ -1317,7 +1316,7 @@ static int mdss_dp_event_handler(struct mdss_panel_data *pdata,
	int rc = 0;
	struct fb_info *fbi;
	struct mdss_dp_drv_pdata *dp = NULL;
	struct hdmi_hdcp_ops *ops;
	struct hdcp_ops *ops;

	if (!pdata) {
		pr_err("%s: Invalid input data\n", __func__);
@@ -1337,16 +1336,16 @@ static int mdss_dp_event_handler(struct mdss_panel_data *pdata,
		break;
	case MDSS_EVENT_PANEL_ON:
		if (hdcp1_check_if_supported_load_app()) {
			if (ops && ops->hdmi_hdcp_authenticate)
				rc = ops->hdmi_hdcp_authenticate(dp->hdcp_data);
			if (ops && ops->authenticate)
				rc = ops->authenticate(dp->hdcp_data);
		}
		break;
	case MDSS_EVENT_PANEL_OFF:
		rc = mdss_dp_off(pdata);
		break;
	case MDSS_EVENT_BLANK:
		if (ops && ops->hdmi_hdcp_off)
			ops->hdmi_hdcp_off(dp->hdcp_data);
		if (ops && ops->off)
			ops->off(dp->hdcp_data);
		break;
	case MDSS_EVENT_FB_REGISTERED:
		fbi = (struct fb_info *)arg;
@@ -1620,9 +1619,9 @@ irqreturn_t dp_isr(int irq, void *ptr)
			dp_aux_native_handler(dp, isr1);
	}

	if (dp->hdcp_ops && dp->hdcp_ops->hdmi_hdcp_isr) {
		if (dp->hdcp_ops->hdmi_hdcp_isr(dp->hdcp_data))
			pr_err("isr failed\n");
	if (dp->hdcp_ops && dp->hdcp_ops->isr) {
		if (dp->hdcp_ops->isr(dp->hdcp_data))
			pr_err("dp_hdcp_isr failed\n");
	}

	return IRQ_HANDLED;
+1 −1
Original line number Diff line number Diff line
@@ -436,7 +436,7 @@ struct mdss_dp_drv_pdata {
	int fb_node;

	void *hdcp_data;
	struct hdmi_hdcp_ops *hdcp_ops;
	struct hdcp_ops *hdcp_ops;
};

static inline const char *__mdss_dp_pm_name(enum dp_pm_type module)
+103 −103

File changed and moved.

Preview size limit exceeded, changes collapsed.

+14 −14
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@ enum hdcp_client_id {
	HDCP_CLIENT_DP,
};

enum hdmi_hdcp_state {
enum hdcp_states {
	HDCP_STATE_INACTIVE,
	HDCP_STATE_AUTHENTICATING,
	HDCP_STATE_AUTHENTICATED,
@@ -32,7 +32,7 @@ enum hdmi_hdcp_state {
	HDCP_STATE_AUTH_ENC_2P2
};

struct hdmi_hdcp_init_data {
struct hdcp_init_data {
	struct dss_io_data *core_io;
	struct dss_io_data *qfprom_io;
	struct dss_io_data *hdcp_io;
@@ -40,7 +40,7 @@ struct hdmi_hdcp_init_data {
	struct kobject *sysfs_kobj;
	struct workqueue_struct *workq;
	void *cb_data;
	void (*notify_status)(void *cb_data, enum hdmi_hdcp_state status);
	void (*notify_status)(void *cb_data, enum hdcp_states status);
	struct hdmi_tx_ddc_ctrl *ddc_ctrl;
	void *dp_data;
	u32 phy_addr;
@@ -51,22 +51,22 @@ struct hdmi_hdcp_init_data {
	enum hdcp_client_id client_id;
};

struct hdmi_hdcp_ops {
	int (*hdmi_hdcp_isr)(void *ptr);
	int (*hdmi_hdcp_reauthenticate)(void *input);
	int (*hdmi_hdcp_authenticate)(void *hdcp_ctrl);
struct hdcp_ops {
	int (*isr)(void *ptr);
	int (*reauthenticate)(void *input);
	int (*authenticate)(void *hdcp_ctrl);
	bool (*feature_supported)(void *input);
	void (*hdmi_hdcp_off)(void *hdcp_ctrl);
	void (*off)(void *hdcp_ctrl);
};

void *hdmi_hdcp_init(struct hdmi_hdcp_init_data *init_data);
void *hdmi_hdcp2p2_init(struct hdmi_hdcp_init_data *init_data);
void hdmi_hdcp_deinit(void *input);
void *hdcp_1x_init(struct hdcp_init_data *init_data);
void *hdmi_hdcp2p2_init(struct hdcp_init_data *init_data);
void hdcp_1x_deinit(void *input);
void hdmi_hdcp2p2_deinit(void *input);

struct hdmi_hdcp_ops *hdmi_hdcp_start(void *input);
struct hdmi_hdcp_ops *hdmi_hdcp2p2_start(void *input);
struct hdcp_ops *hdcp_1x_start(void *input);
struct hdcp_ops *hdmi_hdcp2p2_start(void *input);

const char *hdcp_state_name(enum hdmi_hdcp_state hdcp_state);
const char *hdcp_state_name(enum hdcp_states hdcp_state);

#endif /* __MDSS_HDMI_HDCP_H__ */
Loading