]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
media: venus: venc: Fix h264 8x8 transform control
authorStanimir Varbanov <stanimir.varbanov@linaro.org>
Tue, 8 Feb 2022 01:18:16 +0000 (02:18 +0100)
committerStefan Bader <stefan.bader@canonical.com>
Wed, 27 Apr 2022 09:56:48 +0000 (11:56 +0200)
commit0bb738fcb9b2a9a87f1a1cd7f1ff3a1c0a4f500b
treec4414a8b4a6d17975ebf34d50c8ba7ed8b217c13
parent532165087ab197cf5edb2a66aff031852b3ab761
media: venus: venc: Fix h264 8x8 transform control

BugLink: https://bugs.launchpad.net/bugs/1969110
commit 61b3317dd424a3488b6754d7ff8301944d9d17d7 upstream.

During encoder driver open controls are initialized via a call
to v4l2_ctrl_handler_setup which returns EINVAL error for
V4L2_CID_MPEG_VIDEO_H264_8X8_TRANSFORM v4l2 control. The control
default value is disabled and because of firmware limitations
8x8 transform cannot be disabled for the supported HIGH and
CONSTRAINED_HIGH profiles.

To fix the issue change the control default value to enabled
(this is fine because the firmware enables 8x8 transform for
high and constrained_high profiles by default). Also, correct
the checking of profile ids in s_ctrl from hfi to v4l2 ids.

cc: stable@vger.kernel.org # 5.15+
Fixes: bfee75f73c37 ("media: venus: venc: add support for V4L2_CID_MPEG_VIDEO_H264_8X8_TRANSFORM control")
Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 992af22dab9c15b1ff087b2dd0481408dcb48400)
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
drivers/media/platform/qcom/venus/venc.c
drivers/media/platform/qcom/venus/venc_ctrls.c