mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 07:03:09 -04:00
disp: hdcp: add driver to handle userspace interactions
Create a new driver to handle sysfs and topology events that are
related to application/userspace layer interactions for HDCP
functionality. In turn, this will create a clear separation from
the HDCP QSEECOM layer that defines the communication mechanism
between the kernel and the TrustZone layers.
This implementation is based on a snapshot of the msm_hdcp
driver as of this commit 10ffbfa2c7e03c09 ("drm/msm/dp: Snapshot
of DP and supporting files") on kernel 4.19 project.
Change-Id: I834620420b8d6a580f1905a2b3250cf4e5b8f293
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
This commit is contained in:
parent
51805afe28
commit
9b75dd6713
6 changed files with 424 additions and 2 deletions
17
include/linux/msm_hdcp.h
Normal file
17
include/linux/msm_hdcp.h
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/*
|
||||
* Copyright (c) 2018-2020, The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
#ifndef __MSM_HDCP_H
|
||||
#define __MSM_HDCP_H
|
||||
#include <linux/types.h>
|
||||
#include "hdcp/msm_hdmi_hdcp_mgr.h"
|
||||
|
||||
void msm_hdcp_notify_topology(struct device *dev);
|
||||
void msm_hdcp_cache_repeater_topology(struct device *dev,
|
||||
struct HDCP_V2V1_MSG_TOPOLOGY *tp);
|
||||
void msm_hdcp_register_cb(struct device *dev, void *ctx,
|
||||
void (*cb)(void *ctx, u8 data));
|
||||
|
||||
#endif /* __MSM_HDCP_H */
|
||||
59
include/uapi/display/hdcp/msm_hdmi_hdcp_mgr.h
Normal file
59
include/uapi/display/hdcp/msm_hdmi_hdcp_mgr.h
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */
|
||||
/*
|
||||
* Copyright (c) 2017-2020, The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
#ifndef _UAPI__MSM_HDMI_HDCP_MGR_H
|
||||
#define _UAPI__MSM_HDMI_HDCP_MGR_H
|
||||
|
||||
enum DS_TYPE { /* type of downstream device */
|
||||
DS_UNKNOWN,
|
||||
DS_RECEIVER,
|
||||
DS_REPEATER,
|
||||
};
|
||||
|
||||
enum {
|
||||
MSG_ID_IDX,
|
||||
RET_CODE_IDX,
|
||||
HEADER_LEN,
|
||||
};
|
||||
|
||||
enum RET_CODE {
|
||||
HDCP_NOT_AUTHED,
|
||||
HDCP_AUTHED,
|
||||
HDCP_DISABLE,
|
||||
};
|
||||
|
||||
enum MSG_ID { /* List of functions expected to be called after it */
|
||||
DOWN_CHECK_TOPOLOGY,
|
||||
UP_REQUEST_TOPOLOGY,
|
||||
UP_SEND_TOPOLOGY,
|
||||
DOWN_REQUEST_TOPOLOGY,
|
||||
MSG_NUM,
|
||||
};
|
||||
|
||||
enum SOURCE_ID {
|
||||
HDCP_V1_TX,
|
||||
HDCP_V1_RX,
|
||||
HDCP_V2_RX,
|
||||
HDCP_V2_TX,
|
||||
SRC_NUM,
|
||||
};
|
||||
|
||||
/*
|
||||
* how to parse sysfs params buffer
|
||||
* from hdcp_tx driver.
|
||||
*/
|
||||
|
||||
struct HDCP_V2V1_MSG_TOPOLOGY {
|
||||
/* indicates downstream's type */
|
||||
uint32_t ds_type;
|
||||
uint8_t bksv[5];
|
||||
uint8_t dev_count;
|
||||
uint8_t depth;
|
||||
uint8_t ksv_list[5 * 127];
|
||||
uint32_t max_cascade_exceeded;
|
||||
uint32_t max_dev_exceeded;
|
||||
};
|
||||
|
||||
#endif /* _UAPI__MSM_HDMI_HDCP_MGR_H */
|
||||
Loading…
Reference in a new issue