All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Mark intel_wakeref_get() as a sleeper
@ 2019-11-20 18:39 ` Chris Wilson
  0 siblings, 0 replies; 10+ messages in thread
From: Chris Wilson @ 2019-11-20 18:39 UTC (permalink / raw)
  To: intel-gfx

Assume that intel_wakereg_get() may take the mutex, and perform other
sleeping actions in the course of its callbacks and so use might_sleep()
to ensure that all callers abide. Anything that cannot sleep has to use
e.g. intel_wakeref_get_if_active() to avoid hitting the non-atomic
paths.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/intel_wakeref.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/i915/intel_wakeref.h b/drivers/gpu/drm/i915/intel_wakeref.h
index cbc4fc0d653f..1686bc76881a 100644
--- a/drivers/gpu/drm/i915/intel_wakeref.h
+++ b/drivers/gpu/drm/i915/intel_wakeref.h
@@ -76,6 +76,7 @@ void __intel_wakeref_put_last(struct intel_wakeref *wf, unsigned long flags);
 static inline int
 intel_wakeref_get(struct intel_wakeref *wf)
 {
+	might_sleep();
 	if (unlikely(!atomic_inc_not_zero(&wf->count)))
 		return __intel_wakeref_get_first(wf);
 
-- 
2.24.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [Intel-gfx] [PATCH] drm/i915: Mark intel_wakeref_get() as a sleeper
@ 2019-11-20 18:39 ` Chris Wilson
  0 siblings, 0 replies; 10+ messages in thread
From: Chris Wilson @ 2019-11-20 18:39 UTC (permalink / raw)
  To: intel-gfx

