Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp508690imw; Thu, 14 Jul 2022 05:45:55 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uB3Mv2Ms5DuNW3YFF801lAEfoDNW8mecHdrpGsEDaHso/5/+nsCXxLUxwT1loP3nzbNfbv X-Received: by 2002:a05:6402:26d6:b0:43a:daa5:9f12 with SMTP id x22-20020a05640226d600b0043adaa59f12mr12071288edd.408.1657802754984; Thu, 14 Jul 2022 05:45:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657802754; cv=none; d=google.com; s=arc-20160816; b=A/fZXULmRoG2C2zZpbBNdACKG5EMKdzbv6PFUXLD9eG+9UN1Lja+q7OJNPdf5StGw5 7w0PhWpPsOzwcpvINnzjJxwdB+Pe+TTVAYHuVKnQGh8Ji/N4pBjvYMpO/GdkMGnmERjv p2mIhO3L0XAb2Yad5snc19Tcl45AUUb2Jm6JCf+F6wzacjhUPIsaZnKE1Z91N0A/1FmN U8aCw0w6RIQy1V4RPiWnEESstPwi91EMNEeM3f78SJXb2jcElkiD5XFBBgwzJ3uUeecc oBCDb+nYqUGpTSVNRI4sBav4Jmk/g+9gA1UOTev1pLFDhyfwft3nnQudC6IeV2Kl9mxQ vuAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:from :dkim-signature; bh=r3UguRHW4L/iNo4yTSEJcm6YAuaJILk64ZckLTOqnq8=; b=zw0gdcVaG14E0/QzQ1K1xrWNEsLTYRDAuXahWz7veqo1Z+2YpCbYlc67u+3I7oET03 rcOj8WocgQ+GfumzJDkfsIbkVP81pw1Dfc85rEdXuUUUoEZesJOBp7BFT3hWpWNDCG+A r5sMXP5t4KJ6lR9SYyP3Nad2opMJsAukQEeQzgF4SJYnXRzm+p+H04euAHJajyL9wQLa 2xSqHci1koYbiCfKua05eAWg1MvjVSkoWLaycvrX9U/l/EHBp5Jmu4O94qhTa4UDfBgf O94zCmgpXF63v26Ju7zW3ZUJ+O2tosdBwRxiffpffD7sEXNomTClYsbU+eAUu22nZvh0 RqWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@kernel.org header.s=k20201202 header.b=JSjp5jx6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t17-20020a17090605d100b0072b16a95c07si1790827ejt.193.2022.07.14.05.45.29; Thu, 14 Jul 2022 05:45:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@kernel.org header.s=k20201202 header.b=JSjp5jx6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239161AbiGNMGs (ORCPT + 99 others); Thu, 14 Jul 2022 08:06:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48810 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238754AbiGNMGe (ORCPT ); Thu, 14 Jul 2022 08:06:34 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 46FF55C9D1 for ; Thu, 14 Jul 2022 05:06:32 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id B0AFE61E38 for ; Thu, 14 Jul 2022 12:06:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7B28FC341CE; Thu, 14 Jul 2022 12:06:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1657800390; bh=KmRjlo5sbsszPv9K0jtghWeUlvqMrr55yKQvb6zPzNs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JSjp5jx6cfCt///J1mo3XF+62gpUWYsvyei5+wgUOyi1B4GEPSi3FNgzxaO+43X30 dy9gGoFW4i556U0vDALNE3JH+GUIUkI+6Ajg12NgdVK0EFd+0Ljp3eNA6e/3yRTq0o ol1ONHJpYnXa7v1Cr0dXzU50cjxyLYXae4e3Jc8cBtO8wWcyBNykHLH1lDoth2bShZ 1n2gKfMTWEXeK95IdhFjyqUiKXle8E1ZD2LsZ9Thswxq2E91MUHuytjx+NsnRslYFQ ApJO6ZgwdNXNin9b1yGWB1OiyIK5XMV4TJLSbSR5eVMZlplvw0q/jhkTuJ1jvnqpEl nf1kWQdUFsNWA== Received: from mchehab by mail.kernel.org with local (Exim 4.95) (envelope-from ) id 1oBxbv-0059sY-Q8; Thu, 14 Jul 2022 13:06:27 +0100 From: Mauro Carvalho Chehab Cc: Mauro Carvalho Chehab , Chris Wilson , Daniel Vetter , David Airlie , Jani Nikula , John Harrison , Joonas Lahtinen , Matthew Brost , Rodrigo Vivi , Tvrtko Ursulin , dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 02/21] drm/i915/gt: document with_intel_gt_pm_if_awake() Date: Thu, 14 Jul 2022 13:06:07 +0100 Message-Id: <1ed105f9fd605e1ccdaecc18c394c17eaec1035e.1657800199.git.mchehab@kernel.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add a kernel-doc markup to document this new macro. Signed-off-by: Mauro Carvalho Chehab --- To avoid mailbombing on a large number of people, only mailing lists were C/C on the cover. See [PATCH v2 00/21] at: https://lore.kernel.org/all/cover.1657800199.git.mchehab@kernel.org/ drivers/gpu/drm/i915/gt/intel_gt_pm.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/i915/gt/intel_gt_pm.h b/drivers/gpu/drm/i915/gt/intel_gt_pm.h index a334787a4939..4d4caf612fdc 100644 --- a/drivers/gpu/drm/i915/gt/intel_gt_pm.h +++ b/drivers/gpu/drm/i915/gt/intel_gt_pm.h @@ -55,6 +55,13 @@ static inline void intel_gt_pm_might_put(struct intel_gt *gt) for (tmp = 1, intel_gt_pm_get(gt); tmp; \ intel_gt_pm_put(gt), tmp = 0) +/** + * with_intel_gt_pm_if_awake - if GT is PM awake, get a reference to prevent + * it to sleep, run some code and then put the reference away. + * + * @gt: pointer to the gt + * @wf: pointer to a temporary wakeref. + */ #define with_intel_gt_pm_if_awake(gt, wf) \ for (wf = intel_gt_pm_get_if_awake(gt); wf; intel_gt_pm_put_async(gt), wf = 0) -- 2.36.1