media: venus: enable sufficient sequence change support for vp9
authorDikshita Agarwal <quic_dikshita@quicinc.com>
Mon, 22 May 2023 06:02:51 +0000 (07:02 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Fri, 9 Jun 2023 13:01:29 +0000 (14:01 +0100)
VP9 supports resolution change at interframe.
Currenlty, if sequence change is detected at interframe and
resources are sufficient, sequence change event is not raised
by firmware to driver until the next keyframe.
This change add the HFI to notify the sequence change in this
case to driver.

Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Tested-by: Nathan Hebert <nhebert@chromium.org>
Signed-off-by: Vikash Garodia <quic_vgarodia@quicinc.com>
Signed-off-by: Viswanath Boma <quic_vboma@quicinc.com>
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>
drivers/media/platform/qcom/venus/hfi_cmds.c
drivers/media/platform/qcom/venus/hfi_helper.h
drivers/media/platform/qcom/venus/vdec.c

index 7c82e212434ef317a33ee26efef479b5081d9cc5..7f0802a5518c35fe21c1f2f683d23f137d6432ac 100644 (file)
@@ -521,6 +521,7 @@ static int pkt_session_set_property_1x(struct hfi_session_set_property_pkt *pkt,
                pkt->shdr.hdr.size += sizeof(u32) + sizeof(*en);
                break;
        }
+       case HFI_PROPERTY_PARAM_VDEC_ENABLE_SUFFICIENT_SEQCHANGE_EVENT:
        case HFI_PROPERTY_CONFIG_VDEC_POST_LOOP_DEBLOCKER: {
                struct hfi_enable *in = pdata;
                struct hfi_enable *en = prop_data;
index 105792a680609a0ffe9f7c6ec6a9258da07355a4..0abbc50c586424d8bc381efb49fd03bdc8f83302 100644 (file)
 #define HFI_PROPERTY_PARAM_VDEC_PIXEL_BITDEPTH                 0x1003007
 #define HFI_PROPERTY_PARAM_VDEC_PIC_STRUCT                     0x1003009
 #define HFI_PROPERTY_PARAM_VDEC_COLOUR_SPACE                   0x100300a
+#define HFI_PROPERTY_PARAM_VDEC_ENABLE_SUFFICIENT_SEQCHANGE_EVENT \
+                                                               0x100300b
 
 /*
  * HFI_PROPERTY_CONFIG_VDEC_COMMON_START
index 51a53bf82bd39effbf8d9802eaf266e86b5fba66..f42570a816fe7b1e8babe110e07cd8147b73f19d 100644 (file)
@@ -684,6 +684,14 @@ static int vdec_set_properties(struct venus_inst *inst)
                        return ret;
        }
 
+       /* Enabling sufficient sequence change support for VP9 */
+       if (is_fw_rev_or_newer(inst->core, 5, 4, 51)) {
+               ptype = HFI_PROPERTY_PARAM_VDEC_ENABLE_SUFFICIENT_SEQCHANGE_EVENT;
+               ret = hfi_session_set_property(inst, ptype, &en);
+               if (ret)
+                       return ret;
+       }
+
        ptype = HFI_PROPERTY_PARAM_VDEC_CONCEAL_COLOR;
        conceal = ctr->conceal_color & 0xffff;
        conceal |= ((ctr->conceal_color >> 16) & 0xffff) << 10;