diff options
author | Ezequiel Garcia <ezequiel@collabora.com> | 2020-08-25 05:52:42 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2020-09-01 14:13:29 +0200 |
commit | d3951cfc9bee5b1d4282c2f6b9458b4a94929eee (patch) | |
tree | d7411d7ee63253f3f17d39b67ef9c27f32edb48d /drivers/staging/media/rkvdec | |
parent | 46e8893e72b43d10f5cad92355b36a7babe83724 (diff) | |
download | linux-stable-d3951cfc9bee5b1d4282c2f6b9458b4a94929eee.tar.gz linux-stable-d3951cfc9bee5b1d4282c2f6b9458b4a94929eee.tar.bz2 linux-stable-d3951cfc9bee5b1d4282c2f6b9458b4a94929eee.zip |
media: rkvdec: Drop unneeded per_request driver-specific control flag
Currently, the drivers makes no distinction between per_request
and mandatory, as both are used in the same request validate check.
The driver only cares to know if a given control is
required to be part of a request, so only one flag is needed.
Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
Tested-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/staging/media/rkvdec')
-rw-r--r-- | drivers/staging/media/rkvdec/rkvdec.c | 8 | ||||
-rw-r--r-- | drivers/staging/media/rkvdec/rkvdec.h | 1 |
2 files changed, 1 insertions, 8 deletions
diff --git a/drivers/staging/media/rkvdec/rkvdec.c b/drivers/staging/media/rkvdec/rkvdec.c index 7c5129593921..9f59dfb62d3f 100644 --- a/drivers/staging/media/rkvdec/rkvdec.c +++ b/drivers/staging/media/rkvdec/rkvdec.c @@ -55,35 +55,29 @@ static const struct v4l2_ctrl_ops rkvdec_ctrl_ops = { static const struct rkvdec_ctrl_desc rkvdec_h264_ctrl_descs[] = { { - .per_request = true, .mandatory = true, .cfg.id = V4L2_CID_MPEG_VIDEO_H264_DECODE_PARAMS, }, { - .per_request = true, .mandatory = true, .cfg.id = V4L2_CID_MPEG_VIDEO_H264_SPS, .cfg.ops = &rkvdec_ctrl_ops, }, { - .per_request = true, .mandatory = true, .cfg.id = V4L2_CID_MPEG_VIDEO_H264_PPS, }, { - .per_request = true, .mandatory = true, .cfg.id = V4L2_CID_MPEG_VIDEO_H264_SCALING_MATRIX, }, { - .mandatory = true, .cfg.id = V4L2_CID_MPEG_VIDEO_H264_DECODE_MODE, .cfg.min = V4L2_MPEG_VIDEO_H264_DECODE_MODE_FRAME_BASED, .cfg.max = V4L2_MPEG_VIDEO_H264_DECODE_MODE_FRAME_BASED, .cfg.def = V4L2_MPEG_VIDEO_H264_DECODE_MODE_FRAME_BASED, }, { - .mandatory = true, .cfg.id = V4L2_CID_MPEG_VIDEO_H264_START_CODE, .cfg.min = V4L2_MPEG_VIDEO_H264_START_CODE_ANNEX_B, .cfg.def = V4L2_MPEG_VIDEO_H264_START_CODE_ANNEX_B, @@ -615,7 +609,7 @@ static int rkvdec_request_validate(struct media_request *req) u32 id = ctrls->ctrls[i].cfg.id; struct v4l2_ctrl *ctrl; - if (!ctrls->ctrls[i].per_request || !ctrls->ctrls[i].mandatory) + if (!ctrls->ctrls[i].mandatory) continue; ctrl = v4l2_ctrl_request_hdl_ctrl_find(hdl, id); diff --git a/drivers/staging/media/rkvdec/rkvdec.h b/drivers/staging/media/rkvdec/rkvdec.h index 2fc9f46b6910..77a137cca88e 100644 --- a/drivers/staging/media/rkvdec/rkvdec.h +++ b/drivers/staging/media/rkvdec/rkvdec.h @@ -25,7 +25,6 @@ struct rkvdec_ctx; struct rkvdec_ctrl_desc { - u32 per_request : 1; u32 mandatory : 1; struct v4l2_ctrl_config cfg; }; |