From nobody Fri Oct 10 13:32:48 2025 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9AA0619B5B1 for ; Fri, 13 Jun 2025 14:04:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749823471; cv=none; b=nCpFY+e6VFW30TWrY0ftAfZ+YvwOQegcWOHpAsJa8kXzv2VvBHdgYVgy2E0QDDU5/DD+wSF/v7QtHJtdL8wZkjKuicVNGINobMxa9C7mEQ/JTlu5561aXcTNTkEvH2p+Ib23deq0GQl6y56dKHEQeikMtZZf/jQEu9HU37JWgZs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749823471; c=relaxed/simple; bh=gdhfUspPyqBiEzOlF6EWkZ6U0ttrz2LFWzzIn0eDJFA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=F44D75yW9UlXmKfH9w1MgXAQQI6Z9FoYuYEVELuzFVpVCyUq27vXbxcnWkB1BKn0BITLIrPymCGJocgWwQI7nouJt8CmY4zOfDgVu9vuX6P0wN+hv3qV3W9+YrjBh7hUFwnjqcTwgalE7p2GrfQJ701mwM6g8ydsZ1Gp8E5grvo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=R/pXrXiH; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="R/pXrXiH" Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 55D8Vw8k027192 for ; Fri, 13 Jun 2025 14:04:28 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=dRjk/GIaSQo 1IqS/32SDSp43gzWPCoXG2x1Joi96rvA=; b=R/pXrXiHkOGAxiUHCmLBipGR2bq MikV93dz4G2AvH0QoJf0D49xrjuHxB1qzKpmPL1L1BIxvBuCvOSeGxjsjJkuWqC3 I2MSPEOZ45y+44EjNGXMWM/gRJYkFtMBwrCQJBxp5N9owSYOSLgfAUSK/va5fHAv x4zxdiUpitdIh1PIBBEUv6rtc3oILju8pp/ZyDOV30e6romAFdYOD4HavOtAmtHw kCe+R0rfrmccQ7yr59LSImIwuqQAn3ElfuOAjS21ewi+2IMvI/MsOabDztZ820xB o8c7tTHeWHbT33iLnScgEpbDvrrQ4TJc1EhlwuA54AbtirnPjkTA6JZRw2Q== Received: from mail-pl1-f197.google.com (mail-pl1-f197.google.com [209.85.214.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 474ccvkmey-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Fri, 13 Jun 2025 14:04:28 +0000 (GMT) Received: by mail-pl1-f197.google.com with SMTP id d9443c01a7336-2356ce66d7cso30777775ad.1 for ; Fri, 13 Jun 2025 07:04:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1749823468; x=1750428268; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dRjk/GIaSQo1IqS/32SDSp43gzWPCoXG2x1Joi96rvA=; b=a3lHwOI8PdV1JDzeglrDQhk/B/g+h9noJVfouV42Oi529u8p1nG8THVtPr8kKLz5M9 Z+afYFVsqf+LMuJFI2MGjCJrg6vb6FlglDiJwIA3ZcCLLPladm8XvE/DM7TpPuMRoIG1 tHObueBoxu+Xutsak0ecT9plXFFD0WHZaRTJUp2sbcCfT33HzEnRgSNJ7ZHC3dMWYjFi O6Iymp4J5dF9+szp3WQediywCMKEb6J2rpgmMXf/X32tB0OQAMmACzU1q3JyCvgxasLH Elu7calx3jSiHJlezwXT0rL2VZ3B2eijgdPEceczIyKylayjmdRDrwIJ+pLufEPCFQtA hqKQ== X-Forwarded-Encrypted: i=1; AJvYcCXIZ3Yth62Se2ljvRtb7pAkhWJgWbpECaYormIPHMuBsQUas3Gej9kngBn5h4eBGe4OKh2O9MgTH2EgQ+I=@vger.kernel.org X-Gm-Message-State: AOJu0Yz+M2/xLEmrTKzIkI+p0eStIHJu26VvXcpl8GRYO0OQeTKsqYLf q0VueX7/U5i3+hYJj4hRYtR9rx1Oj5A927xrcgP1teCvIw6xqfB7IvUppQu2Y5Fo8bkqzbsq5xx 2E3JEc60SHNKTsRUE18VyiuV/pOlFrfcnYGkC/XX3lX++OiYJ/1qTsDTbM6FQSjQ5PVQ= X-Gm-Gg: ASbGncuv3KrrELxh1p15To2jwY163jjeBY4NtaycfUPdY5QoiV/0eSMvARfALADUN8v EQB7MhOBADd4XoETzh0/4a1qSl7RJ9xScXaL+x+Yi3MI9pT8RXusTiKPBl8pmfhHc68Gp6A5tnr XOoaKMO8lVLW8cYI6jYd35eevaXCc60DmNOLdJO+mhKNkKYtmZwEdUbfDLTn3O2XsKu4+9sAZFf eVyHJYpj1ENOctzLcYiCRyOm0IHKpJiDdxq4JjyCCQHeHxBwMQdJY9lHRYdj5sfnYeytPOIFIrR PhQq+DjQFfN4Xs06ldKCJsPA4ftOXPC+3KWtmkQ2oYbtlvZH55vQsCKc8bfWB+YcE4fbXZRFTlL a X-Received: by 2002:a17:902:ea11:b0:234:ed31:fca8 with SMTP id d9443c01a7336-2365db04ca2mr42307715ad.27.1749823467422; Fri, 13 Jun 2025 07:04:27 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFR8jsfnA0oH2YzM9LYN0RUmbEBZjUfR9KtG7h9Y5VC+XY+k59J/pusktrBSu7tajQ58/h8lw== X-Received: by 2002:a17:902:ea11:b0:234:ed31:fca8 with SMTP id d9443c01a7336-2365db04ca2mr42306475ad.27.1749823465796; Fri, 13 Jun 2025 07:04:25 -0700 (PDT) Received: from trex.. (132.red-79-144-190.dynamicip.rima-tde.net. [79.144.190.132]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4532e268de2sm53503615e9.40.2025.06.13.07.04.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Jun 2025 07:04:25 -0700 (PDT) From: Jorge Ramirez-Ortiz To: jorge.ramirez@oss.qualcomm.com, quic_vgarodia@quicinc.com, quic_dikshita@quicinc.com, bryan.odonoghue@linaro.org, mchehab@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, stanimir.varbanov@linaro.org Cc: linux-arm-msm@vger.kernel.org, linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/5] dt-bindings: media: venus: Add qcm2290 dt schema Date: Fri, 13 Jun 2025 16:03:58 +0200 Message-Id: <20250613140402.3619465-2-jorge.ramirez@oss.qualcomm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250613140402.3619465-1-jorge.ramirez@oss.qualcomm.com> References: <20250613140402.3619465-1-jorge.ramirez@oss.qualcomm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-ORIG-GUID: _9jSZaRTgg6nTgmyqqhvX-XTz1XEQOPh X-Authority-Analysis: v=2.4 cv=TsLmhCXh c=1 sm=1 tr=0 ts=684c2fec cx=c_pps a=cmESyDAEBpBGqyK7t0alAg==:117 a=wjE3nLva0YkvARyJ+Gfmxg==:17 a=6IFa9wvqVegA:10 a=gEfo2CItAAAA:8 a=EUspDBNiAAAA:8 a=KKAkSRfTAAAA:8 a=1mX_ai67dwKzVtmm1w4A:9 a=1OuFwYUASf3TG4hYMiVC:22 a=sptkURWiP4Gy88Gu7hUp:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-GUID: _9jSZaRTgg6nTgmyqqhvX-XTz1XEQOPh X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNjEzMDEwMyBTYWx0ZWRfX/ZSkb/b4oNkY D04MCXZ31w5gMJvdYSOzS24FDngAiXti0DyamRPNB5SGbk/ILfWG5vq6omq3NK5JPdWtcFfw+Yn dgzeqMoHnrF4Du/yfRoMdNOFqO49kAMBCGUF2nyiGnVm2lf9kWj/beuqOF9xRKlQL+Ay40Fgbaq RFG5YbSPAWdS1OdbhtgVQ4v4naEqbH7mRHWsKSTjail3olOcfOU2zVNsF3cMfCEUq/UlXpYMUGo st+Knco/ttmTwap+BB8Ag73W9mjSzhbR3ZFUbz1UhuT09luUk0XxA/e1q9J5eqPg4xWzlje8El3 79eLIn9QyD1yaqepsKBcRFMYF5SwW7LJA1UGJPrgZe33HUemQzoFwxB+HVZcQlT3iw8JQIspwmB woSeJ38ihTbhC1pGd6GvRlbXc8USo3yMMJjUf0Lqm+dKXAk+biprZW2fJ/MXe51jYN/3IHlO X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40 definitions=2025-06-13_01,2025-06-12_02,2025-03-28_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 phishscore=0 spamscore=0 mlxlogscore=999 impostorscore=0 priorityscore=1501 bulkscore=0 adultscore=0 clxscore=1015 mlxscore=0 malwarescore=0 lowpriorityscore=0 classifier=spam authscore=0 authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2505280000 definitions=main-2506130103 Content-Type: text/plain; charset="utf-8" Add a schema for the venus video encoder/decoder on the qcm2290. Signed-off-by: Jorge Ramirez-Ortiz --- .../bindings/media/qcom,qcm2290-venus.yaml | 153 ++++++++++++++++++ 1 file changed, 153 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/qcom,qcm2290-ve= nus.yaml diff --git a/Documentation/devicetree/bindings/media/qcom,qcm2290-venus.yam= l b/Documentation/devicetree/bindings/media/qcom,qcm2290-venus.yaml new file mode 100644 index 000000000000..ffa72f1e27f3 --- /dev/null +++ b/Documentation/devicetree/bindings/media/qcom,qcm2290-venus.yaml @@ -0,0 +1,153 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/media/qcom,qcm2290-venus.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm QCM2290 Venus video encode and decode accelerators + +maintainers: + - Stanimir Varbanov + +description: | + The Venus AR50_LITE IP is a video encode and decode accelerator present + on Qualcomm platforms + +allOf: + - $ref: qcom,venus-common.yaml# + +properties: + compatible: + const: qcom,qcm2290-venus + + power-domains: + minItems: 2 + maxItems: 3 + + power-domain-names: + minItems: 2 + items: + - const: venus + - const: vcodec0 + - const: cx + + clocks: + maxItems: 6 + + clock-names: + items: + - const: core + - const: iface + - const: bus + - const: throttle + - const: vcodec0_core + - const: vcodec0_bus + + iommus: + minItems: 1 + maxItems: 5 + + interconnects: + maxItems: 2 + + interconnect-names: + items: + - const: video-mem + - const: cpu-cfg + + operating-points-v2: true + opp-table: + type: object + + video-decoder: + type: object + + properties: + compatible: + const: venus-decoder + + required: + - compatible + + deprecated: true + additionalProperties: false + + video-encoder: + type: object + + properties: + compatible: + const: venus-encoder + + required: + - compatible + + deprecated: true + additionalProperties: false + +required: + - compatible + - power-domain-names + - iommus + +unevaluatedProperties: false + +examples: + - | + #include + #include + #include + #include + #include + + venus: video-codec@5a00000 { + compatible =3D "qcom,qcm2290-venus"; + reg =3D <0x5a00000 0xff000>; + interrupts =3D ; + + power-domains =3D <&gcc GCC_VENUS_GDSC>, + <&gcc GCC_VCODEC0_GDSC>, + <&rpmpd QCM2290_VDDCX>; + power-domain-names =3D "venus", "vcodec0", "cx"; + operating-points-v2 =3D <&venus_opp_table>; + + clocks =3D <&gcc GCC_VIDEO_VENUS_CTL_CLK>, + <&gcc GCC_VIDEO_AHB_CLK>, + <&gcc GCC_VENUS_CTL_AXI_CLK>, + <&gcc GCC_VIDEO_THROTTLE_CORE_CLK>, + <&gcc GCC_VIDEO_VCODEC0_SYS_CLK>, + <&gcc GCC_VCODEC0_AXI_CLK>; + clock-names =3D "core", "iface", "bus", "throttle", + "vcodec0_core", "vcodec0_bus"; + + memory-region =3D <&pil_video_mem>; + iommus =3D <&apps_smmu 0x860 0x0>, + <&apps_smmu 0x880 0x0>, + <&apps_smmu 0x861 0x04>, + <&apps_smmu 0x863 0x0>, + <&apps_smmu 0x804 0xE0>; + + interconnects =3D <&mmnrt_virt MASTER_VIDEO_P0 0 &bimc SLAVE_EBI1 = 0>, + <&bimc MASTER_APPSS_PROC 0 &config_noc SLAVE_VENUS= _CFG 0>; + interconnect-names =3D "video-mem", "cpu-cfg"; + + venus_opp_table: opp-table { + compatible =3D "operating-points-v2"; + opp-133000000 { + opp-hz =3D /bits/ 64 <133000000>; + required-opps =3D <&rpmpd_opp_low_svs>; + }; + opp-240000000 { + opp-hz =3D /bits/ 64 <240000000>; + required-opps =3D <&rpmpd_opp_svs>; + }; + }; + + video-decoder { + compatible =3D "venus-decoder"; + }; + + video-encoder { + compatible =3D "venus-encoder"; + }; + }; --=20 2.34.1 From nobody Fri Oct 10 13:32:48 2025 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7C0151D61BC for ; Fri, 13 Jun 2025 14:04:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749823473; cv=none; b=OWIbjxk8Z3BzEIcrf/W/UivSJJhNPUoEUnyQQ17AmGpN6spHml+8EaIZe24/ms6S3syGoH0cwon4jbR5SJcI1qkk24AYxJqzt9ZfDK6OSYKh6Q3kvGUyroANKreiQVT1JF4QuBc3fyQ6NcBtQWShMU5HBY3tzT1UxrtB1Vc6pzE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749823473; c=relaxed/simple; bh=ESY5GP2xLjO/uuUBIZdrZi4e7ID7ZW6MKv1NQJpQTqc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=fOrliD2a2jdAnJEa/4EW87mPAEmvR5uRQVeJPKSbEQ7N9DPGAHaFnYOamN85cXeoq1MaXnjXp8JpUCu2fyzk6hQrBAJ6/KRv3yDskJYms/Xmh1TUU/qfv9a/yYR5PlycxWKXa14GA6SXja5j/D7oG7Rm8onuRXFVITBLg2qaOkE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=CD6w4KH9; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="CD6w4KH9" Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 55D9wuUN027902 for ; Fri, 13 Jun 2025 14:04:30 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=RsM2hPD5yCf EMigxxJenV5Fcl8jXieeQmSVNx4nPyPY=; b=CD6w4KH92tYbGASewlIXtdsZ4x/ xAIBkOMmQJGk3tgeQjTeAyyVuq+yeDXH09KpCRbl1HUsCrHyTAbJepsOlHlAYwRr dkHORv82z/b6tTQCXrDKg1apZ04CRcJ4uDvfavruZxHdPkMA9ehv3Eqy1I5uo91B V3n7cUeSQGWQEx9bbbQ6ZurW5Pj9fYvOo0/OLaszEH65lzVxV8qJS1Qp8djY1+s6 hAM5TlSKWGCMuIW4eAtd39umQd2zbUBDwuDAeRZnt3e0fslBPc/w8BuDGrEb5i/o 8OC3L8Eb2G7hfUpWBp5f52PFybPNRXLyy0ax2SLKzYE1e1MmgaAS7A+jMYA== Received: from mail-io1-f72.google.com (mail-io1-f72.google.com [209.85.166.72]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 476jrhjjmv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Fri, 13 Jun 2025 14:04:30 +0000 (GMT) Received: by mail-io1-f72.google.com with SMTP id ca18e2360f4ac-86a5def8869so442824939f.0 for ; Fri, 13 Jun 2025 07:04:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1749823469; x=1750428269; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=RsM2hPD5yCfEMigxxJenV5Fcl8jXieeQmSVNx4nPyPY=; b=b28fzfrmJQFsm6hkfhm14wYbcmg3Hg1AcAhpT7C6ZzCNKiXvDkMPSNWXVS8SqAWZbR 2XejGUvQaOBIUCksIFpL1yefyR0Fz5TuRKMGI7DdZLq2T8sV8pPtHq1oa69jRcdgeO2c 39lkEVTCgZwv9GOW25qS86Ykn3INTj80b7QP/fPjl5iZCbx1WxZj7AktXNOqWbgcns7w 06PaLhtusQiaXJ77qwrdVpqAw2flkyRarpk74PeUTd72i0EL31V1ribE15Hjvj2zMOAj v4HTa8RkqzKXQFdKH6dIa+cyoKBWDM+Ro3QeEJ9XQmF5zIv3Qax3olC/LNB8YkJaeoqi dxaw== X-Forwarded-Encrypted: i=1; AJvYcCVOQG+eS7H3MzaF65t0jiafiUgQkF92gzcJzDeHQSrhF3DiHcegJzmXfPLAaTvYfqbz81xIJjZRW/2vZ+k=@vger.kernel.org X-Gm-Message-State: AOJu0YyZdaIvNxL5eybqXb8s6V92lDByLc6KYRE6Y0QdtHRjc7+Vmq3X hR9X/nRvzcDP3kEBlXCT1waJipEVAuYkgLCWHsGFQz5dcYHuQ8zeDN/EGKhKfn16gEsVMqbVXjs L/ueAA39RM1cI+iC3BVEvPN71nUX5dw/WFBMn6ABm2eeipg2DeiJd7fQ7CTq2LSOG8T8= X-Gm-Gg: ASbGnct9548ZfM7Z1viA2BPS0EB5Bqcq2v42enUjNK2wS7NXexUWB4OM27rWr7Jx+5r KnJJg/PoYtHb5EzXGhuGwH+GcKdAcvmlia22+FWoER1Hew6IfP/qKM8L2o7dQKj2N1oMINUzREH xIYhj+jtGFxAtUVagADxAwPCKli6f1TFF1eJMduUZ/S/sGpmJFjx45INrHv6YV7aVTg60Uk7st0 CmchUoTHt4ejD/Pxvjkn+AwhdhXBwTIWt8WovBULM55Cx3yA/NJNbvc7uS9mh22T/vZ0xU6aHeT 0DtQstnKEliQ8LZfml4J+dbKBcu7OMvFByYu/B+5x8IipGvxXh+fkeX0IRQIQI7Pnt0q0OH/+9C W X-Received: by 2002:a05:6e02:378a:b0:3dd:9164:906a with SMTP id e9e14a558f8ab-3de00bd9d7amr30230995ab.13.1749823467727; Fri, 13 Jun 2025 07:04:27 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGDz0VH3Av7q60En4HuuZIMYCmq560Rv0gKSCOnab2gqKJsosMfxKzcNjWbSyhrF0ZVHcNOeA== X-Received: by 2002:a05:6e02:378a:b0:3dd:9164:906a with SMTP id e9e14a558f8ab-3de00bd9d7amr30230735ab.13.1749823467257; Fri, 13 Jun 2025 07:04:27 -0700 (PDT) Received: from trex.. (132.red-79-144-190.dynamicip.rima-tde.net. [79.144.190.132]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4532e268de2sm53503615e9.40.2025.06.13.07.04.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Jun 2025 07:04:26 -0700 (PDT) From: Jorge Ramirez-Ortiz To: jorge.ramirez@oss.qualcomm.com, quic_vgarodia@quicinc.com, quic_dikshita@quicinc.com, bryan.odonoghue@linaro.org, mchehab@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, stanimir.varbanov@linaro.org Cc: linux-arm-msm@vger.kernel.org, linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/5] arch: arm64: dts: qcom: qcm2290: Add venus video node Date: Fri, 13 Jun 2025 16:03:59 +0200 Message-Id: <20250613140402.3619465-3-jorge.ramirez@oss.qualcomm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250613140402.3619465-1-jorge.ramirez@oss.qualcomm.com> References: <20250613140402.3619465-1-jorge.ramirez@oss.qualcomm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Authority-Analysis: v=2.4 cv=EovSrTcA c=1 sm=1 tr=0 ts=684c2fee cx=c_pps a=uNfGY+tMOExK0qre0aeUgg==:117 a=wjE3nLva0YkvARyJ+Gfmxg==:17 a=6IFa9wvqVegA:10 a=EUspDBNiAAAA:8 a=6cNYJS_lEeBOaWCNo2sA:9 a=61Ooq9ZcVZHF1UnRMGoz:22 X-Proofpoint-ORIG-GUID: OyUGUe9x3Q_A-YtGu8nVG0yhpneSyLRO X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNjEzMDEwMyBTYWx0ZWRfX3hYv8FBjszX8 VW0eEDIcpFZtU73s8IwqgNeRWMouzeDME914YbAPTLfex/qfAAILM5k9VL33qoHJ8CXDd00HOMK 9uBUi8UOv2g14JGo4dlwQFOqAnnPtWGCaf5pLcR3KcQ6po+wpMZhyUgbZfIolabXU/S/DTPm6qD uEpon3Z3MmUR2ph8H4+ONMEH92VN9O+c6OLvpJV0PHTc6d7KaeKIV7vtHqjcLPZiVfa3Of+kTNv SVBPSi0O8m71umga8Mu4iKgKzws9SXttGHFcbApyAp9PHCEeTl3ywIO394u9aaJSomz8ixc/CdT ne6WibwKHxtrJn9UVwF3uNkDSIuLU4cS3HruMdOG5WbzkSTo05HK4Aq0BaFDO6lDaQhgy8WcERo VRfg9cviS/mTZ2y9n1nCZAimJu9onxo3UI/Lm0SVnP8Laly7ixWRaNiUOD7zUB1sg1AFWHCn X-Proofpoint-GUID: OyUGUe9x3Q_A-YtGu8nVG0yhpneSyLRO X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40 definitions=2025-06-13_01,2025-06-12_02,2025-03-28_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 spamscore=0 suspectscore=0 priorityscore=1501 mlxlogscore=999 mlxscore=0 clxscore=1015 malwarescore=0 adultscore=0 lowpriorityscore=0 phishscore=0 bulkscore=0 classifier=spam authscore=0 authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2505280000 definitions=main-2506130103 Content-Type: text/plain; charset="utf-8" Add DT entries for the qcm2290 venus encoder/decoder. Signed-off-by: Jorge Ramirez-Ortiz --- arch/arm64/boot/dts/qcom/qcm2290.dtsi | 53 +++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/qcm2290.dtsi b/arch/arm64/boot/dts/qc= om/qcm2290.dtsi index f49ac1c1f8a3..af2c1f66fe07 100644 --- a/arch/arm64/boot/dts/qcom/qcm2290.dtsi +++ b/arch/arm64/boot/dts/qcom/qcm2290.dtsi @@ -1628,6 +1628,59 @@ adreno_smmu: iommu@59a0000 { #iommu-cells =3D <2>; }; =20 + venus: video-codec@5a00000 { + compatible =3D "qcom,qcm2290-venus"; + reg =3D <0 0x5a00000 0 0xff000>; + interrupts =3D ; + + power-domains =3D <&gcc GCC_VENUS_GDSC>, + <&gcc GCC_VCODEC0_GDSC>, + <&rpmpd QCM2290_VDDCX>; + power-domain-names =3D "venus", "vcodec0", "cx"; + operating-points-v2 =3D <&venus_opp_table>; + + clocks =3D <&gcc GCC_VIDEO_VENUS_CTL_CLK>, + <&gcc GCC_VIDEO_AHB_CLK>, + <&gcc GCC_VENUS_CTL_AXI_CLK>, + <&gcc GCC_VIDEO_THROTTLE_CORE_CLK>, + <&gcc GCC_VIDEO_VCODEC0_SYS_CLK>, + <&gcc GCC_VCODEC0_AXI_CLK>; + clock-names =3D "core", "iface", "bus", "throttle", + "vcodec0_core", "vcodec0_bus"; + + memory-region =3D <&pil_video_mem>; + iommus =3D <&apps_smmu 0x860 0x0>, + <&apps_smmu 0x880 0x0>, + <&apps_smmu 0x861 0x04>, + <&apps_smmu 0x863 0x0>, + <&apps_smmu 0x804 0xE0>; + + interconnects =3D <&mmnrt_virt MASTER_VIDEO_P0 0 &bimc SLAVE_EBI1 0>, + <&bimc MASTER_APPSS_PROC 0 &config_noc SLAVE_VENUS_CFG 0>; + interconnect-names =3D "video-mem", "cpu-cfg"; + + venus_opp_table: opp-table { + compatible =3D "operating-points-v2"; + opp-133000000 { + opp-hz =3D /bits/ 64 <133000000>; + required-opps =3D <&rpmpd_opp_low_svs>; + }; + + opp-240000000 { + opp-hz =3D /bits/ 64 <240000000>; + required-opps =3D <&rpmpd_opp_svs>; + }; + }; + + video-decoder { + compatible =3D "venus-decoder"; + }; + + video-encoder { + compatible =3D "venus-encoder"; + }; + }; + mdss: display-subsystem@5e00000 { compatible =3D "qcom,qcm2290-mdss"; reg =3D <0x0 0x05e00000 0x0 0x1000>; --=20 2.34.1 From nobody Fri Oct 10 13:32:48 2025 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 03EC51A254C for ; Fri, 13 Jun 2025 14:04:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749823475; cv=none; b=MYfmTrlobdz76amkmEKE42h+mYyL6a6WWovYbXp/oQ2cxiQHtGY65+mxW7zaxAkm3lP++z9DJGlLK/ZPI+sv7kpu50xfuaUgV/hO9g7BQ0VT0Z5O3SZL4eMpvIoojsf2pQdAzCfGmqJPZKIjPWU4h7qGtBUpSz9Wirn2ASFvuO8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749823475; c=relaxed/simple; bh=ofSIhURbE8JGA42UH0YBsV2VOIoz7qhQ+CYI90S4iYk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=RzUErmX0x4hNEFqYo9toubUtDfQWytCnFBKW8fzqJg59a+2R+BynBjWq0trAI3BttoOxpYN+3wBJDVS0kSwNoULT02QTGJkMooiMNq1tmf6fATG+1bYn5zqAlOhuCKjcRa1hwsEsproOYuaQq1Gi1NxWXx5fS+jSViwyLzWDiuA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=CGgL3PP0; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="CGgL3PP0" Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 55D9Bj8X029602 for ; Fri, 13 Jun 2025 14:04:30 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=q4UXbwz6Fhd 4XfS0c/exNIes/qKVhYhBXGv2xa/goXo=; b=CGgL3PP0l1IQJyh0jgJogaxez+Z dmEVvBX+L+aSuDB0nw9+R7Uu2kMU9sBKKRle6W+hjDIBe7LCRgtrhOxzbyDWncai iTqXKTMwtNwdsCLXTKRmcRJIhRbeLNbFkQ5BHwn3N/nXFCfR6oQjYi5mvWECxwJn xhrhnNwEa1qBLdpofb1wIjW8NbI8n4SE8sD8uBtaVHuqd90Dq4Bhh90k7ZQs90cB ph0XU4yifZ/gGp4zi0CjVedWdJIgqvg6+VNS7X5FSLnUYo0oahbPRK6LcIn2ForY 7HEAZLX/5uC2Y+zAUEL9U4iY65qTnZXS4IyMAgcKAKSpmEwhsUqHImiqyjg== Received: from mail-ot1-f69.google.com (mail-ot1-f69.google.com [209.85.210.69]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 474d12bkur-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Fri, 13 Jun 2025 14:04:30 +0000 (GMT) Received: by mail-ot1-f69.google.com with SMTP id 46e09a7af769-735aa4b1572so627401a34.2 for ; Fri, 13 Jun 2025 07:04:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1749823469; x=1750428269; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=q4UXbwz6Fhd4XfS0c/exNIes/qKVhYhBXGv2xa/goXo=; b=Yq1iCh+NT1/GYvtHD5k/nL8vgnqb4dTv0hENOWYWPiNkVxA4sFhvmGx8S2+FZfN93W HBA+4cxKDcreq0cRUpFjxrFLAaICbCZDkqJPsfHPkvR+kEJJEQ6ENpVciK7nrPKvxAhM 3E9I/16VG4CpOVSssFoT2ltXlsuoUPKmeW3f/1ee18WfIBETeuJe6o7mws0NbjvEwlSL h89rqcFPR637lCggZDXd1K7WXFl2AyoD0LUmENrXK27H+6srDXKmgDT/vTe/6y1RCu9b PwO6MfDqM+RVQD4YOsiHBdiUHohEohy9vh1IC2ZUcYqZwjTk/+5Gkt2jWRhIgW4TmoMO eIFQ== X-Forwarded-Encrypted: i=1; AJvYcCVz8NC3tCoovLxPCA6SB+OkgPnrJSKlZLu++awkJF4SOhIRNU5Edm/VfbNcHTPJlgDmcBXGaNQ0kfkARkE=@vger.kernel.org X-Gm-Message-State: AOJu0YyB3Sq2H9nW/XqdJD63CE1wYEEzl6ZpAIr9WtNCBghiB/MoOdcx n/I3sree5LE9TTyYBHN86RtEY9B8FjSyslHCc4spsJyBDDqg+uWUVMFsddpZQbHbuZSYM3KETZ6 m/CwuIMqf3tPf5IuQ+CGC62v8SCy+mYHVwwOJyUGzzYW7Ehx3PXF2i2gnqhQmntzqCNwsYfQ9Fc Y= X-Gm-Gg: ASbGnct8H3abGxNJS+Jx0SIbXfRpsDbmWpbSrklbwJ1hOK9jSae6Equ+detNv98g+cY mIV2SHnof6FuUc2cmSFSQ2HTI92TASfXS12+XCw5zWCs6UnwsFkKwLTgZl73CgjwC2DcFJDWDv5 a1nCIgv9mbwVh+AyKZxAuJMwJkR35urbJd1RtXr7BtnQtagnlXb4rF8w0sYebn0lNCazI3iPLiv 3LPozXhEGpzJGKDYrtrkqgEgG9/s1nFsDXpasLYpbGOJHgYOdd5BMl5Joa+byWYZoNl+F/NJftz 9KnCabG7jIbOLQ6z1EHUOTKLXmUtLcDHvLXQw9UhKAtkuMJL4fczE/Iu6ZKK9tVPjJAq9rCiVTO I X-Received: by 2002:a05:6830:6488:b0:739:fa45:591c with SMTP id 46e09a7af769-73a27117ce9mr2091093a34.13.1749823469089; Fri, 13 Jun 2025 07:04:29 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE6NK7CuldtPlXawMuq8prfqWmCFAxSuPDLMdl9iuUTY5hKhPURrq6fXjXd9zDxFImakDqQqg== X-Received: by 2002:a05:6830:6488:b0:739:fa45:591c with SMTP id 46e09a7af769-73a27117ce9mr2091046a34.13.1749823468657; Fri, 13 Jun 2025 07:04:28 -0700 (PDT) Received: from trex.. (132.red-79-144-190.dynamicip.rima-tde.net. [79.144.190.132]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4532e268de2sm53503615e9.40.2025.06.13.07.04.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Jun 2025 07:04:28 -0700 (PDT) From: Jorge Ramirez-Ortiz To: jorge.ramirez@oss.qualcomm.com, quic_vgarodia@quicinc.com, quic_dikshita@quicinc.com, bryan.odonoghue@linaro.org, mchehab@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, stanimir.varbanov@linaro.org Cc: linux-arm-msm@vger.kernel.org, linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/5] media: venus: vdec: ar50_lite video core support Date: Fri, 13 Jun 2025 16:04:00 +0200 Message-Id: <20250613140402.3619465-4-jorge.ramirez@oss.qualcomm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250613140402.3619465-1-jorge.ramirez@oss.qualcomm.com> References: <20250613140402.3619465-1-jorge.ramirez@oss.qualcomm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-GUID: M9Vr4aQuxzzMlZ8XSSUNVFnyjQwl04NM X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNjEzMDEwMiBTYWx0ZWRfX8L318QZVKzfc aPTi083Ki8UMtGG2xcXjwp3pvWjf7uCs0WoR1CY2CQ6CjaPWw+YqLXfnJNkPLwTRLEGdG0O34L6 4QGa71beQxJL6AOOPWNcTuNcvAZUp6OV8q+IAmmUNxZMNOVClmhLJi4mKeK1px9w4U5RHKJyWHz vBzxaH7nxhC3Zb8i64JTQkCxzGEp8pjLA5Oinyd1pYvxYpSsl8+z2F0ElO8dy34u4N1oE9g74IB FC5M1Cgmg/WIVPwjev2J7P7pRHCPnj4dyEzCzMZHA3kka+KbEbzXx5nPt9THa4HSqxibQNnVfRp zkIAfjbSmfBWwz5PXTNvXiD/8r6KVcIGtjVVcfGgKgrtywdaHmsJ1zZflkgXG5m1vK7Tb1AVUwA 5MN9PRz9I3GdoV24KuPkr9f4OYGciHD0JQ7XNyzaKMwu3AWJd3xj+QYeffBm6zJ1AGSlIKh3 X-Authority-Analysis: v=2.4 cv=GYkXnRXL c=1 sm=1 tr=0 ts=684c2fee cx=c_pps a=z9lCQkyTxNhZyzAvolXo/A==:117 a=wjE3nLva0YkvARyJ+Gfmxg==:17 a=6IFa9wvqVegA:10 a=EUspDBNiAAAA:8 a=Gsml5EI1S0Azkn3hA_8A:9 a=EyFUmsFV_t8cxB2kMr4A:22 X-Proofpoint-ORIG-GUID: M9Vr4aQuxzzMlZ8XSSUNVFnyjQwl04NM X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40 definitions=2025-06-13_01,2025-06-12_02,2025-03-28_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 phishscore=0 spamscore=0 mlxlogscore=999 bulkscore=0 impostorscore=0 clxscore=1015 malwarescore=0 priorityscore=1501 mlxscore=0 adultscore=0 lowpriorityscore=0 classifier=spam authscore=0 authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2505280000 definitions=main-2506130102 Content-Type: text/plain; charset="utf-8" The AR50_LITE is a streamlined variant of the AR50 video core, designed for power and cost-efficient platforms. It supports hardware-accelerated decoding of H.264, HEVC, and VP9 formats. Signed-off-by: Jorge Ramirez-Ortiz Reviewed-by: Bryan O'Donoghue --- drivers/media/platform/qcom/venus/core.c | 11 ++- drivers/media/platform/qcom/venus/core.h | 5 +- drivers/media/platform/qcom/venus/firmware.c | 8 +- drivers/media/platform/qcom/venus/helpers.c | 81 +++++++++++++++++++ drivers/media/platform/qcom/venus/helpers.h | 2 + .../media/platform/qcom/venus/hfi_helper.h | 10 ++- drivers/media/platform/qcom/venus/hfi_venus.c | 14 ++-- .../media/platform/qcom/venus/pm_helpers.c | 1 + drivers/media/platform/qcom/venus/vdec.c | 15 ++-- 9 files changed, 123 insertions(+), 24 deletions(-) diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platf= orm/qcom/venus/core.c index d305d74bb152..736ef53d988d 100644 --- a/drivers/media/platform/qcom/venus/core.c +++ b/drivers/media/platform/qcom/venus/core.c @@ -254,14 +254,19 @@ static int venus_enumerate_codecs(struct venus_core *= core, u32 type) =20 static void venus_assign_register_offsets(struct venus_core *core) { - if (IS_IRIS2(core) || IS_IRIS2_1(core)) { - core->vbif_base =3D core->base + VBIF_BASE; + if (IS_IRIS2(core) || IS_IRIS2_1(core) || IS_AR50_LITE(core)) { core->cpu_base =3D core->base + CPU_BASE_V6; core->cpu_cs_base =3D core->base + CPU_CS_BASE_V6; core->cpu_ic_base =3D core->base + CPU_IC_BASE_V6; core->wrapper_base =3D core->base + WRAPPER_BASE_V6; core->wrapper_tz_base =3D core->base + WRAPPER_TZ_BASE_V6; - core->aon_base =3D core->base + AON_BASE_V6; + if (IS_AR50_LITE(core)) { + core->vbif_base =3D NULL; + core->aon_base =3D NULL; + } else { + core->vbif_base =3D core->base + VBIF_BASE; + core->aon_base =3D core->base + AON_BASE_V6; + } } else { core->vbif_base =3D core->base + VBIF_BASE; core->cpu_base =3D core->base + CPU_BASE; diff --git a/drivers/media/platform/qcom/venus/core.h b/drivers/media/platf= orm/qcom/venus/core.h index b412e0c5515a..122441f9600a 100644 --- a/drivers/media/platform/qcom/venus/core.h +++ b/drivers/media/platform/qcom/venus/core.h @@ -382,6 +382,7 @@ enum venus_inst_modes { * @lock: instance lock * @core: a reference to the core struct * @clk_data: clock data per core ID + * @eosbufs: a lit of EOS buffers * @dpbbufs: a list of decoded picture buffers * @internalbufs: a list of internal bufferes * @registeredbufs: a list of registered capture bufferes @@ -450,6 +451,7 @@ struct venus_inst { struct mutex lock; struct venus_core *core; struct clock_data clk_data; + struct list_head eosbufs; struct list_head dpbbufs; struct list_head internalbufs; struct list_head registeredbufs; @@ -520,7 +522,8 @@ struct venus_inst { #define IS_V1(core) ((core)->res->hfi_version =3D=3D HFI_VERSION_1XX) #define IS_V3(core) ((core)->res->hfi_version =3D=3D HFI_VERSION_3XX) #define IS_V4(core) ((core)->res->hfi_version =3D=3D HFI_VERSION_4XX) -#define IS_V6(core) ((core)->res->hfi_version =3D=3D HFI_VERSION_6XX) +#define IS_V6(core) (((core)->res->hfi_version =3D=3D HFI_VERSION_6XX)= || \ + ((core)->res->hfi_version =3D=3D HFI_VERSION_6XX_LITE)) =20 #define IS_AR50(core) ((core)->res->vpu_version =3D=3D VPU_VERSION_AR50) #define IS_AR50_LITE(core) ((core)->res->vpu_version =3D=3D VPU_VERSION_AR= 50_LITE) diff --git a/drivers/media/platform/qcom/venus/firmware.c b/drivers/media/p= latform/qcom/venus/firmware.c index 66a18830e66d..f8dcef0426ac 100644 --- a/drivers/media/platform/qcom/venus/firmware.c +++ b/drivers/media/platform/qcom/venus/firmware.c @@ -30,7 +30,7 @@ static void venus_reset_cpu(struct venus_core *core) u32 fw_size =3D core->fw.mapped_mem_size; void __iomem *wrapper_base; =20 - if (IS_IRIS2_1(core)) + if (IS_IRIS2_1(core) || IS_AR50_LITE(core)) wrapper_base =3D core->wrapper_tz_base; else wrapper_base =3D core->wrapper_base; @@ -42,7 +42,7 @@ static void venus_reset_cpu(struct venus_core *core) writel(fw_size, wrapper_base + WRAPPER_NONPIX_START_ADDR); writel(fw_size, wrapper_base + WRAPPER_NONPIX_END_ADDR); =20 - if (IS_IRIS2_1(core)) { + if (IS_IRIS2_1(core) || IS_AR50_LITE(core)) { /* Bring XTSS out of reset */ writel(0, wrapper_base + WRAPPER_TZ_XTSS_SW_RESET); } else { @@ -68,7 +68,7 @@ int venus_set_hw_state(struct venus_core *core, bool resu= me) if (resume) { venus_reset_cpu(core); } else { - if (IS_IRIS2_1(core)) + if (IS_IRIS2_1(core) || IS_AR50_LITE(core)) writel(WRAPPER_XTSS_SW_RESET_BIT, core->wrapper_tz_base + WRAPPER_TZ_XTSS_SW_RESET); else @@ -181,7 +181,7 @@ static int venus_shutdown_no_tz(struct venus_core *core) void __iomem *wrapper_base =3D core->wrapper_base; void __iomem *wrapper_tz_base =3D core->wrapper_tz_base; =20 - if (IS_IRIS2_1(core)) { + if (IS_IRIS2_1(core) || IS_AR50_LITE(core)) { /* Assert the reset to XTSS */ reg =3D readl(wrapper_tz_base + WRAPPER_TZ_XTSS_SW_RESET); reg |=3D WRAPPER_XTSS_SW_RESET_BIT; diff --git a/drivers/media/platform/qcom/venus/helpers.c b/drivers/media/pl= atform/qcom/venus/helpers.c index 8295542e1a7c..ae89369c6a07 100644 --- a/drivers/media/platform/qcom/venus/helpers.c +++ b/drivers/media/platform/qcom/venus/helpers.c @@ -230,6 +230,80 @@ int venus_helper_alloc_dpb_bufs(struct venus_inst *ins= t) } EXPORT_SYMBOL_GPL(venus_helper_alloc_dpb_bufs); =20 +static void free_eos_buf(struct venus_inst *inst, struct intbuf *buf) +{ + list_del_init(&buf->list); + dma_free_attrs(inst->core->dev, buf->size, buf->va, buf->da, + buf->attrs); + kfree(buf); +} + +int venus_helper_free_eos_bufs(struct venus_inst *inst) +{ + struct intbuf *buf, *n; + + list_for_each_entry_safe(buf, n, &inst->eosbufs, list) { + free_eos_buf(inst, buf); + } + + if (list_empty(&inst->eosbufs)) + INIT_LIST_HEAD(&inst->eosbufs); + + return 0; + +} +EXPORT_SYMBOL_GPL(venus_helper_free_eos_bufs); + +int venus_helper_alloc_eos_buf(struct venus_inst *inst, + struct hfi_frame_data *data) +{ + struct venus_core *core =3D inst->core; + struct device *dev =3D core->dev; + struct intbuf *buf; + int ret =3D 0; + + memset(data, 0, sizeof(*data)); + + data->buffer_type =3D HFI_BUFFER_INPUT; + data->flags =3D HFI_BUFFERFLAG_EOS; + + if (IS_AR50_LITE(inst->core)) { + /* We must send valid sizes and addresses */ + buf =3D kzalloc(sizeof(*buf), GFP_KERNEL); + if (!buf) { + ret =3D -ENOMEM; + goto fail; + } + + buf->type =3D HFI_BUFFER_INPUT; + buf->size =3D SZ_4K; + buf->attrs =3D DMA_ATTR_NO_KERNEL_MAPPING; + buf->va =3D dma_alloc_attrs(dev, buf->size, &buf->da, GFP_KERNEL, + buf->attrs); + if (!buf->va) { + ret =3D -ENOMEM; + goto fail; + } + + list_add_tail(&buf->list, &inst->eosbufs); + + data->alloc_len =3D buf->size; + data->device_addr =3D buf->da; + + } else if (IS_V6(inst->core) && + is_fw_rev_or_older(inst->core, 1, 0, 87)) { + data->device_addr =3D 0; + } else { + data->device_addr =3D 0xdeadb000; + } + + return 0; +fail: + kfree(buf); + return ret; +} +EXPORT_SYMBOL_GPL(venus_helper_alloc_eos_buf); + static int intbufs_set_buffer(struct venus_inst *inst, u32 type) { struct venus_core *core =3D inst->core; @@ -630,6 +704,13 @@ static int platform_get_bufreq(struct venus_inst *inst= , u32 buftype, if (!hfi_plat || !hfi_plat->bufreq) return -EINVAL; =20 + /* Firmware buffer requirements for internal buffers only */ + if (IS_AR50_LITE(inst->core)) + if ((buftype !=3D HFI_BUFFER_INPUT) && + (buftype !=3D HFI_BUFFER_OUTPUT) && + (buftype !=3D HFI_BUFFER_OUTPUT2)) + return -EINVAL; + params.version =3D version; params.num_vpp_pipes =3D inst->core->res->num_vpp_pipes; =20 diff --git a/drivers/media/platform/qcom/venus/helpers.h b/drivers/media/pl= atform/qcom/venus/helpers.h index 358e4f39c9c0..bf55fe3b8747 100644 --- a/drivers/media/platform/qcom/venus/helpers.h +++ b/drivers/media/platform/qcom/venus/helpers.h @@ -58,6 +58,8 @@ int venus_helper_get_out_fmts(struct venus_inst *inst, u3= 2 fmt, u32 *out_fmt, bool venus_helper_check_format(struct venus_inst *inst, u32 v4l2_pixfmt); int venus_helper_alloc_dpb_bufs(struct venus_inst *inst); int venus_helper_free_dpb_bufs(struct venus_inst *inst); +int venus_helper_alloc_eos_buf(struct venus_inst *inst, struct hfi_frame_d= ata *data); +int venus_helper_free_eos_bufs(struct venus_inst *inst); int venus_helper_intbufs_alloc(struct venus_inst *inst); int venus_helper_intbufs_free(struct venus_inst *inst); int venus_helper_intbufs_realloc(struct venus_inst *inst); diff --git a/drivers/media/platform/qcom/venus/hfi_helper.h b/drivers/media= /platform/qcom/venus/hfi_helper.h index f44059f19505..128ddf8e3cd5 100644 --- a/drivers/media/platform/qcom/venus/hfi_helper.h +++ b/drivers/media/platform/qcom/venus/hfi_helper.h @@ -397,13 +397,16 @@ #define HFI_BUFFER_INTERNAL_PERSIST_1 0x5 #define HFI_BUFFER_INTERNAL_SCRATCH(ver) \ (((ver) =3D=3D HFI_VERSION_4XX || \ - (ver) =3D=3D HFI_VERSION_6XX) ? 0x6 : 0x1000001) + (ver) =3D=3D HFI_VERSION_6XX || (ver) =3D=3D HFI_VERSION_6XX_LITE) \ + ? 0x6 : 0x1000001) #define HFI_BUFFER_INTERNAL_SCRATCH_1(ver) \ (((ver) =3D=3D HFI_VERSION_4XX || \ - (ver) =3D=3D HFI_VERSION_6XX) ? 0x7 : 0x1000005) + (ver) =3D=3D HFI_VERSION_6XX || (ver) =3D=3D HFI_VERSION_6XX_LITE) \ + ? 0x7 : 0x1000005) #define HFI_BUFFER_INTERNAL_SCRATCH_2(ver) \ (((ver) =3D=3D HFI_VERSION_4XX || \ - (ver) =3D=3D HFI_VERSION_6XX) ? 0x8 : 0x1000006) + (ver) =3D=3D HFI_VERSION_6XX || (ver) =3D=3D HFI_VERSION_6XX_LITE) \ + ? 0x8 : 0x1000006) #define HFI_BUFFER_EXTRADATA_INPUT(ver) \ (((ver) =3D=3D HFI_VERSION_4XX) ? 0xc : 0x1000002) #define HFI_BUFFER_EXTRADATA_OUTPUT(ver) \ @@ -561,6 +564,7 @@ enum hfi_version { HFI_VERSION_3XX, HFI_VERSION_4XX, HFI_VERSION_6XX, + HFI_VERSION_6XX_LITE, }; =20 struct hfi_buffer_info { diff --git a/drivers/media/platform/qcom/venus/hfi_venus.c b/drivers/media/= platform/qcom/venus/hfi_venus.c index b5f2ea879950..302776bf8fe6 100644 --- a/drivers/media/platform/qcom/venus/hfi_venus.c +++ b/drivers/media/platform/qcom/venus/hfi_venus.c @@ -497,7 +497,7 @@ static int venus_boot_core(struct venus_hfi_device *hde= v) if (count >=3D max_tries) ret =3D -ETIMEDOUT; =20 - if (IS_IRIS2(hdev->core) || IS_IRIS2_1(hdev->core)) { + if (IS_IRIS2(hdev->core) || IS_IRIS2_1(hdev->core) || IS_AR50_LITE(hdev->= core)) { writel(0x1, cpu_cs_base + CPU_CS_H2XSOFTINTEN_V6); writel(0x0, cpu_cs_base + CPU_CS_X2RPMH_V6); } @@ -565,6 +565,9 @@ static int venus_halt_axi(struct venus_hfi_device *hdev) u32 mask_val; int ret; =20 + if (IS_AR50_LITE(hdev->core)) + return 0; + if (IS_IRIS2(hdev->core) || IS_IRIS2_1(hdev->core)) { writel(0x3, cpu_cs_base + CPU_CS_X2RPMH_V6); =20 @@ -1134,7 +1137,8 @@ static irqreturn_t venus_isr(struct venus_core *core) wrapper_base =3D hdev->core->wrapper_base; =20 status =3D readl(wrapper_base + WRAPPER_INTR_STATUS); - if (IS_IRIS2(core) || IS_IRIS2_1(core)) { + + if (IS_IRIS2(core) || IS_IRIS2_1(core) || IS_AR50_LITE(core)) { if (status & WRAPPER_INTR_STATUS_A2H_MASK || status & WRAPPER_INTR_STATUS_A2HWD_MASK_V6 || status & CPU_CS_SCIACMDARG0_INIT_IDLE_MSG_MASK) @@ -1146,7 +1150,7 @@ static irqreturn_t venus_isr(struct venus_core *core) hdev->irq_status =3D status; } writel(1, cpu_cs_base + CPU_CS_A2HSOFTINTCLR); - if (!(IS_IRIS2(core) || IS_IRIS2_1(core))) + if (!(IS_IRIS2(core) || IS_IRIS2_1(core) || IS_AR50_LITE(core))) writel(status, wrapper_base + WRAPPER_INTR_CLEAR); =20 return IRQ_WAKE_THREAD; @@ -1531,7 +1535,7 @@ static bool venus_cpu_and_video_core_idle(struct venu= s_hfi_device *hdev) void __iomem *cpu_cs_base =3D hdev->core->cpu_cs_base; u32 ctrl_status, cpu_status; =20 - if (IS_IRIS2(hdev->core) || IS_IRIS2_1(hdev->core)) + if (IS_IRIS2(hdev->core) || IS_IRIS2_1(hdev->core) || IS_AR50_LITE(hdev->= core)) cpu_status =3D readl(wrapper_tz_base + WRAPPER_TZ_CPU_STATUS_V6); else cpu_status =3D readl(wrapper_base + WRAPPER_CPU_STATUS); @@ -1551,7 +1555,7 @@ static bool venus_cpu_idle_and_pc_ready(struct venus_= hfi_device *hdev) void __iomem *cpu_cs_base =3D hdev->core->cpu_cs_base; u32 ctrl_status, cpu_status; =20 - if (IS_IRIS2(hdev->core) || IS_IRIS2_1(hdev->core)) + if (IS_IRIS2(hdev->core) || IS_IRIS2_1(hdev->core) || IS_AR50_LITE(hdev->= core)) cpu_status =3D readl(wrapper_tz_base + WRAPPER_TZ_CPU_STATUS_V6); else cpu_status =3D readl(wrapper_base + WRAPPER_CPU_STATUS); diff --git a/drivers/media/platform/qcom/venus/pm_helpers.c b/drivers/media= /platform/qcom/venus/pm_helpers.c index 409aa9bd0b5d..5d9dfe3fd043 100644 --- a/drivers/media/platform/qcom/venus/pm_helpers.c +++ b/drivers/media/platform/qcom/venus/pm_helpers.c @@ -1168,6 +1168,7 @@ const struct venus_pm_ops *venus_pm_get(enum hfi_vers= ion version) return &pm_ops_v3; case HFI_VERSION_4XX: case HFI_VERSION_6XX: + case HFI_VERSION_6XX_LITE: return &pm_ops_v4; } =20 diff --git a/drivers/media/platform/qcom/venus/vdec.c b/drivers/media/platf= orm/qcom/venus/vdec.c index 99ce5fd41577..87c7901b280e 100644 --- a/drivers/media/platform/qcom/venus/vdec.c +++ b/drivers/media/platform/qcom/venus/vdec.c @@ -550,7 +550,7 @@ vdec_decoder_cmd(struct file *file, void *fh, struct v4= l2_decoder_cmd *cmd) { struct venus_inst *inst =3D to_inst(file); struct vb2_queue *dst_vq; - struct hfi_frame_data fdata =3D {0}; + struct hfi_frame_data fdata; int ret; =20 ret =3D v4l2_m2m_ioctl_try_decoder_cmd(file, fh, cmd); @@ -561,18 +561,15 @@ vdec_decoder_cmd(struct file *file, void *fh, struct = v4l2_decoder_cmd *cmd) =20 if (cmd->cmd =3D=3D V4L2_DEC_CMD_STOP) { /* - * Implement V4L2_DEC_CMD_STOP by enqueue an empty buffer on + * Implement V4L2_DEC_CMD_STOP by enqueue a buffer on * decoder input to signal EOS. */ if (!(inst->streamon_out && inst->streamon_cap)) goto unlock; =20 - fdata.buffer_type =3D HFI_BUFFER_INPUT; - fdata.flags |=3D HFI_BUFFERFLAG_EOS; - if (IS_V6(inst->core) && is_fw_rev_or_older(inst->core, 1, 0, 87)) - fdata.device_addr =3D 0; - else - fdata.device_addr =3D 0xdeadb000; + ret =3D venus_helper_alloc_eos_buf(inst, &fdata); + if (ret) + goto unlock; =20 ret =3D hfi_session_process_buf(inst, &fdata); =20 @@ -1332,6 +1329,7 @@ static void vdec_session_release(struct venus_inst *i= nst) hfi_session_abort(inst); =20 venus_helper_free_dpb_bufs(inst); + venus_helper_free_eos_bufs(inst); venus_pm_load_scale(inst); INIT_LIST_HEAD(&inst->registeredbufs); mutex_unlock(&inst->lock); @@ -1682,6 +1680,7 @@ static int vdec_open(struct file *file) if (!inst) return -ENOMEM; =20 + INIT_LIST_HEAD(&inst->eosbufs); INIT_LIST_HEAD(&inst->dpbbufs); INIT_LIST_HEAD(&inst->registeredbufs); INIT_LIST_HEAD(&inst->internalbufs); --=20 2.34.1 From nobody Fri Oct 10 13:32:48 2025 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C33F72DCBEC for ; Fri, 13 Jun 2025 14:04:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749823487; cv=none; b=Nb5O5Fzwa9FvjJp7QcuKbAWZdf8xeN/b+I6wiYXa13t/AQqrs6xMywFR2lqzqxUZNkmZs8cju+Iw1ZxapWBXSpuPPND6dlo001qU+FAafcRLav1ezNYYhG/ritAS8gdqsCVbQo7vr1rIeXHbDvEfgCfRVzsyt+Evx6m/vONfRb0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749823487; c=relaxed/simple; bh=9LSytQPyTFkBJt9YzIaXb6/U5LogpeOg/rPyGmYojDo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=XKwDAZWqqfG4n0H9cGYEKqGSIQz99G6TAj2p/62EivwpfAjxz6hikYD4zn3UYEfykbpOLuu3AXhNDoTtEXcek9JfA0FZUpncJ61XKE+2+OK/KRHWsvhDGSRj5BGpvhlZ6Zy+cSNlqqtyhWKs3RsZzjn1r3xvDjyZtY5maIHWAjA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=ju0aZhiD; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="ju0aZhiD" Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 55D2CxZd022603 for ; Fri, 13 Jun 2025 14:04:44 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=x740bfZ74Zy o3mZSJA/M7WOOgB+n7paS30h2fBwgGpY=; b=ju0aZhiDyvbvsaZfNBH2azwJZ7A Ubzfwh0xHr8I4xdZkbdQgCs3Dd49F9PUxdY3kmrm4RwakCCTQie6mOS2wTNiJcUh Y+n+66o+zX9YTcIWNOVUbSuDw9psHS3GGPqIql2nkJtdRPQyycVGYQMstD9uclq4 NX4/17rE7LW7f4j1sLW+af6C/IQaS8h1CxzD/dypaHIffQj8eX9TZU+z9wlLb8qv ATYX67Q9aRRZZMFF4kYET+RvYjFtjxupSyTxayA9v6gTDxr+vfJgvDDVONBjv/Q5 zdTmgLd+S3Wxfr97TTO7SCK4W9zQXUd3oWpIbgjC93ENSwKk1/cet77Dwww== Received: from mail-qt1-f200.google.com (mail-qt1-f200.google.com [209.85.160.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 477y3gu4hw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Fri, 13 Jun 2025 14:04:44 +0000 (GMT) Received: by mail-qt1-f200.google.com with SMTP id d75a77b69052e-4a6ef72a544so39280091cf.1 for ; Fri, 13 Jun 2025 07:04:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1749823482; x=1750428282; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=x740bfZ74Zyo3mZSJA/M7WOOgB+n7paS30h2fBwgGpY=; b=cM2Q5c/+EcB5/eKk2AVK99NiXLqoKf5NOpyGMC6BnUAAwuJXvF7zibWBE3WrcJBPxL 3KWe7j6dgRmBJEs4YomnEwUiB70SjIqR46/CXCD1XPMjY5Eiyh80CSAd7c1q/FDyWuvg Py0lKtW4XRW+gWVGFpbdHbguE48t03B9NohesJ7lllSW6HqbDIdUvGLuIZRg4ywiNZA3 jRNSRfyD8IbxMZq5Tlxt2zwwsw+thknHBLN60IQJbTGAszg2inAGNPBcLJwykpNWQhhK LCwQbWbmnmwp58bkC94rcsb5Ghup8Ju3w+XGgn8V2D2Jc/iF4HpiUoKinJgYcs2frGhC N7JQ== X-Forwarded-Encrypted: i=1; AJvYcCUo+iJAYAK67jjHc3v4zZsUkpOoUXRdEqoWDKgIFFAoInsCklp8Y1ioydAAz2DvumqOrhzCnXjQwcxTnq0=@vger.kernel.org X-Gm-Message-State: AOJu0Yx05bWhQxYnl2xMmQ9qv0flz3oYoONFPHAxGo7JuWMlAqf7ym1i 1hf5+QgfP9Sx5Zwd69rOOFm7r0kP2N72/JHt2rGMNGM3+8WMouruhJQYHnvVkJkK4t6PRMfgFwn wFrvwRPKXfV6a60b521PM1kCpyGtd+kFOGBDfg9WLIIgkn4Pt9sjiIsusTkrUXekvsLVmil6QU1 I= X-Gm-Gg: ASbGnctSp2CI5J/LzHnUfNdZZS50apOtKkrgRCBCUbJSEMdZ+khiNGStrSLDarE7IVp xfjJrnW5+lVpswaZFva+OVO8KSSxBrdYbM1+zosTC+0y8Fy9zwFqs4gigYN0GnLqrylU4sPPZO2 YYDzA0BSu2Qc9EIDCV7LmqHASHtLZCxYOkQfRmo4sq+axCx04ckU0yLQ9Xf5+7mhh8s1RzWeMDR Bw3DBbZMJpvZYcLi2qcprO7E83Elp/Rh69AsD5po6mgKa5/VLUYFyxKGF6KHFKLCAphAvurQHyh DCvbl8P6OOLAiEds6r0ayQh6NiAFRQexas6AOkaGJ+037jsLF2zKJpCMrRfNxPsqv4AzeIh25Wk Y X-Received: by 2002:a05:622a:6092:b0:4a7:14c3:7405 with SMTP id d75a77b69052e-4a72ff0c6d5mr55984481cf.27.1749823481581; Fri, 13 Jun 2025 07:04:41 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFbevzv6PguuQR1l0g0dgZ34lTnIzgLDs80v2wMOxJ6UnIl+jvAGGIIASkHXLfT1eW72IufsQ== X-Received: by 2002:a05:6122:1809:b0:52f:4776:f6a7 with SMTP id 71dfb90a1353d-5313c860c0bmr2057695e0c.0.1749823470030; Fri, 13 Jun 2025 07:04:30 -0700 (PDT) Received: from trex.. (132.red-79-144-190.dynamicip.rima-tde.net. [79.144.190.132]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4532e268de2sm53503615e9.40.2025.06.13.07.04.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Jun 2025 07:04:29 -0700 (PDT) From: Jorge Ramirez-Ortiz To: jorge.ramirez@oss.qualcomm.com, quic_vgarodia@quicinc.com, quic_dikshita@quicinc.com, bryan.odonoghue@linaro.org, mchehab@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, stanimir.varbanov@linaro.org Cc: linux-arm-msm@vger.kernel.org, linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/5] media: venus: hfi_plat_v6_lite: Populate decode capabilities Date: Fri, 13 Jun 2025 16:04:01 +0200 Message-Id: <20250613140402.3619465-5-jorge.ramirez@oss.qualcomm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250613140402.3619465-1-jorge.ramirez@oss.qualcomm.com> References: <20250613140402.3619465-1-jorge.ramirez@oss.qualcomm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-GUID: 7Gy5WJ6dpneZiECptVzmTKEdCTLaekM4 X-Proofpoint-ORIG-GUID: 7Gy5WJ6dpneZiECptVzmTKEdCTLaekM4 X-Authority-Analysis: v=2.4 cv=DPqP4zNb c=1 sm=1 tr=0 ts=684c2ffc cx=c_pps a=JbAStetqSzwMeJznSMzCyw==:117 a=wjE3nLva0YkvARyJ+Gfmxg==:17 a=6IFa9wvqVegA:10 a=EUspDBNiAAAA:8 a=hV3zkybWQsGKz9K1FyYA:9 a=uxP6HrT_eTzRwkO_Te1X:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNjEzMDEwMiBTYWx0ZWRfX/ov7QFevxLEZ 6wkH88pC4aSe69N1cqkaHAVCN+q0A7W3e6kxvxUz20oc9tz+my9iDP3ZtwjUfbNWqYtteEyyqfZ XZXzZkfUpX4yfQSVScblNUh/XiyYpDfyLz781l3EUWKvx6b0boUikdr7K+J9pYtquBFH828VOEn CIIDQmepBFPFRdas8wHLx8LISHlCnK5kiWVt1T727NOtquO4X54fBnhBQmMvrmj55YYWs8j/ulA 7N02DhL+Aj3Ct2U7zPifY+KwTmSqMMpR7Ph5LeJQoaCwo95SX5kjJTZ1Vm+XPWWAv0+9+GytWEr Kg/lXqdGh8h+5XrmaS80YavtOJtpRdFdGSqeCOs1DeIFPSRJ67O/uG3MSXAterzvCa0+wSYdfiz er/aiX8zdUZ2SVDasbBQnGGn0du9LjxpLwSbH/vAIsIyRisNJjCb8Rq2dUaN0shvIxIrO4Xg X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40 definitions=2025-06-13_01,2025-06-12_02,2025-03-28_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 mlxscore=0 impostorscore=0 phishscore=0 clxscore=1015 priorityscore=1501 lowpriorityscore=0 bulkscore=0 adultscore=0 suspectscore=0 spamscore=0 mlxlogscore=999 classifier=spam authscore=0 authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2505280000 definitions=main-2506130102 Content-Type: text/plain; charset="utf-8" Add hfi platform file with decoding capabilities for hfi v6_lite. Signed-off-by: Jorge Ramirez-Ortiz --- drivers/media/platform/qcom/venus/Makefile | 2 +- .../media/platform/qcom/venus/hfi_platform.c | 2 + .../media/platform/qcom/venus/hfi_platform.h | 1 + .../qcom/venus/hfi_platform_v6_lite.c | 148 ++++++++++++++++++ 4 files changed, 152 insertions(+), 1 deletion(-) create mode 100644 drivers/media/platform/qcom/venus/hfi_platform_v6_lite.c diff --git a/drivers/media/platform/qcom/venus/Makefile b/drivers/media/pla= tform/qcom/venus/Makefile index 91ee6be10292..4a6a942db58b 100644 --- a/drivers/media/platform/qcom/venus/Makefile +++ b/drivers/media/platform/qcom/venus/Makefile @@ -5,7 +5,7 @@ venus-core-objs +=3D core.o helpers.o firmware.o \ hfi_venus.o hfi_msgs.o hfi_cmds.o hfi.o \ hfi_parser.o pm_helpers.o dbgfs.o \ hfi_platform.o hfi_platform_v4.o \ - hfi_platform_v6.o hfi_plat_bufs_v6.o \ + hfi_platform_v6.o hfi_plat_bufs_v6.o hfi_platform_v6_lite.o \ =20 venus-dec-objs +=3D vdec.o vdec_ctrls.o venus-enc-objs +=3D venc.o venc_ctrls.o diff --git a/drivers/media/platform/qcom/venus/hfi_platform.c b/drivers/med= ia/platform/qcom/venus/hfi_platform.c index 643e5aa138f5..f56b8f9946d7 100644 --- a/drivers/media/platform/qcom/venus/hfi_platform.c +++ b/drivers/media/platform/qcom/venus/hfi_platform.c @@ -13,6 +13,8 @@ const struct hfi_platform *hfi_platform_get(enum hfi_vers= ion version) return &hfi_plat_v4; case HFI_VERSION_6XX: return &hfi_plat_v6; + case HFI_VERSION_6XX_LITE: + return &hfi_plat_v6_lite; default: break; } diff --git a/drivers/media/platform/qcom/venus/hfi_platform.h b/drivers/med= ia/platform/qcom/venus/hfi_platform.h index ec89a90a8129..6356e4bd0de2 100644 --- a/drivers/media/platform/qcom/venus/hfi_platform.h +++ b/drivers/media/platform/qcom/venus/hfi_platform.h @@ -58,6 +58,7 @@ struct hfi_platform { =20 extern const struct hfi_platform hfi_plat_v4; extern const struct hfi_platform hfi_plat_v6; +extern const struct hfi_platform hfi_plat_v6_lite; =20 const struct hfi_platform *hfi_platform_get(enum hfi_version version); unsigned long hfi_platform_get_codec_vpp_freq(enum hfi_version version, u3= 2 codec, diff --git a/drivers/media/platform/qcom/venus/hfi_platform_v6_lite.c b/dri= vers/media/platform/qcom/venus/hfi_platform_v6_lite.c new file mode 100644 index 000000000000..41958a3e353b --- /dev/null +++ b/drivers/media/platform/qcom/venus/hfi_platform_v6_lite.c @@ -0,0 +1,148 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Copyright (c) 2025, The Linux Foundation. All rights reserved. + */ +#include "hfi_platform.h" + +static const struct hfi_plat_caps caps[] =3D { +{ + .codec =3D HFI_VIDEO_CODEC_H264, + .domain =3D VIDC_SESSION_TYPE_DEC, + .caps[0] =3D {HFI_CAPABILITY_FRAME_WIDTH, 128, 1920, 1}, + .caps[1] =3D {HFI_CAPABILITY_FRAME_HEIGHT, 128, 1080, 1}, + .caps[2] =3D {HFI_CAPABILITY_MBS_PER_FRAME, 64, 8160, 1}, + .caps[3] =3D {HFI_CAPABILITY_BITRATE, 1, 60000000, 1 }, + .caps[4] =3D {HFI_CAPABILITY_MBS_PER_SECOND, 64, 244800, 1}, + .caps[5] =3D {HFI_CAPABILITY_FRAMERATE, 1, 120, 1}, + .caps[6] =3D {HFI_CAPABILITY_MAX_VIDEOCORES, 0, 1, 1}, + .num_caps =3D 7, + .pl[0] =3D {HFI_H264_PROFILE_BASELINE, HFI_H264_LEVEL_1}, + .pl[1] =3D {HFI_H264_PROFILE_MAIN, HFI_H264_LEVEL_41}, + .pl[2] =3D {HFI_H264_PROFILE_HIGH, HFI_H264_LEVEL_5}, + .pl[3] =3D {HFI_H264_PROFILE_CONSTRAINED_BASE, HFI_H264_LEVEL_41}, + .pl[4] =3D {HFI_H264_PROFILE_CONSTRAINED_HIGH, HFI_H264_LEVEL_41}, + .num_pl =3D 5, + .fmts[0] =3D {HFI_BUFFER_OUTPUT, HFI_COLOR_FORMAT_NV12_UBWC}, + .fmts[1] =3D {HFI_BUFFER_OUTPUT2, HFI_COLOR_FORMAT_NV12_UBWC}, + .fmts[2] =3D {HFI_BUFFER_OUTPUT2, HFI_COLOR_FORMAT_NV12}, + .fmts[3] =3D {HFI_BUFFER_OUTPUT2, HFI_COLOR_FORMAT_NV21}, + .num_fmts =3D 4, +}, { + .codec =3D HFI_VIDEO_CODEC_HEVC, + .domain =3D VIDC_SESSION_TYPE_DEC, + .caps[0] =3D {HFI_CAPABILITY_FRAME_WIDTH, 128, 1920, 1}, + .caps[1] =3D {HFI_CAPABILITY_FRAME_HEIGHT, 128, 1080, 1}, + .caps[2] =3D {HFI_CAPABILITY_MBS_PER_FRAME, 64, 8160, 1}, + .caps[3] =3D {HFI_CAPABILITY_BITRATE, 1, 60000000, 1 }, + .caps[4] =3D {HFI_CAPABILITY_MBS_PER_SECOND, 64, 244800, 1}, + .caps[5] =3D {HFI_CAPABILITY_FRAMERATE, 1, 120, 1}, + .caps[6] =3D {HFI_CAPABILITY_MAX_VIDEOCORES, 0, 1, 1}, + .num_caps =3D 7, + .pl[0] =3D {HFI_HEVC_PROFILE_MAIN, HFI_HEVC_LEVEL_5 | HFI_HEVC_TIER_MAIN}, + .pl[1] =3D {HFI_HEVC_PROFILE_MAIN10, HFI_HEVC_LEVEL_5 | HFI_HEVC_TIER_MAI= N}, + .num_pl =3D 2, + .fmts[0] =3D {HFI_BUFFER_OUTPUT, HFI_COLOR_FORMAT_NV12_UBWC}, + .fmts[1] =3D {HFI_BUFFER_OUTPUT2, HFI_COLOR_FORMAT_NV12_UBWC}, + .fmts[2] =3D {HFI_BUFFER_OUTPUT2, HFI_COLOR_FORMAT_NV12}, + .fmts[3] =3D {HFI_BUFFER_OUTPUT2, HFI_COLOR_FORMAT_NV21}, + .num_fmts =3D 4, +}, { + .codec =3D HFI_VIDEO_CODEC_VP9, + .domain =3D VIDC_SESSION_TYPE_DEC, + .caps[0] =3D {HFI_CAPABILITY_FRAME_WIDTH, 128, 1920, 1}, + .caps[1] =3D {HFI_CAPABILITY_FRAME_HEIGHT, 128, 1080, 1}, + .caps[2] =3D {HFI_CAPABILITY_MBS_PER_FRAME, 64, 8160, 1}, + .caps[3] =3D {HFI_CAPABILITY_BITRATE, 1, 60000000, 1 }, + .caps[4] =3D {HFI_CAPABILITY_MBS_PER_SECOND, 64, 244800, 1}, + .caps[5] =3D {HFI_CAPABILITY_FRAMERATE, 1, 120, 1}, + .caps[6] =3D {HFI_CAPABILITY_MAX_VIDEOCORES, 0, 1, 1}, + .num_caps =3D 7, + .pl[0] =3D {HFI_VP9_PROFILE_P0, 200}, + .pl[1] =3D {HFI_VP9_PROFILE_P2_10B, 200}, + .num_pl =3D 2, + .fmts[0] =3D {HFI_BUFFER_OUTPUT, HFI_COLOR_FORMAT_NV12_UBWC}, + .fmts[1] =3D {HFI_BUFFER_OUTPUT2, HFI_COLOR_FORMAT_NV12_UBWC}, + .fmts[2] =3D {HFI_BUFFER_OUTPUT2, HFI_COLOR_FORMAT_NV12}, + .fmts[3] =3D {HFI_BUFFER_OUTPUT2, HFI_COLOR_FORMAT_NV21}, + .num_fmts =3D 4, +} }; + +static const struct hfi_plat_caps *get_capabilities(unsigned int *entries) +{ + *entries =3D ARRAY_SIZE(caps); + return caps; +} + +static void get_codecs(u32 *enc_codecs, u32 *dec_codecs, u32 *count) +{ + *enc_codecs =3D 0x0; + *dec_codecs =3D HFI_VIDEO_CODEC_H264 | HFI_VIDEO_CODEC_HEVC | + HFI_VIDEO_CODEC_VP9; + *count =3D 3; +} + +static const struct hfi_platform_codec_freq_data codec_freq_data[] =3D { + { V4L2_PIX_FMT_H264, VIDC_SESSION_TYPE_DEC, 440, 0, 440 }, + { V4L2_PIX_FMT_HEVC, VIDC_SESSION_TYPE_DEC, 440, 0, 440 }, + { V4L2_PIX_FMT_VP9, VIDC_SESSION_TYPE_DEC, 440, 0, 440 }, +}; + +static const struct hfi_platform_codec_freq_data * +get_codec_freq_data(u32 session_type, u32 pixfmt) +{ + const struct hfi_platform_codec_freq_data *data =3D codec_freq_data; + unsigned int i, data_size =3D ARRAY_SIZE(codec_freq_data); + const struct hfi_platform_codec_freq_data *found =3D NULL; + + for (i =3D 0; i < data_size; i++) { + if (data[i].pixfmt =3D=3D pixfmt && + data[i].session_type =3D=3D session_type) { + found =3D &data[i]; + break; + } + } + + return found; +} + +static unsigned long codec_vpp_freq(u32 session_type, u32 codec) +{ + const struct hfi_platform_codec_freq_data *data; + + data =3D get_codec_freq_data(session_type, codec); + if (data) + return data->vpp_freq; + + return 0; +} + +static unsigned long codec_vsp_freq(u32 session_type, u32 codec) +{ + const struct hfi_platform_codec_freq_data *data; + + data =3D get_codec_freq_data(session_type, codec); + if (data) + return data->vsp_freq; + + return 0; +} + +static unsigned long codec_lp_freq(u32 session_type, u32 codec) +{ + const struct hfi_platform_codec_freq_data *data; + + data =3D get_codec_freq_data(session_type, codec); + if (data) + return data->low_power_freq; + + return 0; +} + +const struct hfi_platform hfi_plat_v6_lite =3D { + .codec_vpp_freq =3D codec_vpp_freq, + .codec_vsp_freq =3D codec_vsp_freq, + .codec_lp_freq =3D codec_lp_freq, + .codecs =3D get_codecs, + .capabilities =3D get_capabilities, + .bufreq =3D hfi_plat_bufreq_v6, +}; --=20 2.34.1 From nobody Fri Oct 10 13:32:48 2025 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BBD302D23A9 for ; Fri, 13 Jun 2025 14:04:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749823476; cv=none; b=K2CkJrGZ0Eg7two8+935ZD4TYNJRF2YOnMxkEiTUyF/LzYCc0chUQukxqKo3Of6xtPePeMlPvJ3i0NNSAXcisCTDy1Bi5ALpGF8gHjEK7QSvpdQFUJFibemZ3n6h9Q2jPp3heRpRdowFyUIgooPhnt4QIJWmW2w6BvJWv9ZXPLc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749823476; c=relaxed/simple; bh=R3NiWYA6kgddHMiBWO3ir8vpi4s+0r3d1/p6pCY92uo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=RwpGPKq5zZpZc02DwsUYoDyVMtLe1Lh5b5sZzvm0uhn6cgxAiOGT/FJiMN2TUtNnjTDu1cGcrmBuq8LVCgEaOFvFp+iO8jPPxnSyN+aEU7QKnRi3Yvuuy1wztzfAuKsk/BrW8M2nxFDMWbW2i8lznE77pf5bISAuLCxWNOBrngI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=YzWy+4yJ; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="YzWy+4yJ" Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 55D1xJ1C024101 for ; Fri, 13 Jun 2025 14:04:34 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=imWvnWvbJlX 5oc0s6sKOCcLJcc3gmwA4+SPySO+ydLU=; b=YzWy+4yJeRfNTX8XeSouAcdGnAK ZrXS5ggkFYyeyAwXXTzDhxZLoWYnExFjDok5ED5s35S0U4dMbFyTgNQgDcRT7mfG 0LAQrkbHp4cZ0IqSxE6SqDBHh3oFBhF2ZLzpGtetLq6uI017RsGaj5OK4HbI1VJF FYxv/tPg/tHOw6ececAec4SnCzl/CBCzm0gwGv/kr6rex7K7eS98yxdk8F9FE1pi TDYqrCmWKxMYZ1EsndJ/ofBXcqHa6I58LtdHhTeUfrPCc9IqlkQKth4WPRAx8qZI A+SMry/TNpUUp//k4OduMBukFWfWzrDd/QaRrDj5j7OFbW890kv8oows/ig== Received: from mail-pl1-f197.google.com (mail-pl1-f197.google.com [209.85.214.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 477y3gu4hg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Fri, 13 Jun 2025 14:04:33 +0000 (GMT) Received: by mail-pl1-f197.google.com with SMTP id d9443c01a7336-234b133b428so15438275ad.3 for ; Fri, 13 Jun 2025 07:04:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1749823473; x=1750428273; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=imWvnWvbJlX5oc0s6sKOCcLJcc3gmwA4+SPySO+ydLU=; b=OfIBLTKF/eXfNsXL1K4Uxbgelv/9+sqazDBe/tlJhVNBZkAEwGmsqh+rQDOfs4AqOy LBJ3pUtLXtP5f8X5fEUW7gz2k4BfFGWWSovXPv+hHnxyF7JcIEy2Vu5WuWVPFqqDVEUd 9/Rn9XgVSIkctojZaqcaodjjfeuO7q4zZ/79rP1CJGYTnl/ibTQvs+DyCuQ/x2GeEqdJ xG+QIinxmNlgg7KR/5vXqE+U1CaLPkr0vIkbxyBd6kOR8QvI1NuLaE1qUwNbnvD5ckGD GhkxI1cwvT9DJdVjxCPZACa1pvSTn+lxI3pjGDE/g3KusBIeCu1FqdSyHO5z3/OJXduw 57VA== X-Forwarded-Encrypted: i=1; AJvYcCXGFK483nL5gjX6lAmgxYRM8OujWUj9ssiobzV21GjpWloTA0qA5UCZ4Z6OLQg84HxKD8NioRGICT4bQpg=@vger.kernel.org X-Gm-Message-State: AOJu0YzwsINAZQnYzYfNbqmQma7BWVns0b9oNTLNcfknScKAQNvhvJNn 3nZJT9uM7KL/Sk8cRK9U/rP+DqgBOpv/rnoHZvVhIkkOhCMrY8FPo3g/g4ZKhR/cqe7AV+UZVXS VqnmAios5e6hsuGubWQJbI08DxxeoR3RsKHnhgnME7UrJITKDSPBx9DdJlanB0ktYSnM= X-Gm-Gg: ASbGncuje0MDyq9hvm8zeMCOXhyPKLAt01ZhxAIOg/oaX0cN2ERRBiPl2YuD97aXCn7 Uzey1PwhW77jD+TmnHZyKK2Vp3MKF/a9K9JOaUlXdvnsyO8bfl/Q7hPxsTp42SiD2rQJrjuLYyw 6OK3jr2273H11Lw4+U+RoZsXhZMd/a9tfD1Svx+nfp9i8lADFXv/T9hjqZhIl5kOu5BKVh+53by Lps7voZOr7OftMOsvnBBLQ8An4dzDjPoeMj+JZPE+DZwMzV0pY8/fGgn5h6ohA2+KsZ23luQ6xH TWyIe+XYYjnknTOaBWc/ghMjZNNTwQ81i3n92pzdc168yGtVPEhQMzYNJTw0mEYkDyh5msJrk3i E X-Received: by 2002:a17:902:dac4:b0:223:4537:65b1 with SMTP id d9443c01a7336-2365dc34597mr46375945ad.36.1749823472559; Fri, 13 Jun 2025 07:04:32 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGokbzd2JnXLw/G0v+GhIQGYqaRbjI8iFogXgFN8uc9fiV1mee+ivB1odTvwJXOn83pvOiTng== X-Received: by 2002:a17:902:dac4:b0:223:4537:65b1 with SMTP id d9443c01a7336-2365dc34597mr46374855ad.36.1749823471406; Fri, 13 Jun 2025 07:04:31 -0700 (PDT) Received: from trex.. (132.red-79-144-190.dynamicip.rima-tde.net. [79.144.190.132]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4532e268de2sm53503615e9.40.2025.06.13.07.04.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Jun 2025 07:04:30 -0700 (PDT) From: Jorge Ramirez-Ortiz To: jorge.ramirez@oss.qualcomm.com, quic_vgarodia@quicinc.com, quic_dikshita@quicinc.com, bryan.odonoghue@linaro.org, mchehab@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, stanimir.varbanov@linaro.org Cc: linux-arm-msm@vger.kernel.org, linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 5/5] media: venus: core: Add qcm2290 DT compatible and resource data Date: Fri, 13 Jun 2025 16:04:02 +0200 Message-Id: <20250613140402.3619465-6-jorge.ramirez@oss.qualcomm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250613140402.3619465-1-jorge.ramirez@oss.qualcomm.com> References: <20250613140402.3619465-1-jorge.ramirez@oss.qualcomm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-GUID: SdvFIZbRGit2GV7NeVJU8wkUYdg1z7Ks X-Proofpoint-ORIG-GUID: SdvFIZbRGit2GV7NeVJU8wkUYdg1z7Ks X-Authority-Analysis: v=2.4 cv=DPqP4zNb c=1 sm=1 tr=0 ts=684c2ff1 cx=c_pps a=cmESyDAEBpBGqyK7t0alAg==:117 a=wjE3nLva0YkvARyJ+Gfmxg==:17 a=6IFa9wvqVegA:10 a=EUspDBNiAAAA:8 a=5jRkx2jbz5RiTHLqnWMA:9 a=1OuFwYUASf3TG4hYMiVC:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNjEzMDEwMiBTYWx0ZWRfX1paXoHHrh5vE mhXcqI2ioPWy5kOII2Fvr+1Kh0OZtX6GcBgEmPEDC19VfvirgEYedOQIfPSLWMKnB1hTsihAuHU jMoqcKWf5aS1+5gBc4K32VwI0Qg0JiaffJr2v6XKhyjPSUQZi8StiJPtmaEmjGWQZy1WE+VbG9l QhySmjyE0mEmQY9qMhKJon7/p9u0kTUvU7TXfYebDu9uHtL+30HXqnNZYSwMXDLEvGLjOVQvkPa KMH0PKBgNvXxnGesiOsA5uTFECytFjOrLbg5rD35XZ4P6TbWxoNvfJvCk7HT9chLzubb2GYHWxK 9rHFW9jIOlnkoeQHE88xAw/n0e82m+YiA2z6Zs3Q27INcp1JCDorUYulqoOkPmnBwYG1cfCCI5b dWE9q79xNqvbXUinxK2Bqd5sgyBVTaKF1YvdIWYo0ivVKyc7d8yNJg/kEZGArQEpQXg18zdU X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40 definitions=2025-06-13_01,2025-06-12_02,2025-03-28_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 mlxscore=0 impostorscore=0 phishscore=0 clxscore=1015 priorityscore=1501 lowpriorityscore=0 bulkscore=0 adultscore=0 suspectscore=0 spamscore=0 mlxlogscore=999 classifier=spam authscore=0 authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2505280000 definitions=main-2506130102 Content-Type: text/plain; charset="utf-8" Add a qcm2290 compatible binding to the venus core. Signed-off-by: Jorge Ramirez-Ortiz --- drivers/media/platform/qcom/venus/core.c | 39 ++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platf= orm/qcom/venus/core.c index 736ef53d988d..f1f211ca1ce2 100644 --- a/drivers/media/platform/qcom/venus/core.c +++ b/drivers/media/platform/qcom/venus/core.c @@ -1062,6 +1062,44 @@ static const struct venus_resources sc7280_res =3D { .enc_nodename =3D "video-encoder", }; =20 +static const struct freq_tbl qcm2290_freq_table[] =3D { + { 352800, 240000000 }, /* 1920x1088 @ 30 + 1280x720 @ 30 */ + { 244800, 133000000 }, /* 1920x1088 @ 30 */ +}; + +static const struct bw_tbl qcm2290_bw_table_dec[] =3D { + { 244800, 2128000, 0, 2128000, 0}, /* 1920x1088 @ 30 */ +}; + +static const struct venus_resources qcm2290_res =3D { + .freq_tbl =3D qcm2290_freq_table, + .freq_tbl_size =3D ARRAY_SIZE(qcm2290_freq_table), + .bw_tbl_dec =3D qcm2290_bw_table_dec, + .bw_tbl_dec_size =3D ARRAY_SIZE(qcm2290_bw_table_dec), + .clks =3D { "core", "iface", "bus", "throttle" }, + .clks_num =3D 4, + .vcodec0_clks =3D { "vcodec0_core", "vcodec0_bus" }, + .vcodec_clks_num =3D 2, + .vcodec_pmdomains =3D (const char *[]) { "venus", "vcodec0" }, + .vcodec_pmdomains_num =3D 2, + .opp_pmdomain =3D (const char *[]) { "cx" }, + .vcodec_num =3D 1, + .hfi_version =3D HFI_VERSION_6XX_LITE, + .vpu_version =3D VPU_VERSION_AR50_LITE, + .max_load =3D 352800, + .num_vpp_pipes =3D 1, + .vmem_id =3D VIDC_RESOURCE_NONE, + .vmem_size =3D 0, + .vmem_addr =3D 0, + .cp_start =3D 0, + .cp_size =3D 0x70800000, + .cp_nonpixel_start =3D 0x1000000, + .cp_nonpixel_size =3D 0x24800000, + .dma_mask =3D 0xe0000000 - 1, + .fwname =3D "qcom/venus-6.0/venus.mbn", + .dec_nodename =3D "video-decoder", +}; + static const struct of_device_id venus_dt_match[] =3D { { .compatible =3D "qcom,msm8916-venus", .data =3D &msm8916_res, }, { .compatible =3D "qcom,msm8996-venus", .data =3D &msm8996_res, }, @@ -1072,6 +1110,7 @@ static const struct of_device_id venus_dt_match[] =3D= { { .compatible =3D "qcom,sc7180-venus", .data =3D &sc7180_res, }, { .compatible =3D "qcom,sc7280-venus", .data =3D &sc7280_res, }, { .compatible =3D "qcom,sm8250-venus", .data =3D &sm8250_res, }, + { .compatible =3D "qcom,qcm2290-venus", .data =3D &qcm2290_res, }, { } }; MODULE_DEVICE_TABLE(of, venus_dt_match); --=20 2.34.1