Received: by 2002:ab2:7a55:0:b0:1f4:4a7d:290d with SMTP id u21csp531780lqp; Fri, 5 Apr 2024 00:39:54 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVJIviZlRDbgKQD2ZZolrQnKZG2vR9+xWiJqgSKc6H3Ypw2Up7uCALfvBbfJ8ZO0I/eV3xsnNHA4a1gzinU9qus31YK7RRAeBGWLSjUfQ== X-Google-Smtp-Source: AGHT+IHsU5FrWVHMjWsmasVhGIqb8iguaM6n6isYC04vCXUZhttRblEMwUzU/5D96ER/NWo3JV1T X-Received: by 2002:a50:f69e:0:b0:56b:8153:54f7 with SMTP id d30-20020a50f69e000000b0056b815354f7mr471009edn.30.1712302794677; Fri, 05 Apr 2024 00:39:54 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712302794; cv=pass; d=google.com; s=arc-20160816; b=hwieEl6rG8chHrq6v7LJ5YMlB0nErqzYAy9R22bgNhjzE10xYWMtRGx45NezavkgIO IzFA86llA4RhVhn6ySTnQp6HFD0tCDrwa4+YJjMz+A3ENVqb001UkXv/cTFUFJJGpay+ 0XY88svHEVL71VsGaWx+ffvJqsPTmlriip+BiIugCnud8OoFo4gxno6KZtCGEWtVW3Ol ev+Q37JINTgXCkdQEZbXYKtm9WBwjocDrqO9LU3KBn/iZXI0LUqI4jpq5PTnJNi3XvgO aqI0MhkuozTAi7AHBBcPLxAeA1Lzn22BcZAHP6BfrZRxgpy/3Sr3oxmXc/eNpBJdl9vt Lq4Q== 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=3Z1qhTERAHY9u7xtJ3fTK4uczfNK3XCfZWVKTFMT7DY=; fh=l93zIHXyMEdGgv/YBnM8dl+iIeD4yDszaEdpnp/NB80=; b=t+/gMZYjP9+kSEVFNMzO/SQigcvjBmRTpvysNyGqWoK53uI9OG33tHHOJj97tHUE1p n5JbUxv3cXTj2sNxt2T1biwFo/f2LRWHYpOLLf1jh92ooudS2gaWjpqVUDtS3S7NlN8V Jl1+N9j7APUABo4wxnjtSAH0DURBsddlxJA1uH/K0Qxc8DqvzJjOEEghooz7cLrSRBDf v3dvIbucsYAvAalDYPnmNaU2LqkS9W8bmq/CkmlLf9Zms8CSBwPpRG4uD+57BlNbbWKB FduL9oww41g2+oWiF17091rOL2F4DLk92ZKIh/vZV5z9KWPHR8XnOhFvcXmdpgkI4gF0 gZTg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=jBTG5G5W; 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-132566-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-132566-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id t1-20020a508d41000000b0056e22361df4si479915edt.152.2024.04.05.00.39.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Apr 2024 00:39:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-132566-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=jBTG5G5W; 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-132566-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-132566-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 3F9F41F22D31 for ; Fri, 5 Apr 2024 07:39:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8663112FB29; Fri, 5 Apr 2024 07:39:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="jBTG5G5W" 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 3586F12BF2D; Fri, 5 Apr 2024 07:39:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712302776; cv=none; b=WxOJfuxgwdpqgrCyqYGMb17VUZ3RDBYg4VyjeCEE/QCwHJZ9WeDsSSFJN+GW2CxNKk/M40c+PJQxJhaPD5qg6A+HrILE3FsaF3W/mqxfSKy+FgyPv69OyQIzpfSH9q72vzDtAwTD3h/FP0biglJYukG0p8KYux9Fi3z5W8A1i3A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712302776; c=relaxed/simple; bh=QORV4pD15vZ3OzypvqpxnQvSoqXSnK5DsqvoayCIrCU=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=momG6MSmijrnjFHhTlBIh3/xKR+aHWbsIrqkExPMu/vhIcrAG8gxRuwxwU4x/pURi7W8KjsvdP08y8NHchFfKmlOHs6kunLYIryRccZ2cMu5YBNhF0+vlWL0rW5KlGMSiDbA+yBjRUv4IhMgfIntkZMYonpw26wG67254QLlJdo= 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=jBTG5G5W; 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 (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 4355ATg1031822; Fri, 5 Apr 2024 07:39:24 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=3Z1qhTERAHY9u7xtJ3fTK4uczfNK3XCfZWVKTFMT7DY=; b=jB TG5G5WM3Dpx6ELoYVHtsiNaaHSgwLHIc/P00q8kyb8kRU8tMCdk+y73yhgiMFoFL 1XI16Tksf02Fuhvy5geA9meNS1U49qZccNWE3sHoFRW24BOhuBNHnAVXrFJUkuvR FAuJgAlFuAcL2ycfmTjte9y50YQOmAoF8TuwR+omUMKoxvUSLGVJF4AlPOvZDmzt KQkvxW6HDtSTfPiajfhEwdGGJIQr+3a3W5kdsSCFfiWnw7fiFO1GWv2rceL4cr90 9K2tUYq/ys9nAIUOprF6WNiFCkCJHqdklEQ45b4oFTrw7QbYnUF4nsK3hpG+hAsq UOiYTotuL9QaJpSkCuzQ== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3x9en0kjhb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 05 Apr 2024 07:39:24 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 4357dD7f031799 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 5 Apr 2024 07:39:13 GMT Received: from [10.216.11.24] (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) 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 00:39:08 -0700 Message-ID: <5c3f6747-86f6-3fe9-6dfa-edc44b53c0b1@quicinc.com> Date: Fri, 5 Apr 2024 13:09:04 +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 04/19] media: venus: core: Set OPP clkname in a common code path Content-Language: en-US To: Konrad Dybcio , Stanimir Varbanov , Vikash Garodia , 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-4-79f23b81c261@linaro.org> From: Dikshita Agarwal In-Reply-To: <20230911-topic-mars-v3-4-79f23b81c261@linaro.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: 57Arb5L_f6dJ5K6qzLk9j6jW-c6fzNul X-Proofpoint-GUID: 57Arb5L_f6dJ5K6qzLk9j6jW-c6fzNul 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_06,2024-04-04_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 clxscore=1015 impostorscore=0 adultscore=0 priorityscore=1501 phishscore=0 mlxscore=0 bulkscore=0 mlxlogscore=999 spamscore=0 malwarescore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2404010003 definitions=main-2404050055 On 3/27/2024 11:38 PM, Konrad Dybcio wrote: > Calling devm_pm_opp_set_clkname() is repeated for all HFI versions in > pm_ops->core_power. > > Move it to the common codepath. > > This also lets us get rid of core_get_v1. > > Signed-off-by: Konrad Dybcio > --- > drivers/media/platform/qcom/venus/core.c | 5 +++++ > drivers/media/platform/qcom/venus/pm_helpers.c | 23 ++--------------------- > 2 files changed, 7 insertions(+), 21 deletions(-) > > diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c > index ce206b709754..5ab3c414ec0f 100644 > --- a/drivers/media/platform/qcom/venus/core.c > +++ b/drivers/media/platform/qcom/venus/core.c > @@ -14,6 +14,7 @@ > #include > #include > #include > +#include > #include > #include > #include > @@ -319,6 +320,10 @@ static int venus_probe(struct platform_device *pdev) > if (!core->pm_ops) > return -ENODEV; > > + ret = devm_pm_opp_set_clkname(dev, "core"); > + if (ret) > + return ret; > + > if (core->pm_ops->core_get) { > ret = core->pm_ops->core_get(core); > if (ret) > diff --git a/drivers/media/platform/qcom/venus/pm_helpers.c b/drivers/media/platform/qcom/venus/pm_helpers.c > index cf91f50a33aa..ef4b0f0da36f 100644 > --- a/drivers/media/platform/qcom/venus/pm_helpers.c > +++ b/drivers/media/platform/qcom/venus/pm_helpers.c > @@ -318,21 +318,6 @@ static int load_scale_v1(struct venus_inst *inst) > return ret; > } > > -static int core_get_v1(struct venus_core *core) > -{ > - int ret; > - > - ret = venus_clks_get(core); > - if (ret) > - return ret; > - > - ret = devm_pm_opp_set_clkname(core->dev, "core"); > - if (ret) > - return ret; > - > - return 0; > -} > - > static void core_put_v1(struct venus_core *core) > { > } > @@ -350,7 +335,7 @@ static int core_power_v1(struct venus_core *core, int on) > } > > static const struct venus_pm_ops pm_ops_v1 = { > - .core_get = core_get_v1, > + .core_get = venus_clks_get, > .core_put = core_put_v1, > .core_power = core_power_v1, > .load_scale = load_scale_v1, > @@ -423,7 +408,7 @@ static int venc_power_v3(struct device *dev, int on) > } > > static const struct venus_pm_ops pm_ops_v3 = { > - .core_get = core_get_v1, > + .core_get = venus_clks_get, > .core_put = core_put_v1, > .core_power = core_power_v1, > .vdec_get = vdec_get_v3, > @@ -1013,10 +998,6 @@ static int core_get_v4(struct venus_core *core) > if (legacy_binding) > return 0; > > - ret = devm_pm_opp_set_clkname(dev, "core"); > - if (ret) > - return ret; > - > ret = vcodec_domains_get(core); > if (ret) > return ret; > > Reviewed-by: Dikshita Agarwal