summaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/qcom/venus/vdec.c
diff options
context:
space:
mode:
authorDikshita Agarwal <quic_dikshita@quicinc.com>2023-05-22 07:48:17 +0100
committerMauro Carvalho Chehab <mchehab@kernel.org>2023-06-09 14:04:13 +0100
commit996d215547a877406e601439bd6533d8524d27db (patch)
treea27e557b9446d4f5c7524a856c5b2b645b275894 /drivers/media/platform/qcom/venus/vdec.c
parent58b64dd09fd83542effd621daf65b53114904619 (diff)
downloadlinux-stable-996d215547a877406e601439bd6533d8524d27db.tar.gz
linux-stable-996d215547a877406e601439bd6533d8524d27db.tar.bz2
linux-stable-996d215547a877406e601439bd6533d8524d27db.zip
media: venus: add handling of bit depth change from firmware
Set opb format to TP10_UWC and dpb to client set format when bit depth change to 10 bit is detecting by firmware. Acked-by: Konrad Dybcio <konrad.dybcio@linaro.org> Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com> Signed-off-by: Stanimir Varbanov <stanimir.k.varbanov@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Diffstat (limited to 'drivers/media/platform/qcom/venus/vdec.c')
-rw-r--r--drivers/media/platform/qcom/venus/vdec.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/media/platform/qcom/venus/vdec.c b/drivers/media/platform/qcom/venus/vdec.c
index 7aeaf77ef84e..96ecedafe546 100644
--- a/drivers/media/platform/qcom/venus/vdec.c
+++ b/drivers/media/platform/qcom/venus/vdec.c
@@ -736,6 +736,9 @@ static int vdec_set_work_route(struct venus_inst *inst)
}
#define is_ubwc_fmt(fmt) (!!((fmt) & HFI_COLOR_FORMAT_UBWC_BASE))
+#define is_10bit_ubwc_fmt(fmt) (!!((fmt) & HFI_COLOR_FORMAT_10_BIT_BASE & \
+ HFI_COLOR_FORMAT_UBWC_BASE))
+
static int vdec_output_conf(struct venus_inst *inst)
{
@@ -783,7 +786,7 @@ static int vdec_output_conf(struct venus_inst *inst)
inst->opb_fmt = out2_fmt;
inst->dpb_buftype = HFI_BUFFER_OUTPUT;
inst->dpb_fmt = out_fmt;
- } else if (is_ubwc_fmt(out2_fmt)) {
+ } else if (is_ubwc_fmt(out2_fmt) || is_10bit_ubwc_fmt(out_fmt)) {
inst->opb_buftype = HFI_BUFFER_OUTPUT;
inst->opb_fmt = out_fmt;
inst->dpb_buftype = HFI_BUFFER_OUTPUT2;