Re: [PATCH v5 1/5] drm/i915/gt: Add intel_context_timeline_is_locked helper

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 12.04.2023 13:33, Andi Shyti wrote:
We have:

  - intel_context_timeline_lock()
  - intel_context_timeline_unlock()

In the next patches we will also need:

  - intel_context_timeline_is_locked()

Add it.

Signed-off-by: Andi Shyti <andi.shyti@xxxxxxxxxxxxxxx>
Cc: stable@xxxxxxxxxxxxxxx
Reviewed-by: Nirmoy Das <nirmoy.das@xxxxxxxxx>

Reviewed-by: Andrzej Hajda <andrzej.hajda@xxxxxxxxx>

Regards
Andrzej

---
  drivers/gpu/drm/i915/gt/intel_context.h | 6 ++++++
  1 file changed, 6 insertions(+)

diff --git a/drivers/gpu/drm/i915/gt/intel_context.h b/drivers/gpu/drm/i915/gt/intel_context.h
index 48f888c3da083..f2f79ff0dfd1d 100644
--- a/drivers/gpu/drm/i915/gt/intel_context.h
+++ b/drivers/gpu/drm/i915/gt/intel_context.h
@@ -270,6 +270,12 @@ static inline void intel_context_timeline_unlock(struct intel_timeline *tl)
  	mutex_unlock(&tl->mutex);
  }
+static inline void intel_context_assert_timeline_is_locked(struct intel_timeline *tl)
+	__must_hold(&tl->mutex)
+{
+	lockdep_assert_held(&tl->mutex);
+}
+
  int intel_context_prepare_remote_request(struct intel_context *ce,
  					 struct i915_request *rq);




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux