[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1489544252.27174.1.camel@mtksdaap41>
Date: Wed, 15 Mar 2017 10:17:32 +0800
From: Rick Chang <rick.chang@...iatek.com>
To: Minghsiu Tsai <minghsiu.tsai@...iatek.com>
CC: Hans Verkuil <hans.verkuil@...co.com>,
<daniel.thompson@...aro.org>, "Rob Herring" <robh+dt@...nel.org>,
Mauro Carvalho Chehab <mchehab@....samsung.com>,
Matthias Brugger <matthias.bgg@...il.com>,
Daniel Kurtz <djkurtz@...omium.org>,
Pawel Osciak <posciak@...omium.org>,
<srv_heupstream@...iatek.com>,
Eddie Huang <eddie.huang@...iatek.com>,
Yingjoe Chen <yingjoe.chen@...iatek.com>,
Wu-Cheng Li <wuchengli@...gle.com>,
<devicetree@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>,
<linux-media@...r.kernel.org>,
<linux-mediatek@...ts.infradead.org>,
Bin Liu <bin.liu@...iatek.com>
Subject: Re: [PATCH] media: mtk-jpeg: fix continuous log "Context is NULL"
On Tue, 2017-03-14 at 22:21 +0800, Minghsiu Tsai wrote:
> The symptom is continuous log "mtk-jpeg 18004000.jpegdec: Context is NULL"
> in kernel log. It is becauese the error handling in irq doesn't clear
> interrupt.
>
> The calling flow like as below when issue happen
> mtk_jpeg_device_run()
> mtk_jpeg_job_abort()
> v4l2_m2m_job_finish() -> m2m_dev->curr_ctx = NULL;
> mtk_jpeg_dec_irq()
> v4l2_m2m_get_curr_priv()
> -> m2m_dev->curr_ctx == NULL
> -> return NULL
> log "Context is NULL"
>
> There is race condition between job_abort() and irq. In order to simplify
> code, don't want to add extra flag to maintain state, empty job_abort() and
> clear interrupt before v4l2_m2m_get_curr_priv() in irq.
>
> Signed-off-by: Minghsiu Tsai <minghsiu.tsai@...iatek.com>
> ---
> drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c | 14 ++------------
> 1 file changed, 2 insertions(+), 12 deletions(-)
Acked-by: Rick Chang <rick.chang@...iatek.com>
Powered by blists - more mailing lists