Received: by 2002:ab2:7a55:0:b0:1f4:4a7d:290d with SMTP id u21csp671140lqp; Fri, 5 Apr 2024 05:45:24 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUHWlldoIHylJHoZsZe8GFioMzPP+txh8cUsLIY3pJBrP9QRM0VjhUapQr7aPet4kPWTH7QxViAa+xa/s0VWT2QrSO90pu1ru8dHoY1FQ== X-Google-Smtp-Source: AGHT+IHhQcbMQ6Hlvv5BCz4HALYJRJ0io4KGOwnzarFrtnc7guJvqydn+a/aRLAgR8e9iN3GMRAT X-Received: by 2002:a05:620a:5750:b0:78b:ea63:80f with SMTP id wj16-20020a05620a575000b0078bea63080fmr1096568qkn.53.1712321124530; Fri, 05 Apr 2024 05:45:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712321124; cv=pass; d=google.com; s=arc-20160816; b=f5ZChe/KogaUR6nFJrKFEnRMOe/xcb54iStLf+q4V2Ib5+EKXhi8v3k+aDdU2Wa/yZ yQS//xfyty1vDyEjKlEv6vNRxUFEoX5+j/s8WfVjcRc1DH7JMaSlRvmU5CCgQw87hNYH CDoewsxc9zZaunl5YC/RoDzZsedyifw7cAWqU1RGIks/AhjaPWnb7WWSCU1XOc4+LPKL AauBwng9dPYjBGDXT87UGkY1cSkQO81rwqiQ1fYQuSo9vE2R74qxCTX9lvISTBVp6Qll Go/L4C0xv7rxpYni6geymxMfA0o7YGQ24B6hghO/1ZPWwRlP9r7VjqDdBoMOrP1YRCyH qobg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=zc5ni8QDAeHdiipwqwPSCdrgWjokMHTr3M0/Uql0XH0=; fh=m35mpxAlL41Lk3gPefm/kiJXubKmAosIsZgm/nrvSuo=; b=VrTQbfbNtRoY1GGy7RHjVYRRhluHxEQscM4tZnAIr0uVXsY/Z7KAzTxzBzxjVHIjfe TJu/gzOCqGMoithoxHLxXE/kjNluwwYp2G+waV7yGEqfQfi6kdWclqTrI5D/HZlyNHw6 K4PS8DK6wGRwCjC+KKzWkroIxmHcO4TEan5TnEmjt9mRm83EPG2OqUfYIYe/Q8LIpdWt 6L0PqxdWowo39HwI1FsAPPNkYYXgeaRlKjNQ8BtA+6yP3bPIAeiF9D4FnftOiH0wuaSR T3M3tJnM3xMnw3t4hsaKKASH9rI+IjvwwNBIZbVDEUSu0/LJJg3keIrG96gKe4wce0KX 987w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="G/6m+4fM"; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-133011-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-133011-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id h10-20020a37c44a000000b00789e7413c02si1666023qkm.197.2024.04.05.05.45.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Apr 2024 05:45:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-133011-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="G/6m+4fM"; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-133011-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-133011-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 2FA781C22BD6 for ; Fri, 5 Apr 2024 12:45:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9087716D4F1; Fri, 5 Apr 2024 12:44:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="G/6m+4fM" 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 0185B16C86E; Fri, 5 Apr 2024 12:44:38 +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=1712321080; cv=none; b=NnZzwiHKZ/F50Ngt3XGMOaSYscDEw0J5bxHIN6r94eDxG+5ZzfVYXFj+uW9zNEXRDsOrVQ8n79YHuyktP7eJnqIkjgGHE3MxJnBwrBu5HH7KrmUqHhJLUYUne2MbxODbXWwMhLG0f9WWLwEpySxfwoPfYoBpBbs6N2RtBSkbXiU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712321080; c=relaxed/simple; bh=TogtJ4Vn6Gy6a4ti9uknKk9nKZOA1/ci5s+DLH+6evg=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=bIr7OHincA9PfjCax2+A9IrmsSrA8Dksl6PO4IOg4bm4BFswfeBv9tqzkGTHTKdoPkv965V9MuMoptAtmgEwbXlWBEgomPdC8mbHfPiQO8WDTblHG/sT5qmfXH4iUhmuohJyD5+6w69VeBZ/5V97CwdByk7W/LtgPHn3j3v9EAA= 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=G/6m+4fM; 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 Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 435ADrwG031356; Fri, 5 Apr 2024 12:44:26 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= message-id:date:mime-version:subject:to:cc:references:from :in-reply-to:content-type:content-transfer-encoding; s= qcppdkim1; bh=zc5ni8QDAeHdiipwqwPSCdrgWjokMHTr3M0/Uql0XH0=; b=G/ 6m+4fMrPwInyfNgjBmWpg3zx2VRL5LH6qhNJiy07g07PeDghPprZYhPpNQmj3LtG eUthjxo11NMvMaHVVHQYUgeQsshZMj9P+8g3zwEFZyAVoPpFAtFZbdC8Z0WHLuIL +p+cIzEAQATE+WumpagCmocsSo+BKUGdC62zTQ0ihIT9TdIPBgGQkbldkPSlffhX nzpdJfKn4nXhPQuaz3j8kAR2jhyDjxpEL26UQ/X9a/9TWaVBK/OdFGxRaS3JSar4 v2or5q5kvk72vHfUOcAVKF9daBv1RzO2VoyG2L7sCQ3+IJ/6Gt9ZOvxOFis23NHp jgie0KQnT4dmv6hsv50A== Received: from nasanppmta02.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3xaaj18x42-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 05 Apr 2024 12:44:26 +0000 (GMT) Received: from nasanex01a.na.qualcomm.com (nasanex01a.na.qualcomm.com [10.52.223.231]) by NASANPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 435CiOBi018171 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 5 Apr 2024 12:44:24 GMT Received: from [10.216.12.56] (10.80.80.8) by nasanex01a.na.qualcomm.com (10.52.223.231) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Fri, 5 Apr 2024 05:44:19 -0700 Message-ID: <66492657-3649-3bdb-b7df-0f5196418e06@quicinc.com> Date: Fri, 5 Apr 2024 18:14:15 +0530 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH v3 03/19] media: venus: pm_helpers: Add kerneldoc to venus_clks_get() Content-Language: en-US To: Dikshita Agarwal , Konrad Dybcio , Stanimir Varbanov , Bryan O'Donoghue , Andy Gross , Bjorn Andersson , Mauro Carvalho Chehab , "Philipp Zabel" CC: Marijn Suijten , Stanimir Varbanov , Mauro Carvalho Chehab , , , References: <20230911-topic-mars-v3-0-79f23b81c261@linaro.org> <20230911-topic-mars-v3-3-79f23b81c261@linaro.org> <80c0ecb3-1157-1d7a-0829-c3b68b65f17f@quicinc.com> From: Vikash Garodia In-Reply-To: <80c0ecb3-1157-1d7a-0829-c3b68b65f17f@quicinc.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nasanex01a.na.qualcomm.com (10.52.223.231) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: foUleAOSXv8jrkBMfYMX_5RrGXcxukIO X-Proofpoint-GUID: foUleAOSXv8jrkBMfYMX_5RrGXcxukIO X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-04-05_10,2024-04-04_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 phishscore=0 impostorscore=0 bulkscore=0 clxscore=1015 lowpriorityscore=0 mlxlogscore=999 suspectscore=0 malwarescore=0 spamscore=0 mlxscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2404010003 definitions=main-2404050091 Hi Konrad, On 4/5/2024 1:56 PM, Dikshita Agarwal wrote: > > > On 3/27/2024 11:38 PM, Konrad Dybcio wrote: >> To make it easier to understand the various clock requirements within >> this driver, add kerneldoc to venus_clk_get() explaining the fluff. >> >> Reviewed-by: Bryan O'Donoghue >> Signed-off-by: Konrad Dybcio >> --- >> drivers/media/platform/qcom/venus/pm_helpers.c | 28 ++++++++++++++++++++++++++ >> 1 file changed, 28 insertions(+) >> >> diff --git a/drivers/media/platform/qcom/venus/pm_helpers.c b/drivers/media/platform/qcom/venus/pm_helpers.c >> index ac7c83404c6e..cf91f50a33aa 100644 >> --- a/drivers/media/platform/qcom/venus/pm_helpers.c >> +++ b/drivers/media/platform/qcom/venus/pm_helpers.c >> @@ -23,6 +23,34 @@ >> >> static bool legacy_binding; >> >> +/** >> + * venus_clks_get() - Get Venus clocks that are not bound to a vcodec >> + * @core: A pointer to the venus core resource >> + * >> + * The Venus block (depending on the generation) can be split into a couple >> + * of clock domains: one for main logic and one for each video core (0-2 instances). s/main logic/controller. Applies to below places as well. >> + * >> + * MSM8916 (and possibly other HFIv1 users) only feature the "main logic" >> + * domain, so this function is the only kind if clk_get necessary there. To be checked, unable to get the clock document to see why only core clock (VENUS0_VCODEC0_CLK). Will update. >> + * >> + * MSM8996 (and other HFIv3 users) feature two video cores, with core0 being >> + * statically defined a decoder and core1 an encoder, with both having >> + * their own clock domains. >> + * >> + * SDM845 features two video cores, each one of which may or may not be s/two video cores/two identical video cores >> + * subdivided into two encoder/decoder threads. decoder cannot be split into core threads. you can keep it like "each of which is capable to do any encode or decode" >> + * >> + * Other SoCs either feature a single video core (with its own clock domain) >> + * or one video core and one CVP (Computer Vision Processor) core. In both cases >> + * we treat it the same way (CVP only happens to live near-by Venus on the SoC). >> + * >> + * Due to unfortunate developments in the past, we need to support legacy > why unfortunate? please re-phrase this. >> + * bindings (MSM8996, SDM660, SDM845) that require specifying the clocks and >> + * power-domains associated with a video core domain in a bogus sub-node, >> + * which means that additional fluff is necessary. Some background: It was done that way to support decoder core with specific clocks and similarly for encoder. Earlier architectures use to have different clock source for these specific decoder/encoder core clocks, now there is a common clock source for both the cores. Hence if any one is enabled, others gets enabled as it is derived from same source. So if we see the later bindings, the clocks were moved out of sub node to main venus node. Regards, Vikash >> + * >> + * Return: 0 on success, negative errno on failure. >> + */ >> static int venus_clks_get(struct venus_core *core) >> { >> const struct venus_resources *res = core->res; >> > > Thanks, > Dikshita