All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Stop sleeping from inside gen6_bsd_submit_request()
@ 2017-04-10 14:37 Chris Wilson
  2017-04-10 14:38 ` Chris Wilson
  2017-04-10 15:07 ` ✗ Fi.CI.BAT: warning for drm/i915: Stop sleeping from inside gen6_bsd_submit_request() (rev2) Patchwork
  0 siblings, 2 replies; 5+ messages in thread
From: Chris Wilson @ 2017-04-10 14:37 UTC (permalink / raw)
  To: intel-gfx

submit_request() is called from an atomic context, it's not allowed to
sleep. We have to be careful in our parameters to
intel_uncore_wait_for_register() to limit ourselves to the atomic wait
loop and not incur the wrath of our warnings.

Fixes: 3fc7d86b3268 ("drm/i915: Drop const qualifiers from params in wait_for_register()")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_ringbuffer.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
index c98acc27279a..331da59a1eb5 100644
--- a/drivers/gpu/drm/i915/intel_ringbuffer.c
+++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
@@ -1729,11 +1729,11 @@ static void gen6_bsd_submit_request(struct drm_i915_gem_request *request)
 	I915_WRITE64_FW(GEN6_BSD_RNCID, 0x0);
 
 	/* Wait for the ring not to be idle, i.e. for it to wake up. */
-	if (intel_wait_for_register_fw(dev_priv,
-				       GEN6_BSD_SLEEP_PSMI_CONTROL,
-				       GEN6_BSD_SLEEP_INDICATOR,
-				       0,
-				       50))
+	if (__intel_wait_for_register_fw(dev_priv,
+					 GEN6_BSD_SLEEP_PSMI_CONTROL,
+					 GEN6_BSD_SLEEP_INDICATOR,
+					 0,
+					 1000, 0, NULL))
 		DRM_ERROR("timed out waiting for the BSD ring to wake up\n");
 
 	/* Now that the ring is fully powered up, update the tail */
-- 
2.11.0

_______________________________________________
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

* [PATCH] drm/i915: Stop sleeping from inside gen6_bsd_submit_request()
  2017-04-10 14:37 [PATCH] drm/i915: Stop sleeping from inside gen6_bsd_submit_request() Chris Wilson
@ 2017-04-10 14:38 ` Chris Wilson
  2017-04-10 14:43   ` Michal Wajdeczko
  2017-04-10 15:07 ` ✗ Fi.CI.BAT: warning for drm/i915: Stop sleeping from inside gen6_bsd_submit_request() (rev2) Patchwork
  1 sibling, 1 reply; 5+ messages in thread
From: Chris Wilson @ 2017-04-10 14:38 UTC (permalink / raw)
  To: intel-gfx

submit_request() is called from an atomic context, it's not allowed to
sleep. We have to be careful in our parameters to
intel_uncore_wait_for_register() to limit ourselves to the atomic wait
loop and not incur the wrath of our warnings.

Fixes: 6976e74b5fa1 ("drm/i915: Don't allow overuse of __intel_wait_for_register_fw()")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_ringbuffer.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
index c98acc27279a..331da59a1eb5 100644
--- a/drivers/gpu/drm/i915/intel_ringbuffer.c
+++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
@@ -1729,11 +1729,11 @@ static void gen6_bsd_submit_request(struct drm_i915_gem_request *request)
 	I915_WRITE64_FW(GEN6_BSD_RNCID, 0x0);
 
 	/* Wait for the ring not to be idle, i.e. for it to wake up. */
-	if (intel_wait_for_register_fw(dev_priv,
-				       GEN6_BSD_SLEEP_PSMI_CONTROL,
-				       GEN6_BSD_SLEEP_INDICATOR,
-				       0,
-				       50))
+	if (__intel_wait_for_register_fw(dev_priv,
+					 GEN6_BSD_SLEEP_PSMI_CONTROL,
+					 GEN6_BSD_SLEEP_INDICATOR,
+					 0,
+					 1000, 0, NULL))
 		DRM_ERROR("timed out waiting for the BSD ring to wake up\n");
 
 	/* Now that the ring is fully powered up, update the tail */
-- 
2.11.0

_______________________________________________
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: [PATCH] drm/i915: Stop sleeping from inside gen6_bsd_submit_request()
  2017-04-10 14:38 ` Chris Wilson
@ 2017-04-10 14:43   ` Michal Wajdeczko
  2017-04-10 14:50     ` Chris Wilson
  0 siblings, 1 reply; 5+ messages in thread
From: Michal Wajdeczko @ 2017-04-10 14:43 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

