]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
media: chips-media: wave5: Fix timeout while testing 10bit hevc fluster
authorJackson.lee <jackson.lee@chipsnmedia.com>
Tue, 17 Dec 2024 04:51:25 +0000 (13:51 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 20 Apr 2025 08:15:38 +0000 (10:15 +0200)
commit 035371c9e5098018b8512efc6a8812912469480c upstream.

The Wave5 521C variant does not support 10 bit decoding. When 10 bit
decoding support was added for the 515 variant, a section of the code
was removed which returned an error. This removal causes a timeout for
the 521 variant, which was discovered during HEVC 10-bit decoding tests.

Fixes: 143e7ab4d9a0 ("media: chips-media: wave5: support decoding HEVC Main10 profile")
Cc: stable@vger.kernel.org
Signed-off-by: Jackson.lee <jackson.lee@chipsnmedia.com>
Signed-off-by: Nas Chung <nas.chung@chipsnmedia.com>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Sebastian Fricke <sebastian.fricke@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c

index 1ca14032f8b94f5b61fee21ef9111283215b56eb..e238447c88bbf36f233b6dbf763eca1fecd7190e 100644 (file)
@@ -1424,10 +1424,24 @@ static int wave5_vpu_dec_start_streaming(struct vb2_queue *q, unsigned int count
                if (ret)
                        goto free_bitstream_vbuf;
        } else if (q->type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE) {
+               struct dec_initial_info *initial_info =
+                       &inst->codec_info->dec_info.initial_info;
+
                if (inst->state == VPU_INST_STATE_STOP)
                        ret = switch_state(inst, VPU_INST_STATE_INIT_SEQ);
                if (ret)
                        goto return_buffers;
+
+               if (inst->state == VPU_INST_STATE_INIT_SEQ &&
+                   inst->dev->product_code == WAVE521C_CODE) {
+                       if (initial_info->luma_bitdepth != 8) {
+                               dev_info(inst->dev->dev, "%s: no support for %d bit depth",
+                                        __func__, initial_info->luma_bitdepth);
+                               ret = -EINVAL;
+                               goto return_buffers;
+                       }
+               }
+
        }
 
        return ret;