From nobody Wed Oct 8 23:42:18 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 10A061DF977 for ; Mon, 23 Jun 2025 07:49:55 +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=1750664998; cv=none; b=MCAx2J7HU2ESbmJH8TBWCbOAkRzirsHn80ibgz1gu0JEa8NxTP/GGPvpQV2FoQlsXmfW1xrlzBEB0h+pE+RXkJmGqfUTIvSaKW/UkMEr4gOFXiEmWfB8+9dIGW5GIBg282fO2EvNNVzworahZTlXqghGoHoRIaUUCwhyQxytFdU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750664998; c=relaxed/simple; bh=v2+PUpyQuEpd6Qy8uGCa9JWlCfSUOoQ6R2C6kBCVvKo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=CfDUcTiTpYP5h85pD+ai/JWke8LMpP2ZpXjqGrfiJQJy4mjBGSzNY2gJM6TBuIqBY8jmG+Otcs+jb96pOsQSG5i3u0oVjrZ9TV5YCACbH7QIoPpM0CtJis/zx6u/L/eqqALzDJ1hKsjBaYZgLSAL/aG+EXOudUKCIVyL3qenHwo= 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=Uwzvan2r; 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="Uwzvan2r" Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 55N28Sa8018894 for ; Mon, 23 Jun 2025 07:49:55 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=/IEG3Lw7qKW 3BELpNeKdPEcAL7+R57y3cNniHNfPDSA=; b=Uwzvan2rmcOkWANaCOsJcAe7WUH vpolFjMg5ZOVt6TBIpC9H1WwSOQF8oGCE6F/+WgGJbvPygEgIILK2daFamh+KzxA ZAmmLzdBuZ4oe4k3xwtqHKpL8S02u4wdn9lbJthLf0WVLfJvn4z0Z24E38T5Kegq NDb578cFQ3kRcRu3Xn6K9wFlNtzGr7UDkK7cEq2B7jqHWaGJcul4XmPIcYhir7gb LrJWXqq4SHHa419PURk4Qbq0aZhr1D1ytUTUG2GskywlY+eAcL0KCsX//iJvf12b fafgXFmluxlXrESf8FaQWYkkYS2Uz2yaYlDPXKDJjalDhyv4pSoYZgaZRCQ== Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 47ewv78wug-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Mon, 23 Jun 2025 07:49:54 +0000 (GMT) Received: by mail-qk1-f198.google.com with SMTP id af79cd13be357-7cf6c53390eso304935685a.2 for ; Mon, 23 Jun 2025 00:49:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750664994; x=1751269794; 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=/IEG3Lw7qKW3BELpNeKdPEcAL7+R57y3cNniHNfPDSA=; b=QVbYfTC5TOhTZa4NIdhoqGUawHyydDGBnhauHXO/ujKWMty18BuvEK2jgLjc8lpf1a RoXrV7Deu/XA9B8R4ILv653cZeoTztQ2k7DSrtNFFvSkwLYrWDtumyblG0pH7U9MUBLq dB+E7Wi4hp7qf6RTTTEOqlvzRCrVbAtdT/ZO0sY2VWBzwfykV9oqh2/+MSzGYl42LxtY O1JtPai7z/8Rna4Pkm7/+7nAMloRx/GYQ1ZPLBssLRAI/jvj29LKDMb9OBIjDIZ6uSUQ FevIFjV93nfw3eIeoKrmWva6PPNtF9Lo8DWxI4Nk+Tgxd4ti3Q1Jm7MygpNGW+62/7XA b4kw== X-Forwarded-Encrypted: i=1; AJvYcCVY+S23wL6bPwxAV7jqLyYbJemRhiPiM2g7LREh4AACmeawz4K4DuaDL5gr3JsvlHu2BD/nwBG6wetS9nw=@vger.kernel.org X-Gm-Message-State: AOJu0Yw9aCLohmdwP3BBChBfZIZ+6Zbc/W3m9f7rxKiDZYXeSQOdaKD5 JiqRGS4Gs4PT8wZj9JGQOmdhRYXocJvCHVJG7UNnidzXLOLrWExtQhb9O0qPHXY8bq3oGQ7W9X4 yPiAOcnrwoC0jAEhwNfdGoPnmv/BZNNYd/HxTMDp1A0UOo3ybBBxKnXpDFu8cJJ735Uo= X-Gm-Gg: ASbGncsC1l2C+rng9jSy/9k4DuAXOSLdPGsmurUu516kZsMqWUCvgBY54MHegPEjOMR K5tAtn+GGWnJINBnRhNbtNOHezuCW+iS80b/2qz0LA4hHKQPN5/xtJH48RaHLB0GUtTIWawkC4n S1iNnWCv8Rtc/Qz2SZcO2rtAdskgy9rs0BT7JgwgQwXY547w/D9lMN5zCtIpiWIMg0zgaFtBsnE CEOQBVc3OFpmW/1bQRqdjGQE7CdcBacNJx9dlpTx8jINLXBZjGbozT8rYrNsWgKDrT4+VM7n/D0 JRB4RlBELMlcYK7GsPpbkDahY7iRDvRTn/D+k26ujyNaHSzOj0uZ1BqKs7ijpRTU1OxepQFmMbh j X-Received: by 2002:a05:620a:470b:b0:7d3:8fd2:c0cd with SMTP id af79cd13be357-7d3f99469acmr1779647885a.56.1750664994001; Mon, 23 Jun 2025 00:49:54 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHY4gsMYAPVe+IThSQyLPbP0O2YiBUFQ1tUyFy77BiLqNi6c7jvjbSIb56TYV2W/OPEXPL5bQ== X-Received: by 2002:a05:620a:470b:b0:7d3:8fd2:c0cd with SMTP id af79cd13be357-7d3f99469acmr1779645085a.56.1750664993561; Mon, 23 Jun 2025 00:49:53 -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 ffacd0b85a97d-3a6d0f17ac7sm8755313f8f.23.2025.06.23.00.49.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Jun 2025 00:49:53 -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, andersson@kernel.org, konradybcio@kernel.org Cc: linux-arm-msm@vger.kernel.org, linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 1/5] dt-bindings: media: venus: Add qcm2290 dt schema Date: Mon, 23 Jun 2025 09:49:36 +0200 Message-Id: <20250623074940.3445115-2-jorge.ramirez@oss.qualcomm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250623074940.3445115-1-jorge.ramirez@oss.qualcomm.com> References: <20250613140402.3619465-1-jorge.ramirez@oss.qualcomm.com> <20250623074940.3445115-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: 0DQ1EVAUlYfvZDIEbQ4NrBFpLOlZZnGR X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNjIzMDA0NSBTYWx0ZWRfX8iiUFhVYIktU HXULptQFGyihAgsjheVp6/U03w6Sk7EWFBDjdBDmNq+SZloIq+ewgA5oaQ5KQJurB1L0yCQxvcn duysku+NHmN10BXQAg49j0ZPXL5giXYZU4rwlHzCTonrdWljMpwXOWZmg8p0kXJXRhP20bzEMCz FqokipmXowi/9nEjIFVXfieok+XOsKpVCYAYU4b0S6iZW0PwtQthnDT82NqpwcqCwRD3H9Dxzuz y2IKasS6F1G8ldd8gpUh3N+mYPey5EGaaSBPPV8lIZ2EkCerjUQx7x4dFKYOXOAPbpHIKeljwqT kmHd3bLu+fgwUcuerRvWiYCTUa+oUPd7INZNqNc7sAdzybC6MiDrOT8sucgMvMeiWKvyaXfIsc0 VDCZrAjryMg8NCY24fvTjxvT1wk3Bb2fIbU06gkiVv4nAQw5A0TRtT85BZJE2691rVgzIyWo X-Proofpoint-ORIG-GUID: 0DQ1EVAUlYfvZDIEbQ4NrBFpLOlZZnGR X-Authority-Analysis: v=2.4 cv=NtfRc9dJ c=1 sm=1 tr=0 ts=68590722 cx=c_pps a=qKBjSQ1v91RyAK45QCPf5w==:117 a=wjE3nLva0YkvARyJ+Gfmxg==:17 a=6IFa9wvqVegA:10 a=gEfo2CItAAAA:8 a=EUspDBNiAAAA:8 a=COk6AnOGAAAA:8 a=UBg8vxrJu69tSQrAULkA:9 a=NFOGd7dJGGMPyQGDc5-O:22 a=sptkURWiP4Gy88Gu7hUp:22 a=TjNXssC_j7lpFel5tvFf:22 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-23_02,2025-06-20_01,2025-03-28_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=999 spamscore=0 phishscore=0 suspectscore=0 impostorscore=0 priorityscore=1501 mlxscore=0 adultscore=0 lowpriorityscore=0 clxscore=1015 bulkscore=0 malwarescore=0 classifier=spam authscore=0 authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2505280000 definitions=main-2506230045 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 Reviewed-by: Krzysztof Kozlowski --- .../bindings/media/qcom,qcm2290-venus.yaml | 117 ++++++++++++++++++ 1 file changed, 117 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..1b94a95ce514 --- /dev/null +++ b/Documentation/devicetree/bindings/media/qcom,qcm2290-venus.yaml @@ -0,0 +1,117 @@ +# 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: + - Vikash Garodia + +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: + maxItems: 3 + + power-domain-names: + 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 + +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>; + }; + }; + }; --=20 2.34.1 From nobody Wed Oct 8 23:42:18 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 17DB220B21F for ; Mon, 23 Jun 2025 07:49:57 +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=1750665000; cv=none; b=Nq7FvWJMNQuQwhHs51fFi9TIyOTjSHfq/30rDKHOfyIGAfjNn/SXV2a8hJkbFUS+fzzW55noUMNg1mZr08dHUuMoOZyh6RZf+ZAy8Ka9afvsmfj2Tv1Up90MYjGmjFGY3mOCdlz/FmE40qyMGGOXgJTUjEq+omp8g3Xipsp9kgk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750665000; c=relaxed/simple; bh=cf2mE4zjg9GEqCKUKehqP9oOFCutyourmu24HTRAUr0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=lD/Hg4eWt/E/Ix0kDDqbRTwhgKa2mAl8OxYnBWW5Q1l/kYiVxtJDTllBZb65AwCnoQ6imjmVLKEqJdpbjIizfcDsS3Ip85gkeJKpe7o+MjawsPfhW4R0c+yjrV/W5DNVHaXo7AaT9uv92Aqp8kRBC/KJmzgN4YIra5mqy9IaQYk= 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=LTbBUmyf; 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="LTbBUmyf" Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 55N0UCkm021788 for ; Mon, 23 Jun 2025 07:49:57 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=gWN98f3c82+ 9VDHhJ5LqHepgcOVOp6gSM3eOdELEbRQ=; b=LTbBUmyfwggfwW/iTV9PCkHoGW+ uNtQwIjBGILHq/nYZrBQSLQqF4ruGG6H8f00SgQg2SK18QkrCIxuE3vH7AFQStgc 4h+q/PnRMbAhbes2N/7/I9+2XyDbunOGlEmNejCBubZ3i9j6RxXHbsq1TBTKNlNu 1kLYuOzkIJsfRbfMLu1Kwx0NapYTd0cZ0GTBwyJ2J/7qMiPSMDNDeALYSEOUAJ0U TL+uRiWNgDHnQcg/FbH32vovuvqNueElN+DGrvZNKA218/hL1Xkgea2UfyndANNk x8NFjIW0w1taHtsDsN9AXp+/CbgkKXnGRvPP/QwyWRTpuCSG0rq7lN7tGkw== Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 47eh1fsnnh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Mon, 23 Jun 2025 07:49:56 +0000 (GMT) Received: by mail-qk1-f197.google.com with SMTP id af79cd13be357-7d22790afd2so518509085a.2 for ; Mon, 23 Jun 2025 00:49:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750664996; x=1751269796; 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=gWN98f3c82+9VDHhJ5LqHepgcOVOp6gSM3eOdELEbRQ=; b=LfNQA7mpZd9VW6leKfoNjQ9+k1wipCRUxC2ztttnciabfMlXBU2OkHhfJrwhlE/2N/ b7k8jLICsQZ+bPNy8Vnurd3IqzoAWOJ65PVxecf1r+lCDKyVJ+9Cd6WReTRbssDEWkdX ZgXVlyIiBlnFSl8WjIIsxJ2zdHi6njs28t6vZl/80Hl12ciUzmud59nDpIF2XDamFXCZ tO8vsofyGS/RBg1HUqD6ygGEXROLRiHJJY+TNCkP4Lwa5ip8Su4h+3UT5xvGPOxPrdPu XS1SvfUnKw3BRyj0th1f+OqM5clywga6WY3dLDIvkddqWe/drCDG5vZgXRYxY+nWLcj8 aTew== X-Forwarded-Encrypted: i=1; AJvYcCX5fVS0MrhD8Z4N04Ki7NFXB+BDtzpOuEV0sZTtOH1nYH8j1cktUrp3gMNd30g/+JzPke6S/rfvLr5YfyI=@vger.kernel.org X-Gm-Message-State: AOJu0YwHWGQcG6kKfx6jWuLXtNCJ64fUSFZRFQbhVIldKun/5kLUHg1y bOEkl2w7hQ3HohH1hKESShYll4CGi/taqm37jEm3gpxGz/WHh91IeG8uyUefpH+BYyvNKjNrJL8 MrLlH/9PBS8m6TLIAyC3nEh+pr4lLuo3Kox/Nq23cXCxdikzLU5oU16MSDCv1t9HX5Eo= X-Gm-Gg: ASbGncsGc6S8UrhuAx9iQVXD7aTb71Em/mrDpr0AWt5GVsiePeeQSJHJZeoOtunrvrM FBZ/MdxuokYKGh2TYGYu5Os42YPe98RYUfJG6JCqDwSVAm/x91/yrviqifK9rYLbBUgq409pINS xVL2zT4m7OdZzUvcdQa9h6T9ezDE/PTDKgeOIWdtixCRxa/X/kc0cEtdDSH9P+z1l1jpW6aM7g/ lezOElv4CupTjJJtsHR58NvMAozouNGpUiZI2cYlBhx1gghQ9l9+mKQkAwGvyiGmkCnHASEiznE ZdGU8D7EG7v86Gcg36hIDk4TGE/IDTaUtAjBY6fDv/C2svU0F6SFWCjnsjZTDjadrI/qJxTQ2Zg B X-Received: by 2002:a05:620a:2489:b0:7d3:b3e0:d4cc with SMTP id af79cd13be357-7d3f98db4d6mr1317204185a.16.1750664995656; Mon, 23 Jun 2025 00:49:55 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFMoYlU3kvgCVfsMNrwdV7nMsQhyIWv4UhiUBufuGGP9ai9uVYXKeclKu+wSvMpPffmqaNp3A== X-Received: by 2002:a05:620a:2489:b0:7d3:b3e0:d4cc with SMTP id af79cd13be357-7d3f98db4d6mr1317202585a.16.1750664995116; Mon, 23 Jun 2025 00:49:55 -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 ffacd0b85a97d-3a6d0f17ac7sm8755313f8f.23.2025.06.23.00.49.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Jun 2025 00:49:54 -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, andersson@kernel.org, konradybcio@kernel.org Cc: linux-arm-msm@vger.kernel.org, linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 2/5] media: venus: vdec: AR50_LITE video core support Date: Mon, 23 Jun 2025 09:49:37 +0200 Message-Id: <20250623074940.3445115-3-jorge.ramirez@oss.qualcomm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250623074940.3445115-1-jorge.ramirez@oss.qualcomm.com> References: <20250613140402.3619465-1-jorge.ramirez@oss.qualcomm.com> <20250623074940.3445115-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=aflhnQot c=1 sm=1 tr=0 ts=68590724 cx=c_pps a=50t2pK5VMbmlHzFWWp8p/g==:117 a=wjE3nLva0YkvARyJ+Gfmxg==:17 a=6IFa9wvqVegA:10 a=EUspDBNiAAAA:8 a=DlvUenxY_34F2hPXssYA:9 a=IoWCM6iH3mJn3m4BftBB:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNjIzMDA0NCBTYWx0ZWRfX1rvmKh2G0rEp PzFfOT7KLSdI0zVtiPEL53oHuCNqMGwX9LrTHg96rT+1aojwh7ek1ymX+zeGotGYsyo2O7+nxdw eC+LTfgXACHQ0O6u53EFVwPPKqSoil4aGsAjKyiWCnW/grZkID/VMF8Lmc7ntII3Z7HvazG6sRC +Z66rfn0NId0i2oM4qMmeNeHKqwyswaxX7Q/tIS8iLL8+Yl3nwRpXAUOQLXeR5zRa1YPs7JXzrV 4OZ7/zIZjoREloCUwDkUcg3a9JDfbE1NsFs88ww2D2paWc/jYaAn27RGYG+p12Ply5a14jKNfUg W7ydCET634Fyo+ibB4BCyaJM0TRwwZ2iOEpYqMKs29qNgivpRXy0ES7VwuVns/zdUhyeq1jwCZe XYli1Eg7px4KNTfIuhWzstX7TcAEdgIqAtNS25svVJuRRu+1D0EUWQ9GXbpJSJylMjcSHDy6 X-Proofpoint-GUID: OVoS31E0Xg-br4GZjM5oKmkJB3EObPQC X-Proofpoint-ORIG-GUID: OVoS31E0Xg-br4GZjM5oKmkJB3EObPQC 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-23_02,2025-06-20_01,2025-03-28_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=999 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 suspectscore=0 phishscore=0 priorityscore=1501 adultscore=0 mlxscore=0 malwarescore=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-2506230044 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 Co-developed-by: Loic Poulain Signed-off-by: Loic Poulain --- drivers/media/platform/qcom/venus/core.c | 11 ++- drivers/media/platform/qcom/venus/core.h | 11 ++- drivers/media/platform/qcom/venus/firmware.c | 8 +- drivers/media/platform/qcom/venus/helpers.c | 80 +++++++++++++++++++ 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, 128 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..e755a28e919b 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,14 @@ 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) +static inline bool IS_V6(struct venus_core *core) +{ + if (WARN_ON_ONCE(!core)) + return false; + + return 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..812bec9a05be 100644 --- a/drivers/media/platform/qcom/venus/helpers.c +++ b/drivers/media/platform/qcom/venus/helpers.c @@ -230,6 +230,79 @@ 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 +703,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 Wed Oct 8 23:42:18 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 D457521765E for ; Mon, 23 Jun 2025 07:49:59 +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=1750665002; cv=none; b=INZZWSMWsad8WkghMYeYaxFwdveqWLSpLHRoBOmLqNy8hIVgnPTduM6HDbu5WFQffY7GJR5kMW1j/MS/3rsVKS5X1JEgo509KUwZaMV8j/8rjaQQRRanLwY8aQ0nYkDdaa07KVcbfUKWwEf/mVVMqWjpU+vXe3GR5+T+XXlDXEY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750665002; c=relaxed/simple; bh=9LSytQPyTFkBJt9YzIaXb6/U5LogpeOg/rPyGmYojDo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=sdJ5qG1giQBccD8LDXRe9HEO1aAzkhd79xlXHuzpjYAP6Qt0oSGirWlf0M+MZHYiQ5vJjIPKeE7ez7fC/jBMLH5pfpEMf0nTn6xVDXgODmQSexKAm8/yjTjNzfnAgH9sfnJT1Y24plyYKxwz+jTXhaMylQU9k8sgEgjuJGFlPHs= 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=EHDtDAC5; 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="EHDtDAC5" Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 55N00IAp029963 for ; Mon, 23 Jun 2025 07:49:59 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=EHDtDAC5hzT6IFU+7cg0YHeS4pl +3fWyOcCDbdcY2qdyevv5pv8uOwzN0HAezMfdeg66F6CqDcbCGEJz5Opr4C1Sw3V lIvTuf0jQcuEPyHGyMdXsAkIdtADkMOedopEzT21DxWc2hp8ACGkbuBSQRq3NY2U PHf6I7Px0dTTTg7UjqismjXakxj0NdrJKbftYAGcdCrhMUEcC+YDUzqTOohnPkVg vKzinsf2/Angmux/wxOYZaBOOObJjdyVvIur4K6BnAUlRR7EjU2bmKE7ngHZOpEh 0h9Cx2P0Pw3jrfWrYVurcsxGi0Qa/kr/rjBjy5OuwFEdDkQbvSDnvz9GUew== Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 47ec26215v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Mon, 23 Jun 2025 07:49:58 +0000 (GMT) Received: by mail-qk1-f197.google.com with SMTP id af79cd13be357-7c5f3b8b1a1so611581685a.3 for ; Mon, 23 Jun 2025 00:49:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750664997; x=1751269797; 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=VU7XnMHbJNrSk++tuZuUhZIlYr0Jc5OL2vLpjGikPMzny4o+DW5yAasRjwAzE32HPq OMZn4hd3k6VllGIo4Fahn6xoIzbq8plWZ5DSxuyM4A3pG85mF+ZBb4xQZtzqmHi6w4aB ENlA/7tK8AQSA25X7g3H8ZU+IGWk5xolx4IdGHqZQzljatSZBE4h3lEB/UWChJtkBPcp OKXMHqYoXFeliudB1oUiHpuxDQvL2Xm3oIbMjfPLXyTUQ+nm5BQBcqrS1DxXudaY2uu3 pNFB4SiPlROeMBfXQy6ZP/X4jKG9E2uzfMaqNN9gOAQ3LQ3+kY3kyyFVZ20NHhSqXGsE tR5A== X-Forwarded-Encrypted: i=1; AJvYcCVwMTPMQY8nZoYZlzMr3drni9MKCh/7Dp+ZAMAp/bL1MLCa7sQrGPnCG3HRz7LW8ACRRTIwCbu8fk6nBtc=@vger.kernel.org X-Gm-Message-State: AOJu0YyiEZf5Fc1nKqciahfmjgvhITMVIqcYBLCZQ5EV2+NqAwlvbDlw /JhXD3ANHr7SRI2/4J8XjPEcwZf9ZG4XIRspeWE3WQbd3s+jC0zEYgjkKCpSQV/EnOv5NyQgPPF K9D4aY/2esCQ4mhc5mporQVEbXSeZI6ENlgIknySbSPud7TA7YpEuFju10NpOzTT7pXcQDYiEGb Y= X-Gm-Gg: ASbGncvXnt51o1EgQPjICEzVPQ95BCj5uHJsP0IXsR87VC12Fz6T9C38S1azQk9T6Um o3nyEaxz6QI0+FIyvDy3WT/RoqUT4eLz90PqxdI6tanM10mSLUnLUkvYK5v6geDptMnegUUm5ed oMbCl4qt+XJIpWXlVMeweEyix9rHg8xyX0V/3KVJBgsTcL/LhzJh5C227vWygze7HE1gBFFvzp+ sbzOB5MQDmOLYCjNM+DwIxsDcv33iOqYc7NTqBq1C7Y8wCoQUVe+vcASzjpXpP7lbtfMde17SMC 23Db1UbboWpaKYxzXraEZx/tDobgEKoC6Y+f1+EhVqYJrxZvx9+llO3JgKFLhbJmv5KPRLcW2RG e X-Received: by 2002:a05:620a:1a28:b0:7cd:b58:f4b0 with SMTP id af79cd13be357-7d3f98dd4dfmr1372429485a.16.1750664997155; Mon, 23 Jun 2025 00:49:57 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFH5kmcSwV/KEXELRWwyUPS+zyqyRI1vQoidGc5FMFhnewI5yiUMxsooW5L3CoenCa5i4yUag== X-Received: by 2002:a05:620a:1a28:b0:7cd:b58:f4b0 with SMTP id af79cd13be357-7d3f98dd4dfmr1372426985a.16.1750664996696; Mon, 23 Jun 2025 00:49:56 -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 ffacd0b85a97d-3a6d0f17ac7sm8755313f8f.23.2025.06.23.00.49.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Jun 2025 00:49:56 -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, andersson@kernel.org, konradybcio@kernel.org Cc: linux-arm-msm@vger.kernel.org, linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 3/5] media: venus: hfi_plat_v6_lite: Populate decode capabilities Date: Mon, 23 Jun 2025 09:49:38 +0200 Message-Id: <20250623074940.3445115-4-jorge.ramirez@oss.qualcomm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250623074940.3445115-1-jorge.ramirez@oss.qualcomm.com> References: <20250613140402.3619465-1-jorge.ramirez@oss.qualcomm.com> <20250623074940.3445115-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-Spam-Details-Enc: AW1haW4tMjUwNjIzMDA0NSBTYWx0ZWRfX8sUIv5F//mpJ TbqZteBmD1rJu0VAnOVktlthuuy1Xtx6kM4Za8j33AGxWbL29+xcrTG2TgnngEtiDxzE0c3Iu5L 12HmZQFDvftOaTHAyyHsJvzElnU2a3r2njtkrhsBJAUh6UD8POrBx+hUyJKF2plsh31JuuXa9tK fgOxEHeK9SfN918yEvTxkU5GoDZbx9ulxc5tFunb0tZKkWjMwK7n2w8XgqCY4l+mdnoWTQ8sAuO TS2aGN2yC5UQzVnXsI7Si9ukTq651mVJKntqOjmFUuKsJ/LRxCopeNauRa3pLNh3edZ5gb5m6YL ulS2fHL5IKkNeyaPu4GpEPgNuoXokgEgP+QRYV0Sf/zKatt/4jLRVIgcgRR1mld5IXjB5JgWzne 8EsNJrZF9XoxLmh8+E8KmtqCk1cce1ATm/x5PCgPcPTaVYUmrHXlAmVg+RnQ+Oo3tceVkM8Y X-Authority-Analysis: v=2.4 cv=XPQwSRhE c=1 sm=1 tr=0 ts=68590726 cx=c_pps a=50t2pK5VMbmlHzFWWp8p/g==:117 a=wjE3nLva0YkvARyJ+Gfmxg==:17 a=6IFa9wvqVegA:10 a=EUspDBNiAAAA:8 a=hV3zkybWQsGKz9K1FyYA:9 a=IoWCM6iH3mJn3m4BftBB:22 X-Proofpoint-GUID: ugIDeOctqdf8xyxna6d9yhpdqx3e4_Y1 X-Proofpoint-ORIG-GUID: ugIDeOctqdf8xyxna6d9yhpdqx3e4_Y1 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-23_02,2025-06-20_01,2025-03-28_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 impostorscore=0 clxscore=1015 suspectscore=0 mlxscore=0 spamscore=0 phishscore=0 malwarescore=0 mlxlogscore=999 bulkscore=0 priorityscore=1501 adultscore=0 classifier=spam authscore=0 authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2505280000 definitions=main-2506230045 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 Wed Oct 8 23:42:18 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 DD47921FF2B for ; Mon, 23 Jun 2025 07:50:00 +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=1750665002; cv=none; b=SgO2PIUlU/qZKrke4JeqRjefaG1GrsOVcqfWkDgrdH01D09NbzsSQq/CzXIw6Dyk7X3NdnL+YfGf0Sz1ILPbHPuD592YIVR1DaOW0MxF7mzzrpOPuDOrxjBgc/0vbks9EyZrGbeE6prTclYRpCjhWJYCcHYBjMZJhixCrS3HhAc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750665002; c=relaxed/simple; bh=cH+A+MjcVGC/i2HYnkR3s9WU3JModY4E/GfJacde7uY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=jDZNdia7BwsXepO2XRxygGx71dgTkkcHCWmPJbFv3Ag1F+aeNTTV+WT/PXpNl2k1ekvWl817xaIoVO+f+kIUyT3tFg041MuooeSSvmBtk0kijrT9fA9MdyUqNkqM2sAJ9UDTPRjNzc3Kfk2MRdgsaRUfPvHiAdmI+G71ykGet78= 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=muVQYezh; 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="muVQYezh" Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 55MNt2Vj021620 for ; Mon, 23 Jun 2025 07:50:00 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=8J4xLisib0P UNCX7F+6K1Pljmp1lAqOEWPlHd7U8+GU=; b=muVQYezhMoadTJs6WisDWTZD9gi jogcEItcj7Vi0F5tUZjspsf+zhPwoYNit2GBWJR4zBGWOtfZwowjADHkehOw8tos VTiWl6CIUkriJXH43Bvmzovc22wyFbN6ZBX56KDy2FAybdKREUA7EzYp1YEwLKw1 I0YtfQEt0IY6sLtruhYTZyt5xdfHjB6KRWA2GCuHWCyZY7oR+gGI80ml9jPjvRGu 6tlByTz3/qhkV+LeeIOS0Y2z1i8Jl6QlqNwlno7VEOagLT9hBoTupIvJr9WdkDqM jabScxQPYTPkWDQ2phpoHsywQei1mSDhayCuzkqNUkbJrgYJpTSpsljUi7g== Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 47ec26215w-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Mon, 23 Jun 2025 07:50:00 +0000 (GMT) Received: by mail-qk1-f200.google.com with SMTP id af79cd13be357-7c760637fe5so576663085a.0 for ; Mon, 23 Jun 2025 00:50:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750664999; x=1751269799; 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=8J4xLisib0PUNCX7F+6K1Pljmp1lAqOEWPlHd7U8+GU=; b=WtbS/JiOf0MCzIHrtqeJLcCVzVK0ShVMrfTiUWzmdWVQWXrQImnM4TlyKSoeIuKDGI aCXaYnURXTAfaom8DFnvdVz3iO3Jy5ApYkVt4uV3pNyj1xeNi3pJPx3CG0KnRzUrIRSc uv83mXgNNj1HPDFZNM35pXrfVKw5N8f9bbVAspCKfvcDvsbTBofCH1i/3+7I6lFZsWry ZPoUlQq8D2XrpsD23BxNEcweQKTdKGjKqXGRQlugk1Kv3IfsTVXAsaiTyNDgJNNhbc3G J83bFoUUPFLvcf302IdRFcj28tEMr43AiO8RM4vgJdgZC795fLezGkjj9y7lcpT3Lk5N 0SWA== X-Forwarded-Encrypted: i=1; AJvYcCX48O6r61ZcOYuHFfft9/ehxyglQCFUpXWL+yJ+GcycM8Br0VAox0MDKqkT5jEO01hLu1TgMkjQ24kcgGA=@vger.kernel.org X-Gm-Message-State: AOJu0YwWiWMWeYLFESqeOGrh7DbIKkzDAD3mEwjzXVJQelTLMN8bCyHP 3imvz2WwrDmwMz2iBFp6axU07AS07UaUi+gyCJ4KBxvjuDcVQWOi7ulfKa4JCmFEwF2VF0Kc7N7 8SlZCBzbkYVEQya1o/jATfbQQJbq+mf3dj3LxYFSuOoXnscMXEvt7DEnmO6R7fngjRjA= X-Gm-Gg: ASbGncuvDycgjhUnQrmqZ729Mnb3eBsFQEztw5tq+hffJg71a20KHHwqu1jPvJtv6Ao o65xKpncrg9LJyoPZmpxNTGlGIu/8Zp+m8jv2nJ25cFRh8asryE7pQ4YRs0dzYR3qss5ukhbI34 1bySo7+JzuhN16GCYSj9UB8YKqWxXKDV1sAZr5Hd+rI0W14ik+rSoLOykLd2WHZCy3mp8VTjLOH y28Dy2GsMn1AikPE/bZ1YjD5pQxDwf5ZTdQRZtQRjrGvjFmzuksTiOwRw9pIIdKz81JNT/hlpWB hNST7eghpROWGG97zYgFbNR5kZ61M1ep/d4gMUBuBoR0RL0WPx7mMI1FTX4L/WjzeT6NgxRJJcC S X-Received: by 2002:a05:620a:4403:b0:7d3:a52a:125 with SMTP id af79cd13be357-7d3f9923f0cmr1477815785a.26.1750664998830; Mon, 23 Jun 2025 00:49:58 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGGGPyNOllQk9/Q2F0cGH3t0SOxPclBqyGCztEZ0NQrWXoprecRp0lVRoYZaMH2VHLGHf53KA== X-Received: by 2002:a05:620a:4403:b0:7d3:a52a:125 with SMTP id af79cd13be357-7d3f9923f0cmr1477812985a.26.1750664998238; Mon, 23 Jun 2025 00:49:58 -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 ffacd0b85a97d-3a6d0f17ac7sm8755313f8f.23.2025.06.23.00.49.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Jun 2025 00:49:57 -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, andersson@kernel.org, konradybcio@kernel.org Cc: linux-arm-msm@vger.kernel.org, linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 4/5] media: venus: core: Add qcm2290 DT compatible and resource data Date: Mon, 23 Jun 2025 09:49:39 +0200 Message-Id: <20250623074940.3445115-5-jorge.ramirez@oss.qualcomm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250623074940.3445115-1-jorge.ramirez@oss.qualcomm.com> References: <20250613140402.3619465-1-jorge.ramirez@oss.qualcomm.com> <20250623074940.3445115-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-Spam-Details-Enc: AW1haW4tMjUwNjIzMDA0NSBTYWx0ZWRfX+NZ3cq9E74zz T704s0adJQIj//C22rgZTNKRz8nK6w1xLPJujItWgqHcvoq1rW/w6cZkIZjnGvZLhSXwqzZKfIi +V41iokJPAgf9n7Nr5K+5ucFVBpIobMmA0Qh7aEhZ+73pinQe0++VW9uk4AsHBRbItOR3SBL9jW 0MMF+AJWGQl4WOCq7JvtcIu96EzK0REKGZO16ih99VAFXWyT3rLq2hG2oR68lVKWfqHHlLqf8rX 1Kw99AoI24IFaOrNJg8IrIF4NtSaLZKevpfeFTFAW5RpEiUNvJgfbMicp8Dc/XUOceauqflOnQp uvNBUfLcqG16EblOOEtmAllzPn0neqnKL93KeSONEtQJyTNRL9WKa7TgGlaDpxrUhoyDa43K2ts ea7wlTVxXvrCbq/c3Jf169EsTKcRjEZ0B7dOvFtc4qtbMAnu/f+sd7ak+W9EVZJFvvNLv0XM X-Authority-Analysis: v=2.4 cv=XPQwSRhE c=1 sm=1 tr=0 ts=68590728 cx=c_pps a=hnmNkyzTK/kJ09Xio7VxxA==:117 a=wjE3nLva0YkvARyJ+Gfmxg==:17 a=6IFa9wvqVegA:10 a=EUspDBNiAAAA:8 a=6h1BjrdT-BD1Ylfs7NgA:9 a=PEH46H7Ffwr30OY-TuGO:22 X-Proofpoint-GUID: 12vQDyRj-jqyU4EzT24ktMJc-Ce-7xeQ X-Proofpoint-ORIG-GUID: 12vQDyRj-jqyU4EzT24ktMJc-Ce-7xeQ 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-23_02,2025-06-20_01,2025-03-28_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 impostorscore=0 clxscore=1015 suspectscore=0 mlxscore=0 spamscore=0 phishscore=0 malwarescore=0 mlxlogscore=999 bulkscore=0 priorityscore=1501 adultscore=0 classifier=spam authscore=0 authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2505280000 definitions=main-2506230045 Content-Type: text/plain; charset="utf-8" Add a qcm2290 compatible binding to the venus core. Signed-off-by: Jorge Ramirez-Ortiz Co-developed-by: Loic Poulain Signed-off-by: Loic Poulain --- drivers/media/platform/qcom/venus/core.c | 40 ++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platf= orm/qcom/venus/core.c index 736ef53d988d..81fcda8fb4a1 100644 --- a/drivers/media/platform/qcom/venus/core.c +++ b/drivers/media/platform/qcom/venus/core.c @@ -1062,6 +1062,45 @@ 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", + .enc_nodename =3D "video-encoder", +}; + 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 +1111,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 From nobody Wed Oct 8 23:42:18 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 AD2FB221F1E for ; Mon, 23 Jun 2025 07:50:02 +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=1750665005; cv=none; b=tOH9XSZ4cr3QeyqaLZydqd+k6XneMFuu91VsnpRhqfXaqACqqSWI+xAZwwKJkPvqcdZaelNmymqgb8XHKKPtLvqd9OkICWY2W/mXsHnTKt5yEcys60HSCqC97d0FUg7MWq5pwIhh5zCB+xm9cQA+v66Y5LS6lpxw/WqJaz9wJ3g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750665005; c=relaxed/simple; bh=Nn1SUHbdtz+bHl8aKw5FbLQmxNDmU9kBm/3nok286Wg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=qkpJryCn1UKwv+AnqTzAWJFV8ca1JpYi/4Bgcs3NlRimDLREwnEbwFTzHeKZUuTu++fid3D4eN4aJdq+whH4o+G0zREGhB6XTEKwCRbFBIYy5TNiyCMbVrThW9RelcLLjMhi/OFPj4qOcpMg0LKEBgbbCMhvWHpuZ2V/4Ml1hfc= 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=EBez9FuS; 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="EBez9FuS" Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 55N4dYiS015169 for ; Mon, 23 Jun 2025 07:50:01 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=jQR+8/Rp8f5 ejzW/Cs4Zyl6AAG5h3mREu2uxrmhGHwM=; b=EBez9FuSEVbHFpoqoUqxiFce1Pt /9GhnirYjPfI3CNpTeMzlBO76W/EbZpFFVZYs12I/8heO65FP7OZ5YhuQ6E4LdF9 k/DxdsPyPlGPKOvsCDvrM279RwmfRKGvom1/11LyQO2BFFDvsvAQAhbWzxjYzO7c ZnZG/2sSsfv2npB21neTTjeeqx64/lGFHZuGHBxoKpD4q/5XwYUFgpEE9u8tYjro 7qQjQaI8nHQrd+Ex6DGpq4QxkhALfS4k+THR4v9tNhMOhGpu0pQwg6IXDu0TtYge 6lyZHe5JIMHWDc4RG65llPXC9kTTdhq3ksZFG2yhYEHtNvf0F258FGn5eNQ== Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 47f03b0g9s-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Mon, 23 Jun 2025 07:50:01 +0000 (GMT) Received: by mail-qk1-f200.google.com with SMTP id af79cd13be357-7d40f335529so160110585a.0 for ; Mon, 23 Jun 2025 00:50:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750665000; x=1751269800; 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=jQR+8/Rp8f5ejzW/Cs4Zyl6AAG5h3mREu2uxrmhGHwM=; b=mjzno6LckkGqwNynak4hexx9eTNXqk3CBgSV+tq4eofQ2Ig/JkDsHL2JwAM2HRdg+i 5YJp3ShJjoNYjIugC4f/zdXlaMlQRf55PsXsQSd3L1PT3M4QA/vv0vRJqnw1bNC94IGh aZXLtI5FShQw5HT/oiszYq0bAh6thJl9hxzWpxLQ+h3y3FXR/tktZQPmqAoJCmDk4svR YEdLwyRTU9oRxUK5QHWoickj7gVXrJDfGMoF41gXsWGfeMYntk30xkXMJiCXDso65hvg IqVB1GKpskUTDoWSzZ8OKtJxfE/DEwy3gtLSLkNeTeK+twZt5/As2s4inmPyY7Gv/sA4 SeaQ== X-Forwarded-Encrypted: i=1; AJvYcCUkrumpmg+n1zWblZylA4zPDV13poVK9D2DlyJhEVIkH8KvSDPKNoONWAjaIntdIstxtQYbp3i56lc4yZ8=@vger.kernel.org X-Gm-Message-State: AOJu0Yw4r3IIe48l2r+EX1n0O5OmP4m7V7aNkcERXS/wQXA4Rp8g5Mmc glR+8oE9W2C8OG6HLoI8EwO5YUHImpyjD1nyH6MHtfmaz2csxEC1THhkE9jul775J+MZzqMPlM0 IfsCKpqidNqEHk/oxnDchi8rjZhY3QvLFqoao0c7/7Z/iCY1p8SE2GhDXAS+U2eJVaR0= X-Gm-Gg: ASbGnctpEE0fJ6KqTmRFm7UUXVoJ3k31/tEzlarWXGTI3zWBasWePetuJrOO3/I3xYB fjZTyHbdgdPK3x4r4oGpOEYmXKhVPFmAl6CP+5HlBHppd8MbF+4CWc16ESTugImayLEAxDASXwW iKAZXElezyLaBmoAnhSkVBsGze2iLAWLYAUunyXN8H8iMG87LXeCtSrQDIUNHEgGuwLe/diUgFj KY63xeUvOIEAxM/K8aEkQP2ArCYgrLH6tPckeBXowWug4aXaoj7B7WEcw+WXK6w5Zk2HMTZwxlV Zh+/BsWdnvsgl2K9lGKsauqp57HuI7EkHKflvYQ6NZUatcHqVa+KnQ0BqPL2LN5NxwY+SZ3Shss X X-Received: by 2002:a05:620a:460d:b0:7d3:e648:5f5 with SMTP id af79cd13be357-7d3fbf760acmr1548209685a.1.1750665000178; Mon, 23 Jun 2025 00:50:00 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGbmKUcg/kFZe3QXuKKB+2EpQOW/AczTl6L69ib3vwtTOg8rRVszsHDWIaLVlARzjyBpTaLQA== X-Received: by 2002:a05:620a:460d:b0:7d3:e648:5f5 with SMTP id af79cd13be357-7d3fbf760acmr1548207285a.1.1750664999780; Mon, 23 Jun 2025 00:49:59 -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 ffacd0b85a97d-3a6d0f17ac7sm8755313f8f.23.2025.06.23.00.49.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Jun 2025 00:49:59 -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, andersson@kernel.org, konradybcio@kernel.org Cc: linux-arm-msm@vger.kernel.org, linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 5/5] arm64: dts: qcom: qcm2290: Add venus video node Date: Mon, 23 Jun 2025 09:49:40 +0200 Message-Id: <20250623074940.3445115-6-jorge.ramirez@oss.qualcomm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250623074940.3445115-1-jorge.ramirez@oss.qualcomm.com> References: <20250613140402.3619465-1-jorge.ramirez@oss.qualcomm.com> <20250623074940.3445115-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: 6pP3AO-2d8XasZj0Gd4e5amDc3kqzcNo X-Proofpoint-GUID: 6pP3AO-2d8XasZj0Gd4e5amDc3kqzcNo X-Authority-Analysis: v=2.4 cv=CPUqXQrD c=1 sm=1 tr=0 ts=68590729 cx=c_pps a=hnmNkyzTK/kJ09Xio7VxxA==:117 a=wjE3nLva0YkvARyJ+Gfmxg==:17 a=6IFa9wvqVegA:10 a=EUspDBNiAAAA:8 a=6cNYJS_lEeBOaWCNo2sA:9 a=PEH46H7Ffwr30OY-TuGO:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNjIzMDA0NSBTYWx0ZWRfX4qcb7uLoqWEL AxbWyFSr9Hq7LpQEF7XnHdB7RX7HzdhoQupFJhXVztBM3bgJUdk4dTKYI5eLIWHh3izdwrZDQgV bomyC+EZzq2mkMnKgxU+LCmqa76khTNa9U7bLrXK4bKXtmRlPEUv7yL3+SKYmjfGd0s70Yp7Iqa oo9rOrn86Yq7xvLIkWiYkBQpq2/m74vyBCkNPrS1/2H+E/2obRUC5PZc57W2vqSO9wjQ64WK/K0 TDYRhC6MdBDMfO3c8HhtS6s8hAfQRtTjems/Z3be9fxLDb1K22NeRrQPgQ94Pf3UoVfw4runsAq GS8knO0b/K5u4HUk6Ofv7PS+3uQ52AOwDvXVxc3KGWM76HET28ZOLNzgLd/kpzLlQpz16wKgp8Z 02aDa2C7ql2y8/B4Ghue6Uf1atykENKGR4Gvz3xljTvI05XCxcUmXEIX6ufNn9LrZsxhHJhO 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-23_02,2025-06-20_01,2025-03-28_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 impostorscore=0 lowpriorityscore=0 adultscore=0 mlxscore=0 clxscore=1015 bulkscore=0 priorityscore=1501 malwarescore=0 suspectscore=0 mlxlogscore=999 spamscore=0 classifier=spam authscore=0 authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2505280000 definitions=main-2506230045 Content-Type: text/plain; charset="utf-8" Add DT entries for the qcm2290 venus encoder/decoder. Signed-off-by: Jorge Ramirez-Ortiz Co-developed-by: Loic Poulain Signed-off-by: Loic Poulain --- arch/arm64/boot/dts/qcom/qcm2290.dtsi | 45 +++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/qcm2290.dtsi b/arch/arm64/boot/dts/qc= om/qcm2290.dtsi index f49ac1c1f8a3..b7e789d1f639 100644 --- a/arch/arm64/boot/dts/qcom/qcm2290.dtsi +++ b/arch/arm64/boot/dts/qcom/qcm2290.dtsi @@ -1628,6 +1628,51 @@ 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>; + }; + }; + }; + mdss: display-subsystem@5e00000 { compatible =3D "qcom,qcm2290-mdss"; reg =3D <0x0 0x05e00000 0x0 0x1000>; --=20 2.34.1