[PATCH v17 06/12] media: mediatek: jpeg: fix buffer state update timing

AngeloGioacchino Del Regno angelogioacchino.delregno at collabora.com
Tue Sep 22 04:40:03 PDT 2026


On 9/22/26 11:15, Kyrie Wu wrote:
> Update the destination buffer state only after the decoder has selected
> a hardware core and resumed its runtime PM state successfully. This avoids
> assigning frame tracking data to buffers that will be returned early, such
> as when a source resolution change is detected.
> 
> Protect the destination buffer state update with the hardware spinlock so
> the completion path observes a consistent context and frame number. Stop
> walking the done queue after completing the next expected frame, since the
> remaining buffers still need to wait for their own frame order.
> 
> Fixes: dedc21500334 ("media: mtk-jpegdec: add jpeg decode worker interface")
> Signed-off-by: Kyrie Wu <kyrie.wu at mediatek.com>
> Reviewed-by: Nicolas Dufresne <nicolas.dufresne at collabora.com>

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno at collabora.com>




More information about the linux-arm-kernel mailing list