summaryrefslogtreecommitdiff
path: root/drivers/staging/media/hantro/hantro_drv.c
diff options
context:
space:
mode:
authorBenjamin Gaignard <benjamin.gaignard@collabora.com>2022-07-08 17:21:53 +0100
committerMauro Carvalho Chehab <mchehab@kernel.org>2022-07-15 17:36:58 +0100
commit3360755ef89ab2a46c58b07c38c6b97bcdc31d85 (patch)
tree3c8182ff166e6e06c53db3886abcf144833e463d /drivers/staging/media/hantro/hantro_drv.c
parent0a64f5f97ae957ebddc9bffb1101cdacf3ebf9ff (diff)
media: hantro: Stop using Hantro dedicated control
The number of bits to skip in the slice header can be computed in the driver by using sps, pps and decode_params information. This makes it possible to remove Hantro dedicated control. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com> Reviewed-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> Acked-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Tested-by: Jernej Skrabec <jernej.skrabec@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Diffstat (limited to 'drivers/staging/media/hantro/hantro_drv.c')
-rw-r--r--drivers/staging/media/hantro/hantro_drv.c36
1 files changed, 0 insertions, 36 deletions
diff --git a/drivers/staging/media/hantro/hantro_drv.c b/drivers/staging/media/hantro/hantro_drv.c
index 1a62c5610730..e35549663cdc 100644
--- a/drivers/staging/media/hantro/hantro_drv.c
+++ b/drivers/staging/media/hantro/hantro_drv.c
@@ -304,26 +304,6 @@ static int hantro_jpeg_s_ctrl(struct v4l2_ctrl *ctrl)
return 0;
}
-static int hantro_hevc_s_ctrl(struct v4l2_ctrl *ctrl)
-{
- struct hantro_ctx *ctx;
-
- ctx = container_of(ctrl->handler,
- struct hantro_ctx, ctrl_handler);
-
- vpu_debug(1, "s_ctrl: id = %d, val = %d\n", ctrl->id, ctrl->val);
-
- switch (ctrl->id) {
- case V4L2_CID_HANTRO_HEVC_SLICE_HEADER_SKIP:
- ctx->hevc_dec.ctrls.hevc_hdr_skip_length = ctrl->val;
- break;
- default:
- return -EINVAL;
- }
-
- return 0;
-}
-
static const struct v4l2_ctrl_ops hantro_ctrl_ops = {
.try_ctrl = hantro_try_ctrl,
};
@@ -332,10 +312,6 @@ static const struct v4l2_ctrl_ops hantro_jpeg_ctrl_ops = {
.s_ctrl = hantro_jpeg_s_ctrl,
};
-static const struct v4l2_ctrl_ops hantro_hevc_ctrl_ops = {
- .s_ctrl = hantro_hevc_s_ctrl,
-};
-
#define HANTRO_JPEG_ACTIVE_MARKERS (V4L2_JPEG_ACTIVE_MARKER_APP0 | \
V4L2_JPEG_ACTIVE_MARKER_COM | \
V4L2_JPEG_ACTIVE_MARKER_DQT | \
@@ -488,18 +464,6 @@ static const struct hantro_ctrl controls[] = {
.id = V4L2_CID_STATELESS_HEVC_SCALING_MATRIX,
},
}, {
- .codec = HANTRO_HEVC_DECODER,
- .cfg = {
- .id = V4L2_CID_HANTRO_HEVC_SLICE_HEADER_SKIP,
- .name = "Hantro HEVC slice header skip bytes",
- .type = V4L2_CTRL_TYPE_INTEGER,
- .min = 0,
- .def = 0,
- .max = 0x100,
- .step = 1,
- .ops = &hantro_hevc_ctrl_ops,
- },
- }, {
.codec = HANTRO_VP9_DECODER,
.cfg = {
.id = V4L2_CID_STATELESS_VP9_FRAME,