diff options
| author | Ajay Singh Parmar <aparmar@codeaurora.org> | 2016-07-13 11:26:51 -0700 |
|---|---|---|
| committer | Dhaval Patel <pdhaval@codeaurora.org> | 2016-08-01 11:58:15 -0700 |
| commit | 737a60cace9d69baac886ce9aca7f00ba17fb2cd (patch) | |
| tree | 8d29b35243c4b398935c2fcb170c3fa38682d086 /drivers/gpu | |
| parent | 8103c2dc20a87616c2ec27a333828e4d9d2dc38b (diff) | |
drm/dsi-staging: remove interrupt handling
Remove interrupt handling for now as interrupt handling
implementation is not complete and causes basic functionality
break.
Change-Id: I59a0e86434165b34c008ea5e1d62ecb17b5cf1af
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
Diffstat (limited to 'drivers/gpu')
| -rw-r--r-- | drivers/gpu/drm/msm/dsi-staging/dsi_clk_pwr.c | 2 | ||||
| -rw-r--r-- | drivers/gpu/drm/msm/dsi-staging/dsi_ctrl.c | 100 |
2 files changed, 1 insertions, 101 deletions
diff --git a/drivers/gpu/drm/msm/dsi-staging/dsi_clk_pwr.c b/drivers/gpu/drm/msm/dsi-staging/dsi_clk_pwr.c index b10c80286a97..2443e2cdf6f1 100644 --- a/drivers/gpu/drm/msm/dsi-staging/dsi_clk_pwr.c +++ b/drivers/gpu/drm/msm/dsi-staging/dsi_clk_pwr.c @@ -271,7 +271,7 @@ static int dsi_pwr_parse_supply_node(struct device_node *root, } snprintf(regs->vregs[i].vreg_name, - strlen(regs->vregs[i].vreg_name), + ARRAY_SIZE(regs->vregs[i].vreg_name), "%s", st); rc = of_property_read_u32(node, "qcom,supply-min-voltage", diff --git a/drivers/gpu/drm/msm/dsi-staging/dsi_ctrl.c b/drivers/gpu/drm/msm/dsi-staging/dsi_ctrl.c index 56dbcd3ebf68..f943711b779c 100644 --- a/drivers/gpu/drm/msm/dsi-staging/dsi_ctrl.c +++ b/drivers/gpu/drm/msm/dsi-staging/dsi_ctrl.c @@ -499,38 +499,6 @@ static int dsi_ctrl_init_regmap(struct platform_device *pdev, return rc; } -static irqreturn_t dsi_ctrl_isr(int irq, void *ptr) -{ - struct dsi_ctrl *dsi_ctrl = ptr; - u32 interrupt_status = 0; - u64 error_status = 0; - unsigned long flags; - - spin_lock_irqsave(&dsi_ctrl->int_info.intr_lock, flags); - interrupt_status = dsi_ctrl->hw.ops.get_interrupt_status(&dsi_ctrl->hw); - error_status = dsi_ctrl->hw.ops.get_error_status(&dsi_ctrl->hw); - - dsi_ctrl->hw.ops.clear_interrupt_status(&dsi_ctrl->hw, - interrupt_status); - dsi_ctrl->hw.ops.clear_error_status(&dsi_ctrl->hw, error_status); - - dsi_ctrl->int_info.interrupt_status = interrupt_status; - dsi_ctrl->int_info.error_status = error_status; - - spin_unlock_irqrestore(&dsi_ctrl->int_info.intr_lock, flags); - - if (interrupt_status & DSI_CMD_MODE_DMA_DONE) - complete(&dsi_ctrl->int_info.cmd_dma_done); - - if (interrupt_status & DSI_VIDEO_MODE_FRAME_DONE) - complete(&dsi_ctrl->int_info.vid_frame_done); - - if (interrupt_status & DSI_CMD_FRAME_DONE) - complete(&dsi_ctrl->int_info.cmd_frame_done); - - return IRQ_HANDLED; -} - static int dsi_ctrl_clocks_deinit(struct dsi_ctrl *ctrl) { struct dsi_core_clk_info *core = &ctrl->clk_info.core_clks; @@ -1038,17 +1006,6 @@ static int dsi_message_tx(struct dsi_ctrl *dsi_ctrl, dsi_ctrl->index); dsi_ctrl->hw.ops.reset_cmd_fifo(&dsi_ctrl->hw); - rc = wait_for_completion_timeout( - &dsi_ctrl->int_info.cmd_dma_done, - msecs_to_jiffies(DSI_CTRL_TX_TO_MS)); - if (rc == 0) { - pr_err("[%s] timedout waiting for cmd tx\n", - dsi_ctrl->name); - rc = -ETIMEDOUT; - goto error; - } else { - rc = 0; - } } error: if (buffer) @@ -1214,38 +1171,6 @@ int dsi_ctrl_intr_deinit(struct dsi_ctrl *dsi_ctrl) return 0; } -static int dsi_ctrl_intr_init(struct dsi_ctrl *dsi_ctrl) -{ - int rc = 0; - struct dsi_ctrl_interrupts *ints = &dsi_ctrl->int_info; - - ints->irq = irq_of_parse_and_map(dsi_ctrl->pdev->dev.of_node, 0); - if ((int)ints->irq < 0) { - rc = -EINVAL; - pr_err("failed to parse and map irq, rc=%d\n", rc); - dsi_ctrl->int_info.irq = 0; - goto end; - } - - spin_lock_init(&ints->intr_lock); - - init_completion(&ints->cmd_dma_done); - init_completion(&ints->vid_frame_done); - init_completion(&ints->cmd_frame_done); - - rc = devm_request_threaded_irq(&dsi_ctrl->pdev->dev, - ints->irq, - NULL, - dsi_ctrl_isr, - IRQF_TRIGGER_HIGH | IRQF_ONESHOT, - dsi_ctrl->name, - dsi_ctrl); - if (rc) - pr_err("IRQ request failed, rc=%d\n", rc); -end: - return rc; -} - static int dsi_ctrl_buffer_deinit(struct dsi_ctrl *dsi_ctrl) { if (dsi_ctrl->tx_cmd_buf) { @@ -1540,18 +1465,6 @@ int dsi_ctrl_drv_init(struct dsi_ctrl *dsi_ctrl, struct dentry *parent) goto error; } - rc = dsi_ctrl_intr_init(dsi_ctrl); - if (rc) { - pr_err("Failed to initialize interrupt deps, rc=%d\n", rc); - goto error; - } - - rc = dsi_ctrl_buffer_init(dsi_ctrl); - if (rc) { - pr_err("Failed to initialize tx buffer, rc=%d\n", rc); - goto error; - } - rc = dsi_ctrl_debugfs_init(dsi_ctrl, parent); if (rc) { pr_err("[DSI_%d] failed to init debug fs, rc=%d\n", @@ -1591,10 +1504,6 @@ int dsi_ctrl_drv_deinit(struct dsi_ctrl *dsi_ctrl) if (rc) pr_err("Failed to free cmd buffers, rc=%d\n", rc); - rc = dsi_ctrl_intr_deinit(dsi_ctrl); - if (rc) - pr_err("Failed to free interrupt deps, rc=%d\n", rc); - mutex_unlock(&dsi_ctrl->ctrl_lock); return rc; } @@ -1953,15 +1862,6 @@ int dsi_ctrl_cmd_tx_trigger(struct dsi_ctrl *dsi_ctrl, u32 flags) dsi_ctrl->index); } - rc = wait_for_completion_timeout(&dsi_ctrl->int_info.cmd_dma_done, - msecs_to_jiffies(DSI_CTRL_TX_TO_MS)); - if (rc == 0) { - pr_err("[%s] timedout waiting for cmd tx\n", dsi_ctrl->name); - rc = -ETIMEDOUT; - } else { - rc = 0; - } - mutex_unlock(&dsi_ctrl->ctrl_lock); return rc; } |
