From patchwork Mon Nov 25 05:34:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Renjiang Han (QUIC)" X-Patchwork-Id: 13884415 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 712181714B3; Mon, 25 Nov 2024 05:35:18 +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=1732512921; cv=none; b=a+NPZP6LzzC9bcX+8v8offYz5ks2KsNwfoWf5/CZzS2DEhO9i+xDSJl5l/iojv18eQ+aPV/LcS1v1F/TVtwiJNwnUibdGjGSWMvv4feX1JrfQG+0XOMdq34++t0/9I5Lak1n2KjKM9bIxjtPJlL76b9rnkxmiT/rIREuuNs/0V0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732512921; c=relaxed/simple; bh=kcQrYPqIrfhZYQzT9N77XpVrwqSiThU0H+jWfVuRiE4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-ID:References: In-Reply-To:To:CC; b=gQd/m37FeX5LtnhWT5HaJgs53EOgHAyGQaCpWBK4YMTVV4AfpFISzOu3agSOWsxVHY/rFTC9BHejgAmf+wgCnBcXeEBZW613EBaIvb8Ym6g0lOO1E3ACJrZ/WKok/z28PJ6SbeIXC59jotGyDRBSYXz4Ih0LYeluGq++AR4bggU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=gWOhbcUI; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="gWOhbcUI" Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 4AP0iOtf006692; Mon, 25 Nov 2024 05:35:14 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= TcUyi+pznnQBKD8Kg7OGttepW6+uyJWd6n56pmY2aJw=; b=gWOhbcUIGecjPHLr mqyO5QOC2kGWdqvC3Q/Ba3L8APl3a5BNbmMdOyyUI9yB0CdmfYURzvvE5j7dv84p KOcb+HeMrFYc33aOM+awmcRACNJKdSPHtHl3IheLQ214EDmb7mNJ6DS2DC1ekB9f mS12LCrRK3WId1/jiTFAzQ7RCfl9F/5LibER6hTeSJeLngihVp/JF13wXU85M9Z+ wMpqmq81t5qGxnQMI2nh5XVo0cAluTe+SnLF87TcqUxJWUmdeBDwm4TACs86ifgh 0izi8Sta+qZ2hRuofMcMxXmt+e9kBMTO/y1S28gheFDHXMtiYtT1v2cTw+Ekp4pq 6XlTUQ== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4334rd3pgq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 25 Nov 2024 05:35:14 +0000 (GMT) Received: from nalasex01c.na.qualcomm.com (nalasex01c.na.qualcomm.com [10.47.97.35]) by NALASPPMTA03.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 4AP5ZDk4014840 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 25 Nov 2024 05:35:13 GMT Received: from hu-renjiang-sha.qualcomm.com (10.80.80.8) by nalasex01c.na.qualcomm.com (10.47.97.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Sun, 24 Nov 2024 21:35:10 -0800 From: Renjiang Han Date: Mon, 25 Nov 2024 11:04:49 +0530 Subject: [PATCH v3 1/4] dt-bindings: qcom,qcs615-venus: add support for video hardware Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <20241125-add-venus-for-qcs615-v3-1-5a376b97a68e@quicinc.com> References: <20241125-add-venus-for-qcs615-v3-0-5a376b97a68e@quicinc.com> In-Reply-To: <20241125-add-venus-for-qcs615-v3-0-5a376b97a68e@quicinc.com> To: Stanimir Varbanov , Vikash Garodia , Bryan O'Donoghue , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Konrad Dybcio CC: , , , , Renjiang Han X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1732512906; l=5294; i=quic_renjiang@quicinc.com; s=20241001; h=from:subject:message-id; bh=kcQrYPqIrfhZYQzT9N77XpVrwqSiThU0H+jWfVuRiE4=; b=5SL4Bgb5R3BjBTYy5VuKyMPr7fNzSnAHxLxp4ZlIhelMkQIauro6Srcpp4ruwq0DN31n4LE2e Q364X2RhmICDpUoabFFi88HHOMccdgQQJaQHIkk7W70qGpM7LVhVpHk X-Developer-Key: i=quic_renjiang@quicinc.com; a=ed25519; pk=8N59kMJUiVH++5QxJzTyHB/wh/kG5LxQ44j9zhUvZmw= X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01c.na.qualcomm.com (10.47.97.35) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: sHtG1_pa9Myb1Bvw8gd5BySbBY7NvW3K X-Proofpoint-GUID: sHtG1_pa9Myb1Bvw8gd5BySbBY7NvW3K X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.60.29 definitions=2024-09-06_09,2024-09-06_01,2024-09-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 lowpriorityscore=0 bulkscore=0 clxscore=1015 suspectscore=0 priorityscore=1501 malwarescore=0 spamscore=0 adultscore=0 impostorscore=0 phishscore=0 mlxlogscore=955 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2409260000 definitions=main-2411250045 Add support for Qualcomm video acceleration hardware used for video stream decoding and encoding on QCOM QCS615. Signed-off-by: Renjiang Han --- .../bindings/media/qcom,qcs615-venus.yaml | 182 +++++++++++++++++++++ 1 file changed, 182 insertions(+) diff --git a/Documentation/devicetree/bindings/media/qcom,qcs615-venus.yaml b/Documentation/devicetree/bindings/media/qcom,qcs615-venus.yaml new file mode 100644 index 0000000000000000000000000000000000000000..7a3a01ff06d8b62bc2424a0a24857c86c6865f89 --- /dev/null +++ b/Documentation/devicetree/bindings/media/qcom,qcs615-venus.yaml @@ -0,0 +1,182 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/media/qcom,qcs615-venus.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm QCS615 Venus video encode and decode accelerators + +maintainers: + - Stanimir Varbanov + - Vikash Garodia + +description: + The Venus IP is a video encode and decode accelerator present + on Qualcomm platforms + +allOf: + - $ref: qcom,venus-common.yaml# + +properties: + compatible: + const: qcom,qcs615-venus + + power-domains: + minItems: 2 + maxItems: 3 + + power-domain-names: + minItems: 2 + items: + - const: venus + - const: vcodec0 + - const: cx + + clocks: + maxItems: 5 + + clock-names: + items: + - const: core + - const: iface + - const: bus + - const: vcodec0_core + - const: vcodec0_bus + + iommus: + maxItems: 1 + + memory-region: + maxItems: 1 + + interconnects: + maxItems: 2 + + interconnect-names: + items: + - const: video-mem + - const: cpu-cfg + + operating-points-v2: true + + opp-table: + type: object + + video-decoder: + type: object + + additionalProperties: false + + properties: + compatible: + const: venus-decoder + + required: + - compatible + + video-encoder: + type: object + + additionalProperties: false + + properties: + compatible: + const: venus-encoder + + required: + - compatible + +required: + - compatible + - power-domain-names + - iommus + - video-decoder + - video-encoder + +unevaluatedProperties: false + +examples: + - | + #include + #include + #include + #include + + venus: video-codec@aa00000 { + compatible = "qcom,qcs615-venus"; + reg = <0xaa00000 0x100000>; + interrupts = ; + + clocks = <&videocc VIDEO_CC_VENUS_CTL_CORE_CLK>, + <&videocc VIDEO_CC_VENUS_AHB_CLK>, + <&videocc VIDEO_CC_VENUS_CTL_AXI_CLK>, + <&videocc VIDEO_CC_VCODEC0_CORE_CLK>, + <&videocc VIDEO_CC_VCODEC0_AXI_CLK>; + clock-names = "core", + "iface", + "bus", + "vcodec0_core", + "vcodec0_bus"; + + power-domains = <&videocc VENUS_GDSC>, + <&videocc VCODEC0_GDSC>, + <&rpmhpd RPMHPD_CX>; + power-domain-names = "venus", + "vcodec0", + "cx"; + + operating-points-v2 = <&venus_opp_table>; + + interconnects = <&mmss_noc MASTER_VIDEO_P0 0 + &mc_virt SLAVE_EBI1 0>, + <&gem_noc MASTER_APPSS_PROC 0 + &config_noc SLAVE_VENUS_CFG 0>; + interconnect-names = "video-mem", + "cpu-cfg"; + + iommus = <&apps_smmu 0xe40 0x20>; + + memory-region = <&pil_video_mem>; + + video-decoder { + compatible = "venus-decoder"; + }; + + video-encoder { + compatible = "venus-encoder"; + }; + + venus_opp_table: opp-table { + compatible = "operating-points-v2"; + + opp-133330000 { + opp-hz = /bits/ 64 <133330000>; + required-opps = <&rpmhpd_opp_low_svs>; + }; + + opp-240000000 { + opp-hz = /bits/ 64 <240000000>; + required-opps = <&rpmhpd_opp_svs>; + }; + + opp-300000000 { + opp-hz = /bits/ 64 <300000000>; + required-opps = <&rpmhpd_opp_svs_l1>; + }; + + opp-380000000 { + opp-hz = /bits/ 64 <380000000>; + required-opps = <&rpmhpd_opp_nom>; + }; + + opp-410000000 { + opp-hz = /bits/ 64 <410000000>; + required-opps = <&rpmhpd_opp_turbo>; + }; + + opp-460000000 { + opp-hz = /bits/ 64 <460000000>; + required-opps = <&rpmhpd_opp_turbo_l1>; + }; + }; + }; From patchwork Mon Nov 25 05:34:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Renjiang Han (QUIC)" X-Patchwork-Id: 13884416 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 A9C4282866; Mon, 25 Nov 2024 05:35:23 +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=1732512925; cv=none; b=loPp0I6/0vNKN/XanXoEvsb3fubm/vmijy+4OvQ8DS7c1yi3dPTPPay54xF8bU/DirufGtBnc10lDeBB7FrdVJRpnHhUlb6fdf/0jAUoialH74SlWBOXUyix3F6Xd/Rvl5Y548oA+zMJ8JgObsmPtIvfiHBDYPAECzCuehEVG0A= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732512925; c=relaxed/simple; bh=L5y+6FoBMfwDP8m7K2bNaPdAeIfvuJ65U28IdbYMD0c=; h=From:Date:Subject:MIME-Version:Content-Type:Message-ID:References: In-Reply-To:To:CC; b=LQAeA+I60/EvNJOuYADjubtY9doeJby9VcrWtaSuvGZQLWfwXO5y0yFrWcEoHKAFmIyP9sWQslRYRZLNLFQLXR2w2E4OmNsVt6BtVT0u5oPqRfuFfkKarxOO61FEW8Dq3lpx8HZavpBBsDa4QxmNSsyHqMH612xntHKohs4YCq8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=OJNA84Yi; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="OJNA84Yi" 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 4AOMcQW8020148; Mon, 25 Nov 2024 05:35:18 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= DHhZykte0a7xHBxliiaIP4GsdghcPE/ydPEdQu85y/I=; b=OJNA84YiSYVfoL7q v0ZpugKnGy4TvP1/ARXcYZN+Xl5Kto322vkUH3ul85JY+R6CYlAphP98vhI7NsXn d7152BrvnicGl2BZB/4UGQza7Ly1On5DpHMtZlHA6NFGM9uo5njA6qF5y+vos6oO UhNj8A9WPqLW8qLSne4aEkMiyhAgalofDS3jNBRBdlNFP9M/Sr7cccexBSLPdZ4c jKwaM6HKWnRjtjCm+WtFj9YPA3AjupAxl+QvuZGEMV1Oiocifa6DfoBxe+2VLbZS Un0K3ezgE9Cyl9SIsAVdNGQNtd4yO0ECwUeaEaTORAIzegW8eMq/I0slLy2KK/ao TKqgVA== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4334dmuq9t-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 25 Nov 2024 05:35:18 +0000 (GMT) Received: from nalasex01c.na.qualcomm.com (nalasex01c.na.qualcomm.com [10.47.97.35]) by NALASPPMTA05.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 4AP5ZHUM002405 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 25 Nov 2024 05:35:17 GMT Received: from hu-renjiang-sha.qualcomm.com (10.80.80.8) by nalasex01c.na.qualcomm.com (10.47.97.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Sun, 24 Nov 2024 21:35:13 -0800 From: Renjiang Han Date: Mon, 25 Nov 2024 11:04:50 +0530 Subject: [PATCH v3 2/4] media: venus: core: add qcs615 platform data Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <20241125-add-venus-for-qcs615-v3-2-5a376b97a68e@quicinc.com> References: <20241125-add-venus-for-qcs615-v3-0-5a376b97a68e@quicinc.com> In-Reply-To: <20241125-add-venus-for-qcs615-v3-0-5a376b97a68e@quicinc.com> To: Stanimir Varbanov , Vikash Garodia , Bryan O'Donoghue , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Konrad Dybcio CC: , , , , Renjiang Han X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1732512906; l=2956; i=quic_renjiang@quicinc.com; s=20241001; h=from:subject:message-id; bh=L5y+6FoBMfwDP8m7K2bNaPdAeIfvuJ65U28IdbYMD0c=; b=I58/G+aXm4pNxJSBbPkYQuFp/JosXg1FAwMJ7xSUKRgKNo94zllBZGrJ9Km5mSHseKWbueJX/ I5D3UTdeTUuBMIetmf11bwrSppOY+zgrM/t+02gmvKJA9xSvgUskM2k X-Developer-Key: i=quic_renjiang@quicinc.com; a=ed25519; pk=8N59kMJUiVH++5QxJzTyHB/wh/kG5LxQ44j9zhUvZmw= X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01c.na.qualcomm.com (10.47.97.35) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: 9CgGXdD-CDB6mLtu6lR8xRcf--8XOT8q X-Proofpoint-ORIG-GUID: 9CgGXdD-CDB6mLtu6lR8xRcf--8XOT8q X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.60.29 definitions=2024-09-06_09,2024-09-06_01,2024-09-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 priorityscore=1501 mlxlogscore=999 phishscore=0 mlxscore=0 lowpriorityscore=0 suspectscore=0 malwarescore=0 adultscore=0 spamscore=0 impostorscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2409260000 definitions=main-2411250045 Initialize the platform data and enable venus driver probe of QCS615 SoC. Signed-off-by: Renjiang Han --- drivers/media/platform/qcom/venus/core.c | 50 ++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c index 423deb5e94dcb193974da23f9bd2d905bfeab2d9..39d8bcf62fe4f72674746b75994cce6cbaee94eb 100644 --- a/drivers/media/platform/qcom/venus/core.c +++ b/drivers/media/platform/qcom/venus/core.c @@ -630,6 +630,55 @@ static const struct venus_resources msm8998_res = { .fwname = "qcom/venus-4.4/venus.mbn", }; +static const struct freq_tbl qcs615_freq_table[] = { + { 0, 460000000 }, + { 0, 410000000 }, + { 0, 380000000 }, + { 0, 300000000 }, + { 0, 240000000 }, + { 0, 133333333 }, +}; + +static const struct bw_tbl qcs615_bw_table_enc[] = { + { 972000, 951000, 0, 1434000, 0 }, /* 3840x2160@30 */ + { 489600, 723000, 0, 973000, 0 }, /* 1920x1080@60 */ + { 244800, 370000, 0, 495000, 0 }, /* 1920x1080@30 */ +}; + +static const struct bw_tbl qcs615_bw_table_dec[] = { + { 1036800, 1987000, 0, 2797000, 0 }, /* 4096x2160@30 */ + { 489600, 1040000, 0, 1298000, 0 }, /* 1920x1080@60 */ + { 244800, 530000, 0, 659000, 0 }, /* 1920x1080@30 */ +}; + +static const struct venus_resources qcs615_res = { + .freq_tbl = qcs615_freq_table, + .freq_tbl_size = ARRAY_SIZE(qcs615_freq_table), + .bw_tbl_enc = qcs615_bw_table_enc, + .bw_tbl_enc_size = ARRAY_SIZE(qcs615_bw_table_enc), + .bw_tbl_dec = qcs615_bw_table_dec, + .bw_tbl_dec_size = ARRAY_SIZE(qcs615_bw_table_dec), + .clks = {"core", "iface", "bus" }, + .clks_num = 3, + .vcodec0_clks = { "vcodec0_core", "vcodec0_bus" }, + .vcodec_clks_num = 2, + .vcodec_pmdomains = (const char *[]) { "venus", "vcodec0" }, + .vcodec_pmdomains_num = 2, + .opp_pmdomain = (const char *[]) { "cx" }, + .vcodec_num = 1, + .hfi_version = HFI_VERSION_4XX, + .vpu_version = VPU_VERSION_AR50, + .vmem_id = VIDC_RESOURCE_NONE, + .vmem_size = 0, + .vmem_addr = 0, + .dma_mask = 0xe0000000 - 1, + .cp_start = 0, + .cp_size = 0x70800000, + .cp_nonpixel_start = 0x1000000, + .cp_nonpixel_size = 0x24800000, + .fwname = "qcom/venus-5.4/venus_s6.mbn", +}; + static const struct freq_tbl sdm660_freq_table[] = { { 979200, 518400000 }, { 489600, 441600000 }, @@ -937,6 +986,7 @@ static const struct of_device_id venus_dt_match[] = { { .compatible = "qcom,msm8916-venus", .data = &msm8916_res, }, { .compatible = "qcom,msm8996-venus", .data = &msm8996_res, }, { .compatible = "qcom,msm8998-venus", .data = &msm8998_res, }, + { .compatible = "qcom,qcs615-venus", .data = &qcs615_res, }, { .compatible = "qcom,sdm660-venus", .data = &sdm660_res, }, { .compatible = "qcom,sdm845-venus", .data = &sdm845_res, }, { .compatible = "qcom,sdm845-venus-v2", .data = &sdm845_res_v2, }, From patchwork Mon Nov 25 05:34:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Renjiang Han (QUIC)" X-Patchwork-Id: 13884417 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 60A37188587; Mon, 25 Nov 2024 05:35:26 +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=1732512928; cv=none; b=bhLWW0XzLictBf/62Af0pl7bQQJK2oELnfBmKLWftqukkj5XVNXdN2FTBQHqfjUP1zDCNCQuRRC5FMhqEPp5kunhWD1xRMtzzHlUy8p/cExhJNUNYsT+S0qzMsRED/e+idsGK4QmcFXmr3chSewEdZOSQze10QVydIxFhJLkrL8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732512928; c=relaxed/simple; bh=2IAN0GkBPGdzI2DVRoi+bNAHMQKiOhqBBfc1P/mSgkI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-ID:References: In-Reply-To:To:CC; b=Zgtvnpp9cQqsdQBZsxNj9lUnENTT6pc4Ek/UyPd4LCrlZOBaQ3Ff7X57wYB/0lSSjT64FZ52ycMj/THEakF/NSPZuWyy1Y6qh93hETd38ZRcKF8hHdEJqeBEjRNnvfsbYW1t5fM9ApBsTq5xD+PgiInLqK/AFQan+3OA8GCX5K4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=c/tphbKV; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="c/tphbKV" 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 4AONKBae000388; Mon, 25 Nov 2024 05:35:22 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= hxT1CXGpL+q39AIXGREm3YgkjDQb7tBNeBjYiXUmYpE=; b=c/tphbKVPvGjTGu7 InwdOj/dwgMLLJ5pj+2NDmCd1Pka/EQppSFbYKxV7pzwbObMCyulkiECoxjXRGVI taUk5XS8lwOYxwbeZbyC1DtMSQCDb//nIqEP6Fe8fPkKz+GTaXqt/QtvLP+zSQXM 89JSYZHiPOvpU+74Y/oh5AllwwPGKLumk4mgkt/XGQpGrSODpiA5lAyIoHwYD1JT rN+CatANt5gjkLWu3Kinq482VHGO/ZMZQbM9kg8/b6pmaQS5MrjbroJB46W35U/j XET0eRFPn9C/xaWz70O5dpmT0yoUuVklcAcHnr2wiipyWT8e9BSeoJI7PBPRO4yF VMGOqw== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4336mxbg05-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 25 Nov 2024 05:35:22 +0000 (GMT) Received: from nalasex01c.na.qualcomm.com (nalasex01c.na.qualcomm.com [10.47.97.35]) by NALASPPMTA01.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 4AP5ZKGk031802 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 25 Nov 2024 05:35:20 GMT Received: from hu-renjiang-sha.qualcomm.com (10.80.80.8) by nalasex01c.na.qualcomm.com (10.47.97.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Sun, 24 Nov 2024 21:35:17 -0800 From: Renjiang Han Date: Mon, 25 Nov 2024 11:04:51 +0530 Subject: [PATCH v3 3/4] arm64: dts: qcom: add venus node for the qcs615 Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <20241125-add-venus-for-qcs615-v3-3-5a376b97a68e@quicinc.com> References: <20241125-add-venus-for-qcs615-v3-0-5a376b97a68e@quicinc.com> In-Reply-To: <20241125-add-venus-for-qcs615-v3-0-5a376b97a68e@quicinc.com> To: Stanimir Varbanov , Vikash Garodia , Bryan O'Donoghue , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Konrad Dybcio CC: , , , , Renjiang Han X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1732512906; l=3011; i=quic_renjiang@quicinc.com; s=20241001; h=from:subject:message-id; bh=2IAN0GkBPGdzI2DVRoi+bNAHMQKiOhqBBfc1P/mSgkI=; b=F6jYi9+2P4lqXd6M0shnAuLkLEdJtMdXvDSBh6GcZ2g8/0EsaIffbK+83ucn2HPf9FSaLpYk2 V2fZdpvQKO5Ah99JxJjJ1wvpg6LO9lSSMJbkaJqHACZQYvw5K0t4zyK X-Developer-Key: i=quic_renjiang@quicinc.com; a=ed25519; pk=8N59kMJUiVH++5QxJzTyHB/wh/kG5LxQ44j9zhUvZmw= X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01c.na.qualcomm.com (10.47.97.35) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: gJFmN9kOExkvRVSKxyYW-YV22HniflF2 X-Proofpoint-GUID: gJFmN9kOExkvRVSKxyYW-YV22HniflF2 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.60.29 definitions=2024-09-06_09,2024-09-06_01,2024-09-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 mlxscore=0 adultscore=0 impostorscore=0 phishscore=0 spamscore=0 lowpriorityscore=0 clxscore=1015 suspectscore=0 bulkscore=0 priorityscore=1501 mlxlogscore=676 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2409260000 definitions=main-2411250045 Add venus node into devicetree for the qcs615 video. Signed-off-by: Renjiang Han --- arch/arm64/boot/dts/qcom/qcs615.dtsi | 86 ++++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/qcs615.dtsi b/arch/arm64/boot/dts/qcom/qcs615.dtsi index 06deb5c499fe83f0eb20d7957ca14948de7aab34..18ad4da5ed194458aded424560f45a3a9f3163dc 100644 --- a/arch/arm64/boot/dts/qcom/qcs615.dtsi +++ b/arch/arm64/boot/dts/qcom/qcs615.dtsi @@ -394,6 +394,11 @@ smem_region: smem@86000000 { no-map; hwlocks = <&tcsr_mutex 3>; }; + + pil_video_mem: pil-video@93400000 { + reg = <0x0 0x93400000 0x0 0x500000>; + no-map; + }; }; soc: soc@0 { @@ -530,6 +535,87 @@ gem_noc: interconnect@9680000 { qcom,bcm-voters = <&apps_bcm_voter>; }; + venus: video-codec@aa00000 { + compatible = "qcom,qcs615-venus"; + reg = <0x0 0xaa00000 0x0 0x100000>; + interrupts = ; + + clocks = <&videocc VIDEO_CC_VENUS_CTL_CORE_CLK>, + <&videocc VIDEO_CC_VENUS_AHB_CLK>, + <&videocc VIDEO_CC_VENUS_CTL_AXI_CLK>, + <&videocc VIDEO_CC_VCODEC0_CORE_CLK>, + <&videocc VIDEO_CC_VCODEC0_AXI_CLK>; + clock-names = "core", + "iface", + "bus", + "vcodec0_core", + "vcodec0_bus"; + + power-domains = <&videocc VENUS_GDSC>, + <&videocc VCODEC0_GDSC>, + <&rpmhpd RPMHPD_CX>; + power-domain-names = "venus", + "vcodec0", + "cx"; + + operating-points-v2 = <&venus_opp_table>; + + interconnects = <&mmss_noc MASTER_VIDEO_P0 0 + &mc_virt SLAVE_EBI1 0>, + <&gem_noc MASTER_APPSS_PROC 0 + &config_noc SLAVE_VENUS_CFG 0>; + interconnect-names = "video-mem", + "cpu-cfg"; + + iommus = <&apps_smmu 0xe40 0x20>; + + memory-region = <&pil_video_mem>; + + status = "disabled"; + + video-decoder { + compatible = "venus-decoder"; + }; + + video-encoder { + compatible = "venus-encoder"; + }; + + venus_opp_table: opp-table { + compatible = "operating-points-v2"; + + opp-133330000 { + opp-hz = /bits/ 64 <133330000>; + required-opps = <&rpmhpd_opp_low_svs>; + }; + + opp-240000000 { + opp-hz = /bits/ 64 <240000000>; + required-opps = <&rpmhpd_opp_svs>; + }; + + opp-300000000 { + opp-hz = /bits/ 64 <300000000>; + required-opps = <&rpmhpd_opp_svs_l1>; + }; + + opp-380000000 { + opp-hz = /bits/ 64 <380000000>; + required-opps = <&rpmhpd_opp_nom>; + }; + + opp-410000000 { + opp-hz = /bits/ 64 <410000000>; + required-opps = <&rpmhpd_opp_turbo>; + }; + + opp-460000000 { + opp-hz = /bits/ 64 <460000000>; + required-opps = <&rpmhpd_opp_turbo_l1>; + }; + }; + }; + videocc: clock-controller@ab00000 { compatible = "qcom,qcs615-videocc"; reg = <0 0xab00000 0 0x10000>; From patchwork Mon Nov 25 05:34:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Renjiang Han (QUIC)" X-Patchwork-Id: 13884418 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 D829116C684; Mon, 25 Nov 2024 05:35:29 +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=1732512931; cv=none; b=MW6OO2F5RDy6KoD8ww5CjDigl4YgFco+q/t+3mt01uUYV1Q0CCdZVmkUleFjS1Pm1pgJ4s0dSlK8s9kXptrede2tbAgP9wWA1Q9SbyNm43ytBHvyebtmgdAIsTxVtQJLdH2Wn/4xMYpPGr6knj5LREup4lcK/Jhr2CMwdeYUYI0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732512931; c=relaxed/simple; bh=HYx2Ssi6G4xy4zmQ6EwnKL/0RzrjW6bmidoYIfWmtWc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-ID:References: In-Reply-To:To:CC; b=ufV8fHLkmTgbY6w5iHk8gS2IgAfk3O8mCZgLTGD8VjwnpFq0siTMKC/IBBSFe9ImRvL1vaaDrD1w4pgVENdj8kmIK2RMVokGF10AfnfrjP/BF9NN90nZ0lDWCs/V/3lILVnAGQSeemc5Y+7QO6XUwYfmsCNphjWy4PKSobpzt5g= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=hAH0Crip; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="hAH0Crip" 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 4AOMZO4k020756; Mon, 25 Nov 2024 05:35:25 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= hNH/IDTZxakgrflJYx1y1/z3YZ9A68RzinyXpAvjJxI=; b=hAH0CripofPC38xM gzaNG2Ig2T63s1kWhhp+9FoJppXurAptopq6BZpvLp0TGvzBRcNSCVgEbA5oKyCn uKbn69G34gMmkPo2+DfDS5yJjl0xFaiSgPgGlLgegyAc5hmWd3Pgf5abQ6xgoGTH Zh7hirHtHogq5vnOglAROxp7HiqOENsh+6XZF9COtVHSBUMudAngxSC9WX6c3dzk oEzQSfLny0AUJDAIhurTq3aFeEE1UAj4+lM+gk9FA7AhSFYj0EC/3hhuC24cp5XM pK1iNjMlRx/OcQazJ52c2sDdbAzOKW3r3UIyNhs/UW1VoI7qLPxAkTMVtZe+SIQX /qtAGQ== Received: from nalasppmta02.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 43374sufjy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 25 Nov 2024 05:35:25 +0000 (GMT) Received: from nalasex01c.na.qualcomm.com (nalasex01c.na.qualcomm.com [10.47.97.35]) by NALASPPMTA02.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 4AP5ZOWa018472 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 25 Nov 2024 05:35:24 GMT Received: from hu-renjiang-sha.qualcomm.com (10.80.80.8) by nalasex01c.na.qualcomm.com (10.47.97.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Sun, 24 Nov 2024 21:35:21 -0800 From: Renjiang Han Date: Mon, 25 Nov 2024 11:04:52 +0530 Subject: [PATCH v3 4/4] arm64: dts: qcom: qcs615-ride: enable venus node Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <20241125-add-venus-for-qcs615-v3-4-5a376b97a68e@quicinc.com> References: <20241125-add-venus-for-qcs615-v3-0-5a376b97a68e@quicinc.com> In-Reply-To: <20241125-add-venus-for-qcs615-v3-0-5a376b97a68e@quicinc.com> To: Stanimir Varbanov , Vikash Garodia , Bryan O'Donoghue , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Konrad Dybcio CC: , , , , Renjiang Han X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1732512906; l=668; i=quic_renjiang@quicinc.com; s=20241001; h=from:subject:message-id; bh=HYx2Ssi6G4xy4zmQ6EwnKL/0RzrjW6bmidoYIfWmtWc=; b=3jajviKSSSszhsJ/LR9IyfB8UERuCTaioHgD+J+2TJwv6fF50g41pPN/yDIEbYGNqKCNgZmOp S5W5NlZDYugC9U+3ZgxCWrzSikgkaB01sTG5rTD1z54Q1RqU4vppPSn X-Developer-Key: i=quic_renjiang@quicinc.com; a=ed25519; pk=8N59kMJUiVH++5QxJzTyHB/wh/kG5LxQ44j9zhUvZmw= X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01c.na.qualcomm.com (10.47.97.35) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: F7U5v374sGcJ6SKYIaMY0MBsqukLujYT X-Proofpoint-ORIG-GUID: F7U5v374sGcJ6SKYIaMY0MBsqukLujYT X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.60.29 definitions=2024-09-06_09,2024-09-06_01,2024-09-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 lowpriorityscore=0 mlxlogscore=633 bulkscore=0 malwarescore=0 adultscore=0 priorityscore=1501 spamscore=0 mlxscore=0 impostorscore=0 phishscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2409260000 definitions=main-2411250045 Enable the venus node so that the video codec will start working. Signed-off-by: Renjiang Han --- arch/arm64/boot/dts/qcom/qcs615-ride.dts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/qcs615-ride.dts b/arch/arm64/boot/dts/qcom/qcs615-ride.dts index 4ef969a6af150933c72a7a83374a5a2657eebc1b..4a7bfffb7b86b21c412b16426019c9063368ca19 100644 --- a/arch/arm64/boot/dts/qcom/qcs615-ride.dts +++ b/arch/arm64/boot/dts/qcom/qcs615-ride.dts @@ -217,6 +217,10 @@ &uart0 { status = "okay"; }; +&venus { + status = "okay"; +}; + &watchdog { clocks = <&sleep_clk>; };