Media:Wave5: Allocate more linear buffer to avoid block in gst-play
authorSom Qin <som.qin@starfivetech.com>
Wed, 30 Aug 2023 01:23:21 +0000 (09:23 +0800)
committerJaehoon Chung <jh80.chung@samsung.com>
Mon, 19 Feb 2024 00:14:04 +0000 (09:14 +0900)
Signed-off-by: Som Qin <som.qin@starfivetech.com>
[sw0312.kim: cherry-pick the commit a95153b6cedf from https://github.com/starfive-tech/linux/tree/JH7110_VisionFive2_6.1.y_devel]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I526c47f67fa196e27d7e4ad5e685252e8a034989

drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c

index fda9090..e97b3b0 100644 (file)
@@ -345,11 +345,7 @@ static void wave5_vpu_dec_finish_decode(struct vpu_instance *inst)
                                                      ((stride / 2) * (height / 2)));
                        }
 
-                       if (inst->timestamp) {
-                               dst_buf->vb2_buf.timestamp = inst->timestamp;
-                       } else {
-                               dst_buf->vb2_buf.timestamp = inst->timestamp_cnt++ * inst->codec_info->dec_info.initial_info.ns_per_frame;
-                       }
+                       dst_buf->vb2_buf.timestamp = inst->timestamp_cnt++ * inst->codec_info->dec_info.initial_info.ns_per_frame;
 
                        dst_buf->field = V4L2_FIELD_NONE;
                        v4l2_m2m_buf_done(dst_buf, VB2_BUF_STATE_DONE);
@@ -897,6 +893,7 @@ static int wave5_vpu_dec_queue_setup(struct vb2_queue *q, unsigned int *num_buff
                //if (*num_buffers > inst->min_dst_buf_count &&
                //    *num_buffers < WAVE5_MAX_FBS)
                //      inst->dst_buf_count = *num_buffers;
+               inst->dst_buf_count += 2;
 
                *num_buffers = inst->dst_buf_count;
                non_linear_num = inst->dst_buf_count;