Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2504126rwd; Sun, 21 May 2023 23:04:34 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7/lswf7Ykcexu48taBTHQSm2k6C/g3iCqkwnFAHaPi6YfSpHXnjFXC8tSSdXVT06bchG1G X-Received: by 2002:a05:6a00:14c4:b0:63b:5496:7af5 with SMTP id w4-20020a056a0014c400b0063b54967af5mr12041059pfu.1.1684735473994; Sun, 21 May 2023 23:04:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684735473; cv=none; d=google.com; s=arc-20160816; b=U4jWyoCbct7UdDeCglmMEg6DD41BhVTuJH55rrhYpGikBVXTT9igc5J3UJAAnSgG4D x4gUg5IzL5q0NqRNYEQA9I9ofNTKqy+PPrT7N8FN/jsZAUduPtPeQT6tDKKXF5esEIWc +MTrkjdUHB5SpTVc8NW9TzUDQzgfi6ms7Y/xwPxQCJamM0iyMmyPjw1LX6KsQiwaO3/R 0amgX7J6KLTKmLwlY4kA2dNE727aIZeUSa0mIynS36azP3bTwPpZD2Q31mP4VUlJjBA2 8AAycgIM8SGcLwFbbipIi1D5afxKIWpV+5cTtSSogCi5Bw0n5NUw0hf9n81vNX8FzbnT alEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dkim-signature; bh=oYYq6G+y55/30piKBD5IqHmwPcTC9/WitgLM+GtykN4=; b=glAq+ruQYy4PlnKxAfaupxvAdEdaQ1oFLn+10ShThGfBkUffhbNzenMkybZ3bgrDTo HLEd9m9+Pn1bF0AS73nMY/S40mbbJqJsxRrhkOLSHswVb7Ocwztzyi8xEd5V6SkoadDZ jxQymIdMHrsc7tXRatFfc4j+Jq2mt1HPkrCDb+hB5mY6ltf54E4Fc3m6Oj3+M5hj3xJf aoSDfyp0hex/TdxG87tZS9KiZJnXEnJk8anuw5BvYNfQeVuu21Tt95qEpQzjdgJLVvFT kpEDpTbu7P/9ivH5VbwZGm17A5e/7A62SSdYlJ1HoeUqXorjHuWMlYL9FYbw+cjaIEMv Hnpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=SDdYcy+d; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p26-20020aa79e9a000000b006453ad4ff39si4380579pfq.147.2023.05.21.23.04.21; Sun, 21 May 2023 23:04:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=SDdYcy+d; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229841AbjEVGD0 (ORCPT + 99 others); Mon, 22 May 2023 02:03:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39330 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230344AbjEVGDG (ORCPT ); Mon, 22 May 2023 02:03:06 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 66AA7FD; Sun, 21 May 2023 23:03:05 -0700 (PDT) Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 34M5oxEr000742; Mon, 22 May 2023 06:03:01 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : in-reply-to : references; s=qcppdkim1; bh=oYYq6G+y55/30piKBD5IqHmwPcTC9/WitgLM+GtykN4=; b=SDdYcy+dExq5hOHwsI3zn+Ig8m7CYijuvZCLlmlNUMqKzZHy4FwNAPU2eRQ/awsBhhVA ZLnBjGOADFsvK3Ey9VEPamobgoW2RcuifRYtIpNhVR/mKIG69b9kmOpnbyFiWWqgDViR EgHU7mqzxRibRaNHFA+JVNA0K+wAy3LnDnx5XpisWmqSed3BO57/+/RaEETIno78MDZV Zj+AQx1AoECUWYtykBApDvPvzg8GUuCvSk+gnhczj+MSBIF2Bwkoxcc7+9hQ0PFKecT6 Bde3PG2YfEc/ZIFci/NAbf5x138K7jDdlwOcYXgD+nVZGyumk4adMKZ0cxB0Oo5zipJl sA== Received: from apblrppmta02.qualcomm.com (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com [103.229.18.19]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3qppypaq57-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 22 May 2023 06:03:01 +0000 Received: from pps.filterd (APBLRPPMTA02.qualcomm.com [127.0.0.1]) by APBLRPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTP id 34M62wkm032324; Mon, 22 May 2023 06:02:58 GMT Received: from pps.reinject (localhost [127.0.0.1]) by APBLRPPMTA02.qualcomm.com (PPS) with ESMTPS id 3qpq9keeqx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 22 May 2023 06:02:57 +0000 Received: from APBLRPPMTA02.qualcomm.com (APBLRPPMTA02.qualcomm.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 34M62vc4032318; Mon, 22 May 2023 06:02:57 GMT Received: from hu-sgudaval-hyd.qualcomm.com (hu-dikshita-hyd.qualcomm.com [10.213.110.13]) by APBLRPPMTA02.qualcomm.com (PPS) with ESMTP id 34M62vOq032308; Mon, 22 May 2023 06:02:57 +0000 Received: by hu-sgudaval-hyd.qualcomm.com (Postfix, from userid 347544) id C67A133B6; Mon, 22 May 2023 11:32:56 +0530 (+0530) From: Dikshita Agarwal To: linux-media@vger.kernel.org, stanimir.k.varbanov@gmail.com, quic_vgarodia@quicinc.com, agross@kernel.org, andersson@kernel.org, konrad.dybcio@linaro.org, mchehab@kernel.org Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Dikshita Agarwal , Viswanath Boma Subject: [PATCH v4 2/3] venus: enable sufficient sequence change support for vp9 Date: Mon, 22 May 2023 11:32:51 +0530 Message-Id: <1684735372-10075-3-git-send-email-quic_dikshita@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1684735372-10075-1-git-send-email-quic_dikshita@quicinc.com> References: <1684735372-10075-1-git-send-email-quic_dikshita@quicinc.com> X-QCInternal: smtphost X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: TODNTt0w4nJut-vFUG5S9bwtKQZplBD_ X-Proofpoint-GUID: TODNTt0w4nJut-vFUG5S9bwtKQZplBD_ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-05-22_03,2023-05-17_02,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 mlxscore=0 clxscore=1015 mlxlogscore=926 phishscore=0 impostorscore=0 lowpriorityscore=0 bulkscore=0 suspectscore=0 malwarescore=0 spamscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2304280000 definitions=main-2305220050 X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Tested-by: Nathan Hebert Signed-off-by: Vikash Garodia Signed-off-by: Viswanath Boma Signed-off-by: Dikshita Agarwal --- drivers/media/platform/qcom/venus/hfi_cmds.c | 1 + drivers/media/platform/qcom/venus/hfi_helper.h | 2 ++ drivers/media/platform/qcom/venus/vdec.c | 8 ++++++++ 3 files changed, 11 insertions(+) diff --git a/drivers/media/platform/qcom/venus/hfi_cmds.c b/drivers/media/platform/qcom/venus/hfi_cmds.c index 930b743..e2539b5 100644 --- a/drivers/media/platform/qcom/venus/hfi_cmds.c +++ b/drivers/media/platform/qcom/venus/hfi_cmds.c @@ -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; diff --git a/drivers/media/platform/qcom/venus/hfi_helper.h b/drivers/media/platform/qcom/venus/hfi_helper.h index d2d6719..2e03b6e 100644 --- a/drivers/media/platform/qcom/venus/hfi_helper.h +++ b/drivers/media/platform/qcom/venus/hfi_helper.h @@ -469,6 +469,8 @@ #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 diff --git a/drivers/media/platform/qcom/venus/vdec.c b/drivers/media/platform/qcom/venus/vdec.c index 4ceaba3..f0394b9 100644 --- a/drivers/media/platform/qcom/venus/vdec.c +++ b/drivers/media/platform/qcom/venus/vdec.c @@ -671,6 +671,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; -- 2.7.4