On Mon, Apr 10, 2017 at 03:38:07PM +0100, Chris Wilson wrote:
> submit_request() is called from an atomic context, it's not allowed to
> sleep. We have to be careful in our parameters to
> intel_uncore_wait_for_register() to limit ourselves to the atomic wait
> loop and not incur the wrath of our warnings.
> 
> Fixes: 6976e74b5fa1 ("drm/i915: Don't allow overuse of __intel_wait_for_register_fw()")
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/intel_ringbuffer.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
> index c98acc27279a..331da59a1eb5 100644
> --- a/drivers/gpu/drm/i915/intel_ringbuffer.c
> +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
> @@ -1729,11 +1729,11 @@ static void gen6_bsd_submit_request(struct drm_i915_gem_request *request)
>  	I915_WRITE64_FW(GEN6_BSD_RNCID, 0x0);
>  
>  	/* Wait for the ring not to be idle, i.e. for it to wake up. */
> -	if (intel_wait_for_register_fw(dev_priv,
> -				       GEN6_BSD_SLEEP_PSMI_CONTROL,
> -				       GEN6_BSD_SLEEP_INDICATOR,
> -				       0,
> -				       50))
> +	if (__intel_wait_for_register_fw(dev_priv,
> +					 GEN6_BSD_SLEEP_PSMI_CONTROL,
> +					 GEN6_BSD_SLEEP_INDICATOR,
> +					 0,
> +					 1000, 0, NULL))

1000us will still cause __intel_wait_for_register_fw to complain. Limit is 10us.

-Michal

>  		DRM_ERROR("timed out waiting for the BSD ring to wake up\n");
>  
>  	/* Now that the ring is fully powered up, update the tail */
> -- 
> 2.11.0
> 
_______________________________________________
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: [PATCH] drm/i915: Stop sleeping from inside gen6_bsd_submit_request()
  2017-04-10 14:43   ` Michal Wajdeczko
@ 2017-04-10 14:50     ` Chris Wilson
  0 siblings, 0 replies; 5+ messages in thread
From: Chris Wilson @ 2017-04-10 14:50 UTC (permalink / raw)
  To: Michal Wajdeczko; +Cc: intel-gfx

On Mon, Apr 10, 2017 at 04:43:45PM +0200, Michal Wajdeczko wrote:
> On Mon, Apr 10, 2017 at 03:38:07PM +0100, Chris Wilson wrote:
> > submit_request() is called from an atomic context, it's not allowed to
> > sleep. We have to be careful in our parameters to
> > intel_uncore_wait_for_register() to limit ourselves to the atomic wait
> > loop and not incur the wrath of our warnings.
> > 
> > Fixes: 6976e74b5fa1 ("drm/i915: Don't allow overuse of __intel_wait_for_register_fw()")
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
> > Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> > ---
> >  drivers/gpu/drm/i915/intel_ringbuffer.c | 10 +++++-----
> >  1 file changed, 5 insertions(+), 5 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
> > index c98acc27279a..331da59a1eb5 100644
> > --- a/drivers/gpu/drm/i915/intel_ringbuffer.c
> > +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
> > @@ -1729,11 +1729,11 @@ static void gen6_bsd_submit_request(struct drm_i915_gem_request *request)
> >  	I915_WRITE64_FW(GEN6_BSD_RNCID, 0x0);
> >  
> >  	/* Wait for the ring not to be idle, i.e. for it to wake up. */
> > -	if (intel_wait_for_register_fw(dev_priv,
> > -				       GEN6_BSD_SLEEP_PSMI_CONTROL,
> > -				       GEN6_BSD_SLEEP_INDICATOR,
> > -				       0,
> > -				       50))
> > +	if (__intel_wait_for_register_fw(dev_priv,
> > +					 GEN6_BSD_SLEEP_PSMI_CONTROL,
> > +					 GEN6_BSD_SLEEP_INDICATOR,
> > +					 0,
> > +					 1000, 0, NULL))
> 
> 1000us will still cause __intel_wait_for_register_fw to complain. Limit is 10us.

Time to kill that then as well.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
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

* ✗ Fi.CI.BAT: warning for drm/i915: Stop sleeping from inside gen6_bsd_submit_request() (rev2)
  2017-04-10 14:37 [PATCH] drm/i915: Stop sleeping from inside gen6_bsd_submit_request() Chris Wilson
  2017-04-10 14:38 ` Chris Wilson
@ 2017-04-10 15:07 ` Patchwork
  1 sibling, 0 replies; 5+ messages in thread
From: Patchwork @ 2017-04-10 15:07 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: Stop sleeping from inside gen6_bsd_submit_request() (rev2)
URL   : https://patchwork.freedesktop.org/series/22783/
State : warning

== Summary ==

Series 22783v2 drm/i915: Stop sleeping from inside gen6_bsd_submit_request()
https://patchwork.freedesktop.org/api/1.0/series/22783/revisions/2/mbox/

Test drv_getparams_basic:
        Subgroup basic-subslice-total:
                dmesg-warn -> PASS       (fi-snb-2520m)
Test drv_hangman:
        Subgroup error-state-basic:
                pass       -> DMESG-WARN (fi-snb-2520m)
Test gem_basic:
        Subgroup create-close:
                dmesg-warn -> PASS       (fi-snb-2520m)
        Subgroup create-fd-close:
                pass       -> DMESG-WARN (fi-snb-2520m)