Assume that intel_wakereg_get() may take the mutex, and perform other
sleeping actions in the course of its callbacks and so use might_sleep()
to ensure that all callers abide. Anything that cannot sleep has to use
e.g. intel_wakeref_get_if_active() to avoid hitting the non-atomic
paths.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/intel_wakeref.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/i915/intel_wakeref.h b/drivers/gpu/drm/i915/intel_wakeref.h
index cbc4fc0d653f..1686bc76881a 100644
--- a/drivers/gpu/drm/i915/intel_wakeref.h
+++ b/drivers/gpu/drm/i915/intel_wakeref.h
@@ -76,6 +76,7 @@ void __intel_wakeref_put_last(struct intel_wakeref *wf, unsigned long flags);
 static inline int
 intel_wakeref_get(struct intel_wakeref *wf)
 {
+	might_sleep();
 	if (unlikely(!atomic_inc_not_zero(&wf->count)))
 		return __intel_wakeref_get_first(wf);
 
-- 
2.24.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* ✗ Fi.CI.BAT: failure for drm/i915: Mark intel_wakeref_get() as a sleeper
@ 2019-11-21  0:34   ` Patchwork
  0 siblings, 0 replies; 10+ messages in thread
From: Patchwork @ 2019-11-21  0:34 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: Mark intel_wakeref_get() as a sleeper
URL   : https://patchwork.freedesktop.org/series/69776/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_7393 -> Patchwork_15356
====================================================

Summary
-------

  **FAILURE**

  Serious unknown changes coming with Patchwork_15356 absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_15356, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15356/index.html

Possible new issues
-------------------

  Here are the unknown changes that may have been introduced in Patchwork_15356:

### IGT changes ###

#### Possible regressions ####

  * igt@runner@aborted:
    - fi-whl-u:           NOTRUN -> [FAIL][1]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15356/fi-whl-u/igt@runner@aborted.html
    - fi-bxt-dsi:         NOTRUN -> [FAIL][2]
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15356/fi-bxt-dsi/igt@runner@aborted.html
    - fi-bsw-n3050:       NOTRUN -> [FAIL][3]
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15356/fi-bsw-n3050/igt@runner@aborted.html
    - fi-bsw-kefka:       NOTRUN -> [FAIL][4]
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15356/fi-bsw-kefka/igt@runner@aborted.html

  
Known issues
------------

  Here are the changes found in Patchwork_15356 that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@i915_selftest@live_hangcheck:
    - fi-hsw-4770r:       [PASS][5] -> [DMESG-FAIL][6] ([fdo#111991])
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7393/fi-hsw-4770r/igt@i915_selftest@live_hangcheck.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15356/fi-hsw-4770r/igt@i915_selftest@live_hangcheck.html

  
#### Warnings ####

  * igt@runner@aborted:
    - fi-icl-guc:         [FAIL][7] ([fdo#110943] / [fdo#111093]) -> [FAIL][8] ([fdo#110191] / [fdo#111093])
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7393/fi-icl-guc/igt@runner@aborted.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15356/fi-icl-guc/igt@runner@aborted.html
    - fi-cml-s:           [FAIL][9] ([fdo#111764] / [fdo#112216]) -> [FAIL][10] ([fdo#111461] / [fdo#112216])
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7393/fi-cml-s/igt@runner@aborted.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15356/fi-cml-s/igt@runner@aborted.html

  
  [fdo#110191]: https://bugs.freedesktop.org/show_bug.cgi?id=110191
  [fdo#110943]: https://bugs.freedesktop.org/show_bug.cgi?id=110943
  [fdo#111093]: https://bugs.freedesktop.org/show_bug.cgi?id=111093
  [fdo#111461]: https://bugs.freedesktop.org/show_bug.cgi?id=111461
  [fdo#111764]: https://bugs.freedesktop.org/show_bug.cgi?id=111764
  [fdo#111991]: https://bugs.freedesktop.org/show_bug.cgi?id=111991
  [fdo#112216]: https://bugs.freedesktop.org/show_bug.cgi?id=112216


Participating hosts (50 -> 43)
------------------------------

  Missing    (7): fi-hsw-4200u fi-bsw-cyan fi-ctg-p8600 fi-cfl-8109u fi-byt-clapper fi-bsw-nick fi-bdw-samus 


Build changes
-------------

  * CI: CI-20190529 -> None
  * Linux: CI_DRM_7393 -> Patchwork_15356

  CI-20190529: 20190529
  CI_DRM_7393: 0e204eb18baca0cd97950bf936fffdbbce1fd337 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_5299: 65fed6a79adea14f7bef6d55530da47d7731d370 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_15356: d990f5e1e93a3731c104f0c5cb1c7d65602086c2 @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

d990f5e1e93a drm/i915: Mark intel_wakeref_get() as a sleeper

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15356/index.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915: Mark intel_wakeref_get() as a sleeper
@ 2019-11-21  0:34   ` Patchwork
  0 siblings, 0 replies; 10+ messages in thread
From: Patchwork @ 2019-11-21  0:34 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: Mark intel_wakeref_get() as a sleeper
URL   : https://patchwork.freedesktop.org/series/69776/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_7393 -> Patchwork_15356
====================================================

Summary
-------

  **FAILURE**

  Serious unknown changes coming with Patchwork_15356 absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_15356, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15356/index.html

Possible new issues
-------------------

  Here are the unknown changes that may have been introduced in Patchwork_15356:

### IGT changes ###

#### Possible regressions ####

  * igt@runner@aborted:
    - fi-whl-u:           NOTRUN -> [FAIL][1]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15356/fi-whl-u/igt@runner@aborted.html
    - fi-bxt-dsi:         NOTRUN -> [FAIL][2]
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15356/fi-bxt-dsi/igt@runner@aborted.html
    - fi-bsw-n3050:       NOTRUN -> [FAIL][3]
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15356/fi-bsw-n3050/igt@runner@aborted.html
    - fi-bsw-kefka:       NOTRUN -> [FAIL][4]
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15356/fi-bsw-kefka/igt@runner@aborted.html

  
Known issues
------------

  Here are the changes found in Patchwork_15356 that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@i915_selftest@live_hangcheck:
    - fi-hsw-4770r:       [PASS][5] -> [DMESG-FAIL][6] ([fdo#111991])
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7393/fi-hsw-4770r/igt@i915_selftest@live_hangcheck.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15356/fi-hsw-4770r/igt@i915_selftest@live_hangcheck.html

  
#### Warnings ####

  * igt@runner@aborted:
    - fi-icl-guc:         [FAIL][7] ([fdo#110943] / [fdo#111093]) -> [FAIL][8] ([fdo#110191] / [fdo#111093])
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7393/fi-icl-guc/igt@runner@aborted.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15356/fi-icl-guc/igt@runner@aborted.html
    - fi-cml-s:           [FAIL][9] ([fdo#111764] / [fdo#112216]) -> [FAIL][10] ([fdo#111461] / [fdo#112216])
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7393/fi-cml-s/igt@runner@aborted.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15356/fi-cml-s/igt@runner@aborted.html

  
  [fdo#110191]: https://bugs.freedesktop.org/show_bug.cgi?id=110191
  [fdo#110943]: https://bugs.freedesktop.org/show_bug.cgi?id=110943
  [fdo#111093]: https://bugs.freedesktop.org/show_bug.cgi?id=111093
  [fdo#111461]: https://bugs.freedesktop.org/show_bug.cgi?id=111461
  [fdo#111764]: https://bugs.freedesktop.org/show_bug.cgi?id=111764
  [fdo#111991]: https://bugs.freedesktop.org/show_bug.cgi?id=111991
  [fdo#112216]: https://bugs.freedesktop.org/show_bug.cgi?id=112216


Participating hosts (50 -> 43)
------------------------------

  Missing    (7): fi-hsw-4200u fi-bsw-cyan fi-ctg-p8600 fi-cfl-8109u fi-byt-clapper fi-bsw-nick fi-bdw-samus 


Build changes
-------------

  * CI: CI-20190529 -> None
  * Linux: CI_DRM_7393 -> Patchwork_15356

  CI-20190529: 20190529
  CI_DRM_7393: 0e204eb18baca0cd97950bf936fffdbbce1fd337 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_5299: 65fed6a79adea14f7bef6d55530da47d7731d370 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_15356: d990f5e1e93a3731c104f0c5cb1c7d65602086c2 @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

d990f5e1e93a drm/i915: Mark intel_wakeref_get() as a sleeper

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15356/index.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH] drm/i915: Mark intel_wakeref_get() as a sleeper
@ 2019-11-21  8:59   ` Chris Wilson
  0 siblings, 0 replies; 10+ messages in thread
From: Chris Wilson @ 2019-11-21  8:59 UTC (permalink / raw)
  To: intel-gfx

Assume that intel_wakereg_get() may take the mutex, and perform other
sleeping actions in the course of its callbacks and so use might_sleep()
to ensure that all callers abide. Anything that cannot sleep has to use
e.g. intel_wakeref_get_if_active() to guarantee its avoidance of the
non-atomic paths.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/gt/intel_gt_pm.h           |  5 +++++
 drivers/gpu/drm/i915/gt/intel_lrc.c             |  2 +-
 .../gpu/drm/i915/gt/uc/intel_guc_submission.c   |  2 +-
 drivers/gpu/drm/i915/intel_wakeref.h            | 17 +++++++++++++++--
 4 files changed, 22 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/gt/intel_gt_pm.h b/drivers/gpu/drm/i915/gt/intel_gt_pm.h
index 990efc27a4e4..4a9e48c12bd4 100644
--- a/drivers/gpu/drm/i915/gt/intel_gt_pm.h
+++ b/drivers/gpu/drm/i915/gt/intel_gt_pm.h
@@ -22,6 +22,11 @@ static inline void intel_gt_pm_get(struct intel_gt *gt)
 	intel_wakeref_get(&gt->wakeref);
 }
 
+static inline void __intel_gt_pm_get(struct intel_gt *gt)
+{
+	__intel_wakeref_get(&gt->wakeref);
+}
+
 static inline bool intel_gt_pm_get_if_awake(struct intel_gt *gt)
 {
 	return intel_wakeref_get_if_active(&gt->wakeref);
diff --git a/drivers/gpu/drm/i915/gt/intel_lrc.c b/drivers/gpu/drm/i915/gt/intel_lrc.c
index b65bc06855b0..516306ebc839 100644
--- a/drivers/gpu/drm/i915/gt/intel_lrc.c
+++ b/drivers/gpu/drm/i915/gt/intel_lrc.c
@@ -1121,7 +1121,7 @@ __execlists_schedule_in(struct i915_request *rq)
 		BUILD_BUG_ON(NUM_CONTEXT_TAG > GEN12_MAX_CONTEXT_HW_ID);
 	}
 
-	intel_gt_pm_get(engine->gt);
+	__intel_gt_pm_get(engine->gt);
 	execlists_context_status_change(rq, INTEL_CONTEXT_SCHEDULE_IN);
 	intel_engine_context_in(engine);
 
diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
index dcccbd640809..6f94af7ad1de 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
@@ -529,7 +529,7 @@ static struct i915_request *schedule_in(struct i915_request *rq, int idx)
 	 * required if we generalise the inflight tracking.
 	 */
 
-	intel_gt_pm_get(rq->engine->gt);
+	__intel_gt_pm_get(rq->engine->gt);
 	return i915_request_get(rq);
 }
 
diff --git a/drivers/gpu/drm/i915/intel_wakeref.h b/drivers/gpu/drm/i915/intel_wakeref.h
index da6e8fd506e6..3897bfea72d9 100644
--- a/drivers/gpu/drm/i915/intel_wakeref.h
+++ b/drivers/gpu/drm/i915/intel_wakeref.h
@@ -59,9 +59,7 @@ void __intel_wakeref_put_last(struct intel_wakeref *wf, unsigned long flags);
 
 /**
  * intel_wakeref_get: Acquire the wakeref
- * @i915: the drm_i915_private device
  * @wf: the wakeref
- * @fn: callback for acquired the wakeref, called only on first acquire.
  *
  * Acquire a hold on the wakeref. The first user to do so, will acquire
  * the runtime pm wakeref and then call the @fn underneath the wakeref
@@ -76,12 +74,27 @@ void __intel_wakeref_put_last(struct intel_wakeref *wf, unsigned long flags);
 static inline int
 intel_wakeref_get(struct intel_wakeref *wf)
 {
+	might_sleep();
 	if (unlikely(!atomic_inc_not_zero(&wf->count)))
 		return __intel_wakeref_get_first(wf);
 
 	return 0;
 }
 
+/**
+ * __intel_wakeref_get: Acquire the wakeref, again
+ * @wf: the wakeref
+ *
+ * Increment the wakeref counter, but only valid if it is already held by
+ * the caller.
+ */
+static inline void
+__intel_wakeref_get(struct intel_wakeref *wf)
+{
+	INTEL_WAKEREF_BUG_ON(!atomic_read(&wf->count));
+	atomic_inc(&wf->count);
+}
+
 /**
  * intel_wakeref_get_if_in_use: Acquire the wakeref
  * @wf: the wakeref
-- 
2.24.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [Intel-gfx] [PATCH] drm/i915: Mark intel_wakeref_get() as a sleeper
@ 2019-11-21  8:59   ` Chris Wilson
  0 siblings, 0 replies; 10+ messages in thread
From: Chris Wilson @ 2019-11-21  8:59 UTC (permalink / raw)
  To: intel-gfx

Assume that intel_wakereg_get() may take the mutex, and perform other
sleeping actions in the course of its callbacks and so use might_sleep()
to ensure that all callers abide. Anything that cannot sleep has to use
e.g. intel_wakeref_get_if_active() to guarantee its avoidance of the
non-atomic paths.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/gt/intel_gt_pm.h           |  5 +++++
 drivers/gpu/drm/i915/gt/intel_lrc.c             |  2 +-
 .../gpu/drm/i915/gt/uc/intel_guc_submission.c   |  2 +-
 drivers/gpu/drm/i915/intel_wakeref.h            | 17 +++++++++++++++--
 4 files changed, 22 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/gt/intel_gt_pm.h b/drivers/gpu/drm/i915/gt/intel_gt_pm.h
index 990efc27a4e4..4a9e48c12bd4 100644
--- a/drivers/gpu/drm/i915/gt/intel_gt_pm.h
+++ b/drivers/gpu/drm/i915/gt/intel_gt_pm.h
@@ -22,6 +22,11 @@ static inline void intel_gt_pm_get(struct intel_gt *gt)
 	intel_wakeref_get(&gt->wakeref);
 }
 
+static inline void __intel_gt_pm_get(struct intel_gt *gt)
+{
+	__intel_wakeref_get(&gt->wakeref);
+}
+
 static inline bool intel_gt_pm_get_if_awake(struct intel_gt *gt)
 {
 	return intel_wakeref_get_if_active(&gt->wakeref);
diff --git a/drivers/gpu/drm/i915/gt/intel_lrc.c b/drivers/gpu/drm/i915/gt/intel_lrc.c
index b65bc06855b0..516306ebc839 100644
--- a/drivers/gpu/drm/i915/gt/intel_lrc.c
+++ b/drivers/gpu/drm/i915/gt/intel_lrc.c
@@ -1121,7 +1121,7 @@ __execlists_schedule_in(struct i915_request *rq)
 		BUILD_BUG_ON(NUM_CONTEXT_TAG > GEN12_MAX_CONTEXT_HW_ID);
 	}
 
-	intel_gt_pm_get(engine->gt);
+	__intel_gt_pm_get(engine->gt);
 	execlists_context_status_change(rq, INTEL_CONTEXT_SCHEDULE_IN);
 	intel_engine_context_in(engine);
 
diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
index dcccbd640809..6f94af7ad1de 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
@@ -529,7 +529,7 @@ static struct i915_request *schedule_in(struct i915_request *rq, int idx)
 	 * required if we generalise the inflight tracking.
 	 */
 
-	intel_gt_pm_get(rq->engine->gt);
+	__intel_gt_pm_get(rq->engine->gt);
 	return i915_request_get(rq);
 }
 
diff --git a/drivers/gpu/drm/i915/intel_wakeref.h b/drivers/gpu/drm/i915/intel_wakeref.h
index da6e8fd506e6..3897bfea72d9 100644
--- a/drivers/gpu/drm/i915/intel_wakeref.h
+++ b/drivers/gpu/drm/i915/intel_wakeref.h
@@ -59,9 +59,7 @@ void __intel_wakeref_put_last(struct intel_wakeref *wf, unsigned long flags);
 
 /**
  * intel_wakeref_get: Acquire the wakeref
- * @i915: the drm_i915_private device
  * @wf: the wakeref
- * @fn: callback for acquired the wakeref, called only on first acquire.
  *
  * Acquire a hold on the wakeref. The first user to do so, will acquire
  * the runtime pm wakeref and then call the @fn underneath the wakeref
@@ -76,12 +74,27 @@ void __intel_wakeref_put_last(struct intel_wakeref *wf, unsigned long flags);
 static inline int
 intel_wakeref_get(struct intel_wakeref *wf)
 {
+	might_sleep();
 	if (unlikely(!atomic_inc_not_zero(&wf->count)))
 		return __intel_wakeref_get_first(wf);
 
 	return 0;
 }
 
+/**
+ * __intel_wakeref_get: Acquire the wakeref, again
+ * @wf: the wakeref
+ *
+ * Increment the wakeref counter, but only valid if it is already held by
+ * the caller.
+ */
+static inline void
+__intel_wakeref_get(struct intel_wakeref *wf)
+{
+	INTEL_WAKEREF_BUG_ON(!atomic_read(&wf->count));
+	atomic_inc(&wf->count);
+}
+
 /**
  * intel_wakeref_get_if_in_use: Acquire the wakeref
  * @wf: the wakeref
-- 
2.24.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* ✓ Fi.CI.BAT: success for drm/i915: Mark intel_wakeref_get() as a sleeper (rev2)
@ 2019-11-21 10:55   ` Patchwork
  0 siblings, 0 replies; 10+ messages in thread
From: Patchwork @ 2019-11-21 10:55 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: Mark intel_wakeref_get() as a sleeper (rev2)
URL   : https://patchwork.freedesktop.org/series/69776/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_7397 -> Patchwork_15370
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15370/index.html

Known issues
------------

  Here are the changes found in Patchwork_15370 that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@i915_module_load@reload-with-fault-injection:
    - fi-skl-6770hq:      [PASS][1] -> [DMESG-WARN][2] ([fdo#105541])
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7397/fi-skl-6770hq/igt@i915_module_load@reload-with-fault-injection.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15370/fi-skl-6770hq/igt@i915_module_load@reload-with-fault-injection.html

  * igt@kms_chamelium@dp-hpd-fast:
    - fi-icl-u2:          [PASS][3] -> [DMESG-WARN][4] ([fdo#110595])
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7397/fi-icl-u2/igt@kms_chamelium@dp-hpd-fast.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15370/fi-icl-u2/igt@kms_chamelium@dp-hpd-fast.html

  * igt@kms_chamelium@hdmi-hpd-fast:
    - fi-kbl-7500u:       [PASS][5] -> [FAIL][6] ([fdo#111407])
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7397/fi-kbl-7500u/igt@kms_chamelium@hdmi-hpd-fast.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15370/fi-kbl-7500u/igt@kms_chamelium@hdmi-hpd-fast.html

  * igt@kms_frontbuffer_tracking@basic:
    - fi-hsw-peppy:       [PASS][7] -> [DMESG-WARN][8] ([fdo#102614])
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7397/fi-hsw-peppy/igt@kms_frontbuffer_tracking@basic.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15370/fi-hsw-peppy/igt@kms_frontbuffer_tracking@basic.html

  
#### Possible fixes ####

  * igt@i915_pm_rpm@module-reload:
    - fi-skl-lmem:        [DMESG-WARN][9] ([fdo#112261]) -> [PASS][10]
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7397/fi-skl-lmem/igt@i915_pm_rpm@module-reload.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15370/fi-skl-lmem/igt@i915_pm_rpm@module-reload.html

  * igt@i915_selftest@live_blt:
    - fi-hsw-peppy:       [DMESG-FAIL][11] ([fdo#112147]) -> [PASS][12]
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7397/fi-hsw-peppy/igt@i915_selftest@live_blt.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15370/fi-hsw-peppy/igt@i915_selftest@live_blt.html

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [fdo#102614]: https://bugs.freedesktop.org/show_bug.cgi?id=102614
  [fdo#105541]: https://bugs.freedesktop.org/show_bug.cgi?id=105541
  [fdo#109964]: https://bugs.freedesktop.org/show_bug.cgi?id=109964
  [fdo#110595]: https://bugs.freedesktop.org/show_bug.cgi?id=110595
  [fdo#111407]: https://bugs.freedesktop.org/show_bug.cgi?id=111407
  [fdo#112147]: https://bugs.freedesktop.org/show_bug.cgi?id=112147
  [fdo#112260]: https://bugs.freedesktop.org/show_bug.cgi?id=112260
  [fdo#112261]: https://bugs.freedesktop.org/show_bug.cgi?id=112261
  [fdo#112298]: https://bugs.freedesktop.org/show_bug.cgi?id=112298


Participating hosts (50 -> 40)
------------------------------

  Missing    (10): fi-kbl-soraka fi-hsw-4200u fi-bsw-cyan fi-ctg-p8600 fi-pnv-d510 fi-bdw-samus fi-icl-guc fi-byt-clapper fi-bsw-nick fi-skl-6700k2 


Build changes
-------------

  * CI: CI-20190529 -> None
  * Linux: CI_DRM_7397 -> Patchwork_15370

  CI-20190529: 20190529
  CI_DRM_7397: fbec270656a873c25d05a69d40c5335bedd68a67 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_5299: 65fed6a79adea14f7bef6d55530da47d7731d370 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_15370: 624c2f36b96b8e947b4a5f781bac1735dc4c25d1 @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

624c2f36b96b drm/i915: Mark intel_wakeref_get() as a sleeper

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15370/index.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Mark intel_wakeref_get() as a sleeper (rev2)
@ 2019-11-21 10:55   ` Patchwork
  0 siblings, 0 replies; 10+ messages in thread
From: Patchwork @ 2019-11-21 10:55 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: Mark intel_wakeref_get() as a sleeper (rev2)
URL   : https://patchwork.freedesktop.org/series/69776/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_7397 -> Patchwork_15370
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15370/index.html

Known issues
------------

  Here are the changes found in Patchwork_15370 that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@i915_module_load@reload-with-fault-injection:
    - fi-skl-6770hq:      [PASS][1] -> [DMESG-WARN][2] ([fdo#105541])
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7397/fi-skl-6770hq/igt@i915_module_load@reload-with-fault-injection.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15370/fi-skl-6770hq/igt@i915_module_load@reload-with-fault-injection.html

  * igt@kms_chamelium@dp-hpd-fast:
    - fi-icl-u2:          [PASS][3] -> [DMESG-WARN][4] ([fdo#110595])
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7397/fi-icl-u2/igt@kms_chamelium@dp-hpd-fast.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15370/fi-icl-u2/igt@kms_chamelium@dp-hpd-fast.html

  * igt@kms_chamelium@hdmi-hpd-fast:
    - fi-kbl-7500u:       [PASS][5] -> [FAIL][6] ([fdo#111407])
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7397/fi-kbl-7500u/igt@kms_chamelium@hdmi-hpd-fast.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15370/fi-kbl-7500u/igt@kms_chamelium@hdmi-hpd-fast.html

  * igt@kms_frontbuffer_tracking@basic:
    - fi-hsw-peppy:       [PASS][7] -> [DMESG-WARN][8] ([fdo#102614])
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7397/fi-hsw-peppy/igt@kms_frontbuffer_tracking@basic.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15370/fi-hsw-peppy/igt@kms_frontbuffer_tracking@basic.html

  
#### Possible fixes ####

  * igt@i915_pm_rpm@module-reload:
    - fi-skl-lmem:        [DMESG-WARN][9] ([fdo#112261]) -> [PASS][10]
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7397/fi-skl-lmem/igt@i915_pm_rpm@module-reload.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15370/fi-skl-lmem/igt@i915_pm_rpm@module-reload.html

  * igt@i915_selftest@live_blt:
    - fi-hsw-peppy:       [DMESG-FAIL][11] ([fdo#112147]) -> [PASS][12]
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7397/fi-hsw-peppy/igt@i915_selftest@live_blt.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15370/fi-hsw-peppy/igt@i915_selftest@live_blt.html

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [fdo#102614]: https://bugs.freedesktop.org/show_bug.cgi?id=102614
  [fdo#105541]: https://bugs.freedesktop.org/show_bug.cgi?id=105541
  [fdo#109964]: https://bugs.freedesktop.org/show_bug.cgi?id=109964
  [fdo#110595]: https://bugs.freedesktop.org/show_bug.cgi?id=110595
  [fdo#111407]: https://bugs.freedesktop.org/show_bug.cgi?id=111407
  [fdo#112147]: https://bugs.freedesktop.org/show_bug.cgi?id=112147
  [fdo#112260]: https://bugs.freedesktop.org/show_bug.cgi?id=112260
  [fdo#112261]: https://bugs.freedesktop.org/show_bug.cgi?id=112261
  [fdo#112298]: https://bugs.freedesktop.org/show_bug.cgi?id=112298


Participating hosts (50 -> 40)
------------------------------

  Missing    (10): fi-kbl-soraka fi-hsw-4200u fi-bsw-cyan fi-ctg-p8600 fi-pnv-d510 fi-bdw-samus fi-icl-guc fi-byt-clapper fi-bsw-nick fi-skl-6700k2 


Build changes
-------------

  * CI: CI-20190529 -> None
  * Linux: CI_DRM_7397 -> Patchwork_15370

  CI-20190529: 20190529
  CI_DRM_7397: fbec270656a873c25d05a69d40c5335bedd68a67 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_5299: 65fed6a79adea14f7bef6d55530da47d7731d370 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_15370: 624c2f36b96b8e947b4a5f781bac1735dc4c25d1 @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

624c2f36b96b drm/i915: Mark intel_wakeref_get() as a sleeper

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15370/index.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] drm/i915: Mark intel_wakeref_get() as a sleeper
@ 2019-11-21 12:55     ` Mika Kuoppala
  0 siblings, 0 replies; 10+ messages in thread
From: Mika Kuoppala @ 2019-11-21 12:55 UTC (permalink / raw)
  To: Chris Wilson, intel-gfx

Chris Wilson <chris@chris-wilson.co.uk> writes:

> Assume that intel_wakereg_get() may take the mutex, and perform other
> sleeping actions in the course of its callbacks and so use might_sleep()
> to ensure that all callers abide. Anything that cannot sleep has to use
> e.g. intel_wakeref_get_if_active() to guarantee its avoidance of the
> non-atomic paths.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>

> ---
>  drivers/gpu/drm/i915/gt/intel_gt_pm.h           |  5 +++++
>  drivers/gpu/drm/i915/gt/intel_lrc.c             |  2 +-
>  .../gpu/drm/i915/gt/uc/intel_guc_submission.c   |  2 +-
>  drivers/gpu/drm/i915/intel_wakeref.h            | 17 +++++++++++++++--
>  4 files changed, 22 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gt/intel_gt_pm.h b/drivers/gpu/drm/i915/gt/intel_gt_pm.h
> index 990efc27a4e4..4a9e48c12bd4 100644
> --- a/drivers/gpu/drm/i915/gt/intel_gt_pm.h
> +++ b/drivers/gpu/drm/i915/gt/intel_gt_pm.h
> @@ -22,6 +22,11 @@ static inline void intel_gt_pm_get(struct intel_gt *gt)
>  	intel_wakeref_get(&gt->wakeref);
>  }
>  
> +static inline void __intel_gt_pm_get(struct intel_gt *gt)
> +{
> +	__intel_wakeref_get(&gt->wakeref);
> +}
> +
>  static inline bool intel_gt_pm_get_if_awake(struct intel_gt *gt)
>  {
>  	return intel_wakeref_get_if_active(&gt->wakeref);
> diff --git a/drivers/gpu/drm/i915/gt/intel_lrc.c b/drivers/gpu/drm/i915/gt/intel_lrc.c
> index b65bc06855b0..516306ebc839 100644
> --- a/drivers/gpu/drm/i915/gt/intel_lrc.c
> +++ b/drivers/gpu/drm/i915/gt/intel_lrc.c
> @@ -1121,7 +1121,7 @@ __execlists_schedule_in(struct i915_request *rq)
>  		BUILD_BUG_ON(NUM_CONTEXT_TAG > GEN12_MAX_CONTEXT_HW_ID);
>  	}
>  
> -	intel_gt_pm_get(engine->gt);
> +	__intel_gt_pm_get(engine->gt);
>  	execlists_context_status_change(rq, INTEL_CONTEXT_SCHEDULE_IN);
>  	intel_engine_context_in(engine);
>  
> diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
> index dcccbd640809..6f94af7ad1de 100644
> --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
> +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
> @@ -529,7 +529,7 @@ static struct i915_request *schedule_in(struct i915_request *rq, int idx)
>  	 * required if we generalise the inflight tracking.
>  	 */
>  
> -	intel_gt_pm_get(rq->engine->gt);
> +	__intel_gt_pm_get(rq->engine->gt);
>  	return i915_request_get(rq);
>  }
>  
> diff --git a/drivers/gpu/drm/i915/intel_wakeref.h b/drivers/gpu/drm/i915/intel_wakeref.h
> index da6e8fd506e6..3897bfea72d9 100644
> --- a/drivers/gpu/drm/i915/intel_wakeref.h
> +++ b/drivers/gpu/drm/i915/intel_wakeref.h
> @@ -59,9 +59,7 @@ void __intel_wakeref_put_last(struct intel_wakeref *wf, unsigned long flags);
>  
>  /**
>   * intel_wakeref_get: Acquire the wakeref
> - * @i915: the drm_i915_private device
>   * @wf: the wakeref
> - * @fn: callback for acquired the wakeref, called only on first acquire.
>   *
>   * Acquire a hold on the wakeref. The first user to do so, will acquire
>   * the runtime pm wakeref and then call the @fn underneath the wakeref
> @@ -76,12 +74,27 @@ void __intel_wakeref_put_last(struct intel_wakeref *wf, unsigned long flags);
>  static inline int
>  intel_wakeref_get(struct intel_wakeref *wf)
>  {
> +	might_sleep();
>  	if (unlikely(!atomic_inc_not_zero(&wf->count)))
>  		return __intel_wakeref_get_first(wf);
>  
>  	return 0;
>  }
>  
> +/**
> + * __intel_wakeref_get: Acquire the wakeref, again
> + * @wf: the wakeref
> + *
> + * Increment the wakeref counter, but only valid if it is already held by
> + * the caller.
> + */
> +static inline void
> +__intel_wakeref_get(struct intel_wakeref *wf)
> +{
> +	INTEL_WAKEREF_BUG_ON(!atomic_read(&wf->count));
> +	atomic_inc(&wf->count);
> +}
> +
>  /**
>   * intel_wakeref_get_if_in_use: Acquire the wakeref
>   * @wf: the wakeref
> -- 
> 2.24.0
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Intel-gfx] [PATCH] drm/i915: Mark intel_wakeref_get() as a sleeper
@ 2019-11-21 12:55     ` Mika Kuoppala
  0 siblings, 0 replies; 10+ messages in thread
From: Mika Kuoppala @ 2019-11-21 12:55 UTC (permalink / raw)
  To: Chris Wilson, intel-gfx

Chris Wilson <chris@chris-wilson.co.uk> writes:

> Assume that intel_wakereg_get() may take the mutex, and perform other
> sleeping actions in the course of its callbacks and so use might_sleep()
> to ensure that all callers abide. Anything that cannot sleep has to use
> e.g. intel_wakeref_get_if_active() to guarantee its avoidance of the
> non-atomic paths.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>

> ---
>  drivers/gpu/drm/i915/gt/intel_gt_pm.h           |  5 +++++
>  drivers/gpu/drm/i915/gt/intel_lrc.c             |  2 +-
>  .../gpu/drm/i915/gt/uc/intel_guc_submission.c   |  2 +-
>  drivers/gpu/drm/i915/intel_wakeref.h            | 17 +++++++++++++++--
>  4 files changed, 22 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gt/intel_gt_pm.h b/drivers/gpu/drm/i915/gt/intel_gt_pm.h
> index 990efc27a4e4..4a9e48c12bd4 100644
> --- a/drivers/gpu/drm/i915/gt/intel_gt_pm.h
> +++ b/drivers/gpu/drm/i915/gt/intel_gt_pm.h
> @@ -22,6 +22,11 @@ static inline void intel_gt_pm_get(struct intel_gt *gt)
>  	intel_wakeref_get(&gt->wakeref);
>  }
>  
> +static inline void __intel_gt_pm_get(struct intel_gt *gt)
> +{
> +	__intel_wakeref_get(&gt->wakeref);
> +}
> +
>  static inline bool intel_gt_pm_get_if_awake(struct intel_gt *gt)
>  {
>  	return intel_wakeref_get_if_active(&gt->wakeref);
> diff --git a/drivers/gpu/drm/i915/gt/intel_lrc.c b/drivers/gpu/drm/i915/gt/intel_lrc.c
> index b65bc06855b0..516306ebc839 100644
> --- a/drivers/gpu/drm/i915/gt/intel_lrc.c
> +++ b/drivers/gpu/drm/i915/gt/intel_lrc.c
> @@ -1121,7 +1121,7 @@ __execlists_schedule_in(struct i915_request *rq)
>  		BUILD_BUG_ON(NUM_CONTEXT_TAG > GEN12_MAX_CONTEXT_HW_ID);
>  	}
>  
> -	intel_gt_pm_get(engine->gt);
> +	__intel_gt_pm_get(engine->gt);
>  	execlists_context_status_change(rq, INTEL_CONTEXT_SCHEDULE_IN);
>  	intel_engine_context_in(engine);
>  
> diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
> index dcccbd640809..6f94af7ad1de 100644
> --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
> +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
> @@ -529,7 +529,7 @@ static struct i915_request *schedule_in(struct i915_request *rq, int idx)
>  	 * required if we generalise the inflight tracking.
>  	 */
>  
> -	intel_gt_pm_get(rq->engine->gt);
> +	__intel_gt_pm_get(rq->engine->gt);
>  	return i915_request_get(rq);
>  }
>  
> diff --git a/drivers/gpu/drm/i915/intel_wakeref.h b/drivers/gpu/drm/i915/intel_wakeref.h
> index da6e8fd506e6..3897bfea72d9 100644
> --- a/drivers/gpu/drm/i915/intel_wakeref.h
> +++ b/drivers/gpu/drm/i915/intel_wakeref.h
> @@ -59,9 +59,7 @@ void __intel_wakeref_put_last(struct intel_wakeref *wf, unsigned long flags);
>  
>  /**
>   * intel_wakeref_get: Acquire the wakeref
> - * @i915: the drm_i915_private device
>   * @wf: the wakeref
> - * @fn: callback for acquired the wakeref, called only on first acquire.
>   *
>   * Acquire a hold on the wakeref. The first user to do so, will acquire
>   * the runtime pm wakeref and then call the @fn underneath the wakeref
> @@ -76,12 +74,27 @@ void __intel_wakeref_put_last(struct intel_wakeref *wf, unsigned long flags);
>  static inline int
>  intel_wakeref_get(struct intel_wakeref *wf)
>  {
> +	might_sleep();
>  	if (unlikely(!atomic_inc_not_zero(&wf->count)))
>  		return __intel_wakeref_get_first(wf);
>  
>  	return 0;
>  }
>  
> +/**
> + * __intel_wakeref_get: Acquire the wakeref, again
> + * @wf: the wakeref
> + *
> + * Increment the wakeref counter, but only valid if it is already held by
> + * the caller.
> + */
> +static inline void
> +__intel_wakeref_get(struct intel_wakeref *wf)
> +{
> +	INTEL_WAKEREF_BUG_ON(!atomic_read(&wf->count));
> +	atomic_inc(&wf->count);
> +}
> +
>  /**
>   * intel_wakeref_get_if_in_use: Acquire the wakeref
>   * @wf: the wakeref
> -- 
> 2.24.0
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2019-11-21 12:56 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-11-20 18:39 [PATCH] drm/i915: Mark intel_wakeref_get() as a sleeper Chris Wilson
2019-11-20 18:39 ` [Intel-gfx] " Chris Wilson
2019-11-21  0:34 ` ✗ Fi.CI.BAT: failure for " Patchwork
2019-11-21  0:34   ` [Intel-gfx] " Patchwork
2019-11-21  8:59 ` [PATCH] " Chris Wilson
2019-11-21  8:59   ` [Intel-gfx] " Chris Wilson
2019-11-21 12:55   ` Mika Kuoppala
2019-11-21 12:55     ` [Intel-gfx] " Mika Kuoppala
2019-11-21 10:55 ` ✓ Fi.CI.BAT: success for drm/i915: Mark intel_wakeref_get() as a sleeper (rev2) Patchwork
2019-11-21 10:55   ` [Intel-gfx] " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.