* [PATCH v1 1/5] wave5 : Support yuv422 input format for encoder.
2024-02-02 7:03 [PATCH v1 0/5] wave5 codec driver jackson.lee
@ 2024-02-02 7:03 ` jackson.lee
2024-02-02 7:03 ` [PATCH v1 2/5] wave5: Support to prepend sps/pps to IDR frame jackson.lee
` (4 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: jackson.lee @ 2024-02-02 7:03 UTC (permalink / raw)
To: mchehab
Cc: linux-media, linux-kernel, jackson.lee, lafley.kim, b-brnich,
hverkuil, nas.chung
Encoder supports the following formats.
YUV422P, NV16, NV61, NV16M, NV61M
Signed-off-by: Jackson Lee <jackson.lee@chipsnmedia.com>
Signed-off-by: Nas Chung <nas.chung@chipsnmedia.com>
---
.../chips-media/wave5/wave5-vpu-enc.c | 79 ++++++++++++++++++-
1 file changed, 76 insertions(+), 3 deletions(-)
diff --git a/drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c b/drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c
index f29cfa3af94a..0cb5bfb67258 100644
--- a/drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c
+++ b/drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c
@@ -70,6 +70,41 @@ static const struct vpu_format enc_fmt_list[FMT_TYPES][MAX_FMTS] = {
.max_height = W5_MAX_ENC_PIC_HEIGHT,
.min_height = W5_MIN_ENC_PIC_HEIGHT,
},
+ {
+ .v4l2_pix_fmt = V4L2_PIX_FMT_YUV422P,
+ .max_width = W5_MAX_ENC_PIC_WIDTH,
+ .min_width = W5_MIN_ENC_PIC_WIDTH,
+ .max_height = W5_MAX_ENC_PIC_HEIGHT,
+ .min_height = W5_MIN_ENC_PIC_HEIGHT,
+ },
+ {
+ .v4l2_pix_fmt = V4L2_PIX_FMT_NV16,
+ .max_width = W5_MAX_ENC_PIC_WIDTH,
+ .min_width = W5_MIN_ENC_PIC_WIDTH,
+ .max_height = W5_MAX_ENC_PIC_HEIGHT,
+ .min_height = W5_MIN_ENC_PIC_HEIGHT,
+ },
+ {
+ .v4l2_pix_fmt = V4L2_PIX_FMT_NV61,
+ .max_width = W5_MAX_ENC_PIC_WIDTH,
+ .min_width = W5_MIN_ENC_PIC_WIDTH,
+ .max_height = W5_MAX_ENC_PIC_HEIGHT,
+ .min_height = W5_MIN_ENC_PIC_HEIGHT,
+ },
+ {
+ .v4l2_pix_fmt = V4L2_PIX_FMT_NV16M,
+ .max_width = W5_MAX_ENC_PIC_WIDTH,
+ .min_width = W5_MIN_ENC_PIC_WIDTH,
+ .max_height = W5_MAX_ENC_PIC_HEIGHT,
+ .min_height = W5_MIN_ENC_PIC_HEIGHT,
+ },
+ {
+ .v4l2_pix_fmt = V4L2_PIX_FMT_NV61M,
+ .max_width = W5_MAX_ENC_PIC_WIDTH,
+ .min_width = W5_MIN_ENC_PIC_WIDTH,
+ .max_height = W5_MAX_ENC_PIC_HEIGHT,
+ .min_height = W5_MIN_ENC_PIC_HEIGHT,
+ },
}
};
@@ -136,6 +171,23 @@ static void wave5_update_pix_fmt(struct v4l2_pix_format_mplane *pix_mp, unsigned
pix_mp->plane_fmt[1].bytesperline = round_up(width, 32);
pix_mp->plane_fmt[1].sizeimage = round_up(width, 32) * height / 2;
break;
+ case V4L2_PIX_FMT_YUV422P:
+ case V4L2_PIX_FMT_NV16:
+ case V4L2_PIX_FMT_NV61:
+ pix_mp->width = width;
+ pix_mp->height = height;
+ pix_mp->plane_fmt[0].bytesperline = round_up(width, 32);
+ pix_mp->plane_fmt[0].sizeimage = round_up(width, 32) * height * 2;
+ break;
+ case V4L2_PIX_FMT_NV16M:
+ case V4L2_PIX_FMT_NV61M:
+ pix_mp->width = width;
+ pix_mp->height = height;
+ pix_mp->plane_fmt[0].bytesperline = round_up(width, 32);
+ pix_mp->plane_fmt[0].sizeimage = round_up(width, 32) * height;
+ pix_mp->plane_fmt[1].bytesperline = round_up(width, 32);
+ pix_mp->plane_fmt[1].sizeimage = round_up(width, 32) * height;
+ break;
default:
pix_mp->width = width;
pix_mp->height = height;
@@ -155,11 +207,19 @@ static int start_encode(struct vpu_instance *inst, u32 *fail_res)
struct enc_param pic_param;
u32 stride = ALIGN(inst->dst_fmt.width, 32);
u32 luma_size = (stride * inst->dst_fmt.height);
- u32 chroma_size = ((stride / 2) * (inst->dst_fmt.height / 2));
+ u32 chroma_size;
memset(&pic_param, 0, sizeof(struct enc_param));
memset(&frame_buf, 0, sizeof(struct frame_buffer));
+ if (inst->src_fmt.pixelformat == V4L2_PIX_FMT_YUV420 ||
+ inst->src_fmt.pixelformat == V4L2_PIX_FMT_YUV420M)
+ chroma_size = ((stride / 2) * (inst->dst_fmt.height / 2));
+ else if (inst->src_fmt.pixelformat == V4L2_PIX_FMT_YUV422P)
+ chroma_size = ((stride) * (inst->dst_fmt.height / 2));
+ else
+ chroma_size = 0;
+
dst_buf = v4l2_m2m_next_dst_buf(m2m_ctx);
if (!dst_buf) {
dev_dbg(inst->dev->dev, "%s: No destination buffer found\n", __func__);
@@ -550,11 +610,15 @@ static int wave5_vpu_enc_s_fmt_out(struct file *file, void *fh, struct v4l2_form
}
if (inst->src_fmt.pixelformat == V4L2_PIX_FMT_NV12 ||
- inst->src_fmt.pixelformat == V4L2_PIX_FMT_NV12M) {
+ inst->src_fmt.pixelformat == V4L2_PIX_FMT_NV12M ||
+ inst->src_fmt.pixelformat == V4L2_PIX_FMT_NV16 ||
+ inst->src_fmt.pixelformat == V4L2_PIX_FMT_NV16M) {
inst->cbcr_interleave = true;
inst->nv21 = false;
} else if (inst->src_fmt.pixelformat == V4L2_PIX_FMT_NV21 ||
- inst->src_fmt.pixelformat == V4L2_PIX_FMT_NV21M) {
+ inst->src_fmt.pixelformat == V4L2_PIX_FMT_NV21M ||
+ inst->src_fmt.pixelformat == V4L2_PIX_FMT_NV61 ||
+ inst->src_fmt.pixelformat == V4L2_PIX_FMT_NV61M) {
inst->cbcr_interleave = true;
inst->nv21 = true;
} else {
@@ -1132,6 +1196,15 @@ static void wave5_set_enc_openparam(struct enc_open_param *open_param,
u32 num_ctu_row = ALIGN(inst->dst_fmt.height, 64) / 64;
u32 num_mb_row = ALIGN(inst->dst_fmt.height, 16) / 16;
+ if (inst->src_fmt.pixelformat == V4L2_PIX_FMT_NV16 ||
+ inst->src_fmt.pixelformat == V4L2_PIX_FMT_NV61 ||
+ inst->src_fmt.pixelformat == V4L2_PIX_FMT_YUV422P ||
+ inst->src_fmt.pixelformat == V4L2_PIX_FMT_NV16M ||
+ inst->src_fmt.pixelformat == V4L2_PIX_FMT_NV61M)
+ open_param->src_format = FORMAT_422;
+ else
+ open_param->src_format = FORMAT_420;
+
open_param->wave_param.gop_preset_idx = PRESET_IDX_IPP_SINGLE;
open_param->wave_param.hvs_qp_scale = 2;
open_param->wave_param.hvs_max_delta_qp = 10;
--
2.43.0
^ permalink raw reply [flat|nested] 8+ messages in thread* [PATCH v1 2/5] wave5: Support to prepend sps/pps to IDR frame.
2024-02-02 7:03 [PATCH v1 0/5] wave5 codec driver jackson.lee
2024-02-02 7:03 ` [PATCH v1 1/5] wave5 : Support yuv422 input format for encoder jackson.lee
@ 2024-02-02 7:03 ` jackson.lee
2024-02-02 7:03 ` [PATCH v1 3/5] wave5 : Support runtime suspend/resume jackson.lee
` (3 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: jackson.lee @ 2024-02-02 7:03 UTC (permalink / raw)
To: mchehab
Cc: linux-media, linux-kernel, jackson.lee, lafley.kim, b-brnich,
hverkuil, nas.chung
Indicates whether to generate SPS and PPS at every IDR. Setting it to 0 disables generating SPS and PPS at every IDR.
Setting it to one enables generating SPS and PPS at every IDR.
Signed-off-by: Jackson Lee <jackson.lee@chipsnmedia.com>
Signed-off-by: Nas Chung <nas.chung@chipsnmedia.com>
---
drivers/media/platform/chips-media/wave5/wave5-hw.c | 6 ++++--
drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c | 7 +++++++
drivers/media/platform/chips-media/wave5/wave5-vpuapi.h | 1 +
3 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/drivers/media/platform/chips-media/wave5/wave5-hw.c b/drivers/media/platform/chips-media/wave5/wave5-hw.c
index f1e022fb148e..8ad7f3a28ae1 100644
--- a/drivers/media/platform/chips-media/wave5/wave5-hw.c
+++ b/drivers/media/platform/chips-media/wave5/wave5-hw.c
@@ -1602,11 +1602,13 @@ int wave5_vpu_enc_init_seq(struct vpu_instance *inst)
if (inst->std == W_AVC_ENC)
vpu_write_reg(inst->dev, W5_CMD_ENC_SEQ_INTRA_PARAM, p_param->intra_qp |
((p_param->intra_period & 0x7ff) << 6) |
- ((p_param->avc_idr_period & 0x7ff) << 17));
+ ((p_param->avc_idr_period & 0x7ff) << 17) |
+ (p_param->forced_idr_header_enable << 28));
else if (inst->std == W_HEVC_ENC)
vpu_write_reg(inst->dev, W5_CMD_ENC_SEQ_INTRA_PARAM,
p_param->decoding_refresh_type | (p_param->intra_qp << 3) |
- (p_param->intra_period << 16));
+ (p_param->forced_idr_header_enable << 9) |
+ (p_param->intra_period << 16));
reg_val = (p_param->rdo_skip << 2) |
(p_param->lambda_scaling_enable << 3) |
diff --git a/drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c b/drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c
index 0cb5bfb67258..761775216cd4 100644
--- a/drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c
+++ b/drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c
@@ -1125,6 +1125,9 @@ static int wave5_vpu_enc_s_ctrl(struct v4l2_ctrl *ctrl)
case V4L2_CID_MPEG_VIDEO_H264_ENTROPY_MODE:
inst->enc_param.entropy_coding_mode = ctrl->val;
break;
+ case V4L2_CID_MPEG_VIDEO_PREPEND_SPSPPS_TO_IDR:
+ inst->enc_param.forced_idr_header_enable = ctrl->val;
+ break;
case V4L2_CID_MIN_BUFFERS_FOR_OUTPUT:
break;
default:
@@ -1292,6 +1295,7 @@ static void wave5_set_enc_openparam(struct enc_open_param *open_param,
else
open_param->wave_param.intra_refresh_arg = num_ctu_row;
}
+ open_param->wave_param.forced_idr_header_enable = input.forced_idr_header_enable;
}
static int initialize_sequence(struct vpu_instance *inst)
@@ -1775,6 +1779,9 @@ static int wave5_vpu_open_enc(struct file *filp)
0, 1, 1, 0);
v4l2_ctrl_new_std(v4l2_ctrl_hdl, &wave5_vpu_enc_ctrl_ops,
V4L2_CID_MIN_BUFFERS_FOR_OUTPUT, 1, 32, 1, 1);
+ v4l2_ctrl_new_std(v4l2_ctrl_hdl, &wave5_vpu_enc_ctrl_ops,
+ V4L2_CID_MPEG_VIDEO_PREPEND_SPSPPS_TO_IDR,
+ 0, 1, 1, 0);
if (v4l2_ctrl_hdl->error) {
ret = -ENODEV;
diff --git a/drivers/media/platform/chips-media/wave5/wave5-vpuapi.h b/drivers/media/platform/chips-media/wave5/wave5-vpuapi.h
index 352f6e904e50..3ad6118550ac 100644
--- a/drivers/media/platform/chips-media/wave5/wave5-vpuapi.h
+++ b/drivers/media/platform/chips-media/wave5/wave5-vpuapi.h
@@ -566,6 +566,7 @@ struct enc_wave_param {
u32 lambda_scaling_enable: 1; /* enable lambda scaling using custom GOP */
u32 transform8x8_enable: 1; /* enable 8x8 intra prediction and 8x8 transform */
u32 mb_level_rc_enable: 1; /* enable MB-level rate control */
+ u32 forced_idr_header_enable: 1; /* enable header encoding before IDR frame */
};
struct enc_open_param {
--
2.43.0
^ permalink raw reply [flat|nested] 8+ messages in thread* [PATCH v1 3/5] wave5 : Support runtime suspend/resume.
2024-02-02 7:03 [PATCH v1 0/5] wave5 codec driver jackson.lee
2024-02-02 7:03 ` [PATCH v1 1/5] wave5 : Support yuv422 input format for encoder jackson.lee
2024-02-02 7:03 ` [PATCH v1 2/5] wave5: Support to prepend sps/pps to IDR frame jackson.lee
@ 2024-02-02 7:03 ` jackson.lee
2024-02-02 7:03 ` [PATCH v1 4/5] wave5: Use the bitstream buffer size from host jackson.lee
` (2 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: jackson.lee @ 2024-02-02 7:03 UTC (permalink / raw)
To: mchehab
Cc: linux-media, linux-kernel, jackson.lee, lafley.kim, b-brnich,
hverkuil, nas.chung
There are two device run-time PM callbacks defined in 'struct dev_pm_ops'
int (*runtime_suspend)(struct device *dev);
int (*runtime_resume)(struct device *dev);
Signed-off-by: Jackson Lee <jackson.lee@chipsnmedia.com>
Signed-off-by: Nas Chung <nas.chung@chipsnmedia.com>
---
.../platform/chips-media/wave5/wave5-hw.c | 5 +-
.../chips-media/wave5/wave5-vpu-dec.c | 9 +++
.../chips-media/wave5/wave5-vpu-enc.c | 9 +++
.../platform/chips-media/wave5/wave5-vpu.c | 68 +++++++++++++++++++
.../platform/chips-media/wave5/wave5-vpuapi.c | 7 ++
.../media/platform/chips-media/wave5/wave5.h | 3 +
6 files changed, 99 insertions(+), 2 deletions(-)
diff --git a/drivers/media/platform/chips-media/wave5/wave5-hw.c b/drivers/media/platform/chips-media/wave5/wave5-hw.c
index 8ad7f3a28ae1..8aade5a38439 100644
--- a/drivers/media/platform/chips-media/wave5/wave5-hw.c
+++ b/drivers/media/platform/chips-media/wave5/wave5-hw.c
@@ -503,6 +503,7 @@ int wave5_vpu_build_up_dec_param(struct vpu_instance *inst,
/* This register must be reset explicitly */
vpu_write_reg(inst->dev, W5_CMD_EXT_ADDR, 0);
vpu_write_reg(inst->dev, W5_CMD_NUM_CQ_DEPTH_M1, (COMMAND_QUEUE_DEPTH - 1));
+ vpu_write_reg(inst->dev, W5_CMD_ERR_CONCEAL, 0);
ret = send_firmware_command(inst, W5_CREATE_INSTANCE, true, NULL, NULL);
if (ret) {
@@ -1075,8 +1076,8 @@ int wave5_vpu_re_init(struct device *dev, u8 *fw, size_t size)
return setup_wave5_properties(dev);
}
-static int wave5_vpu_sleep_wake(struct device *dev, bool i_sleep_wake, const uint16_t *code,
- size_t size)
+int wave5_vpu_sleep_wake(struct device *dev, bool i_sleep_wake, const uint16_t *code,
+ size_t size)
{
u32 reg_val;
struct vpu_buf *common_vb;
diff --git a/drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c b/drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c
index ef227af72348..328a7a8f26c5 100644
--- a/drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c
+++ b/drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c
@@ -5,6 +5,7 @@
* Copyright (C) 2021-2023 CHIPS&MEDIA INC
*/
+#include <linux/pm_runtime.h>
#include "wave5-helper.h"
#define VPU_DEC_DEV_NAME "C&M Wave5 VPU decoder"
@@ -1387,9 +1388,17 @@ static int wave5_vpu_dec_start_streaming(struct vb2_queue *q, unsigned int count
if (q->type == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE && inst->state == VPU_INST_STATE_NONE) {
struct dec_open_param open_param;
+ int err = 0;
memset(&open_param, 0, sizeof(struct dec_open_param));
+ err = pm_runtime_resume_and_get(inst->dev->dev);
+ if (err) {
+ dev_err(inst->dev->dev, "decoder runtime resume failed %d\n", err);
+ ret = -EINVAL;
+ goto return_buffers;
+ }
+
ret = wave5_vpu_dec_allocate_ring_buffer(inst);
if (ret)
goto return_buffers;
diff --git a/drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c b/drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c
index 761775216cd4..ff73d69de41c 100644
--- a/drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c
+++ b/drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c
@@ -5,6 +5,7 @@
* Copyright (C) 2021-2023 CHIPS&MEDIA INC
*/
+#include <linux/pm_runtime.h>
#include "wave5-helper.h"
#define VPU_ENC_DEV_NAME "C&M Wave5 VPU encoder"
@@ -1387,9 +1388,17 @@ static int wave5_vpu_enc_start_streaming(struct vb2_queue *q, unsigned int count
if (inst->state == VPU_INST_STATE_NONE && q->type == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE) {
struct enc_open_param open_param;
+ int err = 0;
memset(&open_param, 0, sizeof(struct enc_open_param));
+ err = pm_runtime_resume_and_get(inst->dev->dev);
+ if (err) {
+ dev_err(inst->dev->dev, "encoder runtime resume failed %d\n", err);
+ ret = -EINVAL;
+ goto return_buffers;
+ }
+
wave5_set_enc_openparam(&open_param, inst);
ret = wave5_vpu_enc_open(inst, &open_param);
diff --git a/drivers/media/platform/chips-media/wave5/wave5-vpu.c b/drivers/media/platform/chips-media/wave5/wave5-vpu.c
index 0d90b5820bef..f81409740a56 100644
--- a/drivers/media/platform/chips-media/wave5/wave5-vpu.c
+++ b/drivers/media/platform/chips-media/wave5/wave5-vpu.c
@@ -10,6 +10,7 @@
#include <linux/clk.h>
#include <linux/firmware.h>
#include <linux/interrupt.h>
+#include <linux/pm_runtime.h>
#include "wave5-vpu.h"
#include "wave5-regdefine.h"
#include "wave5-vpuconfig.h"
@@ -117,6 +118,65 @@ static int wave5_vpu_load_firmware(struct device *dev, const char *fw_name,
return 0;
}
+static __maybe_unused int wave5_pm_suspend(struct device *dev)
+{
+ struct vpu_device *vpu = dev_get_drvdata(dev);
+
+ if (pm_runtime_suspended(dev))
+ return 0;
+
+ wave5_vpu_sleep_wake(dev, true, NULL, 0);
+ clk_bulk_disable_unprepare(vpu->num_clks, vpu->clks);
+
+ return 0;
+}
+
+static __maybe_unused int wave5_pm_resume(struct device *dev)
+{
+ struct vpu_device *vpu = dev_get_drvdata(dev);
+ int ret = 0;
+
+ wave5_vpu_sleep_wake(dev, false, NULL, 0);
+ ret = clk_bulk_prepare_enable(vpu->num_clks, vpu->clks);
+ if (ret) {
+ dev_err(dev, "Enabling clocks, fail: %d\n", ret);
+ return ret;
+ }
+
+ return ret;
+}
+
+static __maybe_unused int wave5_suspend(struct device *dev)
+{
+ struct vpu_device *vpu = dev_get_drvdata(dev);
+ struct vpu_instance *inst;
+
+ list_for_each_entry(inst, &vpu->instances, list)
+ v4l2_m2m_suspend(inst->v4l2_m2m_dev);
+
+ return pm_runtime_force_suspend(dev);
+}
+
+static __maybe_unused int wave5_resume(struct device *dev)
+{
+ struct vpu_device *vpu = dev_get_drvdata(dev);
+ struct vpu_instance *inst;
+ int ret = 0;
+
+ ret = pm_runtime_force_resume(dev);
+ if (ret < 0)
+ return ret;
+
+ list_for_each_entry(inst, &vpu->instances, list)
+ v4l2_m2m_resume(inst->v4l2_m2m_dev);
+
+ return ret;
+}
+
+static const struct dev_pm_ops wave5_pm_ops = {
+ SET_RUNTIME_PM_OPS(wave5_pm_suspend, wave5_pm_resume, NULL)
+};
+
static int wave5_vpu_probe(struct platform_device *pdev)
{
int ret;
@@ -232,6 +292,10 @@ static int wave5_vpu_probe(struct platform_device *pdev)
(match_data->flags & WAVE5_IS_DEC) ? "'DECODE'" : "");
dev_info(&pdev->dev, "Product Code: 0x%x\n", dev->product_code);
dev_info(&pdev->dev, "Firmware Revision: %u\n", fw_revision);
+
+ pm_runtime_enable(&pdev->dev);
+ wave5_vpu_sleep_wake(&pdev->dev, true, NULL, 0);
+
return 0;
err_enc_unreg:
@@ -254,6 +318,9 @@ static int wave5_vpu_remove(struct platform_device *pdev)
{
struct vpu_device *dev = dev_get_drvdata(&pdev->dev);
+ pm_runtime_put_sync(&pdev->dev);
+ pm_runtime_disable(&pdev->dev);
+
mutex_destroy(&dev->dev_lock);
mutex_destroy(&dev->hw_lock);
clk_bulk_disable_unprepare(dev->num_clks, dev->clks);
@@ -281,6 +348,7 @@ static struct platform_driver wave5_vpu_driver = {
.driver = {
.name = VPU_PLATFORM_DEVICE_NAME,
.of_match_table = of_match_ptr(wave5_dt_ids),
+ .pm = &wave5_pm_ops,
},
.probe = wave5_vpu_probe,
.remove = wave5_vpu_remove,
diff --git a/drivers/media/platform/chips-media/wave5/wave5-vpuapi.c b/drivers/media/platform/chips-media/wave5/wave5-vpuapi.c
index 1a3efb638dde..f1f8e4fc8474 100644
--- a/drivers/media/platform/chips-media/wave5/wave5-vpuapi.c
+++ b/drivers/media/platform/chips-media/wave5/wave5-vpuapi.c
@@ -6,6 +6,7 @@
*/
#include <linux/bug.h>
+#include <linux/pm_runtime.h>
#include "wave5-vpuapi.h"
#include "wave5-regdefine.h"
#include "wave5.h"
@@ -232,6 +233,9 @@ int wave5_vpu_dec_close(struct vpu_instance *inst, u32 *fail_res)
wave5_vdi_free_dma_memory(vpu_dev, &p_dec_info->vb_task);
+ if (!pm_runtime_suspended(inst->dev->dev))
+ pm_runtime_put_sync(inst->dev->dev);
+
unlock_and_return:
mutex_unlock(&vpu_dev->hw_lock);
@@ -734,6 +738,9 @@ int wave5_vpu_enc_close(struct vpu_instance *inst, u32 *fail_res)
wave5_vdi_free_dma_memory(vpu_dev, &p_enc_info->vb_task);
+ if (!pm_runtime_suspended(inst->dev->dev))
+ pm_runtime_put_sync(inst->dev->dev);
+
mutex_unlock(&vpu_dev->hw_lock);
return 0;
diff --git a/drivers/media/platform/chips-media/wave5/wave5.h b/drivers/media/platform/chips-media/wave5/wave5.h
index 063028eccd3b..6125eff938a8 100644
--- a/drivers/media/platform/chips-media/wave5/wave5.h
+++ b/drivers/media/platform/chips-media/wave5/wave5.h
@@ -56,6 +56,9 @@ int wave5_vpu_get_version(struct vpu_device *vpu_dev, u32 *revision);
int wave5_vpu_init(struct device *dev, u8 *fw, size_t size);
+int wave5_vpu_sleep_wake(struct device *dev, bool i_sleep_wake, const uint16_t *code,
+ size_t size);
+
int wave5_vpu_reset(struct device *dev, enum sw_reset_mode reset_mode);
int wave5_vpu_build_up_dec_param(struct vpu_instance *inst, struct dec_open_param *param);
--
2.43.0
^ permalink raw reply [flat|nested] 8+ messages in thread* [PATCH v1 4/5] wave5: Use the bitstream buffer size from host.
2024-02-02 7:03 [PATCH v1 0/5] wave5 codec driver jackson.lee
` (2 preceding siblings ...)
2024-02-02 7:03 ` [PATCH v1 3/5] wave5 : Support runtime suspend/resume jackson.lee
@ 2024-02-02 7:03 ` jackson.lee
2024-02-02 7:03 ` [PATCH v1 5/5] wave5 : Fixed the wrong buffer size formula jackson.lee
2024-02-02 8:16 ` [PATCH v1 0/5] wave5 codec driver Sebastian Fricke
5 siblings, 0 replies; 8+ messages in thread
From: jackson.lee @ 2024-02-02 7:03 UTC (permalink / raw)
To: mchehab
Cc: linux-media, linux-kernel, jackson.lee, lafley.kim, b-brnich,
hverkuil, nas.chung
In V4L2 spec, Host can set the bitstream buffer size.
Allow the larger size between default size and input size.
Signed-off-by: Jackson Lee <jackson.lee@chipsnmedia.com>
Signed-off-by: Nas Chung <nas.chung@chipsnmedia.com>
---
drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c b/drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c
index ff73d69de41c..62be7cdfccd8 100644
--- a/drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c
+++ b/drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c
@@ -11,6 +11,8 @@
#define VPU_ENC_DEV_NAME "C&M Wave5 VPU encoder"
#define VPU_ENC_DRV_NAME "wave5-enc"
+#define DEFAULT_SRC_SIZE(width, height) ((width) * (height) / 8 * 3)
+
static const struct vpu_format enc_fmt_list[FMT_TYPES][MAX_FMTS] = {
[VPU_FMT_TYPE_CODEC] = {
{
@@ -193,7 +195,8 @@ static void wave5_update_pix_fmt(struct v4l2_pix_format_mplane *pix_mp, unsigned
pix_mp->width = width;
pix_mp->height = height;
pix_mp->plane_fmt[0].bytesperline = 0;
- pix_mp->plane_fmt[0].sizeimage = width * height / 8 * 3;
+ pix_mp->plane_fmt[0].sizeimage = max(DEFAULT_SRC_SIZE(width, height),
+ pix_mp->plane_fmt[0].sizeimage);
break;
}
}
--
2.43.0
^ permalink raw reply [flat|nested] 8+ messages in thread* [PATCH v1 5/5] wave5 : Fixed the wrong buffer size formula.
2024-02-02 7:03 [PATCH v1 0/5] wave5 codec driver jackson.lee
` (3 preceding siblings ...)
2024-02-02 7:03 ` [PATCH v1 4/5] wave5: Use the bitstream buffer size from host jackson.lee
@ 2024-02-02 7:03 ` jackson.lee
2024-02-02 8:16 ` [PATCH v1 0/5] wave5 codec driver Sebastian Fricke
5 siblings, 0 replies; 8+ messages in thread
From: jackson.lee @ 2024-02-02 7:03 UTC (permalink / raw)
To: mchehab
Cc: linux-media, linux-kernel, jackson.lee, lafley.kim, b-brnich,
hverkuil, nas.chung
S_FMT/G_FMT should report the buffer size based on aligned width and height.
And, Host can set the real encoding size through s_selection and g_selection.
So, Driver should use the conf_win information for encoding size instead of size of S_FMT/G_FMT.
Signed-off-by: Nas Chung <nas.chung@chipsnmedia.com>
Signed-off-by: Jackson Lee <jackson.lee@chipsnmedia.com>
---
.../chips-media/wave5/wave5-vpu-dec.c | 77 +++++++------------
.../chips-media/wave5/wave5-vpu-enc.c | 77 +++++++++++--------
2 files changed, 72 insertions(+), 82 deletions(-)
diff --git a/drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c b/drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c
index 328a7a8f26c5..fb9449908ebd 100644
--- a/drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c
+++ b/drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c
@@ -243,54 +243,54 @@ static void wave5_update_pix_fmt(struct v4l2_pix_format_mplane *pix_mp, unsigned
case V4L2_PIX_FMT_NV21:
pix_mp->width = round_up(width, 32);
pix_mp->height = round_up(height, 16);
- pix_mp->plane_fmt[0].bytesperline = round_up(width, 32);
- pix_mp->plane_fmt[0].sizeimage = width * height * 3 / 2;
+ pix_mp->plane_fmt[0].bytesperline = pix_mp->width;
+ pix_mp->plane_fmt[0].sizeimage = pix_mp->width * pix_mp->height * 3 / 2;
break;
case V4L2_PIX_FMT_YUV422P:
case V4L2_PIX_FMT_NV16:
case V4L2_PIX_FMT_NV61:
pix_mp->width = round_up(width, 32);
pix_mp->height = round_up(height, 16);
- pix_mp->plane_fmt[0].bytesperline = round_up(width, 32);
- pix_mp->plane_fmt[0].sizeimage = width * height * 2;
+ pix_mp->plane_fmt[0].bytesperline = pix_mp->width;
+ pix_mp->plane_fmt[0].sizeimage = pix_mp->width * pix_mp->height * 2;
break;
case V4L2_PIX_FMT_YUV420M:
pix_mp->width = round_up(width, 32);
pix_mp->height = round_up(height, 16);
- pix_mp->plane_fmt[0].bytesperline = round_up(width, 32);
- pix_mp->plane_fmt[0].sizeimage = width * height;
- pix_mp->plane_fmt[1].bytesperline = round_up(width, 32) / 2;
- pix_mp->plane_fmt[1].sizeimage = width * height / 4;
- pix_mp->plane_fmt[2].bytesperline = round_up(width, 32) / 2;
- pix_mp->plane_fmt[2].sizeimage = width * height / 4;
+ pix_mp->plane_fmt[0].bytesperline = pix_mp->width;
+ pix_mp->plane_fmt[0].sizeimage = pix_mp->width * pix_mp->height;
+ pix_mp->plane_fmt[1].bytesperline = pix_mp->width / 2;
+ pix_mp->plane_fmt[1].sizeimage = pix_mp->width * pix_mp->height / 4;
+ pix_mp->plane_fmt[2].bytesperline = pix_mp->width / 2;
+ pix_mp->plane_fmt[2].sizeimage = pix_mp->width * pix_mp->height / 4;
break;
case V4L2_PIX_FMT_NV12M:
case V4L2_PIX_FMT_NV21M:
pix_mp->width = round_up(width, 32);
pix_mp->height = round_up(height, 16);
- pix_mp->plane_fmt[0].bytesperline = round_up(width, 32);
- pix_mp->plane_fmt[0].sizeimage = width * height;
- pix_mp->plane_fmt[1].bytesperline = round_up(width, 32);
- pix_mp->plane_fmt[1].sizeimage = width * height / 2;
+ pix_mp->plane_fmt[0].bytesperline = pix_mp->width;
+ pix_mp->plane_fmt[0].sizeimage = pix_mp->width * pix_mp->height;
+ pix_mp->plane_fmt[1].bytesperline = pix_mp->width;
+ pix_mp->plane_fmt[1].sizeimage = pix_mp->width * pix_mp->height / 2;
break;
case V4L2_PIX_FMT_YUV422M:
pix_mp->width = round_up(width, 32);
pix_mp->height = round_up(height, 16);
- pix_mp->plane_fmt[0].bytesperline = round_up(width, 32);
- pix_mp->plane_fmt[0].sizeimage = width * height;
- pix_mp->plane_fmt[1].bytesperline = round_up(width, 32) / 2;
- pix_mp->plane_fmt[1].sizeimage = width * height / 2;
- pix_mp->plane_fmt[2].bytesperline = round_up(width, 32) / 2;
- pix_mp->plane_fmt[2].sizeimage = width * height / 2;
+ pix_mp->plane_fmt[0].bytesperline = pix_mp->width;
+ pix_mp->plane_fmt[0].sizeimage = pix_mp->width * pix_mp->height;
+ pix_mp->plane_fmt[1].bytesperline = pix_mp->width / 2;
+ pix_mp->plane_fmt[1].sizeimage = pix_mp->width * pix_mp->height / 2;
+ pix_mp->plane_fmt[2].bytesperline = pix_mp->width / 2;
+ pix_mp->plane_fmt[2].sizeimage = pix_mp->width * pix_mp->height / 2;
break;
case V4L2_PIX_FMT_NV16M:
case V4L2_PIX_FMT_NV61M:
pix_mp->width = round_up(width, 32);
pix_mp->height = round_up(height, 16);
- pix_mp->plane_fmt[0].bytesperline = round_up(width, 32);
- pix_mp->plane_fmt[0].sizeimage = width * height;
- pix_mp->plane_fmt[1].bytesperline = round_up(width, 32);
- pix_mp->plane_fmt[1].sizeimage = width * height;
+ pix_mp->plane_fmt[0].bytesperline = pix_mp->width;
+ pix_mp->plane_fmt[0].sizeimage = pix_mp->width * pix_mp->height;
+ pix_mp->plane_fmt[1].bytesperline = pix_mp->width;
+ pix_mp->plane_fmt[1].sizeimage = pix_mp->width * pix_mp->height;
break;
default:
pix_mp->width = width;
@@ -1003,6 +1003,7 @@ static int wave5_vpu_dec_queue_setup(struct vb2_queue *q, unsigned int *num_buff
struct vpu_instance *inst = vb2_get_drv_priv(q);
struct v4l2_pix_format_mplane inst_format =
(q->type == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE) ? inst->src_fmt : inst->dst_fmt;
+ unsigned int i;
dev_dbg(inst->dev->dev, "%s: num_buffers: %u | num_planes: %u | type: %u\n", __func__,
*num_buffers, *num_planes, q->type);
@@ -1016,31 +1017,9 @@ static int wave5_vpu_dec_queue_setup(struct vb2_queue *q, unsigned int *num_buff
if (*num_buffers < inst->fbc_buf_count)
*num_buffers = inst->fbc_buf_count;
- if (*num_planes == 1) {
- if (inst->output_format == FORMAT_422)
- sizes[0] = inst_format.width * inst_format.height * 2;
- else
- sizes[0] = inst_format.width * inst_format.height * 3 / 2;
- dev_dbg(inst->dev->dev, "%s: size[0]: %u\n", __func__, sizes[0]);
- } else if (*num_planes == 2) {
- sizes[0] = inst_format.width * inst_format.height;
- if (inst->output_format == FORMAT_422)
- sizes[1] = inst_format.width * inst_format.height;
- else
- sizes[1] = inst_format.width * inst_format.height / 2;
- dev_dbg(inst->dev->dev, "%s: size[0]: %u | size[1]: %u\n",
- __func__, sizes[0], sizes[1]);
- } else if (*num_planes == 3) {
- sizes[0] = inst_format.width * inst_format.height;
- if (inst->output_format == FORMAT_422) {
- sizes[1] = inst_format.width * inst_format.height / 2;
- sizes[2] = inst_format.width * inst_format.height / 2;
- } else {
- sizes[1] = inst_format.width * inst_format.height / 4;
- sizes[2] = inst_format.width * inst_format.height / 4;
- }
- dev_dbg(inst->dev->dev, "%s: size[0]: %u | size[1]: %u | size[2]: %u\n",
- __func__, sizes[0], sizes[1], sizes[2]);
+ for (i = 0; i < *num_planes; i++) {
+ sizes[i] = inst_format.plane_fmt[i].sizeimage;
+ dev_dbg(inst->dev->dev, "%s: size[%u]: %u\n", __func__, i, sizes[i]);
}
}
diff --git a/drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c b/drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c
index 62be7cdfccd8..6898d1513f11 100644
--- a/drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c
+++ b/drivers/media/platform/chips-media/wave5/wave5-vpu-enc.c
@@ -150,46 +150,46 @@ static void wave5_update_pix_fmt(struct v4l2_pix_format_mplane *pix_mp, unsigned
case V4L2_PIX_FMT_YUV420:
case V4L2_PIX_FMT_NV12:
case V4L2_PIX_FMT_NV21:
- pix_mp->width = width;
- pix_mp->height = height;
- pix_mp->plane_fmt[0].bytesperline = round_up(width, 32);
- pix_mp->plane_fmt[0].sizeimage = round_up(width, 32) * height * 3 / 2;
+ pix_mp->width = round_up(width, 32);
+ pix_mp->height = round_up(height, 16);
+ pix_mp->plane_fmt[0].bytesperline = pix_mp->width;
+ pix_mp->plane_fmt[0].sizeimage = pix_mp->width * pix_mp->height * 3 / 2;
break;
case V4L2_PIX_FMT_YUV420M:
- pix_mp->width = width;
- pix_mp->height = height;
- pix_mp->plane_fmt[0].bytesperline = round_up(width, 32);
- pix_mp->plane_fmt[0].sizeimage = round_up(width, 32) * height;
- pix_mp->plane_fmt[1].bytesperline = round_up(width, 32) / 2;
- pix_mp->plane_fmt[1].sizeimage = round_up(width, 32) * height / 4;
- pix_mp->plane_fmt[2].bytesperline = round_up(width, 32) / 2;
- pix_mp->plane_fmt[2].sizeimage = round_up(width, 32) * height / 4;
+ pix_mp->width = round_up(width, 32);
+ pix_mp->height = round_up(height, 16);
+ pix_mp->plane_fmt[0].bytesperline = pix_mp->width;
+ pix_mp->plane_fmt[0].sizeimage = pix_mp->width * pix_mp->height;
+ pix_mp->plane_fmt[1].bytesperline = pix_mp->width / 2;
+ pix_mp->plane_fmt[1].sizeimage = pix_mp->width * pix_mp->height / 4;
+ pix_mp->plane_fmt[2].bytesperline = pix_mp->width / 2;
+ pix_mp->plane_fmt[2].sizeimage = pix_mp->width * pix_mp->height / 4;
break;
case V4L2_PIX_FMT_NV12M:
case V4L2_PIX_FMT_NV21M:
- pix_mp->width = width;
- pix_mp->height = height;
- pix_mp->plane_fmt[0].bytesperline = round_up(width, 32);
- pix_mp->plane_fmt[0].sizeimage = round_up(width, 32) * height;
- pix_mp->plane_fmt[1].bytesperline = round_up(width, 32);
- pix_mp->plane_fmt[1].sizeimage = round_up(width, 32) * height / 2;
+ pix_mp->width = round_up(width, 32);
+ pix_mp->height = round_up(height, 16);
+ pix_mp->plane_fmt[0].bytesperline = pix_mp->width;
+ pix_mp->plane_fmt[0].sizeimage = pix_mp->width * pix_mp->height;
+ pix_mp->plane_fmt[1].bytesperline = pix_mp->width;
+ pix_mp->plane_fmt[1].sizeimage = pix_mp->width * pix_mp->height / 2;
break;
case V4L2_PIX_FMT_YUV422P:
case V4L2_PIX_FMT_NV16:
case V4L2_PIX_FMT_NV61:
- pix_mp->width = width;
- pix_mp->height = height;
- pix_mp->plane_fmt[0].bytesperline = round_up(width, 32);
- pix_mp->plane_fmt[0].sizeimage = round_up(width, 32) * height * 2;
+ pix_mp->width = round_up(width, 32);
+ pix_mp->height = round_up(height, 16);
+ pix_mp->plane_fmt[0].bytesperline = pix_mp->width;
+ pix_mp->plane_fmt[0].sizeimage = pix_mp->width * pix_mp->height * 2;
break;
case V4L2_PIX_FMT_NV16M:
case V4L2_PIX_FMT_NV61M:
- pix_mp->width = width;
- pix_mp->height = height;
- pix_mp->plane_fmt[0].bytesperline = round_up(width, 32);
- pix_mp->plane_fmt[0].sizeimage = round_up(width, 32) * height;
- pix_mp->plane_fmt[1].bytesperline = round_up(width, 32);
- pix_mp->plane_fmt[1].sizeimage = round_up(width, 32) * height;
+ pix_mp->width = round_up(width, 32);
+ pix_mp->height = round_up(height, 16);
+ pix_mp->plane_fmt[0].bytesperline = pix_mp->width;
+ pix_mp->plane_fmt[0].sizeimage = pix_mp->width * pix_mp->height;
+ pix_mp->plane_fmt[1].bytesperline = pix_mp->width;
+ pix_mp->plane_fmt[1].sizeimage = pix_mp->width * pix_mp->height;
break;
default:
pix_mp->width = width;
@@ -636,6 +636,8 @@ static int wave5_vpu_enc_s_fmt_out(struct file *file, void *fh, struct v4l2_form
inst->xfer_func = f->fmt.pix_mp.xfer_func;
wave5_update_pix_fmt(&inst->dst_fmt, f->fmt.pix_mp.width, f->fmt.pix_mp.height);
+ inst->conf_win.width = inst->dst_fmt.width;
+ inst->conf_win.height = inst->dst_fmt.height;
return 0;
}
@@ -651,12 +653,17 @@ static int wave5_vpu_enc_g_selection(struct file *file, void *fh, struct v4l2_se
switch (s->target) {
case V4L2_SEL_TGT_CROP_DEFAULT:
case V4L2_SEL_TGT_CROP_BOUNDS:
- case V4L2_SEL_TGT_CROP:
s->r.left = 0;
s->r.top = 0;
s->r.width = inst->dst_fmt.width;
s->r.height = inst->dst_fmt.height;
break;
+ case V4L2_SEL_TGT_CROP:
+ s->r.left = 0;
+ s->r.top = 0;
+ s->r.width = inst->conf_win.width;
+ s->r.height = inst->conf_win.height;
+ break;
default:
return -EINVAL;
}
@@ -679,8 +686,10 @@ static int wave5_vpu_enc_s_selection(struct file *file, void *fh, struct v4l2_se
s->r.left = 0;
s->r.top = 0;
- s->r.width = inst->src_fmt.width;
- s->r.height = inst->src_fmt.height;
+ s->r.width = min(s->r.width, inst->dst_fmt.width);
+ s->r.height = min(s->r.height, inst->dst_fmt.height);
+
+ inst->conf_win = s->r;
return 0;
}
@@ -1227,8 +1236,8 @@ static void wave5_set_enc_openparam(struct enc_open_param *open_param,
open_param->wave_param.lambda_scaling_enable = 1;
open_param->line_buf_int_en = true;
- open_param->pic_width = inst->dst_fmt.width;
- open_param->pic_height = inst->dst_fmt.height;
+ open_param->pic_width = inst->conf_win.width;
+ open_param->pic_height = inst->conf_win.height;
open_param->frame_rate_info = inst->frame_rate;
open_param->rc_enable = inst->rc_enable;
if (inst->rc_enable) {
@@ -1804,6 +1813,8 @@ static int wave5_vpu_open_enc(struct file *filp)
v4l2_ctrl_handler_setup(v4l2_ctrl_hdl);
wave5_set_default_format(&inst->src_fmt, &inst->dst_fmt);
+ inst->conf_win.width = inst->dst_fmt.width;
+ inst->conf_win.height = inst->dst_fmt.height;
inst->colorspace = V4L2_COLORSPACE_REC709;
inst->ycbcr_enc = V4L2_YCBCR_ENC_DEFAULT;
inst->quantization = V4L2_QUANTIZATION_DEFAULT;
--
2.43.0
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH v1 0/5] wave5 codec driver
2024-02-02 7:03 [PATCH v1 0/5] wave5 codec driver jackson.lee
` (4 preceding siblings ...)
2024-02-02 7:03 ` [PATCH v1 5/5] wave5 : Fixed the wrong buffer size formula jackson.lee
@ 2024-02-02 8:16 ` Sebastian Fricke
2024-02-02 8:20 ` jackson.lee
5 siblings, 1 reply; 8+ messages in thread
From: Sebastian Fricke @ 2024-02-02 8:16 UTC (permalink / raw)
To: jackson.lee
Cc: mchehab, linux-media, linux-kernel, lafley.kim, b-brnich,
hverkuil, nas.chung
Hey Jackson,
thanks for sending the patches!
I would advise to not send the next version of a patch series with
multiple patches too quickly. So far the patches only got a single very
minor review comment and others might already work on a deeper review
and test. There is no hard rule but I would say give such a series at
least a week or two to gather some review comments before sending the
next version, as it is always a bit of hassle to adjust to a new
version and you don't want to spam the mailing list.
Should you not receive any more review comments, then please go ahead
and ping some relevant people (Hans Verkuil, people from Collabora that
developed the patches, etc.) to review, either per mail or per IRC on
the OFTC server on the channel #linux-media.
Greetings,
Sebastian
On 02.02.2024 16:03, jackson.lee wrote:
>The wave5 codec driver is a stateful encoder/decoder.
>The following patches is for supporting yuv422 inpuy format, supporting
>runtime suspend/resume feature and extra things.
>
>Change since v0:
>=================
>The DEFAULT_SRC_SIZE macro was defined using multiple lines,
>To make a simple define, tab and multiple lines has been removed,
>The macro is defined using one line.
>
>
>jackson.lee (5):
> wave5 : Support yuv422 input format for encoder.
> wave5: Support to prepend sps/pps to IDR frame.
> wave5 : Support runtime suspend/resume.
> wave5: Use the bitstream buffer size from host.
> wave5 : Fixed the wrong buffer size formula.
>
> .../platform/chips-media/wave5/wave5-hw.c | 11 +-
> .../chips-media/wave5/wave5-vpu-dec.c | 86 +++++-----
> .../chips-media/wave5/wave5-vpu-enc.c | 157 +++++++++++++++---
> .../platform/chips-media/wave5/wave5-vpu.c | 68 ++++++++
> .../platform/chips-media/wave5/wave5-vpuapi.c | 7 +
> .../platform/chips-media/wave5/wave5-vpuapi.h | 1 +
> .../media/platform/chips-media/wave5/wave5.h | 3 +
> 7 files changed, 253 insertions(+), 80 deletions(-)
>
>--
>2.43.0
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread* RE: [PATCH v1 0/5] wave5 codec driver
2024-02-02 8:16 ` [PATCH v1 0/5] wave5 codec driver Sebastian Fricke
@ 2024-02-02 8:20 ` jackson.lee
0 siblings, 0 replies; 8+ messages in thread
From: jackson.lee @ 2024-02-02 8:20 UTC (permalink / raw)
To: Sebastian Fricke
Cc: mchehab, linux-media, linux-kernel, lafley.kim, b-brnich,
hverkuil, Nas Chung
Hello Sebastian
Thanks for your advice.
> -----Original Message-----
> From: Sebastian Fricke <sebastian.fricke@collabora.com>
> Sent: Friday, February 2, 2024 5:16 PM
> To: jackson.lee <jackson.lee@chipsnmedia.com>
> Cc: mchehab@kernel.org; linux-media@vger.kernel.org; linux-
> kernel@vger.kernel.org; lafley.kim <lafley.kim@chipsnmedia.com>; b-
> brnich@ti.com; hverkuil@xs4all.nl; Nas Chung <nas.chung@chipsnmedia.com>
> Subject: Re: [PATCH v1 0/5] wave5 codec driver
>
> Hey Jackson,
>
> thanks for sending the patches!
>
> I would advise to not send the next version of a patch series with
> multiple patches too quickly. So far the patches only got a single very
> minor review comment and others might already work on a deeper review and
> test. There is no hard rule but I would say give such a series at least a
> week or two to gather some review comments before sending the next version,
> as it is always a bit of hassle to adjust to a new version and you don't
> want to spam the mailing list.
> Should you not receive any more review comments, then please go ahead and
> ping some relevant people (Hans Verkuil, people from Collabora that
> developed the patches, etc.) to review, either per mail or per IRC on the
> OFTC server on the channel #linux-media.
>
> Greetings,
> Sebastian
>
> On 02.02.2024 16:03, jackson.lee wrote:
> >The wave5 codec driver is a stateful encoder/decoder.
> >The following patches is for supporting yuv422 inpuy format, supporting
> >runtime suspend/resume feature and extra things.
> >
> >Change since v0:
> >=================
> >The DEFAULT_SRC_SIZE macro was defined using multiple lines, To make a
> >simple define, tab and multiple lines has been removed, The macro is
> >defined using one line.
> >
> >
> >jackson.lee (5):
> > wave5 : Support yuv422 input format for encoder.
> > wave5: Support to prepend sps/pps to IDR frame.
> > wave5 : Support runtime suspend/resume.
> > wave5: Use the bitstream buffer size from host.
> > wave5 : Fixed the wrong buffer size formula.
> >
> > .../platform/chips-media/wave5/wave5-hw.c | 11 +-
> > .../chips-media/wave5/wave5-vpu-dec.c | 86 +++++-----
> > .../chips-media/wave5/wave5-vpu-enc.c | 157 +++++++++++++++---
> > .../platform/chips-media/wave5/wave5-vpu.c | 68 ++++++++
> > .../platform/chips-media/wave5/wave5-vpuapi.c | 7 +
> > .../platform/chips-media/wave5/wave5-vpuapi.h | 1 +
> > .../media/platform/chips-media/wave5/wave5.h | 3 +
> > 7 files changed, 253 insertions(+), 80 deletions(-)
> >
> >--
> >2.43.0
> >
> >
^ permalink raw reply [flat|nested] 8+ messages in thread