[<prev] [next>] [day] [month] [year] [list]
Message-ID: <3b74cc48-2e18-3ad1-613c-fb90fced5d7d@collabora.com>
Date: Thu, 14 Jul 2022 13:57:34 +0200
From: AngeloGioacchino Del Regno
<angelogioacchino.delregno@...labora.com>
To: "kyrie.wu" <kyrie.wu@...iatek.com>,
Irui Wang <irui.wang@...iatek.com>,
Hans Verkuil <hverkuil-cisco@...all.nl>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Rob Herring <robh+dt@...nel.org>,
Matthias Brugger <matthias.bgg@...il.com>,
Tzung-Bi Shih <tzungbi@...omium.org>,
nicolas.dufresne@...labora.com, wenst@...omium.org
Cc: Project_Global_Chrome_Upstream_Group@...iatek.com,
linux-media@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org,
Tomasz Figa <tfiga@...omium.org>, xia.jiang@...iatek.com,
maoguang.meng@...iatek.com, srv_heupstream@...iatek.com
Subject: Re: [V10,5/7] mtk-jpegenc: add jpeg encode worker interface
Il 14/07/22 10:51, kyrie.wu ha scritto:
> On Tue, 2022-07-05 at 15:27 +0200, AngeloGioacchino Del Regno wrote:
>> Il 27/06/22 04:56, Irui Wang ha scritto:
>>> From: kyrie wu <kyrie.wu@...iatek.com>
>>>
>>> Add jpeg encoding worker to ensure that two HWs
>>> run in parallel in MT8195.
>>>
>>> Signed-off-by: kyrie wu <kyrie.wu@...iatek.com>
>>> ---
>>> .../platform/mediatek/jpeg/mtk_jpeg_core.c | 208
>>> ++++++++++++++++--
>>> .../platform/mediatek/jpeg/mtk_jpeg_core.h | 30 ++-
>>> .../platform/mediatek/jpeg/mtk_jpeg_enc_hw.c | 39 +++-
>>> 3 files changed, 240 insertions(+), 37 deletions(-)
>>>
>>> diff --git a/drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c
>>> b/drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c
>>> index 0c5c85a112ca..544673a527a0 100644
>>> --- a/drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c
>>> +++ b/drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.c
>>
>> ..snip..
>>
..snip..
>>> @@ -218,30 +222,37 @@ static irqreturn_t
>>> mtk_jpegenc_hw_irq_handler(int irq, void *priv)
>>>
>>> cancel_delayed_work(&jpeg->job_timeout_work);
>>>
>>> + ctx = jpeg->hw_param.curr_ctx;
>>> + src_buf = jpeg->hw_param.src_buffer;
>>> + dst_buf = jpeg->hw_param.dst_buffer;
>>> + v4l2_m2m_buf_copy_metadata(src_buf, dst_buf, true);
>>> +
>>> irq_status = readl(jpeg->reg_base + JPEG_ENC_INT_STS) &
>>> JPEG_ENC_INT_STATUS_MASK_ALLIRQ;
>>> if (irq_status)
>>> writel(0, jpeg->reg_base + JPEG_ENC_INT_STS);
>>> - if (!(irq_status & JPEG_ENC_INT_STATUS_DONE))
>>> - return IRQ_NONE;
>>> -
>>> - ctx = v4l2_m2m_get_curr_priv(master_jpeg->m2m_dev);
>>> - if (!ctx) {
>>> - v4l2_err(&master_jpeg->v4l2_dev, "Context is NULL\n");
>>> - return IRQ_HANDLED;
>>> + if (!(irq_status & JPEG_ENC_INT_STATUS_DONE)) {
>>> + dev_err(jpeg->dev, " Not JPEG_ENC_INT_STATUS_DONE\n");
>>
>> Please be more descriptive in error messages. Also, should this
>> really be
>> a dev_err?!?
> maybe dev_warn is right, I will fix it.
>
I think that v4l2_err() would be more appropriate.
Regards,
Angelo
Powered by blists - more mailing lists