Merge branch 'display-kernel.lnx.5.10' into display-kernel.lnx.1.0
Change-Id: I5d2b08380b6b0eb09492b950fb38cd9a0b3196c1
This commit is contained in:
@@ -365,13 +365,6 @@ static void dsi_ctrl_dma_cmd_wait_for_done(struct dsi_ctrl *dsi_ctrl)
|
||||
dsi_hw_ops = dsi_ctrl->hw.ops;
|
||||
SDE_EVT32(dsi_ctrl->cell_index, SDE_EVTLOG_FUNC_ENTRY);
|
||||
|
||||
/*
|
||||
* This atomic state will be set if ISR has been triggered,
|
||||
* so the wait is not needed.
|
||||
*/
|
||||
if (atomic_read(&dsi_ctrl->dma_irq_trig))
|
||||
return;
|
||||
|
||||
ret = wait_for_completion_timeout(
|
||||
&dsi_ctrl->irq_info.cmd_dma_done,
|
||||
msecs_to_jiffies(DSI_CTRL_TX_TO_MS));
|
||||
@@ -392,6 +385,7 @@ static void dsi_ctrl_dma_cmd_wait_for_done(struct dsi_ctrl *dsi_ctrl)
|
||||
dsi_ctrl_disable_status_interrupt(dsi_ctrl,
|
||||
DSI_SINT_CMD_MODE_DMA_DONE);
|
||||
}
|
||||
SDE_EVT32(dsi_ctrl->cell_index, SDE_EVTLOG_FUNC_EXIT);
|
||||
|
||||
}
|
||||
|
||||
@@ -434,7 +428,8 @@ static void dsi_ctrl_post_cmd_transfer(struct dsi_ctrl *dsi_ctrl)
|
||||
if ((dsi_ctrl->pending_cmd_flags & DSI_CTRL_CMD_BROADCAST) &&
|
||||
!(dsi_ctrl->pending_cmd_flags & DSI_CTRL_CMD_BROADCAST_MASTER)) {
|
||||
dsi_ctrl_clear_dma_status(dsi_ctrl);
|
||||
} else {
|
||||
} else if (!(dsi_ctrl->pending_cmd_flags & DSI_CTRL_CMD_READ)) {
|
||||
/* Wait for read command transfer to complete is done in dsi_message_rx. */
|
||||
dsi_ctrl_dma_cmd_wait_for_done(dsi_ctrl);
|
||||
}
|
||||
|
||||
@@ -443,10 +438,8 @@ static void dsi_ctrl_post_cmd_transfer(struct dsi_ctrl *dsi_ctrl)
|
||||
if (rc)
|
||||
DSI_CTRL_ERR(dsi_ctrl, "failed to disable command engine\n");
|
||||
|
||||
if (dsi_ctrl->pending_cmd_flags & DSI_CTRL_CMD_READ)
|
||||
mask |= BIT(DSI_FIFO_UNDERFLOW);
|
||||
|
||||
dsi_ctrl_mask_error_status_interrupts(dsi_ctrl, mask, false);
|
||||
if (!(dsi_ctrl->pending_cmd_flags & DSI_CTRL_CMD_READ))
|
||||
dsi_ctrl_mask_error_status_interrupts(dsi_ctrl, mask, false);
|
||||
|
||||
mutex_unlock(&dsi_ctrl->ctrl_lock);
|
||||
|
||||
@@ -1505,7 +1498,7 @@ static int dsi_message_tx(struct dsi_ctrl *dsi_ctrl, struct dsi_cmd_desc *cmd_de
|
||||
goto error;
|
||||
}
|
||||
|
||||
SDE_EVT32(dsi_ctrl->cell_index, SDE_EVTLOG_FUNC_ENTRY, *flags);
|
||||
SDE_EVT32(dsi_ctrl->cell_index, SDE_EVTLOG_FUNC_ENTRY, *flags, dsi_ctrl->cmd_len);
|
||||
|
||||
if (*flags & DSI_CTRL_CMD_NON_EMBEDDED_MODE) {
|
||||
cmd_mem.offset = dsi_ctrl->cmd_buffer_iova;
|
||||
@@ -1905,16 +1898,18 @@ static int dsi_disable_ulps(struct dsi_ctrl *dsi_ctrl)
|
||||
return rc;
|
||||
}
|
||||
|
||||
static void dsi_ctrl_enable_error_interrupts(struct dsi_ctrl *dsi_ctrl)
|
||||
void dsi_ctrl_toggle_error_interrupt_status(struct dsi_ctrl *dsi_ctrl, bool enable)
|
||||
{
|
||||
if (dsi_ctrl->host_config.panel_mode == DSI_OP_VIDEO_MODE &&
|
||||
!dsi_ctrl->host_config.u.video_engine.bllp_lp11_en &&
|
||||
!dsi_ctrl->host_config.u.video_engine.eof_bllp_lp11_en)
|
||||
dsi_ctrl->hw.ops.enable_error_interrupts(&dsi_ctrl->hw,
|
||||
0xFF00A0);
|
||||
else
|
||||
dsi_ctrl->hw.ops.enable_error_interrupts(&dsi_ctrl->hw,
|
||||
0xFF00E0);
|
||||
if (!enable) {
|
||||
dsi_ctrl->hw.ops.enable_error_interrupts(&dsi_ctrl->hw, 0);
|
||||
} else {
|
||||
if (dsi_ctrl->host_config.panel_mode == DSI_OP_VIDEO_MODE &&
|
||||
!dsi_ctrl->host_config.u.video_engine.bllp_lp11_en &&
|
||||
!dsi_ctrl->host_config.u.video_engine.eof_bllp_lp11_en)
|
||||
dsi_ctrl->hw.ops.enable_error_interrupts(&dsi_ctrl->hw, 0xFF00A0);
|
||||
else
|
||||
dsi_ctrl->hw.ops.enable_error_interrupts(&dsi_ctrl->hw, 0xFF00E0);
|
||||
}
|
||||
}
|
||||
|
||||
static int dsi_ctrl_drv_state_init(struct dsi_ctrl *dsi_ctrl)
|
||||
@@ -2593,7 +2588,7 @@ int dsi_ctrl_setup(struct dsi_ctrl *dsi_ctrl)
|
||||
&dsi_ctrl->host_config.common_config);
|
||||
|
||||
dsi_ctrl->hw.ops.enable_status_interrupts(&dsi_ctrl->hw, 0x0);
|
||||
dsi_ctrl_enable_error_interrupts(dsi_ctrl);
|
||||
dsi_ctrl_toggle_error_interrupt_status(dsi_ctrl, true);
|
||||
|
||||
dsi_ctrl->hw.ops.ctrl_en(&dsi_ctrl->hw, true);
|
||||
|
||||
@@ -2953,7 +2948,10 @@ void dsi_ctrl_enable_status_interrupt(struct dsi_ctrl *dsi_ctrl,
|
||||
intr_idx >= DSI_STATUS_INTERRUPT_COUNT)
|
||||
return;
|
||||
|
||||
SDE_EVT32(dsi_ctrl->cell_index, SDE_EVTLOG_FUNC_ENTRY, intr_idx);
|
||||
SDE_EVT32(dsi_ctrl->cell_index, SDE_EVTLOG_FUNC_ENTRY, intr_idx,
|
||||
dsi_ctrl->irq_info.irq_num, dsi_ctrl->irq_info.irq_stat_mask,
|
||||
dsi_ctrl->irq_info.irq_stat_refcount[intr_idx]);
|
||||
|
||||
spin_lock_irqsave(&dsi_ctrl->irq_info.irq_lock, flags);
|
||||
|
||||
if (dsi_ctrl->irq_info.irq_stat_refcount[intr_idx] == 0) {
|
||||
@@ -2986,7 +2984,10 @@ void dsi_ctrl_disable_status_interrupt(struct dsi_ctrl *dsi_ctrl,
|
||||
if (!dsi_ctrl || intr_idx >= DSI_STATUS_INTERRUPT_COUNT)
|
||||
return;
|
||||
|
||||
SDE_EVT32_IRQ(dsi_ctrl->cell_index, SDE_EVTLOG_FUNC_ENTRY, intr_idx);
|
||||
SDE_EVT32_IRQ(dsi_ctrl->cell_index, SDE_EVTLOG_FUNC_ENTRY, intr_idx,
|
||||
dsi_ctrl->irq_info.irq_num, dsi_ctrl->irq_info.irq_stat_mask,
|
||||
dsi_ctrl->irq_info.irq_stat_refcount[intr_idx]);
|
||||
|
||||
spin_lock_irqsave(&dsi_ctrl->irq_info.irq_lock, flags);
|
||||
|
||||
if (dsi_ctrl->irq_info.irq_stat_refcount[intr_idx])
|
||||
@@ -3127,7 +3128,7 @@ int dsi_ctrl_host_init(struct dsi_ctrl *dsi_ctrl, bool skip_op)
|
||||
}
|
||||
|
||||
dsi_ctrl->hw.ops.enable_status_interrupts(&dsi_ctrl->hw, 0x0);
|
||||
dsi_ctrl_enable_error_interrupts(dsi_ctrl);
|
||||
dsi_ctrl_toggle_error_interrupt_status(dsi_ctrl, true);
|
||||
|
||||
DSI_CTRL_DEBUG(dsi_ctrl, "Host initialization complete, skip op: %d\n",
|
||||
skip_op);
|
||||
@@ -3413,10 +3414,8 @@ int dsi_ctrl_transfer_prepare(struct dsi_ctrl *dsi_ctrl, u32 flags)
|
||||
|
||||
mutex_lock(&dsi_ctrl->ctrl_lock);
|
||||
|
||||
if (flags & DSI_CTRL_CMD_READ)
|
||||
mask |= BIT(DSI_FIFO_UNDERFLOW);
|
||||
|
||||
dsi_ctrl_mask_error_status_interrupts(dsi_ctrl, mask, true);
|
||||
if (!(flags & DSI_CTRL_CMD_READ))
|
||||
dsi_ctrl_mask_error_status_interrupts(dsi_ctrl, mask, true);
|
||||
|
||||
rc = dsi_ctrl_set_cmd_engine_state(dsi_ctrl, DSI_CTRL_ENGINE_ON, false);
|
||||
if (rc) {
|
||||
|
Reference in New Issue
Block a user