disp: msm: hdcp: abort queued tasks while processing PM suspend

During suspend, there might be a chance that lib auth work is queued
but not yet started. So during pm cycle it might start execution
before host_init which can lead to noc error while accessing dp_aux
registers. To prevent that set abort flag to abort lib auth work and
set interrupts before host_deinit.

Change-Id: Ie2c3ac9b0846644d3c2b37f410c341659b030c16
Signed-off-by: Rajat Gupta <rajatgu@codeaurora.org>
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
This commit is contained in:
Rajat Gupta
2020-02-10 14:15:57 +05:30
committed by Tatenda Chipeperekwa
parent 54365213d1
commit 0e1496c718
4 changed files with 47 additions and 2 deletions

View File

@@ -31,6 +31,7 @@ struct dp_hdcp2p2_ctrl {
DECLARE_KFIFO(cmd_q, enum hdcp_transport_wakeup_cmd, 8);
wait_queue_head_t wait_q;
atomic_t auth_state;
atomic_t abort;
enum dp_hdcp2p2_sink_status sink_status; /* Is sink connected */
struct dp_hdcp2p2_interrupts *intr;
struct sde_hdcp_init_data init_data;
@@ -151,6 +152,9 @@ static void dp_hdcp2p2_set_interrupts(struct dp_hdcp2p2_ctrl *ctrl, bool enable)
void __iomem *base = ctrl->init_data.dp_ahb->base;
struct dp_hdcp2p2_interrupts *intr = ctrl->intr;
if (atomic_read(&ctrl->abort))
return;
while (intr && intr->reg) {
struct dp_hdcp2p2_int_set *int_set = intr->int_set;
u32 interrupts = 0;
@@ -882,6 +886,13 @@ static int dp_hdcp2p2_main(void *data)
return 0;
}
static void dp_hdcp2p2_abort(void *input, bool abort)
{
struct dp_hdcp2p2_ctrl *ctrl = input;
atomic_set(&ctrl->abort, abort);
}
void *sde_dp_hdcp2p2_init(struct sde_hdcp_init_data *init_data)
{
int rc;
@@ -896,6 +907,7 @@ void *sde_dp_hdcp2p2_init(struct sde_hdcp_init_data *init_data)
.set_mode = dp_hdcp2p2_register,
.on = dp_hdcp2p2_on,
.off = dp_hdcp2p2_off,
.abort = dp_hdcp2p2_abort,
.cp_irq = dp_hdcp2p2_cp_irq,
.register_streams = dp_hdcp2p2_register_streams,
.deregister_streams = dp_hdcp2p2_deregister_streams,