From patchwork Tue Apr 4 06:17:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dikshita Agarwal X-Patchwork-Id: 78861 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2808235vqo; Mon, 3 Apr 2023 23:21:58 -0700 (PDT) X-Google-Smtp-Source: AKy350bABC5wx35jdU6TafANcg0JbNZH5bdSF1JwB2PaTetDrrqF6nSl3GO7i3o9DUhAjO6Ze9os X-Received: by 2002:aa7:d409:0:b0:501:c839:cf91 with SMTP id z9-20020aa7d409000000b00501c839cf91mr1493429edq.6.1680589318618; Mon, 03 Apr 2023 23:21:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680589318; cv=none; d=google.com; s=arc-20160816; b=fNjbW5Jv53LM9yqKuX43RJu5Kbb7fDtS8C8kfwsxZng5CwsWO4QmOhUIif0oQGdlp+ rQpNDaeYfyHcmVNenaChCUKbYV7G8Cf2+jlDAbRKHegIEAfwOJYYnKvko6gC4rw6Arfv Dfj0cOFzvS3tGlCLjRRC1aaC2drISdLF/cpcZs1O0nzy0cTo5WbM4bUu3xwAYyxI2NWO LQwehCZ+lMdOaeSuVkfQ5RLlFsL60OEsfA2Ogi6jmWoruQVotWeRQGyM/VwtyS8rYWkk mFEZS+imHrwM+iHKedm2AVxvc1KwSnNA5O8yL8AdCu6oejBbPNA1jJFzEOkyREF2JeKD W/Rg== 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=grgTMcbHCPjMv7ub754VdWBy4MpytG/qUoM43Jl5gGI=; b=X4Vtfw31zARKdl7F7zKPEij622jxp6bVTw8WOa+GmRTJS8gHi9ZFBYu36neDFNkK7X TgWSWWGS4lXNsusECS+Sc4a/VYF+jV9UFfvqnvx5dKt5ho18RLTYUvGOAxcUh+xNQ53+ GhfnJyKYlneuT6f0Suc316Je8K1Oiu5Vp+KeKMAlnGpq/uK0Zg97RcRIljlm0EThl1Rc i8dZkktIfh40CWC03sxZKH2e7j4xi444nLOqMajNF3ZKwg8KVuAXeiI5r3aIuBafX3K8 E5i7LE985gWK3LALs/CxYDjUNf8is+zw3zW8lCyJ84GlHWUL0rL5UxFZY/PWvLoKONtQ eofQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=BzezNaBN; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g19-20020a056402181300b00501c984361fsi178826edy.427.2023.04.03.23.21.34; Mon, 03 Apr 2023 23:21:58 -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=BzezNaBN; 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 S233777AbjDDGS2 (ORCPT + 99 others); Tue, 4 Apr 2023 02:18:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39722 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229621AbjDDGSR (ORCPT ); Tue, 4 Apr 2023 02:18:17 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A490819B2; Mon, 3 Apr 2023 23:18:00 -0700 (PDT) Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3344GnTN001558; Tue, 4 Apr 2023 06:17:20 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=grgTMcbHCPjMv7ub754VdWBy4MpytG/qUoM43Jl5gGI=; b=BzezNaBN1U7WI/P5OcvPSKDibmnZ/JGbq5bZ4FTUZFBO03sA6ozGgsil4aHC5sB5fSEi AbuzknItI5q2854Kk5w8kpUvJXsJCCIsyYUBES01jNEn+rV5+gCFf01hI1Wzqs3uBMf3 1wh5tXImKSvqvuallBOfvL0abpCP1E/bXuf3P7Uih9r1HFw9eszCu51kMN3wWux7r6Nn swwDhLqahWG8ofC7fPBCHnDeGwb/opqYCzpAWYxBBKwGTblDm0/xPbUC8s+oZIXKdblg YE/neTpyhkXLz+qPrTsKZeBYuwcqjTMugWqC60JoQR39Qjxiww9T2XO8TZuY60UTvxX6 Dg== Received: from apblrppmta01.qualcomm.com (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com [103.229.18.19]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3pqteeat8h-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 04 Apr 2023 06:17:20 +0000 Received: from pps.filterd (APBLRPPMTA01.qualcomm.com [127.0.0.1]) by APBLRPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTP id 3346HG6Z025896; Tue, 4 Apr 2023 06:17:16 GMT Received: from pps.reinject (localhost [127.0.0.1]) by APBLRPPMTA01.qualcomm.com (PPS) with ESMTP id 3ppdpkhu3s-1; Tue, 04 Apr 2023 06:17:16 +0000 Received: from APBLRPPMTA01.qualcomm.com (APBLRPPMTA01.qualcomm.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 3346HGnH025819; Tue, 4 Apr 2023 06:17:16 GMT Received: from hu-sgudaval-hyd.qualcomm.com (hu-dikshita-hyd.qualcomm.com [10.213.110.13]) by APBLRPPMTA01.qualcomm.com (PPS) with ESMTP id 3346HGIE025692; Tue, 04 Apr 2023 06:17:16 +0000 Received: by hu-sgudaval-hyd.qualcomm.com (Postfix, from userid 347544) id DD4D032EE; Tue, 4 Apr 2023 11:47:15 +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 1/3] venus: add firmware version based check Date: Tue, 4 Apr 2023 11:47:10 +0530 Message-Id: <1680589032-26046-2-git-send-email-quic_dikshita@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1680589032-26046-1-git-send-email-quic_dikshita@quicinc.com> References: <1680589032-26046-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-GUID: mu73jd88BacWVIY0F1XxEvJidpwr3PTp X-Proofpoint-ORIG-GUID: mu73jd88BacWVIY0F1XxEvJidpwr3PTp X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-04-03_19,2023-04-03_03,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 spamscore=0 priorityscore=1501 mlxlogscore=841 bulkscore=0 impostorscore=0 lowpriorityscore=0 clxscore=1015 malwarescore=0 adultscore=0 phishscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303200000 definitions=main-2304040057 X-Spam-Status: No, score=-0.5 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE autolearn=unavailable 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762225624892971168?= X-GMAIL-MSGID: =?utf-8?q?1762225624892971168?= Add firmware version based checks to enable/disable features for different SOCs. Signed-off-by: Dikshita Agarwal Signed-off-by: Vikash Garodia Signed-off-by: Viswanath Boma Tested-by: Nathan Hebert --- drivers/media/platform/qcom/venus/core.h | 18 ++++++++++++++++++ drivers/media/platform/qcom/venus/hfi_msgs.c | 11 +++++++++-- 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/qcom/venus/core.h b/drivers/media/platform/qcom/venus/core.h index 32551c2..ee8b70a 100644 --- a/drivers/media/platform/qcom/venus/core.h +++ b/drivers/media/platform/qcom/venus/core.h @@ -202,6 +202,11 @@ struct venus_core { unsigned int core0_usage_count; unsigned int core1_usage_count; struct dentry *root; + struct venus_img_version { + u32 major; + u32 minor; + u32 rev; + } venus_ver; }; struct vdec_controls { @@ -500,4 +505,17 @@ venus_caps_by_codec(struct venus_core *core, u32 codec, u32 domain) return NULL; } +static inline int +is_fw_rev_or_newer(struct venus_core *core, u32 vmajor, u32 vminor, u32 vrev) +{ + return ((core)->venus_ver.major == vmajor && (core)->venus_ver.minor == + vminor && (core)->venus_ver.rev >= vrev); +} + +static inline int +is_fw_rev_or_older(struct venus_core *core, u32 vmajor, u32 vminor, u32 vrev) +{ + return ((core)->venus_ver.major == vmajor && (core)->venus_ver.minor == + vminor && (core)->venus_ver.rev <= vrev); +} #endif diff --git a/drivers/media/platform/qcom/venus/hfi_msgs.c b/drivers/media/platform/qcom/venus/hfi_msgs.c index df96db3..07ac0fc 100644 --- a/drivers/media/platform/qcom/venus/hfi_msgs.c +++ b/drivers/media/platform/qcom/venus/hfi_msgs.c @@ -248,9 +248,10 @@ static void hfi_sys_init_done(struct venus_core *core, struct venus_inst *inst, } static void -sys_get_prop_image_version(struct device *dev, +sys_get_prop_image_version(struct venus_core *core, struct hfi_msg_sys_property_info_pkt *pkt) { + struct device *dev = core->dev; u8 *smem_tbl_ptr; u8 *img_ver; int req_bytes; @@ -263,6 +264,12 @@ sys_get_prop_image_version(struct device *dev, return; img_ver = pkt->data; + if (IS_V4(core)) + sscanf(img_ver, "14:VIDEO.VE.%u.%u-%u-PROD", + &core->venus_ver.major, &core->venus_ver.minor, &core->venus_ver.rev); + else if (IS_V6(core)) + sscanf(img_ver, "14:VIDEO.VPU.%u.%u-%u-PROD", + &core->venus_ver.major, &core->venus_ver.minor, &core->venus_ver.rev); dev_dbg(dev, VDBGL "F/W version: %s\n", img_ver); @@ -286,7 +293,7 @@ static void hfi_sys_property_info(struct venus_core *core, switch (pkt->property) { case HFI_PROPERTY_SYS_IMAGE_VERSION: - sys_get_prop_image_version(dev, pkt); + sys_get_prop_image_version(core, pkt); break; default: dev_dbg(dev, VDBGL "unknown property data\n"); From patchwork Tue Apr 4 06:17:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dikshita Agarwal X-Patchwork-Id: 78864 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2810058vqo; Mon, 3 Apr 2023 23:26:29 -0700 (PDT) X-Google-Smtp-Source: AKy350adXcp+bDspE+OeOn/nmhYCebwUh+ZJwAUbh6UtHHq2gfcACcv/cuz81L0zpp/3CaWcYXj5 X-Received: by 2002:aa7:cb4f:0:b0:4fc:725:e670 with SMTP id w15-20020aa7cb4f000000b004fc0725e670mr1691090edt.11.1680589589114; Mon, 03 Apr 2023 23:26:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680589589; cv=none; d=google.com; s=arc-20160816; b=S9pnCK6yYpzPWKsrRCke2JQvIFC6TYDsXhmpf5v/KM6mZ5b0Ky62E0xJRCmrmL4C7N qEzsxuUkmoyqu43zv9R5daF1SJLXYlqvqu3Y/ueHBLx/B/6yQVUP/WePBlyst9Vi+Cj3 EQSdxXuG/d9B9JgEwG4gz+rQdhvHdo4m3pKdOX9NPB3+kjfvEDY/vet4zUJt+40kVcuE ltmAb5bdGNiTe3Oe2zVHp5PQw3yEqEaTMd7zxew2lX680ZXX4gQlR9Ow+6ezb1yw97YS uDOHoOLlhaLu4elqmmzaf2Y8ro3ym1r7TSvDs5k0DM9ECJc2l65s2MTvxIx3URDlbdVv QZfw== 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=0S7+uGNt9THphK854doV1sLggrAP6r14jqBBaKfAZFo=; b=ICmIy0QzO7VEMxBdE/p0B+Pz6mFn55MtJnEPuOAOsNhQguWa2DvpcFiKM5aS9zVPcm j+El2e62aXsfmF6qk2sWbya1v5AVAdNpS3o3q9oYBia2UZ/XXMTmXtFIjxawvVZL6B9P lMsg70AmBrqAGwxwwQBZQXNB3btVCVTYPfltsc1W2RUMdKwcN7o6oh8xNFP4J+9iGf+N siiUuwtc6Nf3+dDb8GIA3foKsEof8Ma+VWXbr2V2TbkHy67/i1aLgJpEfgJ9CcH42reo 0XafvDbxWukHk5n2XnnXkSJnxqg6xvyQ0AXHnLx8/HsEzmguXlKvGG1UOmqdoPmNr+Av ixBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=kDL9KHAF; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e15-20020a056402148f00b005002ebedfc7si4478127edv.403.2023.04.03.23.26.05; Mon, 03 Apr 2023 23:26:29 -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=kDL9KHAF; 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 S233791AbjDDGSa (ORCPT + 99 others); Tue, 4 Apr 2023 02:18:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39742 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233398AbjDDGSS (ORCPT ); Tue, 4 Apr 2023 02:18:18 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EF8F51B8; Mon, 3 Apr 2023 23:18:00 -0700 (PDT) Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3344EFXp006230; Tue, 4 Apr 2023 06:17:22 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=0S7+uGNt9THphK854doV1sLggrAP6r14jqBBaKfAZFo=; b=kDL9KHAFdHtJwJ8/7QmsS76ybQ4xrm6LEAb5j6suCspmg5mZvuHanfF4+5tS9PJN16YL YUNRz6uRmPy70+hvSn5LAghbgmmnWbgoqODEGV8v5B3SuuAFpU+8NvHrt23P++ItEXII HJl5rZ8uFGdZANbq4TAV1loA03Oe8HZyfz8p7tUlR8rC8GWmH5RhbjvGRZ1F65gk/4T4 Cd+8OKV4ksD0xOnWA5ScseGklS2VH484l1mICBJcjTXdJFdti7vyLKjImHoq/Dc9Rzwx nIilFhVd/L9f7gZEkeggeodUHiFa9Lhvm349V3OaFNdbvrmzGHKV0MpkQHrYMBHFAjei rA== Received: from apblrppmta01.qualcomm.com (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com [103.229.18.19]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3pr4jm9784-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 04 Apr 2023 06:17:21 +0000 Received: from pps.filterd (APBLRPPMTA01.qualcomm.com [127.0.0.1]) by APBLRPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTP id 3346HG7s025891; Tue, 4 Apr 2023 06:17:18 GMT Received: from pps.reinject (localhost [127.0.0.1]) by APBLRPPMTA01.qualcomm.com (PPS) with ESMTP id 3ppdpkhu42-1; Tue, 04 Apr 2023 06:17:18 +0000 Received: from APBLRPPMTA01.qualcomm.com (APBLRPPMTA01.qualcomm.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 3346HH5E026449; Tue, 4 Apr 2023 06:17:17 GMT Received: from hu-sgudaval-hyd.qualcomm.com (hu-dikshita-hyd.qualcomm.com [10.213.110.13]) by APBLRPPMTA01.qualcomm.com (PPS) with ESMTP id 3346HHv1026329; Tue, 04 Apr 2023 06:17:17 +0000 Received: by hu-sgudaval-hyd.qualcomm.com (Postfix, from userid 347544) id 0F83732EE; Tue, 4 Apr 2023 11:47:17 +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 2/3] venus: enable sufficient sequence change support for vp9 Date: Tue, 4 Apr 2023 11:47:11 +0530 Message-Id: <1680589032-26046-3-git-send-email-quic_dikshita@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1680589032-26046-1-git-send-email-quic_dikshita@quicinc.com> References: <1680589032-26046-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: 2641QbTpnIbuXegDLPPOEe8eXNuNLruf X-Proofpoint-GUID: 2641QbTpnIbuXegDLPPOEe8eXNuNLruf X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-04-03_19,2023-04-03_03,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 priorityscore=1501 malwarescore=0 suspectscore=0 bulkscore=0 adultscore=0 impostorscore=0 lowpriorityscore=0 clxscore=1015 mlxscore=0 mlxlogscore=912 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303200000 definitions=main-2304040057 X-Spam-Status: No, score=-0.5 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE autolearn=unavailable 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762225909325766580?= X-GMAIL-MSGID: =?utf-8?q?1762225909325766580?= 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. Signed-off-by: Dikshita Agarwal Signed-off-by: Vikash Garodia Signed-off-by: Viswanath Boma Tested-by: Nathan Hebert --- 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..20516b4 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 \ + 0x0100300b /* * 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; From patchwork Tue Apr 4 06:17:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dikshita Agarwal X-Patchwork-Id: 78866 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2814935vqo; Mon, 3 Apr 2023 23:38:53 -0700 (PDT) X-Google-Smtp-Source: AKy350Yx9aKZeo80O2sHguU4edmcrKhvIiq4j/RdvS4CS2IRQ6VIfTBfIswPFcCUhSvHoL4vmKDx X-Received: by 2002:a17:906:b08f:b0:933:4d37:82b2 with SMTP id x15-20020a170906b08f00b009334d3782b2mr1146777ejy.57.1680590333644; Mon, 03 Apr 2023 23:38:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680590333; cv=none; d=google.com; s=arc-20160816; b=h+xT79RAgeaQR/e24GGsBqdUVco4naIpppCtvji9jaqjl7QFrXTPvzpBkYP/4GRHV2 xQp0+PyAVeMeuTgMRTD8bywQQSL0p18ipzhqD9wYq2MP31suBISGScpcW0qNgMkYqYh4 /pte06RJP6uedRTTgqFVpJGMVR40ZkJLZYITdHw9xiFlk93dWv5wDkU/KUsWI0yT/PSI sS6jxP7lel3GHcgh5Y2MYfgxpBlc5zpfOfUGSZYLfygcyEstVWVybtzKcm+WHFCkHzwr QKSiAsNMoZSTuUGZN/iMPTm8VZ7bh27d0BQVSAGyX+6Imvg/ndpJO6vCCQYMNo5Q2flo C+IA== 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=QCbU4Us3JwDR7tMefYDEltxnregNvaXA8Q9OulYvGkg=; b=JjPKz+4wTmkqxjf7U9iydJVB1TPbBjt4e5l4VVSEOI8kyFkNYlzAeH+j1m4Kar8oEN JDj7mKv/g5f2IW+aqgoCgVptuMaqU66Sq6CTaCX6XJMhx1/5FQkI6s2xPA473HxmMXVN ntY6PmNwLuoPw7MTwAaOrti7PsNgqYg2xGbMAob3vox1oYTPacVerY8kiISQO0G5b0Qr fJzZvyzi+J0h3ajBK5QS4c4QZI0vvb3qEA09BFjR/Vm9/+EK4xZT9ZybedgbFeOCo/SM Zj+5B2Ia79I41iKdBp9pBRnIachBYFrwzuogX3LGwXvvzJversIgCZDmifnJ+QzM+IMB PnVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=ay8Zd2wW; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q24-20020aa7da98000000b00501e60780absi9938838eds.600.2023.04.03.23.38.28; Mon, 03 Apr 2023 23:38:53 -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=ay8Zd2wW; 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 S233800AbjDDGSd (ORCPT + 99 others); Tue, 4 Apr 2023 02:18:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39752 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233692AbjDDGSS (ORCPT ); Tue, 4 Apr 2023 02:18:18 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 52A5E1BD8; Mon, 3 Apr 2023 23:18:01 -0700 (PDT) Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3344uOus022342; Tue, 4 Apr 2023 06:17:23 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=QCbU4Us3JwDR7tMefYDEltxnregNvaXA8Q9OulYvGkg=; b=ay8Zd2wWTm5dcHLIePAADLuZlQieIRpesopzFqMS002T2v7C0DyO1AC7TFAd5NPkpD58 CxVnhKMgQ+15/GOallIqVNUNM1JJG2xNOtnxErHaUqbjk5cwaejVBW2yqqXnq/xQMUuu of7lkTDkWG0SjLabAVFpRyAQTFtCIgGWibnIDhki0oNoVSL+Cdvf+OZ+d6xfc0ekJqjM dV2Xc5RioFZJwZwH7Ex9K+2Cp258Om6h4ebgUluP2QpgSMo2PtXvI0bG4ASX0uR553ov lUdB6Kv65DaGbt9zdlV3A7kySIGRBsl15074leRTispkl7liW7n7SXebjsnAzj9HU50e zA== Received: from apblrppmta01.qualcomm.com (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com [103.229.18.19]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3pqy6224ge-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 04 Apr 2023 06:17:22 +0000 Received: from pps.filterd (APBLRPPMTA01.qualcomm.com [127.0.0.1]) by APBLRPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTP id 3346HJL7026785; Tue, 4 Apr 2023 06:17:19 GMT Received: from pps.reinject (localhost [127.0.0.1]) by APBLRPPMTA01.qualcomm.com (PPS) with ESMTP id 3ppdpkhu48-1; Tue, 04 Apr 2023 06:17:19 +0000 Received: from APBLRPPMTA01.qualcomm.com (APBLRPPMTA01.qualcomm.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 3346HJGq026778; Tue, 4 Apr 2023 06:17:19 GMT Received: from hu-sgudaval-hyd.qualcomm.com (hu-dikshita-hyd.qualcomm.com [10.213.110.13]) by APBLRPPMTA01.qualcomm.com (PPS) with ESMTP id 3346HJvs026777; Tue, 04 Apr 2023 06:17:19 +0000 Received: by hu-sgudaval-hyd.qualcomm.com (Postfix, from userid 347544) id 8C6D932EE; Tue, 4 Apr 2023 11:47:18 +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 3/3] venus: fix EOS handling in decoder stop command Date: Tue, 4 Apr 2023 11:47:12 +0530 Message-Id: <1680589032-26046-4-git-send-email-quic_dikshita@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1680589032-26046-1-git-send-email-quic_dikshita@quicinc.com> References: <1680589032-26046-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-GUID: NTcNPRkZMnD2HwfTxzFoRjJzrlVTXGEP X-Proofpoint-ORIG-GUID: NTcNPRkZMnD2HwfTxzFoRjJzrlVTXGEP X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-04-03_19,2023-04-03_03,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 suspectscore=0 bulkscore=0 mlxlogscore=999 phishscore=0 mlxscore=0 adultscore=0 impostorscore=0 clxscore=1015 malwarescore=0 lowpriorityscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303200000 definitions=main-2304040057 X-Spam-Status: No, score=-0.5 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE autolearn=unavailable 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762226689978197505?= X-GMAIL-MSGID: =?utf-8?q?1762226689978197505?= Use firmware version based check to assign correct device address for EOS buffer to fix the EOS handling with different firmware version. Signed-off-by: Dikshita Agarwal Signed-off-by: Vikash Garodia Signed-off-by: Viswanath Boma Tested-by: Nathan Hebert Reviewed-by: Konrad Dybcio --- drivers/media/platform/qcom/venus/vdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/qcom/venus/vdec.c b/drivers/media/platform/qcom/venus/vdec.c index f0394b9..c59b34f 100644 --- a/drivers/media/platform/qcom/venus/vdec.c +++ b/drivers/media/platform/qcom/venus/vdec.c @@ -545,7 +545,7 @@ vdec_decoder_cmd(struct file *file, void *fh, struct v4l2_decoder_cmd *cmd) fdata.buffer_type = HFI_BUFFER_INPUT; fdata.flags |= HFI_BUFFERFLAG_EOS; - if (IS_V6(inst->core)) + if (IS_V6(inst->core) && is_fw_rev_or_older(inst->core, 1, 0, 87)) fdata.device_addr = 0; else fdata.device_addr = 0xdeadb000;