Test gem_ctx_param:
        Subgroup basic-default:
                dmesg-warn -> PASS       (fi-snb-2520m)
Test gem_exec_basic:
        Subgroup basic-render:
                pass       -> DMESG-WARN (fi-snb-2520m)
        Subgroup gtt-bsd:
                pass       -> DMESG-WARN (fi-snb-2600)
                pass       -> DMESG-WARN (fi-snb-2520m)
        Subgroup gtt-default:
                pass       -> DMESG-WARN (fi-snb-2520m)
        Subgroup gtt-render:
                dmesg-warn -> PASS       (fi-snb-2520m)
        Subgroup readonly-blt:
                pass       -> DMESG-WARN (fi-snb-2520m)
        Subgroup readonly-bsd:
                dmesg-warn -> PASS       (fi-snb-2520m)
        Subgroup readonly-default:
                dmesg-warn -> PASS       (fi-snb-2520m)
        Subgroup readonly-render:
                dmesg-warn -> PASS       (fi-snb-2600)
Test gem_exec_fence:
        Subgroup basic-busy-default:
                pass       -> DMESG-WARN (fi-snb-2520m)
        Subgroup basic-wait-default:
                dmesg-warn -> PASS       (fi-snb-2520m)
Test gem_exec_reloc:
        Subgroup basic-cpu-gtt-active:
                dmesg-warn -> PASS       (fi-snb-2520m)
        Subgroup basic-cpu-read-noreloc:
                pass       -> DMESG-WARN (fi-snb-2600)
        Subgroup basic-gtt-active:
                pass       -> DMESG-WARN (fi-snb-2520m)
        Subgroup basic-gtt-cpu-active:
                pass       -> DMESG-WARN (fi-snb-2520m)
        Subgroup basic-gtt-read:
                pass       -> DMESG-WARN (fi-snb-2600)
        Subgroup basic-gtt-read-noreloc:
                dmesg-warn -> PASS       (fi-snb-2600)
        Subgroup basic-write-cpu:
                dmesg-warn -> PASS       (fi-snb-2600)
        Subgroup basic-write-gtt-active:
                dmesg-warn -> PASS       (fi-snb-2600)
Test gem_exec_store:
        Subgroup basic-all:
                dmesg-warn -> PASS       (fi-snb-2520m)
        Subgroup basic-blt:
                pass       -> DMESG-WARN (fi-snb-2520m)
        Subgroup basic-render:
                dmesg-warn -> PASS       (fi-snb-2520m)
Test gem_exec_suspend:
        Subgroup basic-s4-devices:
                dmesg-warn -> PASS       (fi-kbl-7560u) fdo#100125
Test gem_ringfill:
        Subgroup basic-default-fd:
                pass       -> DMESG-WARN (fi-snb-2520m)
Test kms_addfb_basic:
        Subgroup bad-pitch-128:
                dmesg-warn -> PASS       (fi-snb-2600)
        Subgroup bad-pitch-256:
                pass       -> DMESG-WARN (fi-snb-2600)
Test kms_flip:
        Subgroup basic-flip-vs-dpms:
                pass       -> DMESG-WARN (fi-kbl-7560u)
Test kms_force_connector_basic:
        Subgroup force-edid:
                dmesg-warn -> PASS       (fi-snb-2600)
        Subgroup prune-stale-modes:
                pass       -> DMESG-WARN (fi-snb-2600)
Test kms_frontbuffer_tracking:
        Subgroup basic:
                pass       -> DMESG-WARN (fi-kbl-7560u)
Test kms_pipe_crc_basic:
        Subgroup nonblocking-crc-pipe-b:
                pass       -> DMESG-WARN (fi-kbl-7560u)
        Subgroup read-crc-pipe-c-frame-sequence:
                pass       -> DMESG-WARN (fi-kbl-7560u)
        Subgroup suspend-read-crc-pipe-c:
                dmesg-warn -> PASS       (fi-kbl-7560u) fdo#100445
Test prime_self_import:
        Subgroup basic-with_fd_dup:
                pass       -> DMESG-WARN (fi-snb-2600)
        Subgroup basic-with_one_bo:
                dmesg-warn -> PASS       (fi-snb-2600)
Test prime_vgem:
        Subgroup basic-busy-default:
WARNING: Long output truncated

e461ecfd413fb930d00f44f3de0019e528b4731f drm-tip: 2017y-04m-10d-14h-25m-24s UTC integration manifest
5a4d34a drm/i915: Stop sleeping from inside gen6_bsd_submit_request()

== Logs ==

For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_4462/
_______________________________________________
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:[~2017-04-10 15:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-10 14:37 [PATCH] drm/i915: Stop sleeping from inside gen6_bsd_submit_request() Chris Wilson
2017-04-10 14:38 ` Chris Wilson
2017-04-10 14:43   ` Michal Wajdeczko
2017-04-10 14:50     ` Chris Wilson
2017-04-10 15:07 ` ✗ Fi.CI.BAT: warning for drm/i915: Stop sleeping from inside gen6_bsd_submit_request() (rev2) 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.