]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
media: mediatek: vcodec: Correct vsi_core framebuffer size
authorFei Shao <fshao@chromium.org>
Fri, 14 Mar 2025 07:56:17 +0000 (15:56 +0800)
committerHans Verkuil <hverkuil@xs4all.nl>
Fri, 11 Apr 2025 11:21:12 +0000 (13:21 +0200)
The framebuffer size for decoder instances was being incorrectly set -
inst->vsi_core->fb.y.size was assigned twice consecutively.

Assign the second picinfo framebuffer size to the C framebuffer instead,
which appears to be the intended target based on the surrounding code.

Fixes: 2674486aac7d ("media: mediatek: vcodec: support stateless hevc decoder")
Cc: stable@vger.kernel.org
Signed-off-by: Fei Shao <fshao@chromium.org>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
drivers/media/platform/mediatek/vcodec/decoder/vdec/vdec_hevc_req_multi_if.c

index aa721cc43647c7b53fadec44b13c14734b481ab0..2725db882e5b30ad9febae093ece40f4347f7147 100644 (file)
@@ -821,7 +821,7 @@ static int vdec_hevc_slice_setup_core_buffer(struct vdec_hevc_slice_inst *inst,
        inst->vsi_core->fb.y.dma_addr = y_fb_dma;
        inst->vsi_core->fb.y.size = ctx->picinfo.fb_sz[0];
        inst->vsi_core->fb.c.dma_addr = c_fb_dma;
-       inst->vsi_core->fb.y.size = ctx->picinfo.fb_sz[1];
+       inst->vsi_core->fb.c.size = ctx->picinfo.fb_sz[1];
 
        inst->vsi_core->dec.vdec_fb_va = (unsigned long)fb;