[v2,5/6] media: s5p-mfc: Use standard frame skip mode control

Message ID 20200721074538.505-6-stanimir.varbanov@linaro.org
State New
Headers show
Series
  • Add new controls for CQ and Frame-skip
Related show

Commit Message

Stanimir Varbanov July 21, 2020, 7:45 a.m.
Use the standard menu control for frame skip mode in the MFC
driver. The legacy private menu control is kept for backward
compatibility.

Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>

---
 drivers/media/platform/s5p-mfc/s5p_mfc_enc.c | 6 ++++++
 1 file changed, 6 insertions(+)

-- 
2.17.1

Comments

Stanimir Varbanov July 22, 2020, 11:35 a.m. | #1
Hi,

Could someone mfc driver maintainers ack or review this patch?

On 7/21/20 10:45 AM, Stanimir Varbanov wrote:
> Use the standard menu control for frame skip mode in the MFC

> driver. The legacy private menu control is kept for backward

> compatibility.

> 

> Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>

> ---

>  drivers/media/platform/s5p-mfc/s5p_mfc_enc.c | 6 ++++++

>  1 file changed, 6 insertions(+)

> 

> diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c b/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c

> index 912fe0c5ab18..3092eb6777a5 100644

> --- a/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c

> +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c

> @@ -261,6 +261,11 @@ static struct mfc_control controls[] = {

>  		.menu_skip_mask = 0,

>  		.default_value = V4L2_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE_DISABLED,

>  	},

> +	{

> +		.id = V4L2_CID_MPEG_VIDEO_FRAME_SKIP_MODE,

> +		.maximum = V4L2_MPEG_VIDEO_FRAME_SKIP_MODE_BUF_LIMIT,

> +		.default_value = V4L2_MPEG_VIDEO_FRAME_SKIP_MODE_DISABLED,

> +	},

>  	{

>  		.id = V4L2_CID_MPEG_MFC51_VIDEO_RC_FIXED_TARGET_BIT,

>  		.type = V4L2_CTRL_TYPE_BOOLEAN,

> @@ -1849,6 +1854,7 @@ static int s5p_mfc_enc_s_ctrl(struct v4l2_ctrl *ctrl)

>  		p->seq_hdr_mode = ctrl->val;

>  		break;

>  	case V4L2_CID_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE:

> +	case V4L2_CID_MPEG_VIDEO_FRAME_SKIP_MODE:

>  		p->frame_skip_mode = ctrl->val;

>  		break;

>  	case V4L2_CID_MPEG_MFC51_VIDEO_RC_FIXED_TARGET_BIT:

> 


-- 
regards,
Stan

Patch

diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c b/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c
index 912fe0c5ab18..3092eb6777a5 100644
--- a/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c
@@ -261,6 +261,11 @@  static struct mfc_control controls[] = {
 		.menu_skip_mask = 0,
 		.default_value = V4L2_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE_DISABLED,
 	},
+	{
+		.id = V4L2_CID_MPEG_VIDEO_FRAME_SKIP_MODE,
+		.maximum = V4L2_MPEG_VIDEO_FRAME_SKIP_MODE_BUF_LIMIT,
+		.default_value = V4L2_MPEG_VIDEO_FRAME_SKIP_MODE_DISABLED,
+	},
 	{
 		.id = V4L2_CID_MPEG_MFC51_VIDEO_RC_FIXED_TARGET_BIT,
 		.type = V4L2_CTRL_TYPE_BOOLEAN,
@@ -1849,6 +1854,7 @@  static int s5p_mfc_enc_s_ctrl(struct v4l2_ctrl *ctrl)
 		p->seq_hdr_mode = ctrl->val;
 		break;
 	case V4L2_CID_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE:
+	case V4L2_CID_MPEG_VIDEO_FRAME_SKIP_MODE:
 		p->frame_skip_mode = ctrl->val;
 		break;
 	case V4L2_CID_MPEG_MFC51_VIDEO_RC_FIXED_TARGET_BIT: