[RFC v1 06/20] drm/hdcp: display driver callback funcs defined
Ramalingam C
ramalingam.c at intel.com
Wed Jul 12 08:28:50 UTC 2017
Callback functions for Platform specific services are defined. These
pointers has to be initialized from display driver's hdcp_init and
passed onto drm_hdcp_init.
drm_hdcp_funcs will have pointers of functions common for all HDCP
versions supported on that platform.
Signed-off-by: Ramalingam C <ramalingam.c at intel.com>
---
include/drm/drm_hdcp.h | 40 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 40 insertions(+)
diff --git a/include/drm/drm_hdcp.h b/include/drm/drm_hdcp.h
index bf77d37..2a48ef9 100644
--- a/include/drm/drm_hdcp.h
+++ b/include/drm/drm_hdcp.h
@@ -28,6 +28,7 @@
#define __DRM_HDCP_H__
struct drm_connector;
+struct drm_hdcp;
/**
* HDCP Software stack specific
@@ -67,6 +68,43 @@ enum wired_protocol {
WIRED_PROTOCOL_DP
};
+struct drm_hdcp_funcs {
+
+ /**
+ * @link_write:
+ *
+ * Service Function to implement the HDCP protocol write on
+ * I2C/AUX bus based on HDCP protocol.
+ *
+ * returns No of Bytes written on success
+ * else negative error codes
+ **/
+ ssize_t (*link_write)(struct drm_hdcp *hdcp, uint32_t offset,
+ void *buf, size_t size);
+
+ /**
+ * @link_read:
+ *
+ * Service Function to implement the HDCP protocol read on
+ * I2C/AUX bus based on HDCP protocol.
+ *
+ * returns No of Bytes read on success
+ * else negative error codes
+ **/
+ ssize_t (*link_read)(struct drm_hdcp *hdcp, uint32_t offset,
+ void *buf, size_t size);
+
+ /**
+ * @late_init:
+ *
+ * Service function to do any deferred init at platform level.
+ *
+ * returns 0 on success
+ * else negative error codes
+ **/
+ int (*late_init)(struct drm_hdcp *hdcp);
+};
+
/**
* Struct drm_hdcp - central drm hdcp control structure
*/
@@ -83,6 +121,8 @@ struct drm_hdcp {
/* HDMI/DP Protocol */
enum wired_protocol protocol;
+ const struct drm_hdcp_funcs *hdcp_funcs;
+
struct mutex mutex;
};
--
2.7.4
More information about the dri-devel
mailing list