Received: by 2002:ab2:6991:0:b0:1f2:fff1:ace7 with SMTP id v17csp224803lqo; Wed, 27 Mar 2024 11:10:05 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU0a3mhM5fCnGBH4vnjRShXDjd2QNkHMGltk1WFlIsynhndDIWqzIlHKwVrxVAnMO794zJEq5qvEFd8TFYRpLUV+eo6ZcN+S3wjsJX9SQ== X-Google-Smtp-Source: AGHT+IFQ05A5frvK1NoQuXyoAIUA8F10oOixW+YcSYJ8DCoLIPyPN9SqD4GRnO/deVvHfzRrbYBL X-Received: by 2002:ae9:f308:0:b0:78a:3c30:6ea7 with SMTP id p8-20020ae9f308000000b0078a3c306ea7mr290925qkg.57.1711563005406; Wed, 27 Mar 2024 11:10:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711563005; cv=pass; d=google.com; s=arc-20160816; b=j47vLb6NKnpFWtFuX4kgqBxCVo8TiZybWg3EMV7dSrNht9+KVSSP0nRmKppl5RQrnU tbW8Q/J/w+dsjf3Qtzg3/MdAXV/68Lz+9ORifnUp1GcfGVTKRtuEQDJEQqq6cCLbHj1S Yb61LQ5cA83noGsO/f2V1DSNcph0oZJlFdec4IHBlwd1lRf/ri/OPVpE1DFYgaKWLdlU mxScph0DCGGngpVnMakUpi6iJznbMQMybPIYiv2G2ZecA0OGulKFqNUYovXOhjFnviem xn7FOxWQNMQTdW6y0rXFVb5PdcMFpYLFVxDjbuNFLZ0ZyPJi0lyTOYfi5Z/d9ZXQC+a0 g7gg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=Cpiy05x6+KmwppdZDoeFtIMDjcMCWVRc+LYx5JwTOaY=; fh=+GDjGrGssT1k+PUwvjx9Zegxb6MTwehl2EiHwpjuNEQ=; b=ulxYIpX7sbsaMGtzQt+byA5hOevmoi4EGdb6aMLp0sYhMwbsH4+zlE49U2uSdY1LGL r9Gd621QCdc91CLrk3nC33XMlgbZKa6fMItRkn7ieKfOzK7iMK1yxj3tqEd1j5OsmZfx bnhoialMenVa4FNQkMsXbEyJpfvYPCxeRbdSUjey+eRRzINTUJ57XiWzDu2V9XVEwUvC f4mJJyRTrFJmDziRLSSu3VrDQcwEMlgzOqPSejU4PDKhlKHesAoK74/JTFt61Do/GIHC wDWLsl3y4lml1ZGLJtfGrvvIcdVVQcUxDu5qlRdDbvTP/1TMmsenxkA4yQPxhLvHH6cG yVAQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QRHSIiZz; 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-121789-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-121789-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id t19-20020a05620a0b1300b0078a5eb365a0si5069556qkg.545.2024.03.27.11.10.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 11:10:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-121789-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=@linaro.org header.s=google header.b=QRHSIiZz; 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-121789-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-121789-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 103EE1C32B31 for ; Wed, 27 Mar 2024 18:10:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 060D61514D7; Wed, 27 Mar 2024 18:08:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="QRHSIiZz" Received: from mail-ej1-f47.google.com (mail-ej1-f47.google.com [209.85.218.47]) (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 502A415099A for ; Wed, 27 Mar 2024 18:08:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711562935; cv=none; b=Nf/vKg40Uhc/Im1Ow9v0ESVlPhdlp6xz9/JBSzdfyVWff4LLQA0WpixLOWz8ZmdGjKoUb6+V7c9V6KuBt9nlvn+5S9fyV5snF7Qtikf/OpjKyLJ5MXv8zINJj/eHVpsgFowwY048gf1wgWTYsdrqxH+Y32+HKMlUADEGW/oU9Cw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711562935; c=relaxed/simple; bh=0FsCQVaaR6mlZkTyREXWtukXCjlINsoRv31QgmDTlf4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=jDh9p6/egJVOF3cBRtBtFE+A6M3fDT02BxXUgTIcNs8rwPBb/ozpA1GQIz3h5eNx6K8m2olpQIE9L4vqpWe5JQM/msqEfc7Jnhs09XO1uCUgL/R8qKqg8nR/TPiM4JgbSEZVdLiy6u2ye86rWo+zBlBnb9gH7MFuNFYQhmb4scc= 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=QRHSIiZz; arc=none smtp.client-ip=209.85.218.47 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-ej1-f47.google.com with SMTP id a640c23a62f3a-a466fc8fcccso15442266b.1 for ; Wed, 27 Mar 2024 11:08:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711562931; x=1712167731; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=Cpiy05x6+KmwppdZDoeFtIMDjcMCWVRc+LYx5JwTOaY=; b=QRHSIiZzE9NdURx5SjtD2dmOvBjQioEuGVTBX7DeV8JvcMS36dFt6WbNlw8iS38QVA sBsEayhr0WjumwsEPah0fzq5/uL6qMa/XAz4Cdg8hD6zWi2vAIeENlrXstjaQCxikax7 O9iIjhBYVFxbwUWaXHwXirXCkqzUPAttS+E71MbVlX62GuKqG9bu95tnPb0Vnz0Fsjyz kNlFTBKUgM6ir0ssAepSYW0F5Rfh7oD8bKLZPihrqhvOyROTyd2dj9P6Q/VbXdx0z9VE 430Le/SH3rK1BGZfs1f0Pg7iojQbTeVwBLftdpqZJ+Q1e0ElFXbkjcKTrnQZLriCzsLr REnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711562931; x=1712167731; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Cpiy05x6+KmwppdZDoeFtIMDjcMCWVRc+LYx5JwTOaY=; b=asBIO89AERsuWE7hgNE2KO3afwpS6cChVgrDhHKKgV84sXggYcRP1aEaBbLQzUIBqS +u7pEinfWsOMu1CbI7hZTLx6/KShThTuT346UpxG//lDBligvAiOgTxMGk6JqMJGP3Ht Xn1nzC3pHONrmI80hUdnMW+kpIORlIk9PjTzyNI9Nr1310fxTdF7hSfSC1itT7oVApiG iFLcBWSc1/v0VB9OFULDVXn8jXlDcQKVg3Ho+JCle9nXazf3zhY4TXuSulH+sOmZChjD KG+dblgrQccmxtipNzyv157LrNZLl5cfhH0Q/8iPvLInzuyCoCRFdUKvwP+F2r5AGgf+ KByQ== X-Forwarded-Encrypted: i=1; AJvYcCVDOQRzxC4tyKEtmxEufr17/gfMlzmRmrB3ewCocUqmYHs3xwyFxYBgmiCQ0fCIj6/PWf1UhCoIRykp2rihdothhGP4fpRbGG9lt8F3 X-Gm-Message-State: AOJu0YxhZH66qW4jEEtreri/kT14cup2mCojMq7M/njxxcgEXcP2OgTB GM4yhAJSsDplQDlIN/AsZihH1bPlzGgviLy2peKfUU8EcX80augHcCg0mr5x8H4= X-Received: by 2002:a17:906:e209:b0:a47:29ef:f3ca with SMTP id gf9-20020a170906e20900b00a4729eff3camr165767ejb.31.1711562931607; Wed, 27 Mar 2024 11:08:51 -0700 (PDT) Received: from [192.168.92.47] (078088045141.garwolin.vectranet.pl. [78.88.45.141]) by smtp.gmail.com with ESMTPSA id z2-20020a1709060be200b00a45f2dc6795sm5702733ejg.137.2024.03.27.11.08.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 11:08:51 -0700 (PDT) From: Konrad Dybcio Date: Wed, 27 Mar 2024 19:08:41 +0100 Subject: [PATCH v3 03/19] media: venus: pm_helpers: Add kerneldoc to venus_clks_get() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20230911-topic-mars-v3-3-79f23b81c261@linaro.org> References: <20230911-topic-mars-v3-0-79f23b81c261@linaro.org> In-Reply-To: <20230911-topic-mars-v3-0-79f23b81c261@linaro.org> To: Stanimir Varbanov , Vikash Garodia , Bryan O'Donoghue , Andy Gross , Bjorn Andersson , Mauro Carvalho Chehab , Dikshita Agarwal , 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, Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1711562923; l=2193; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=0FsCQVaaR6mlZkTyREXWtukXCjlINsoRv31QgmDTlf4=; b=XnknYN2sPi2dJ+IqyT2Vfoq8/8onJ2qiUbiRyC6uKY00P0GSoy+wFqTEbOhtzn8LOy+0HBZBn bddAPSiXr86AVYTi8xNlIi7MUuDCciF+i/4xzPBAPKg+681HKPrZD3/ X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= 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). + * + * MSM8916 (and possibly other HFIv1 users) only feature the "main logic" + * domain, so this function is the only kind if clk_get necessary there. + * + * 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 + * subdivided into two encoder/decoder threads. + * + * 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 + * 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.. + * + * Return: 0 on success, negative errno on failure. + */ static int venus_clks_get(struct venus_core *core) { const struct venus_resources *res = core->res; -- 2.44.0