[PATCH] media: imx-jpeg: Add support for descriptor allocation from SRAM

Ming Qian(OSS) ming.qian at oss.nxp.com
Thu Aug 21 02:42:48 PDT 2025


Hi Marek,

On 8/21/2025 5:03 PM, Marek Vasut wrote:
> On 8/21/25 8:28 AM, Ming Qian(OSS) wrote:
>> Hi Marek,
> 
> Hello Ming,
> 
>> On 8/21/2025 12:29 AM, Marek Vasut wrote:
>>> [You don't often get email from marek.vasut at mailbox.org. Learn why 
>>> this is important at https://aka.ms/LearnAboutSenderIdentification ]
>>>
>>> Add support for optional allocation of bitstream descriptors from SRAM
>>> instead of DRAM. In case the encoder/decoder DT node contains 'sram'
>>> property which points to 'mmio-sram', the driver will attempt to use
>>> the SRAM instead of DRAM for descriptor allocation, which might improve
>>> performance.
>>>
>>> This however helps on i.MX95 with sporadic SLOTn_STATUS IMG_RD_ERR 
>>> bit 11
>>> being triggered during JPEG encoding. The following pipeline triggers 
>>> the
>>> problem when descriptors get allocated from DRAM, the pipeline often 
>>> hangs
>>> after a few seconds and the encoder driver indicates "timeout, cancel 
>>> it" :
>>
>> It's a hardware bug in i.MX95 A0, and the i.MX95 B0 has fixed this issue.
> 
> Ahh, this helps, thank you.
> 
>> 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.

This patch makes the jpeg can support SRAM. Maybe in some scenarios, we
can assign the SRAM to jpeg instead of VPU.

So for me, I welcome this patch.

Regards,
Ming




More information about the linux-arm-kernel mailing list