Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp507925imw; Wed, 13 Jul 2022 02:47:49 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vgiyasUPzQMOloL0f/fjVZWanEpifgBoa1FxL391vSqdcoJjFqHDSq25cOLflGnyeQF2mo X-Received: by 2002:a63:1809:0:b0:408:417a:6fa5 with SMTP id y9-20020a631809000000b00408417a6fa5mr2300305pgl.228.1657705668803; Wed, 13 Jul 2022 02:47:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657705668; cv=none; d=google.com; s=arc-20160816; b=zhgQRFFEIpC44RP/ZhNiNl8CaYZ2FwwdoxfyafDd6h1OE1F5taUrY3m0CfC0m0YPNA QibtoX156fyAaqozECk3mEvi6qqexFFWsc0wdKYY3Lab4uPcBaOc9W5bqh16JmBg1MDC xO+QTnTfQkAyNvC5m4TZAhQOyjVNH+uTgqbGhfPUa+mzCSjLDGRjDW98pXzeBs7jxdJo XFIXYpbi7aEDEUElConh4z32smyh280ZkUjoyrQO7A2RAUyRn2kAzg95Ty1jlKqMcmlf zukzfT+4n8obkjQqQrVE0f2zycimPRuRkOBBGld4fw7VQkVmHpClIEBNrb5zyr5D4FUD G7hA== 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=06qRGXrrKMN6LFWAL2WVITrIpv4dBVDWkIbxRnh3DpQ=; b=wfOECGdpZRBj+EYgj1xvHa9ytkNhSR7/13N3WEnP5i6DPvtqem87VyZgiJC6mkk3Hm U+I5IBorffTys/+ADKY+tPNPGoqkZHOR8FIIuTb+7rSBi+rOAUYJwdbeV++PM6Slzm+6 r6TcwTjzX4O8DuYAQMmzuMSqN1TC6tuAJ2nWDUmPTqWKSrgXbt4K2MWC0ItUIfMcnYQd +Zo5Vgt+XDSMjKL9pworEQoVkGPZen7zMMvRDXK+KtILg22cP7QAdljRpKUEMESJVsjO /xqdXmsD88XwUCvvEmkpjXVOh5BgmXEkxtMwsyjxaLp6xGIx6bUqZWldfWTfBtix9bJ9 oKBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@kernel.org header.s=k20201202 header.b=OgEhUNPj; 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 i7-20020a170902c94700b0016781796321si18477564pla.49.2022.07.13.02.47.36; Wed, 13 Jul 2022 02:47:48 -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=OgEhUNPj; 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 S235444AbiGMJa0 (ORCPT + 99 others); Wed, 13 Jul 2022 05:30:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43722 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235096AbiGMJaX (ORCPT ); Wed, 13 Jul 2022 05:30:23 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 21A67F2E0D for ; Wed, 13 Jul 2022 02:30:23 -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 A5C1961CA1 for ; Wed, 13 Jul 2022 09:30:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E7D05C341C0; Wed, 13 Jul 2022 09:30:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1657704621; bh=oMqR086Sh4/11DEbRL1QYHjCa4npxyd592GKCoYy7dA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OgEhUNPjQ6hv/NsRUJVgEJP4P8zctXjwJ7IsMcn8R6KW67CXZpEX0jKlUTwKqp0JS tciXxSP/G1wxho/bwQ7rMbRvSPmpUMFYYDEDg0fdE6AVvxl9Va7CMkP/muPH7cDfpt HwKQW2kntXRpUYZYG8EZAS0lIbPzI7cc5Xb/+uB5YdtRkn+8Y1ju7riT8VTAv21rQZ 3VxqsY700jJAwuLy/AonV1jz+DhCgmmxX05KBhnC5DcT74zI6ZCu5UfnDqbPeeqVaB oJl7PZFDWBhrXF462nvFRujzYXeEp5bb9CllQp5YQWqAwmE3kLZiG8tYIsHH9pITGZ M+qgLV+iXacdg== Received: from mchehab by mail.kernel.org with local (Exim 4.95) (envelope-from ) id 1oBYhH-0050LF-IC; Wed, 13 Jul 2022 10:30:19 +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 02/21] drm/i915/gt: document with_intel_gt_pm_if_awake() Date: Wed, 13 Jul 2022 10:29:59 +0100 Message-Id: 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 --- See [PATCH 00/21] at: https://lore.kernel.org/all/cover.1657703926.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