From: Marek Vasut <marek.vasut@mailbox.org>
To: "Ming Qian(OSS)" <ming.qian@oss.nxp.com>, linux-media@vger.kernel.org
Cc: Fabio Estevam <festevam@gmail.com>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Mirela Rabulea <mirela.rabulea@nxp.com>,
Nicolas Dufresne <nicolas.dufresne@collabora.com>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Sascha Hauer <s.hauer@pengutronix.de>,
Shawn Guo <shawnguo@kernel.org>,
imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] media: imx-jpeg: Add support for descriptor allocation from SRAM
Date: Sat, 11 Oct 2025 20:35:39 +0200 [thread overview]
Message-ID: <64d2edd4-b641-4f2f-b831-bf2f49da1508@mailbox.org> (raw)
In-Reply-To: <c1289df9-01b1-4c0c-ba09-7cf18ee8baaf@oss.nxp.com>
On 8/22/25 2:58 AM, Ming Qian(OSS) wrote:
Hello Ming,
sorry for the very late reply.
>>>>> Using sram instead of dram only improves timing, but doesn't
>>>>> completely circumvent the hardware bug
>>>> Does it make sense to upstream this patch anyway ?
>>>
>>> I think this patch is helpful.
>>>
>>> But so far, we don't have any SRAM resources for jpeg.
>>> The i.MX95 does have sram, but it is very limited, and it has been
>>> assigned to arm_scmi and VPU.
>>
>> I found out the SM can work fine with only 192 kiB of SRAM instead of
>> 256 kiB of SRAM. That frees up 64 kiB of SRAM for NS world. Each JPEG
>> IP needs 20544 Bytes for descriptors, which fits into those freed up
>> 64 kiB of SRAM.
>>
>> The alternative would be to handle those AXI read errors and restart
>> the encoding. I always observe these errors in the CONFIG phase of
>> encoding. Do you happen to have any details of this issue you could
>> share ? Do you know whether the problem occurs only during CONFIG
>> phase, or also during image read phase ?
>>
>> If the problem occurs only during CONFIG phase of encoding, it would
>> be easy to retrigger the CONFIG I think. If the problem occurs also
>> during image read, that might need some more creative fix.
>>
>
> This is a hardware bug that affects not only the jpeg encoder but also
> the jpeg decoder.
>
> This issue occurs under conditions of high backpressure on the AXI bus,
> meaning the latency on the write/response channel is high, while the
> read channel latency remains low.
>
> When error occurs during CONFIG phase of encoder, it will trigger a
> interrupt. But in other phase, there is no interrupt, then the running
> job is stalled until timeout.
I sent a V2 now, thank you for the clarification, I tried to include
that in the commit message too.
prev parent reply other threads:[~2025-10-11 18:35 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-20 16:29 [PATCH] media: imx-jpeg: Add support for descriptor allocation from SRAM Marek Vasut
2025-08-20 18:17 ` Frank Li
2025-08-20 20:16 ` Marek Vasut
2025-08-21 6:28 ` Ming Qian(OSS)
2025-08-21 9:03 ` Marek Vasut
2025-08-21 9:42 ` Ming Qian(OSS)
2025-08-21 12:01 ` Marek Vasut
2025-08-22 0:58 ` Ming Qian(OSS)
2025-10-11 18:35 ` Marek Vasut [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=64d2edd4-b641-4f2f-b831-bf2f49da1508@mailbox.org \
--to=marek.vasut@mailbox.org \
--cc=festevam@gmail.com \
--cc=imx@lists.linux.dev \
--cc=kernel@pengutronix.de \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=ming.qian@oss.nxp.com \
--cc=mirela.rabulea@nxp.com \
--cc=nicolas.dufresne@collabora.com \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).