* [Intel-gfx] [PATCH 1/2] drm/i915: Early return for no-op i915_vma_pin_fence()
@ 2020-01-08 15:35 Chris Wilson
2020-01-08 15:35 ` [Intel-gfx] [PATCH 2/2] drm/i915: Reduce warning for i915_vma_pin_iomap() without runtime-pm Chris Wilson
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Chris Wilson @ 2020-01-08 15:35 UTC (permalink / raw)
To: intel-gfx
If we have no fence and desire no fence on the vma, return before we try
and take the vm->mutex.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
---
drivers/gpu/drm/i915/i915_gem_fence_reg.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/i915/i915_gem_fence_reg.c b/drivers/gpu/drm/i915/i915_gem_fence_reg.c
index 71efccfde122..d9c34a23cd67 100644
--- a/drivers/gpu/drm/i915/i915_gem_fence_reg.c
+++ b/drivers/gpu/drm/i915/i915_gem_fence_reg.c
@@ -412,6 +412,9 @@ int i915_vma_pin_fence(struct i915_vma *vma)
{
int err;
+ if (!vma->fence && !i915_gem_object_is_tiled(vma->obj))
+ return 0;
+
/*
* Note that we revoke fences on runtime suspend. Therefore the user
* must keep the device awake whilst using the fence.
--
2.25.0.rc1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Intel-gfx] [PATCH 2/2] drm/i915: Reduce warning for i915_vma_pin_iomap() without runtime-pm
2020-01-08 15:35 [Intel-gfx] [PATCH 1/2] drm/i915: Early return for no-op i915_vma_pin_fence() Chris Wilson
@ 2020-01-08 15:35 ` Chris Wilson
2020-01-10 11:39 ` Mika Kuoppala
2020-01-09 8:08 ` [Intel-gfx] [PATCH 1/2] drm/i915: Early return for no-op i915_vma_pin_fence() Mika Kuoppala
2020-01-09 10:47 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for series starting with [1/2] " Patchwork
2 siblings, 1 reply; 5+ messages in thread
From: Chris Wilson @ 2020-01-08 15:35 UTC (permalink / raw)
To: intel-gfx
Access through the GGTT (iomap) into the vma does require the device to
be awake. However, we often take the i915_vma_pin_iomap() as an early
preparatory step that is long before we use the iomap. Asserting that
the device is awake at pin time does not protect us, and is merely a
nuisance.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
---
drivers/gpu/drm/i915/i915_vma.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_vma.c b/drivers/gpu/drm/i915/i915_vma.c
index cbd783c31adb..43d5c270bdb0 100644
--- a/drivers/gpu/drm/i915/i915_vma.c
+++ b/drivers/gpu/drm/i915/i915_vma.c
@@ -423,8 +423,6 @@ void __iomem *i915_vma_pin_iomap(struct i915_vma *vma)
void __iomem *ptr;
int err;
- /* Access through the GTT requires the device to be awake. */
- assert_rpm_wakelock_held(vma->vm->gt->uncore->rpm);
if (GEM_WARN_ON(!i915_vma_is_map_and_fenceable(vma))) {
err = -ENODEV;
goto err;
@@ -456,6 +454,8 @@ void __iomem *i915_vma_pin_iomap(struct i915_vma *vma)
goto err_unpin;
i915_vma_set_ggtt_write(vma);
+
+ /* NB Access through the GTT requires the device to be awake. */
return ptr;
err_unpin:
--
2.25.0.rc1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [Intel-gfx] [PATCH 1/2] drm/i915: Early return for no-op i915_vma_pin_fence()
2020-01-08 15:35 [Intel-gfx] [PATCH 1/2] drm/i915: Early return for no-op i915_vma_pin_fence() Chris Wilson
2020-01-08 15:35 ` [Intel-gfx] [PATCH 2/2] drm/i915: Reduce warning for i915_vma_pin_iomap() without runtime-pm Chris Wilson
@ 2020-01-09 8:08 ` Mika Kuoppala
2020-01-09 10:47 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for series starting with [1/2] " Patchwork
2 siblings, 0 replies; 5+ messages in thread
From: Mika Kuoppala @ 2020-01-09 8:08 UTC (permalink / raw)
To: Chris Wilson, intel-gfx
Chris Wilson <chris@chris-wilson.co.uk> writes:
> If we have no fence and desire no fence on the vma, return before we try
> and take the vm->mutex.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> ---
> drivers/gpu/drm/i915/i915_gem_fence_reg.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem_fence_reg.c b/drivers/gpu/drm/i915/i915_gem_fence_reg.c
> index 71efccfde122..d9c34a23cd67 100644
> --- a/drivers/gpu/drm/i915/i915_gem_fence_reg.c
> +++ b/drivers/gpu/drm/i915/i915_gem_fence_reg.c
> @@ -412,6 +412,9 @@ int i915_vma_pin_fence(struct i915_vma *vma)
> {
> int err;
>
> + if (!vma->fence && !i915_gem_object_is_tiled(vma->obj))
> + return 0;
> +
> /*
> * Note that we revoke fences on runtime suspend. Therefore the user
> * must keep the device awake whilst using the fence.
> --
> 2.25.0.rc1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Intel-gfx] ✗ Fi.CI.BAT: failure for series starting with [1/2] drm/i915: Early return for no-op i915_vma_pin_fence()
2020-01-08 15:35 [Intel-gfx] [PATCH 1/2] drm/i915: Early return for no-op i915_vma_pin_fence() Chris Wilson
2020-01-08 15:35 ` [Intel-gfx] [PATCH 2/2] drm/i915: Reduce warning for i915_vma_pin_iomap() without runtime-pm Chris Wilson
2020-01-09 8:08 ` [Intel-gfx] [PATCH 1/2] drm/i915: Early return for no-op i915_vma_pin_fence() Mika Kuoppala
@ 2020-01-09 10:47 ` Patchwork
2 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2020-01-09 10:47 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
== Series Details ==
Series: series starting with [1/2] drm/i915: Early return for no-op i915_vma_pin_fence()
URL : https://patchwork.freedesktop.org/series/71772/
State : failure
== Summary ==
Applying: drm/i915: Early return for no-op i915_vma_pin_fence()
Using index info to reconstruct a base tree...
M drivers/gpu/drm/i915/i915_gem_fence_reg.c
Falling back to patching base and 3-way merge...
No changes -- Patch already applied.
Applying: drm/i915: Reduce warning for i915_vma_pin_iomap() without runtime-pm
Using index info to reconstruct a base tree...
M drivers/gpu/drm/i915/i915_vma.c
Falling back to patching base and 3-way merge...
No changes -- Patch already applied.
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Intel-gfx] [PATCH 2/2] drm/i915: Reduce warning for i915_vma_pin_iomap() without runtime-pm
2020-01-08 15:35 ` [Intel-gfx] [PATCH 2/2] drm/i915: Reduce warning for i915_vma_pin_iomap() without runtime-pm Chris Wilson
@ 2020-01-10 11:39 ` Mika Kuoppala
0 siblings, 0 replies; 5+ messages in thread
From: Mika Kuoppala @ 2020-01-10 11:39 UTC (permalink / raw)
To: Chris Wilson, intel-gfx
Chris Wilson <chris@chris-wilson.co.uk> writes:
> Access through the GGTT (iomap) into the vma does require the device to
> be awake. However, we often take the i915_vma_pin_iomap() as an early
> preparatory step that is long before we use the iomap. Asserting that
> the device is awake at pin time does not protect us, and is merely a
> nuisance.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
I do remember stamping this. No matter, i have plenty of ink.
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> ---
> drivers/gpu/drm/i915/i915_vma.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_vma.c b/drivers/gpu/drm/i915/i915_vma.c
> index cbd783c31adb..43d5c270bdb0 100644
> --- a/drivers/gpu/drm/i915/i915_vma.c
> +++ b/drivers/gpu/drm/i915/i915_vma.c
> @@ -423,8 +423,6 @@ void __iomem *i915_vma_pin_iomap(struct i915_vma *vma)
> void __iomem *ptr;
> int err;
>
> - /* Access through the GTT requires the device to be awake. */
> - assert_rpm_wakelock_held(vma->vm->gt->uncore->rpm);
> if (GEM_WARN_ON(!i915_vma_is_map_and_fenceable(vma))) {
> err = -ENODEV;
> goto err;
> @@ -456,6 +454,8 @@ void __iomem *i915_vma_pin_iomap(struct i915_vma *vma)
> goto err_unpin;
>
> i915_vma_set_ggtt_write(vma);
> +
> + /* NB Access through the GTT requires the device to be awake. */
> return ptr;
>
> err_unpin:
> --
> 2.25.0.rc1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-01-10 11:40 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-08 15:35 [Intel-gfx] [PATCH 1/2] drm/i915: Early return for no-op i915_vma_pin_fence() Chris Wilson
2020-01-08 15:35 ` [Intel-gfx] [PATCH 2/2] drm/i915: Reduce warning for i915_vma_pin_iomap() without runtime-pm Chris Wilson
2020-01-10 11:39 ` Mika Kuoppala
2020-01-09 8:08 ` [Intel-gfx] [PATCH 1/2] drm/i915: Early return for no-op i915_vma_pin_fence() Mika Kuoppala
2020-01-09 10:47 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for series starting with [1/2] " 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.