Commit 4d87d362 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab Committed by Andi Shyti
Browse files

drm/i915/gt: document with_intel_gt_pm_if_awake()

parent 4bedceae
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -55,6 +55,14 @@ 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 asynchrously 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)