Received: by 2002:ab2:f03:0:b0:1ef:ffd0:ce49 with SMTP id i3csp62894lqf; Tue, 26 Mar 2024 14:31:53 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUGGN8g717Ule+da72QE0h7oJWpjBWErytlXIJeo6FDqW23XoGmCNGtAwv5ItBqch9Bm8+6+EUBbrdCRJ9E5BOBPwJ+Bnp9qh2xV9ZqRg== X-Google-Smtp-Source: AGHT+IEPk6B1YmfaSGugaTGOIy9Y4f7UIh1lNT8d7Chy+Qk1Ab9xc4UTPSK7om4bwSva8OE/5v85 X-Received: by 2002:a17:907:7f22:b0:a4e:26a:6558 with SMTP id qf34-20020a1709077f2200b00a4e026a6558mr194525ejc.24.1711488712874; Tue, 26 Mar 2024 14:31:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711488712; cv=pass; d=google.com; s=arc-20160816; b=Yeyou7yJAdeU4mhhQkcfT77ovE1QZyjGBIz+2+fUpXzJVjxdrz00DQFyNMY6OPRfsm v7GLu9aCH1iL9mBZA7ngwsd9g/4yRANAocpb9zm8NyhAj5u+/pKLELYEaoqZ+xugH79u d3Hzlozd5SZK3IO7T4vsGp/nXdnLi8xtOjcKz2X9mifqtas9k9dwYMTIbtovzRrBzpHF 3xerHaPH7UVx8ISqLRW8KpxR2dOfcQ+IFqtHGkWPZUHbSRbIhnf//80hdvyuuz5kbfHN S5/+xON0lJ2PxQhI0cSXfJkdBoJ7bejB+iVgF++BfL7y1Vh+034G3c2fvyL0BLRqQwEz xXjg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=bgSJDrIUVsXQMfKvel9wfZ0njlDv710JAdsSE3N3rYY=; fh=qKeKe60BHZphBJGOK23Nw0SAT6StEl6Z4mucFfHI3n0=; b=JKi7qkuiEc0W10fkSBxl3LFAoSYF4KLIiMn7EYff6htZvI424ARPHbGLBBzMN3+uH7 u6cs9J8EacWLI38bN3PgwPsL23eGHJdOhP/Vd9a6G6lTpMVQMMo6sNAtd+W3MzbOWIYu dCQXtRrw0Fhala6Wa+BJC+PFc3277QahevgqYfAva2S+DN/NkFkLrBwXZK3hY06kRGrC KVoGLperl4ExXJpm3BHWfW+xJGXonvJc+cXWbW8gnntDZOlmGPMRytcCF1+fa/nVCpe1 feIt/Q2Ni9cdq30nhBqIBeRb4TAnxX8PObOASQ7kPLaho5/p7z6cZYRTBTIECeAl20Cc GUFA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XqdNI4Uv; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-120010-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-120010-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id hv10-20020a17090760ca00b00a47a33c308esi2694724ejc.926.2024.03.26.14.31.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Mar 2024 14:31:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-120010-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=@linaro.org header.s=google header.b=XqdNI4Uv; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-120010-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-120010-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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 702AD1F811C5 for ; Tue, 26 Mar 2024 21:31:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5EED413D898; Tue, 26 Mar 2024 21:31:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="XqdNI4Uv" Received: from mail-lf1-f43.google.com (mail-lf1-f43.google.com [209.85.167.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4BB5713D61F for ; Tue, 26 Mar 2024 21:31:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711488697; cv=none; b=oqO8/orJwMVseT4Ye4eZkWZY6wh9Vrf/qpmJqJMu5c34oIk6sW+qgTNSyc35tHvli1BXF+TUdIQm1JyqFfijvP8h5eRnN8np3xpVw33cwnU3VsJbF6khnpQHb4OaULSuvTNQG0AtuGX9MlgOpYoW2KRMO1qOsd9llnQJnvY3AKQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711488697; c=relaxed/simple; bh=2b2iswpmhzrhhGsFbXhQA2SK05/fhLqjPLFxGalyfWM=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=C5isCLvpLLuBS15KdPSRKxrwrVG7o6JXLo7cLfiEBpvs3a8VWX/QR9a/oHl7YApTgDzeJ4gmYsA+wH/dK2SABbxbZ83phwrDy7UKAMEx6xE8zu0xXMuszGGxesV4KWeG9PNVQOjE4q0c6rYhcs2/+jQnNwYHVtH1lfSlCMnA6Iw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=XqdNI4Uv; arc=none smtp.client-ip=209.85.167.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-lf1-f43.google.com with SMTP id 2adb3069b0e04-515a86daf09so4205356e87.3 for ; Tue, 26 Mar 2024 14:31:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711488692; x=1712093492; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to; bh=bgSJDrIUVsXQMfKvel9wfZ0njlDv710JAdsSE3N3rYY=; b=XqdNI4UvMbQO7xpZSKO/D1W6KJ9pD3/WosTSq488oPvcvVIElK6M+v7VkUvoKpmhlF tcjUBd25a33KN3MrgQqY3Lclt48HKNqYN7TzTZyfsmePG8CAQ+T8U253WRXlCHmQXQ7d yLQZW+d0rBBu8g1roIsnEPjR0yeQL5DZfvKCAiPRDvJWlmR1IExxVqmuI3LHkzamD4Nk 2LUr/dxu0kF+IpT2Umgn8e8tY053Ui4M/2f8eoqq5LGVADzrXnBK1o2AxdKUcHSztrl/ djQhedSm2+kb9pO3X3hfjbn0zjSy5iZjA9dD/kG1M23PFxS9HjxLCzp5DQmerXMFOGdC WNeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711488692; x=1712093492; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=bgSJDrIUVsXQMfKvel9wfZ0njlDv710JAdsSE3N3rYY=; b=g0aLyZqIBhBeTFhJikG7Vj0xmwkuY99ExRDazxFDwfPa1Ozb3Zr7fichG81+Gg4e0H C5mi2OGoXIC1E9aCN1zIhFohKB30AzJYgy+AceSwzJxSgytIETZSoK1F4S/h/TmsMNNz uDcORDPxS4ncnPYFN/M/RHjf0Ho43vXtNR0ScEIy1Vxt1VVBABUlxCOY0V4NixLXfgeG 7CCg9dUXqq6oQ2SmLNuZmeu9qt0g1+FqUJXr4RQFYhReXhK83ML7XPFoLyAr2adPG/cU +yUnXx1wUpziXwiUoVCpL5wZT6iZ3Bp6D1WyhIBfrlIu/MZ6YQt4S95eoCAvggMdxpHg JXoA== X-Forwarded-Encrypted: i=1; AJvYcCVraSrMLb29Mv4JMsy2h2nDAdrxSDuc8ZWXZNvLtH4pTvRFTLsCsgh6c7AuP+OxVrRoCahXY+A5wyKu0cngMpuv9UvsAC1kEBIqvhec X-Gm-Message-State: AOJu0Yy0/SjvopdP7gYhGd1OLe3omi+Aq/MhZiXb5AcY9uNo+TuSK5fU U9kaqJ+263wwE8Tv07p6MssXQt6EapWs+zlewI/q1LP35mnd8CjAw+UUxiQ3Owk= X-Received: by 2002:a05:6512:3a8b:b0:513:ca96:dbdf with SMTP id q11-20020a0565123a8b00b00513ca96dbdfmr11956446lfu.12.1711488692267; Tue, 26 Mar 2024 14:31:32 -0700 (PDT) Received: from [192.168.92.47] (078088045141.garwolin.vectranet.pl. [78.88.45.141]) by smtp.gmail.com with ESMTPSA id qs25-20020a170906459900b00a4663450fa9sm4659206ejc.188.2024.03.26.14.31.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 26 Mar 2024 14:31:31 -0700 (PDT) Message-ID: <06df4365-7e9e-4ed2-bdbd-b12f6a304c37@linaro.org> Date: Tue, 26 Mar 2024 22:31:29 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 17/20] media: venus: pm_helpers: Commonize getting clocks and GenPDs To: Dikshita Agarwal , Stanimir Varbanov , Vikash Garodia , Bryan O'Donoghue , Andy Gross , Bjorn Andersson , Mauro Carvalho Chehab , Philipp Zabel Cc: Marijn Suijten , Stanimir Varbanov , Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org References: <20230911-topic-mars-v2-0-3dac84b88c4b@linaro.org> <20230911-topic-mars-v2-17-3dac84b88c4b@linaro.org> <11164c40-492c-60a0-72a8-1176e017ffb1@quicinc.com> Content-Language: en-US From: Konrad Dybcio Autocrypt: addr=konrad.dybcio@linaro.org; keydata= xsFNBF9ALYUBEADWAhxdTBWrwAgDQQzc1O/bJ5O7b6cXYxwbBd9xKP7MICh5YA0DcCjJSOum BB/OmIWU6X+LZW6P88ZmHe+KeyABLMP5s1tJNK1j4ntT7mECcWZDzafPWF4F6m4WJOG27kTJ HGWdmtO+RvadOVi6CoUDqALsmfS3MUG5Pj2Ne9+0jRg4hEnB92AyF9rW2G3qisFcwPgvatt7 TXD5E38mLyOPOUyXNj9XpDbt1hNwKQfiidmPh5e7VNAWRnW1iCMMoKqzM1Anzq7e5Afyeifz zRcQPLaqrPjnKqZGL2BKQSZDh6NkI5ZLRhhHQf61fkWcUpTp1oDC6jWVfT7hwRVIQLrrNj9G MpPzrlN4YuAqKeIer1FMt8cq64ifgTzxHzXsMcUdclzq2LTk2RXaPl6Jg/IXWqUClJHbamSk t1bfif3SnmhA6TiNvEpDKPiT3IDs42THU6ygslrBxyROQPWLI9IL1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dVAQUBAQdAwmUx xrbSCx2ksDxz7rFFGX1KmTkdRtcgC6F3NfuNYkYDAQgHwsF2BBgBCAAgFiEEU24if9oCL2zd AAQVR4cBcg5dfFgFAmQ5bvICGwwACgkQR4cBcg5dfFju1Q//Xta1ShwL0MLSC1KL1lXGXeRM 8arzfyiB5wJ9tb9U/nZvhhdfilEDLe0jKJY0RJErbdRHsalwQCrtq/1ewQpMpsRxXzAjgfRN jc4tgxRWmI+aVTzSRpywNahzZBT695hMz81cVZJoZzaV0KaMTlSnBkrviPz1nIGHYCHJxF9r cIu0GSIyUjZ/7xslxdvjpLth16H27JCWDzDqIQMtg61063gNyEyWgt1qRSaK14JIH/DoYRfn jfFQSC8bffFjat7BQGFz4ZpRavkMUFuDirn5Tf28oc5ebe2cIHp4/kajTx/7JOxWZ80U70mA cBgEeYSrYYnX+UJsSxpzLc/0sT1eRJDEhI4XIQM4ClIzpsCIN5HnVF76UQXh3a9zpwh3dk8i bhN/URmCOTH+LHNJYN/MxY8wuukq877DWB7k86pBs5IDLAXmW8v3gIDWyIcgYqb2v8QO2Mqx YMqL7UZxVLul4/JbllsQB8F/fNI8AfttmAQL9cwo6C8yDTXKdho920W4WUR9k8NT/OBqWSyk bGqMHex48FVZhexNPYOd58EY9/7mL5u0sJmo+jTeb4JBgIbFPJCFyng4HwbniWgQJZ1WqaUC nas9J77uICis2WH7N8Bs9jy0wQYezNzqS+FxoNXmDQg2jetX8en4bO2Di7Pmx0jXA4TOb9TM izWDgYvmBE8= In-Reply-To: <11164c40-492c-60a0-72a8-1176e017ffb1@quicinc.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 4.03.2024 8:13 AM, Dikshita Agarwal wrote: > > > On 2/10/2024 2:40 AM, Konrad Dybcio wrote: >> As has been the story with the past few commits, much of the resource >> acquisition logic is totally identical between different generations >> and there's no good reason to invent a new function for each one. >> >> Commonize core_get() and rename it to venus_get_resources() to be more >> meaningful. >> >> Signed-off-by: Konrad Dybcio >> --- >> drivers/media/platform/qcom/venus/core.c | 8 +++----- >> drivers/media/platform/qcom/venus/pm_helpers.c | 5 +---- >> drivers/media/platform/qcom/venus/pm_helpers.h | 3 +-- >> 3 files changed, 5 insertions(+), 11 deletions(-) >> >> diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c >> index 680674dd0d68..873affe17537 100644 >> --- a/drivers/media/platform/qcom/venus/core.c >> +++ b/drivers/media/platform/qcom/venus/core.c >> @@ -334,11 +334,9 @@ static int venus_probe(struct platform_device *pdev) >> return PTR_ERR(core->resets[i]); >> } >> >> - if (core->pm_ops->core_get) { >> - ret = core->pm_ops->core_get(core); >> - if (ret) >> - return ret; >> - } >> + ret = venus_get_resources(core); >> + if (ret) >> + return ret; >> >> ret = dma_set_mask_and_coherent(dev, res->dma_mask); >> if (ret) >> diff --git a/drivers/media/platform/qcom/venus/pm_helpers.c b/drivers/media/platform/qcom/venus/pm_helpers.c >> index a292c788ffba..1cbcffbc29af 100644 >> --- a/drivers/media/platform/qcom/venus/pm_helpers.c >> +++ b/drivers/media/platform/qcom/venus/pm_helpers.c >> @@ -326,7 +326,6 @@ static int load_scale_v1(struct venus_inst *inst) >> } >> >> static const struct venus_pm_ops pm_ops_v1 = { >> - .core_get = venus_clks_get, > core_get is initialized with venus_clks_get in patch 4 and then being > removed here. It would be better to combine both patches. Generally I'd agree, but this series is rather big and both patch 4 and this one are logically separated well enough, so I'd rather not waste time moving things around and fighting merge conflicts for no functional change Konrad