From patchwork Tue Dec 17 09:17:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Renjiang Han X-Patchwork-Id: 13911447 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 E12C61DED7C; Tue, 17 Dec 2024 09:18:23 +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=1734427105; cv=none; b=bTRviIhOXbudvQP9XLlJ1BJkD+5vbbCybTMfKE//TH38dHCAQyNrdU/4vSKzIdpd/OL7cQptzyZ5aZv5NAQ0A7Hid4bNiw2BBwCniMVejD7nzjmiCcUmMsBVbFrYcU+XTNHGkjfEU4jGDDEB68wJwHTxOG5P4zp66KjUr0rwhhs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734427105; c=relaxed/simple; bh=06b8lLGqvb6UoPzTfPWeex1Kku4lZh7ho91BtL1ijKo=; h=From:Date:Subject:MIME-Version:Content-Type:Message-ID:References: In-Reply-To:To:CC; b=mlIMrVItJW1rdGsfamdo6DoznFBdsDqm7ZTfFAfBs5SWo5n7TjNuDuVfbeIyAUje2xB+o2utpptRRzQPw+1HKoSusF8Mtjr0mo/acjwUWZx/MJJudB6rJtSUNotdkm704jevPsJ3Ghpum99dtC5hb6PYzpet/gTAVEsDtIjtnos= 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=k2Q2r9IX; 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="k2Q2r9IX" 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 4BH82YCA002863; Tue, 17 Dec 2024 09:18:20 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= 1OSQhARwNrSvwT+L+qHgmEH0juK0IqB5r39SAxKWeA4=; b=k2Q2r9IXcdw8AgFi SvDKQcSdtzPSgY3nr6HgY3v7cZBdAIa93fMQVU6LDZguPC9P67Kn/zBIOjpZYlwx W/6l8tAKiN9A1lspt8u4fl/YKGv6MaoNOazrOjF6w+hAXVTg3bSVvUGg03+5Gfu6 HPahvFMk+FfHbTt9JnsMazbVtk9HflkYc6i8QC1yYL0UXlmk/NThd3QBofVxaYzr EcAF/u/NdK11X38Mwijo4TThNtzlkQF85k/ffCYJ3m5VW5oe+yh0eHUJ4FthaTQR XL+y/+n9xAq3FaDzfEzENnNcUdqtSOjYGEfvfWG3Q6NB5Wqpz9R1am9yYIfnmtBV F6QTbw== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 43k5ek06eb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 17 Dec 2024 09:18:20 +0000 (GMT) Received: from nalasex01c.na.qualcomm.com (nalasex01c.na.qualcomm.com [10.47.97.35]) by NALASPPMTA04.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 4BH9IJEB000565 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 17 Dec 2024 09:18:19 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; Tue, 17 Dec 2024 01:18:16 -0800 From: Renjiang Han Date: Tue, 17 Dec 2024 14:47:37 +0530 Subject: [PATCH v5 1/4] dt-bindings: media: 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: <20241217-add-venus-for-qcs615-v5-1-747395d9e630@quicinc.com> References: <20241217-add-venus-for-qcs615-v5-0-747395d9e630@quicinc.com> In-Reply-To: <20241217-add-venus-for-qcs615-v5-0-747395d9e630@quicinc.com> To: Stanimir Varbanov , Vikash Garodia , Bryan O'Donoghue , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Konrad Dybcio CC: , , , , "Stanimir Varbanov" , Renjiang Han X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1734427092; l=1032; i=quic_renjiang@quicinc.com; s=20241001; h=from:subject:message-id; bh=06b8lLGqvb6UoPzTfPWeex1Kku4lZh7ho91BtL1ijKo=; b=FC/PRWpyeEIh2gTTfT2gp+kEGOFYc/udsQVO9HFlFkvoId2xu1O2s3lckspDmpPA49rm80eZr Sp93GONqot/AAAWJWF7ZwwgHorGj3CpzeH95y9hUl8y/AQuvd1Wtq2k X-Developer-Key: i=quic_renjiang@quicinc.com; a=ed25519; pk=8N59kMJUiVH++5QxJzTyHB/wh/kG5LxQ44j9zhUvZmw= X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) 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: 33DcLI4bg9qwRT_XwALBBKKTo8ASG2P4 X-Proofpoint-ORIG-GUID: 33DcLI4bg9qwRT_XwALBBKKTo8ASG2P4 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 phishscore=0 malwarescore=0 priorityscore=1501 impostorscore=0 mlxlogscore=999 spamscore=0 mlxscore=0 adultscore=0 bulkscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2411120000 definitions=main-2412170076 Add qcom,qcs615-venus compatible into qcom,sc7180-venus.yaml for the video, and let qcom,qcs615-venus fallback to qcom,sc7180-venus on QCS615 platform. Signed-off-by: Renjiang Han --- Documentation/devicetree/bindings/media/qcom,sc7180-venus.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/media/qcom,sc7180-venus.yaml b/Documentation/devicetree/bindings/media/qcom,sc7180-venus.yaml index 5cec1d077cda77817f6d876109defcb0abbfeb2c..de628709fe43b1f3261820b89c65e6eb4dd352e2 100644 --- a/Documentation/devicetree/bindings/media/qcom,sc7180-venus.yaml +++ b/Documentation/devicetree/bindings/media/qcom,sc7180-venus.yaml @@ -18,7 +18,12 @@ allOf: properties: compatible: - const: qcom,sc7180-venus + oneOf: + - items: + - enum: + - qcom,qcs615-venus + - const: qcom,sc7180-venus + - const: qcom,sc7180-venus power-domains: minItems: 2 From patchwork Tue Dec 17 09:17:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Renjiang Han X-Patchwork-Id: 13911450 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 CEDD41DEFCD; Tue, 17 Dec 2024 09:18:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734427113; cv=none; b=shS4ZP5njRuZ6uDmnYMkkSVzFBYIfCHIE3LMc/H1BdbRNmmomwdEZGIDmERi5my9RqaVPQXI1TXQsfRadyuEem4EOd2m+LrDBS7dCHlDkGP1yEYKw+wjHQdRoyfThmni3BXazvzqkf3RoqPZiJzbC3xipg5iETbmPFLqUfqTQ4E= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734427113; c=relaxed/simple; bh=lbGubnC5ljfHPKTpjMM8t1KJhwu4tczHJG9CDSSHgZQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-ID:References: In-Reply-To:To:CC; b=FhhwZytMqfEg+qmDEd38aZAoohXAbwojO+VsCSZYVgvuAz791gPl4WzADbxl2Rxq05feu4BnAa8bpMG6NxYl0LclQNjE0kTeyJ/e5hf3ZRus5MynyluSTEGoOsY0VQ0/aEDnODrKBh5TUXBeKFZySaImUCeo63JKprSmSr7/fMI= 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=GY+YKShX; 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="GY+YKShX" 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 4BH95f0U023906; Tue, 17 Dec 2024 09:18:24 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= jskFk3aNdibrhc0qsYRPx86ht7Uv3FtKg5xBPZs9ki8=; b=GY+YKShXOSg/skRX uBTaRdzCHKBDhQlyrw+FopurULRX25xNYcSl7sPbp7paZAqk74kgf5Q8wUit78Lj IfSJs+T8EmfICjg08t5r1/EDJWrYnKJGIef2sutmU3MoDYhjmytAIbTlfm6+lQQc XTfVx6rLaJiDMjMWM7VLgRJnHfJ8BEKsNmVDzVECJFnHCIRzZrVLEOWeaIJMJKdp XegiNNkocVCKj3Vq4n9pRrjw31li22ZOQi+CTlxW7RsXj2Q+bndiK0qYGKQOWpLT WnwgmbfAxUfxatj+9vDlAdUE3hwp1s9M2MpER8g0I6ayFnYJ6YU0piwuReYJMd1y kGkUHg== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 43k6c8g17h-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 17 Dec 2024 09:18:24 +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 4BH9IN7M030620 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 17 Dec 2024 09:18:23 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; Tue, 17 Dec 2024 01:18:19 -0800 From: Renjiang Han Date: Tue, 17 Dec 2024 14:47:38 +0530 Subject: [PATCH v5 2/4] media: venus: core: use opp-table for the frequency Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <20241217-add-venus-for-qcs615-v5-2-747395d9e630@quicinc.com> References: <20241217-add-venus-for-qcs615-v5-0-747395d9e630@quicinc.com> In-Reply-To: <20241217-add-venus-for-qcs615-v5-0-747395d9e630@quicinc.com> To: Stanimir Varbanov , Vikash Garodia , Bryan O'Donoghue , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Konrad Dybcio CC: , , , , "Stanimir Varbanov" , Renjiang Han X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1734427092; l=3890; i=quic_renjiang@quicinc.com; s=20241001; h=from:subject:message-id; bh=lbGubnC5ljfHPKTpjMM8t1KJhwu4tczHJG9CDSSHgZQ=; b=nhkSPlCydd/6U9eKysHWqdbBT9LYOHk7Ko1qYUqsci7eitTO8R+fKiduoWu1t3L7ntVRFCIZ/ UZ5FOZaQzkYC2QG+vywcEqZGDzp4drbt8Z88+1WbiCKSFAMRm8+srh6 X-Developer-Key: i=quic_renjiang@quicinc.com; a=ed25519; pk=8N59kMJUiVH++5QxJzTyHB/wh/kG5LxQ44j9zhUvZmw= X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) 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: PKJbEcKJqBR0OxzduPVIUPW4nIa1mQNv X-Proofpoint-ORIG-GUID: PKJbEcKJqBR0OxzduPVIUPW4nIa1mQNv 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 bulkscore=0 spamscore=0 mlxscore=0 lowpriorityscore=0 priorityscore=1501 adultscore=0 suspectscore=0 mlxlogscore=999 malwarescore=0 clxscore=1015 impostorscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2411120000 definitions=main-2412170076 Get frequency value from the opp-table of devicetree for the v4 core. For compatibility, if getting data from the opp table fails, the data in the frequency table will be used. Signed-off-by: Renjiang Han --- drivers/media/platform/qcom/venus/pm_helpers.c | 53 +++++++++++++++++++------- 1 file changed, 39 insertions(+), 14 deletions(-) diff --git a/drivers/media/platform/qcom/venus/pm_helpers.c b/drivers/media/platform/qcom/venus/pm_helpers.c index 33a5a659c0ada0ca97eebb5522c5f349f95c49c7..b61c0ad152878870b7223efa274e137d3636433b 100644 --- a/drivers/media/platform/qcom/venus/pm_helpers.c +++ b/drivers/media/platform/qcom/venus/pm_helpers.c @@ -43,14 +43,20 @@ static int core_clks_enable(struct venus_core *core) const struct venus_resources *res = core->res; const struct freq_tbl *freq_tbl = core->res->freq_tbl; unsigned int freq_tbl_size = core->res->freq_tbl_size; + struct device *dev = core->dev; + struct dev_pm_opp *opp; unsigned long freq; unsigned int i; int ret; - if (!freq_tbl) - return -EINVAL; - - freq = freq_tbl[freq_tbl_size - 1].freq; + opp = dev_pm_opp_find_freq_ceil(dev, &freq); + if (IS_ERR(opp)) { + if (!freq_tbl) + return -EINVAL; + freq = freq_tbl[freq_tbl_size - 1].freq; + } else { + dev_pm_opp_put(opp); + } for (i = 0; i < res->clks_num; i++) { if (IS_V6(core)) { @@ -627,12 +633,15 @@ min_loaded_core(struct venus_inst *inst, u32 *min_coreid, u32 *min_load, bool lo static int decide_core(struct venus_inst *inst) { + const struct freq_tbl *freq_tbl = inst->core->res->freq_tbl; const u32 ptype = HFI_PROPERTY_CONFIG_VIDEOCORES_USAGE; struct venus_core *core = inst->core; u32 min_coreid, min_load, cur_inst_load; u32 min_lp_coreid, min_lp_load, cur_inst_lp_load; struct hfi_videocores_usage_type cu; - unsigned long max_freq; + unsigned long max_freq = ULONG_MAX; + struct device *dev = core->dev; + struct dev_pm_opp *opp; int ret = 0; if (legacy_binding) { @@ -655,7 +664,11 @@ static int decide_core(struct venus_inst *inst) cur_inst_lp_load *= inst->clk_data.low_power_freq; /*TODO : divide this inst->load by work_route */ - max_freq = core->res->freq_tbl[0].freq; + opp = dev_pm_opp_find_freq_floor(dev, &max_freq); + if (IS_ERR(opp)) + max_freq = freq_tbl[0].freq; + else + dev_pm_opp_put(opp); min_loaded_core(inst, &min_coreid, &min_load, false); min_loaded_core(inst, &min_lp_coreid, &min_lp_load, true); @@ -1078,7 +1091,9 @@ static int load_scale_v4(struct venus_inst *inst) unsigned int num_rows = core->res->freq_tbl_size; struct device *dev = core->dev; unsigned long freq = 0, freq_core1 = 0, freq_core2 = 0; + unsigned long max_freq = ULONG_MAX; unsigned long filled_len = 0; + struct dev_pm_opp *opp; int i, ret = 0; for (i = 0; i < inst->num_input_bufs; i++) @@ -1104,19 +1119,29 @@ static int load_scale_v4(struct venus_inst *inst) freq = max(freq_core1, freq_core2); - if (freq > table[0].freq) { - dev_dbg(dev, VDBGL "requested clock rate: %lu scaling clock rate : %lu\n", - freq, table[0].freq); + opp = dev_pm_opp_find_freq_floor(dev, &max_freq); + if (IS_ERR(opp)) + max_freq = table[0].freq; + else + dev_pm_opp_put(opp); - freq = table[0].freq; + if (freq > max_freq) { + dev_dbg(dev, VDBGL "requested clock rate: %lu scaling clock rate : %lu\n", + freq, max_freq); + freq = max_freq; goto set_freq; } - for (i = num_rows - 1 ; i >= 0; i--) { - if (freq <= table[i].freq) { - freq = table[i].freq; - break; + opp = dev_pm_opp_find_freq_ceil(dev, &freq); + if (IS_ERR(opp)) { + for (i = num_rows - 1 ; i >= 0; i--) { + if (freq <= table[i].freq) { + freq = table[i].freq; + break; + } } + } else { + dev_pm_opp_put(opp); } set_freq: From patchwork Tue Dec 17 09:17:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Renjiang Han X-Patchwork-Id: 13911449 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 83DF11DED7B; Tue, 17 Dec 2024 09:18:31 +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=1734427113; cv=none; b=OZP+YYCfz7Sp+lCdzx7xdDkpTDOwjFQzTLm90GaHZkGHqydCOzmrKJxeL4A9h4Jr9Kgyq8yKDk3ZEVW+g+BTcFawXsikMnhzdjdBVNdt9Zwxluy4QXVNKv/L+3BnwlicuvSFCrNhlxCSwZIuOrfrOgGYuV03y2ROKgKl4uqR5Q4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734427113; c=relaxed/simple; bh=uTSY4z0MGeT9RR8dSnwA5qg/wvyJsYhU49oOq1m6/qk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-ID:References: In-Reply-To:To:CC; b=lFJ9TMiCBW4AfWavdvnTX/EGx+g6t9hYXjSmjivf8QYypuCZ+eQ8BPAFX1a+DO5fgUQyClsjHbqLo4LYlLcjmjAsFMp55rY9bPny3c05QBE4Ehx1QQivkxkXJb034lOrrMy2CNp1aPBlODiscW+cndM80uES/rT7KqXUxfK6Vs8= 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=mrxQWJg8; 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="mrxQWJg8" Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 4BH57eHx016394; Tue, 17 Dec 2024 09:18:27 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= 33ypJSRHynebSzHjf9Mh5CBdBQqzX2XOz+i4vngPg0g=; b=mrxQWJg8AEmq59VF 6Pb/kPY65GH0F3WI5wIzy6DW7bMRzIQcmXhagWrLyaBQyoun42VNhJAPROyFQHmM aGmNelspHJ496e0OdynSJQEtSMmHzIEQ/GpokaVNAV15p2ohvYnOdvrgpPtt7EGW tp/t8FycqQsfcMHXGkBGovaMepU6yegrXLVzs+Zt82oQWMME6HEYQUi0HUxKNsGb AikXeprdKmtzUSTwgQCJJt6msfNuxtT2Uv/as5bomMmNqaQo1MxasKTfZxrvQOJd MfMS98yJ00eJEHFH1W7rj5ha1bd22XDoYeeATDmXNHRMbOZ6tzDJYxWAomt3iljo 7GKytA== Received: from nalasppmta02.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 43k2vngkm0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 17 Dec 2024 09:18:27 +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 4BH9IQCC014902 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 17 Dec 2024 09:18:26 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; Tue, 17 Dec 2024 01:18:23 -0800 From: Renjiang Han Date: Tue, 17 Dec 2024 14:47:39 +0530 Subject: [PATCH v5 3/4] arm64: dts: qcom: qcs615: add 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: <20241217-add-venus-for-qcs615-v5-3-747395d9e630@quicinc.com> References: <20241217-add-venus-for-qcs615-v5-0-747395d9e630@quicinc.com> In-Reply-To: <20241217-add-venus-for-qcs615-v5-0-747395d9e630@quicinc.com> To: Stanimir Varbanov , Vikash Garodia , Bryan O'Donoghue , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Konrad Dybcio CC: , , , , "Stanimir Varbanov" , Renjiang Han X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1734427092; l=3165; i=quic_renjiang@quicinc.com; s=20241001; h=from:subject:message-id; bh=uTSY4z0MGeT9RR8dSnwA5qg/wvyJsYhU49oOq1m6/qk=; b=7ugu2Zp00oe7I0jEZojFYaxqMbRiLkI3xgmBYI00+HbPIzu7RfYOm98LoQ3LTbOOXeZGXiZj+ DwEIeJ3Ct5TB1mygQmcTaaZ4CSc+5yq5zOi0G6d5HYiLRwr8vpKbzMI X-Developer-Key: i=quic_renjiang@quicinc.com; a=ed25519; pk=8N59kMJUiVH++5QxJzTyHB/wh/kG5LxQ44j9zhUvZmw= X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) 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: yXnFO7KEZVkR7-m3kv2oRMW9fnoFvTzT X-Proofpoint-ORIG-GUID: yXnFO7KEZVkR7-m3kv2oRMW9fnoFvTzT 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 bulkscore=0 adultscore=0 mlxlogscore=689 impostorscore=0 mlxscore=0 suspectscore=0 lowpriorityscore=0 clxscore=1015 priorityscore=1501 malwarescore=0 spamscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2411120000 definitions=main-2412170075 Add venus node into devicetree for the qcs615 video and fallback qcs615 to sc7180 due to the same video core. 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 37a189e0834d2f4b75ed9deb6fff73da163cb3a3..e92a0d90a4606a450f160c1ed9ee84c16b9c22cf 100644 --- a/arch/arm64/boot/dts/qcom/qcs615.dtsi +++ b/arch/arm64/boot/dts/qcom/qcs615.dtsi @@ -427,6 +427,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 { @@ -2806,6 +2811,87 @@ gem_noc: interconnect@9680000 { qcom,bcm-voters = <&apps_bcm_voter>; }; + venus: video-codec@aa00000 { + compatible = "qcom,qcs615-venus", "qcom,sc7180-venus"; + reg = <0x0 0x0aa00000 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 QCOM_ICC_TAG_ALWAYS + &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>, + <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS + &config_noc SLAVE_VENUS_CFG QCOM_ICC_TAG_ALWAYS>; + interconnect-names = "video-mem", + "cpu-cfg"; + + iommus = <&apps_smmu 0xe40 0x20>; + + memory-region = <&pil_video_mem>; + + status = "disabled"; + + 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>; + }; + }; + + video-decoder { + compatible = "venus-decoder"; + }; + + video-encoder { + compatible = "venus-encoder"; + }; + }; + videocc: clock-controller@ab00000 { compatible = "qcom,qcs615-videocc"; reg = <0 0xab00000 0 0x10000>; From patchwork Tue Dec 17 09:17:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Renjiang Han X-Patchwork-Id: 13911451 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 4B2901F191B; Tue, 17 Dec 2024 09:18:35 +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=1734427116; cv=none; b=AacBxBdECr02qiTs+vB4tgolLfQYOZvCKxjF4P1fTCcnd1ucU4w/o37OM0u0cJDJKBg/4rEB8CxDBXCZtsN7HZJM7pezGLt9bLTqorYoRfgl+xT8i7Y7mgWT7sSorZX2JoG33I9855jQBb1FTyXbvl45989p3vlKZh9EXczEDhM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734427116; c=relaxed/simple; bh=KwWEWFCB5ShOc5u4wAgQHgytmXEGoQcKusA3At0d9GU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-ID:References: In-Reply-To:To:CC; b=jc9TZq6Ba97tjgmsaiCKg2cYCLXnSPHnssRmwq4kTkGFjMlsE0uPH4XurBBLni+z3PmML8svJ/952U7FUDHpxXYUqwTRPPOLW9ancd8TTrE7t21DitCXbGP2HnFw/En9Rt/AYd+12cN3EXj3FKK2ZSnQQo0l2T/F8JJID9m36rA= 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=GcY/GBpD; 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="GcY/GBpD" Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 4BH621cr005088; Tue, 17 Dec 2024 09:18:31 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= 4SElXYnGf35AatXlxXldZcr44qubrPnAWZUpZmhsISg=; b=GcY/GBpDczNloczL 1IdYxG487S+pQ2tdgv0KEayw5PpRCMDREuEsGU3dMX7UpCF6J00/Rbu4OpIefidP r/B8A5nflA0DLN9Wl/oljpTj4rVReoCfto+vFiDdK9Eqy3h2nDY3VkFUrRce9opT N5rCIgYN0fsY0mW95dcXHu2TQCnweBoo8X8RZSE1jJRPwLopDCYBXn1ss3SNw++w DtPXv5VrHpAefTW6zafR6wx+8QKpcppVBKxXyyZXUVIEj+FStk6WsGqrpkvW1+qg /uel9FkuU3luzt+ppCT+zjl9dGxmYqECVzExAbayd/MX4hXEzM/CdxJMQAeaUsfz iZcNwQ== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 43k3p48gua-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 17 Dec 2024 09:18:31 +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 4BH9IUuN030732 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 17 Dec 2024 09:18:30 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; Tue, 17 Dec 2024 01:18:26 -0800 From: Renjiang Han Date: Tue, 17 Dec 2024 14:47:40 +0530 Subject: [PATCH v5 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: <20241217-add-venus-for-qcs615-v5-4-747395d9e630@quicinc.com> References: <20241217-add-venus-for-qcs615-v5-0-747395d9e630@quicinc.com> In-Reply-To: <20241217-add-venus-for-qcs615-v5-0-747395d9e630@quicinc.com> To: Stanimir Varbanov , Vikash Garodia , Bryan O'Donoghue , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Konrad Dybcio CC: , , , , "Stanimir Varbanov" , Renjiang Han X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1734427092; l=680; i=quic_renjiang@quicinc.com; s=20241001; h=from:subject:message-id; bh=KwWEWFCB5ShOc5u4wAgQHgytmXEGoQcKusA3At0d9GU=; b=QJ8jF8iRgBWFTrXH2AF0r6CEAkjxAAOXeXpwsKd7PujbkPCXa+LCIBI+kM2Mb6hsjfAuiAGHj v5CV9gTDV2RBX/OD2fLRQaLzKIMT/LtDiM4zMsx+SCahqBRuXAetRVU X-Developer-Key: i=quic_renjiang@quicinc.com; a=ed25519; pk=8N59kMJUiVH++5QxJzTyHB/wh/kG5LxQ44j9zhUvZmw= X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) 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: H2HJRaPB0UKEuSP8Lv79mXHhTx9K2iS7 X-Proofpoint-GUID: H2HJRaPB0UKEuSP8Lv79mXHhTx9K2iS7 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 mlxlogscore=557 phishscore=0 spamscore=0 clxscore=1015 suspectscore=0 mlxscore=0 adultscore=0 lowpriorityscore=0 impostorscore=0 bulkscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2411120000 definitions=main-2412170076 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 a25928933e2b66241258e418c6e5bc36c306101e..de954ede27f0942397d982f9aa725e59a8de9657 100644 --- a/arch/arm64/boot/dts/qcom/qcs615-ride.dts +++ b/arch/arm64/boot/dts/qcom/qcs615-ride.dts @@ -237,6 +237,10 @@ &usb_1_dwc3 { dr_mode = "peripheral"; }; +&venus { + status = "okay"; +}; + &watchdog { clocks = <&sleep_clk>; };