disp: msm: make the HDCP protocol module asynchronous
Commands to the HDCP protocol layer can fail or block if executed when the system enters suspend or shutdown. Protocol layer blockage will occur until the system returns into a power on state, potentially resulting in deadlocks for clients who synchronously wait on protocol layer completion. Asynchronously handle all requests to the protocol module to ensure that clients can make progress regardless of the state of the underlying HDCP handler. When an already queued request is received by the protocol module, that request will be rescheduled to the back of the queue. Change-Id: I658dd09a81f21037cd90bbaa5b7d73363472e0b0 Signed-off-by: Christopher Braga <cbraga@codeaurora.org>
This commit is contained in:
@@ -32,6 +32,8 @@
|
||||
*/
|
||||
enum sde_hdcp_2x_wakeup_cmd {
|
||||
HDCP_2X_CMD_INVALID,
|
||||
HDCP_2X_CMD_ENABLE,
|
||||
HDCP_2X_CMD_DISABLE,
|
||||
HDCP_2X_CMD_START,
|
||||
HDCP_2X_CMD_START_AUTH,
|
||||
HDCP_2X_CMD_STOP,
|
||||
@@ -79,6 +81,7 @@ enum sde_hdcp_2x_device_type {
|
||||
/**
|
||||
* struct sde_hdcp_2x_lib_wakeup_data - command and data send to HDCP driver
|
||||
* @cmd: command type
|
||||
* @device_type type of device in use by the HDCP driver
|
||||
* @context: void pointer to the HDCP driver instance
|
||||
* @buf: message received from the sink
|
||||
* @buf_len: length of message received from the sink
|
||||
@@ -88,6 +91,7 @@ enum sde_hdcp_2x_device_type {
|
||||
*/
|
||||
struct sde_hdcp_2x_wakeup_data {
|
||||
enum sde_hdcp_2x_wakeup_cmd cmd;
|
||||
enum sde_hdcp_2x_device_type device_type;
|
||||
void *context;
|
||||
uint32_t total_message_length;
|
||||
uint32_t timeout;
|
||||
@@ -211,7 +215,5 @@ struct sde_hdcp_2x_register_data {
|
||||
|
||||
/* functions for the HDCP 2.2 state machine module */
|
||||
int sde_hdcp_2x_register(struct sde_hdcp_2x_register_data *data);
|
||||
int sde_hdcp_2x_enable(void *data, enum sde_hdcp_2x_device_type device_type);
|
||||
void sde_hdcp_2x_disable(void *data);
|
||||
void sde_hdcp_2x_deregister(void *data);
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user