Skip to content

Commit 1b97e52

Browse files
ezequielgarciamchehab
authored andcommitted
media: rockchip/rga: Remove unrequired wait in .job_abort
As per the documentation, job_abort is not required to wait until the current job finishes. It is redundant to do so, as the core will perform the wait operation. Remove the wait infrastructure completely. Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com> Reviewed-by: Jacob Chen <jacob-chen@iotwrt.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
1 parent 9aecc03 commit 1b97e52

2 files changed

Lines changed: 1 addition & 14 deletions

File tree

‎drivers/media/platform/rockchip/rga/rga.c‎

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,7 @@ module_param(debug, int, 0644);
4141

4242
static void job_abort(void *prv)
4343
{
44-
struct rga_ctx *ctx = prv;
45-
struct rockchip_rga *rga = ctx->rga;
46-
47-
if (!rga->curr) /* No job currently running */
48-
return;
49-
50-
wait_event_timeout(rga->irq_queue,
51-
!rga->curr, msecs_to_jiffies(RGA_TIMEOUT));
44+
/* Can't do anything rational here */
5245
}
5346

5447
static void device_run(void *prv)
@@ -104,8 +97,6 @@ static irqreturn_t rga_isr(int irq, void *prv)
10497
v4l2_m2m_buf_done(src, VB2_BUF_STATE_DONE);
10598
v4l2_m2m_buf_done(dst, VB2_BUF_STATE_DONE);
10699
v4l2_m2m_job_finish(rga->m2m_dev, ctx->fh.m2m_ctx);
107-
108-
wake_up(&rga->irq_queue);
109100
}
110101

111102
return IRQ_HANDLED;
@@ -838,8 +829,6 @@ static int rga_probe(struct platform_device *pdev)
838829
spin_lock_init(&rga->ctrl_lock);
839830
mutex_init(&rga->mutex);
840831

841-
init_waitqueue_head(&rga->irq_queue);
842-
843832
ret = rga_parse_dt(rga);
844833
if (ret)
845834
dev_err(&pdev->dev, "Unable to parse OF data\n");

‎drivers/media/platform/rockchip/rga/rga.h‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,6 @@ struct rockchip_rga {
8686
/* ctrl parm lock */
8787
spinlock_t ctrl_lock;
8888

89-
wait_queue_head_t irq_queue;
90-
9189
struct rga_ctx *curr;
9290
dma_addr_t cmdbuf_phy;
9391
void *cmdbuf_virt;

0 commit comments

Comments
 (0)