All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/i915/guc: Advance over port[0] if set and not preempting
@ 2017-11-24 13:37 Chris Wilson
  2017-11-24 13:37 ` [PATCH 2/2] HAX Enable GuC Submission for CI Chris Wilson
                   ` (5 more replies)
  0 siblings, 6 replies; 9+ messages in thread
From: Chris Wilson @ 2017-11-24 13:37 UTC (permalink / raw)
  To: intel-gfx

Our execlist emulation is intended to only use a maximum of 2 ports per
engine, so as to not overflow the wq. (By knowing the limits, we can
avoid having to handle the wq exhaustion.) However, upon adding
preemption, we lost the skip over the first port if set for the
non-preemption path. Restore it.

Reported-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Fixes: c41937fd994a ("drm/i915/guc: Preemption! With GuC")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Michał Winiarski <michal.winiarski@intel.com>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_guc_submission.c | 29 ++++++++++++++++-------------
 1 file changed, 16 insertions(+), 13 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_guc_submission.c b/drivers/gpu/drm/i915/intel_guc_submission.c
index cbf5a96f5806..70e64bdb73dd 100644
--- a/drivers/gpu/drm/i915/intel_guc_submission.c
+++ b/drivers/gpu/drm/i915/intel_guc_submission.c
@@ -743,23 +743,26 @@ static void guc_dequeue(struct intel_engine_cs *engine)
 	if (!rb)
 		goto unlock;
 
-	if (HAS_LOGICAL_RING_PREEMPTION(engine->i915) && port_isset(port)) {
-		struct guc_preempt_work *preempt_work =
-			&engine->i915->guc.preempt_work[engine->id];
-
-		if (rb_entry(rb, struct i915_priolist, node)->priority >
-		    max(port_request(port)->priotree.priority, 0)) {
-			execlists_set_active(execlists,
-					     EXECLISTS_ACTIVE_PREEMPT);
-			queue_work(engine->i915->guc.preempt_wq,
-				   &preempt_work->work);
-			goto unlock;
-		} else if (port_isset(last_port)) {
-			goto unlock;
+	if (port_isset(port)) {
+		if (HAS_LOGICAL_RING_PREEMPTION(engine->i915)) {
+			struct guc_preempt_work *preempt_work =
+				&engine->i915->guc.preempt_work[engine->id];
+
+			if (rb_entry(rb, struct i915_priolist, node)->priority >
+			    max(port_request(port)->priotree.priority, 0)) {
+				execlists_set_active(execlists,
+						     EXECLISTS_ACTIVE_PREEMPT);
+				queue_work(engine->i915->guc.preempt_wq,
+					   &preempt_work->work);
+				goto unlock;
+			}
 		}
 
 		port++;
+		if (port_isset(port))
+			goto unlock;
 	}
+	GEM_BUG_ON(port_isset(port));
 
 	do {
 		struct i915_priolist *p = rb_entry(rb, typeof(*p), node);
-- 
2.15.0

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

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

* [PATCH 2/2] HAX Enable GuC Submission for CI
  2017-11-24 13:37 [PATCH 1/2] drm/i915/guc: Advance over port[0] if set and not preempting Chris Wilson
@ 2017-11-24 13:37 ` Chris Wilson
  2017-11-24 13:43 ` [PATCH 1/2] drm/i915/guc: Advance over port[0] if set and not preempting Chris Wilson
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: Chris Wilson @ 2017-11-24 13:37 UTC (permalink / raw)
  To: intel-gfx

From: Michał Winiarski <michal.winiarski@intel.com>

Also:
Revert "drm/i915/guc: Assert that we switch between known ggtt->invalidate functions"

This reverts commit 04f7b24eccdfae680a36e9825fe0d61dcd5ed528.
---
 drivers/gpu/drm/i915/i915_gem_gtt.c | 8 ++------
 drivers/gpu/drm/i915/i915_params.h  | 4 ++--
 2 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
index 41a203e0c160..5e8614fd390b 100644
--- a/drivers/gpu/drm/i915/i915_gem_gtt.c
+++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
@@ -3590,17 +3590,13 @@ int i915_ggtt_enable_hw(struct drm_i915_private *dev_priv)
 
 void i915_ggtt_enable_guc(struct drm_i915_private *i915)
 {
-	GEM_BUG_ON(i915->ggtt.invalidate != gen6_ggtt_invalidate);
-
 	i915->ggtt.invalidate = guc_ggtt_invalidate;
 }
 
 void i915_ggtt_disable_guc(struct drm_i915_private *i915)
 {
-	/* We should only be called after i915_ggtt_enable_guc() */
-	GEM_BUG_ON(i915->ggtt.invalidate != guc_ggtt_invalidate);
-
-	i915->ggtt.invalidate = gen6_ggtt_invalidate;
+	if (i915->ggtt.invalidate == guc_ggtt_invalidate)
+		i915->ggtt.invalidate = gen6_ggtt_invalidate;
 }
 
 void i915_gem_restore_gtt_mappings(struct drm_i915_private *dev_priv)
diff --git a/drivers/gpu/drm/i915/i915_params.h b/drivers/gpu/drm/i915/i915_params.h
index 8321bd86cba5..69ee2484c6bb 100644
--- a/drivers/gpu/drm/i915/i915_params.h
+++ b/drivers/gpu/drm/i915/i915_params.h
@@ -42,8 +42,8 @@
 	param(int, disable_power_well, -1) \
 	param(int, enable_ips, 1) \
 	param(int, invert_brightness, 0) \
-	param(int, enable_guc_loading, 0) \
-	param(int, enable_guc_submission, 0) \
+	param(int, enable_guc_loading, 1) \
+	param(int, enable_guc_submission, 1) \
 	param(int, guc_log_level, -1) \
 	param(char *, guc_firmware_path, NULL) \
 	param(char *, huc_firmware_path, NULL) \
-- 
2.15.0

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

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

* Re: [PATCH 1/2] drm/i915/guc: Advance over port[0] if set and not preempting
  2017-11-24 13:37 [PATCH 1/2] drm/i915/guc: Advance over port[0] if set and not preempting Chris Wilson
  2017-11-24 13:37 ` [PATCH 2/2] HAX Enable GuC Submission for CI Chris Wilson
@ 2017-11-24 13:43 ` Chris Wilson
  2017-11-24 13:50   ` Mika Kuoppala
  2017-11-24 13:48 ` Mika Kuoppala
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 9+ messages in thread
From: Chris Wilson @ 2017-11-24 13:43 UTC (permalink / raw)
  To: intel-gfx

Quoting Chris Wilson (2017-11-24 13:37:44)
> Our execlist emulation is intended to only use a maximum of 2 ports per
> engine, so as to not overflow the wq. (By knowing the limits, we can
> avoid having to handle the wq exhaustion.) However, upon adding
> preemption, we lost the skip over the first port if set for the
> non-preemption path. Restore it.
> 
> Reported-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> Fixes: c41937fd994a ("drm/i915/guc: Preemption! With GuC")
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Michał Winiarski <michal.winiarski@intel.com>
> Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/intel_guc_submission.c | 29 ++++++++++++++++-------------
>  1 file changed, 16 insertions(+), 13 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_guc_submission.c b/drivers/gpu/drm/i915/intel_guc_submission.c
> index cbf5a96f5806..70e64bdb73dd 100644
> --- a/drivers/gpu/drm/i915/intel_guc_submission.c
> +++ b/drivers/gpu/drm/i915/intel_guc_submission.c
> @@ -743,23 +743,26 @@ static void guc_dequeue(struct intel_engine_cs *engine)
>         if (!rb)
>                 goto unlock;
>  
> -       if (HAS_LOGICAL_RING_PREEMPTION(engine->i915) && port_isset(port)) {
> -               struct guc_preempt_work *preempt_work =
> -                       &engine->i915->guc.preempt_work[engine->id];
> -
> -               if (rb_entry(rb, struct i915_priolist, node)->priority >
> -                   max(port_request(port)->priotree.priority, 0)) {
> -                       execlists_set_active(execlists,
> -                                            EXECLISTS_ACTIVE_PREEMPT);
> -                       queue_work(engine->i915->guc.preempt_wq,
> -                                  &preempt_work->work);
> -                       goto unlock;
> -               } else if (port_isset(last_port)) {
> -                       goto unlock;
> +       if (port_isset(port)) {
> +               if (HAS_LOGICAL_RING_PREEMPTION(engine->i915)) {
> +                       struct guc_preempt_work *preempt_work =
> +                               &engine->i915->guc.preempt_work[engine->id];
> +
> +                       if (rb_entry(rb, struct i915_priolist, node)->priority >
> +                           max(port_request(port)->priotree.priority, 0)) {
> +                               execlists_set_active(execlists,
> +                                                    EXECLISTS_ACTIVE_PREEMPT);
> +                               queue_work(engine->i915->guc.preempt_wq,
> +                                          &preempt_work->work);
> +                               goto unlock;
> +                       }
>                 }
>  
>                 port++;
> +               if (port_isset(port))

You probably want to stick with last_port, or at least Mika will want to
make it last_port again after he expands ELSP[] and propagates all the
changes.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH 1/2] drm/i915/guc: Advance over port[0] if set and not preempting
  2017-11-24 13:37 [PATCH 1/2] drm/i915/guc: Advance over port[0] if set and not preempting Chris Wilson
  2017-11-24 13:37 ` [PATCH 2/2] HAX Enable GuC Submission for CI Chris Wilson
  2017-11-24 13:43 ` [PATCH 1/2] drm/i915/guc: Advance over port[0] if set and not preempting Chris Wilson
@ 2017-11-24 13:48 ` Mika Kuoppala
  2017-11-24 14:16 ` ✓ Fi.CI.BAT: success for series starting with [1/2] " Patchwork
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: Mika Kuoppala @ 2017-11-24 13:48 UTC (permalink / raw)
  To: Chris Wilson, intel-gfx

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

> Our execlist emulation is intended to only use a maximum of 2 ports per
> engine, so as to not overflow the wq. (By knowing the limits, we can
> avoid having to handle the wq exhaustion.) However, upon adding
> preemption, we lost the skip over the first port if set for the
> non-preemption path. Restore it.
>
> Reported-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> Fixes: c41937fd994a ("drm/i915/guc: Preemption! With GuC")
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Michał Winiarski <michal.winiarski@intel.com>
> Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>

Now it makes sense to me. You might want a stamp from Michał too.

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

> ---
>  drivers/gpu/drm/i915/intel_guc_submission.c | 29 ++++++++++++++++-------------
>  1 file changed, 16 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_guc_submission.c b/drivers/gpu/drm/i915/intel_guc_submission.c
> index cbf5a96f5806..70e64bdb73dd 100644
> --- a/drivers/gpu/drm/i915/intel_guc_submission.c
> +++ b/drivers/gpu/drm/i915/intel_guc_submission.c
> @@ -743,23 +743,26 @@ static void guc_dequeue(struct intel_engine_cs *engine)
>  	if (!rb)
>  		goto unlock;
>  
> -	if (HAS_LOGICAL_RING_PREEMPTION(engine->i915) && port_isset(port)) {
> -		struct guc_preempt_work *preempt_work =
> -			&engine->i915->guc.preempt_work[engine->id];
> -
> -		if (rb_entry(rb, struct i915_priolist, node)->priority >
> -		    max(port_request(port)->priotree.priority, 0)) {
> -			execlists_set_active(execlists,
> -					     EXECLISTS_ACTIVE_PREEMPT);
> -			queue_work(engine->i915->guc.preempt_wq,
> -				   &preempt_work->work);
> -			goto unlock;
> -		} else if (port_isset(last_port)) {
> -			goto unlock;
> +	if (port_isset(port)) {
> +		if (HAS_LOGICAL_RING_PREEMPTION(engine->i915)) {
> +			struct guc_preempt_work *preempt_work =
> +				&engine->i915->guc.preempt_work[engine->id];
> +
> +			if (rb_entry(rb, struct i915_priolist, node)->priority >
> +			    max(port_request(port)->priotree.priority, 0)) {
> +				execlists_set_active(execlists,
> +						     EXECLISTS_ACTIVE_PREEMPT);
> +				queue_work(engine->i915->guc.preempt_wq,
> +					   &preempt_work->work);
> +				goto unlock;
> +			}
>  		}
>  
>  		port++;
> +		if (port_isset(port))
> +			goto unlock;
>  	}
> +	GEM_BUG_ON(port_isset(port));
>  
>  	do {
>  		struct i915_priolist *p = rb_entry(rb, typeof(*p), node);
> -- 
> 2.15.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH 1/2] drm/i915/guc: Advance over port[0] if set and not preempting
  2017-11-24 13:43 ` [PATCH 1/2] drm/i915/guc: Advance over port[0] if set and not preempting Chris Wilson
@ 2017-11-24 13:50   ` Mika Kuoppala
  0 siblings, 0 replies; 9+ messages in thread
From: Mika Kuoppala @ 2017-11-24 13:50 UTC (permalink / raw)
  To: Chris Wilson, intel-gfx

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

> Quoting Chris Wilson (2017-11-24 13:37:44)
>> Our execlist emulation is intended to only use a maximum of 2 ports per
>> engine, so as to not overflow the wq. (By knowing the limits, we can
>> avoid having to handle the wq exhaustion.) However, upon adding
>> preemption, we lost the skip over the first port if set for the
>> non-preemption path. Restore it.
>> 
>> Reported-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
>> Fixes: c41937fd994a ("drm/i915/guc: Preemption! With GuC")
>> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
>> Cc: Michał Winiarski <michal.winiarski@intel.com>
>> Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
>> ---
>>  drivers/gpu/drm/i915/intel_guc_submission.c | 29 ++++++++++++++++-------------
>>  1 file changed, 16 insertions(+), 13 deletions(-)
>> 
>> diff --git a/drivers/gpu/drm/i915/intel_guc_submission.c b/drivers/gpu/drm/i915/intel_guc_submission.c
>> index cbf5a96f5806..70e64bdb73dd 100644
>> --- a/drivers/gpu/drm/i915/intel_guc_submission.c
>> +++ b/drivers/gpu/drm/i915/intel_guc_submission.c
>> @@ -743,23 +743,26 @@ static void guc_dequeue(struct intel_engine_cs *engine)
>>         if (!rb)
>>                 goto unlock;
>>  
>> -       if (HAS_LOGICAL_RING_PREEMPTION(engine->i915) && port_isset(port)) {
>> -               struct guc_preempt_work *preempt_work =
>> -                       &engine->i915->guc.preempt_work[engine->id];
>> -
>> -               if (rb_entry(rb, struct i915_priolist, node)->priority >
>> -                   max(port_request(port)->priotree.priority, 0)) {
>> -                       execlists_set_active(execlists,
>> -                                            EXECLISTS_ACTIVE_PREEMPT);
>> -                       queue_work(engine->i915->guc.preempt_wq,
>> -                                  &preempt_work->work);
>> -                       goto unlock;
>> -               } else if (port_isset(last_port)) {
>> -                       goto unlock;
>> +       if (port_isset(port)) {
>> +               if (HAS_LOGICAL_RING_PREEMPTION(engine->i915)) {
>> +                       struct guc_preempt_work *preempt_work =
>> +                               &engine->i915->guc.preempt_work[engine->id];
>> +
>> +                       if (rb_entry(rb, struct i915_priolist, node)->priority >
>> +                           max(port_request(port)->priotree.priority, 0)) {
>> +                               execlists_set_active(execlists,
>> +                                                    EXECLISTS_ACTIVE_PREEMPT);
>> +                               queue_work(engine->i915->guc.preempt_wq,
>> +                                          &preempt_work->work);
>> +                               goto unlock;
>> +                       }
>>                 }
>>  
>>                 port++;
>> +               if (port_isset(port))
>
> You probably want to stick with last_port, or at least Mika will want to
> make it last_port again after he expands ELSP[] and propagates all the
> changes.

This looks cleaner this way. We can always bring it back if it truely
helps readability. There has been too much last_port == port[1]
assumptions to tackle with.

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

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

* ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915/guc: Advance over port[0] if set and not preempting
  2017-11-24 13:37 [PATCH 1/2] drm/i915/guc: Advance over port[0] if set and not preempting Chris Wilson
                   ` (2 preceding siblings ...)
  2017-11-24 13:48 ` Mika Kuoppala
@ 2017-11-24 14:16 ` Patchwork
  2017-11-24 15:11 ` [PATCH 1/2] " Michał Winiarski
  2017-11-24 17:02 ` ✓ Fi.CI.IGT: success for series starting with [1/2] " Patchwork
  5 siblings, 0 replies; 9+ messages in thread
From: Patchwork @ 2017-11-24 14:16 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: series starting with [1/2] drm/i915/guc: Advance over port[0] if set and not preempting
URL   : https://patchwork.freedesktop.org/series/34361/
State : success

== Summary ==

Series 34361v1 series starting with [1/2] drm/i915/guc: Advance over port[0] if set and not preempting
https://patchwork.freedesktop.org/api/1.0/series/34361/revisions/1/mbox/

Test kms_pipe_crc_basic:
        Subgroup suspend-read-crc-pipe-b:
                pass       -> INCOMPLETE (fi-snb-2520m) fdo#103713

fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713

fi-bdw-5557u     total:289  pass:268  dwarn:0   dfail:0   fail:0   skip:21  time:445s
fi-bdw-gvtdvm    total:289  pass:265  dwarn:0   dfail:0   fail:0   skip:24  time:455s
fi-blb-e6850     total:289  pass:223  dwarn:1   dfail:0   fail:0   skip:65  time:382s
fi-bsw-n3050     total:289  pass:243  dwarn:0   dfail:0   fail:0   skip:46  time:541s
fi-bwr-2160      total:289  pass:183  dwarn:0   dfail:0   fail:0   skip:106 time:277s
fi-bxt-dsi       total:289  pass:259  dwarn:0   dfail:0   fail:0   skip:30  time:504s
fi-bxt-j4205     total:289  pass:260  dwarn:0   dfail:0   fail:0   skip:29  time:510s
fi-byt-j1900     total:289  pass:254  dwarn:0   dfail:0   fail:0   skip:35  time:502s
fi-byt-n2820     total:289  pass:250  dwarn:0   dfail:0   fail:0   skip:39  time:491s
fi-elk-e7500     total:289  pass:229  dwarn:0   dfail:0   fail:0   skip:60  time:428s
fi-gdg-551       total:289  pass:178  dwarn:1   dfail:0   fail:1   skip:109 time:265s
fi-glk-1         total:289  pass:261  dwarn:0   dfail:0   fail:0   skip:28  time:543s
fi-hsw-4770      total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:428s
fi-hsw-4770r     total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:438s
fi-ilk-650       total:289  pass:228  dwarn:0   dfail:0   fail:0   skip:61  time:425s
fi-ivb-3520m     total:289  pass:260  dwarn:0   dfail:0   fail:0   skip:29  time:473s
fi-ivb-3770      total:289  pass:260  dwarn:0   dfail:0   fail:0   skip:29  time:462s
fi-kbl-7500u     total:289  pass:264  dwarn:1   dfail:0   fail:0   skip:24  time:481s
fi-kbl-7560u     total:289  pass:270  dwarn:0   dfail:0   fail:0   skip:19  time:520s
fi-kbl-7567u     total:289  pass:269  dwarn:0   dfail:0   fail:0   skip:20  time:478s
fi-kbl-r         total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:527s
fi-pnv-d510      total:289  pass:222  dwarn:1   dfail:0   fail:0   skip:66  time:576s
fi-skl-6260u     total:289  pass:269  dwarn:0   dfail:0   fail:0   skip:20  time:456s
fi-skl-6600u     total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:539s
fi-skl-6700hq    total:289  pass:263  dwarn:0   dfail:0   fail:0   skip:26  time:563s
fi-skl-6700k     total:289  pass:265  dwarn:0   dfail:0   fail:0   skip:24  time:524s
fi-skl-6770hq    total:289  pass:269  dwarn:0   dfail:0   fail:0   skip:20  time:494s
fi-skl-gvtdvm    total:289  pass:266  dwarn:0   dfail:0   fail:0   skip:23  time:457s
fi-snb-2520m     total:246  pass:212  dwarn:0   dfail:0   fail:0   skip:33 
fi-snb-2600      total:289  pass:249  dwarn:0   dfail:0   fail:0   skip:40  time:422s
Blacklisted hosts:
fi-cfl-s2        total:289  pass:263  dwarn:0   dfail:0   fail:0   skip:26  time:610s
fi-glk-dsi       total:289  pass:156  dwarn:0   dfail:10  fail:2   skip:121 time:373s
fi-cnl-y failed to connect after reboot

99e3e01d35c95de2392d7f5796f3086cb13b441a drm-tip: 2017y-11m-24d-13h-20m-57s UTC integration manifest
b9f468eb29d4 HAX Enable GuC Submission for CI
927a4b8c8c74 drm/i915/guc: Advance over port[0] if set and not preempting

== Logs ==

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

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

* Re: [PATCH 1/2] drm/i915/guc: Advance over port[0] if set and not preempting
  2017-11-24 13:37 [PATCH 1/2] drm/i915/guc: Advance over port[0] if set and not preempting Chris Wilson
                   ` (3 preceding siblings ...)
  2017-11-24 14:16 ` ✓ Fi.CI.BAT: success for series starting with [1/2] " Patchwork
@ 2017-11-24 15:11 ` Michał Winiarski
  2017-11-24 17:02 ` ✓ Fi.CI.IGT: success for series starting with [1/2] " Patchwork
  5 siblings, 0 replies; 9+ messages in thread
From: Michał Winiarski @ 2017-11-24 15:11 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

On Fri, Nov 24, 2017 at 01:37:44PM +0000, Chris Wilson wrote:
> Our execlist emulation is intended to only use a maximum of 2 ports per
> engine, so as to not overflow the wq. (By knowing the limits, we can
> avoid having to handle the wq exhaustion.) However, upon adding
> preemption, we lost the skip over the first port if set for the
> non-preemption path. Restore it.
> 
> Reported-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> Fixes: c41937fd994a ("drm/i915/guc: Preemption! With GuC")
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Michał Winiarski <michal.winiarski@intel.com>
> Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>

Reviewed-by: Michał Winiarski <michal.winiarski@intel.com>

-Michał

> ---
>  drivers/gpu/drm/i915/intel_guc_submission.c | 29 ++++++++++++++++-------------
>  1 file changed, 16 insertions(+), 13 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_guc_submission.c b/drivers/gpu/drm/i915/intel_guc_submission.c
> index cbf5a96f5806..70e64bdb73dd 100644
> --- a/drivers/gpu/drm/i915/intel_guc_submission.c
> +++ b/drivers/gpu/drm/i915/intel_guc_submission.c
> @@ -743,23 +743,26 @@ static void guc_dequeue(struct intel_engine_cs *engine)
>  	if (!rb)
>  		goto unlock;
>  
> -	if (HAS_LOGICAL_RING_PREEMPTION(engine->i915) && port_isset(port)) {
> -		struct guc_preempt_work *preempt_work =
> -			&engine->i915->guc.preempt_work[engine->id];
> -
> -		if (rb_entry(rb, struct i915_priolist, node)->priority >
> -		    max(port_request(port)->priotree.priority, 0)) {
> -			execlists_set_active(execlists,
> -					     EXECLISTS_ACTIVE_PREEMPT);
> -			queue_work(engine->i915->guc.preempt_wq,
> -				   &preempt_work->work);
> -			goto unlock;
> -		} else if (port_isset(last_port)) {
> -			goto unlock;
> +	if (port_isset(port)) {
> +		if (HAS_LOGICAL_RING_PREEMPTION(engine->i915)) {
> +			struct guc_preempt_work *preempt_work =
> +				&engine->i915->guc.preempt_work[engine->id];
> +
> +			if (rb_entry(rb, struct i915_priolist, node)->priority >
> +			    max(port_request(port)->priotree.priority, 0)) {
> +				execlists_set_active(execlists,
> +						     EXECLISTS_ACTIVE_PREEMPT);
> +				queue_work(engine->i915->guc.preempt_wq,
> +					   &preempt_work->work);
> +				goto unlock;
> +			}
>  		}
>  
>  		port++;
> +		if (port_isset(port))
> +			goto unlock;
>  	}
> +	GEM_BUG_ON(port_isset(port));
>  
>  	do {
>  		struct i915_priolist *p = rb_entry(rb, typeof(*p), node);
> -- 
> 2.15.0
> 
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* ✓ Fi.CI.IGT: success for series starting with [1/2] drm/i915/guc: Advance over port[0] if set and not preempting
  2017-11-24 13:37 [PATCH 1/2] drm/i915/guc: Advance over port[0] if set and not preempting Chris Wilson
                   ` (4 preceding siblings ...)
  2017-11-24 15:11 ` [PATCH 1/2] " Michał Winiarski
@ 2017-11-24 17:02 ` Patchwork
  2017-11-24 17:11   ` Chris Wilson
  5 siblings, 1 reply; 9+ messages in thread
From: Patchwork @ 2017-11-24 17:02 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: series starting with [1/2] drm/i915/guc: Advance over port[0] if set and not preempting
URL   : https://patchwork.freedesktop.org/series/34361/
State : success

== Summary ==

Test kms_frontbuffer_tracking:
        Subgroup fbc-1p-offscren-pri-shrfb-draw-render:
                fail       -> PASS       (shard-snb) fdo#101623 +1
Test gem_busy:
        Subgroup close-race:
                fail       -> PASS       (shard-snb) fdo#103829

fdo#101623 https://bugs.freedesktop.org/show_bug.cgi?id=101623
fdo#103829 https://bugs.freedesktop.org/show_bug.cgi?id=103829

shard-hsw        total:2667 pass:1535 dwarn:1   dfail:0   fail:10  skip:1121 time:9535s
shard-snb        total:2667 pass:1311 dwarn:1   dfail:0   fail:13  skip:1342 time:8031s
Blacklisted hosts:
shard-apl        total:2667 pass:1660 dwarn:6   dfail:3   fail:43  skip:955 time:12343s

== Logs ==

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

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

* Re: ✓ Fi.CI.IGT: success for series starting with [1/2] drm/i915/guc: Advance over port[0] if set and not preempting
  2017-11-24 17:02 ` ✓ Fi.CI.IGT: success for series starting with [1/2] " Patchwork
@ 2017-11-24 17:11   ` Chris Wilson
  0 siblings, 0 replies; 9+ messages in thread
From: Chris Wilson @ 2017-11-24 17:11 UTC (permalink / raw)
  To: Patchwork; +Cc: intel-gfx

Quoting Patchwork (2017-11-24 17:02:54)
> == Series Details ==
> 
> Series: series starting with [1/2] drm/i915/guc: Advance over port[0] if set and not preempting
> URL   : https://patchwork.freedesktop.org/series/34361/
> State : success
> 
> == Summary ==
> 
> Test kms_frontbuffer_tracking:
>         Subgroup fbc-1p-offscren-pri-shrfb-draw-render:
>                 fail       -> PASS       (shard-snb) fdo#101623 +1
> Test gem_busy:
>         Subgroup close-race:
>                 fail       -> PASS       (shard-snb) fdo#103829
> 
> fdo#101623 https://bugs.freedesktop.org/show_bug.cgi?id=101623
> fdo#103829 https://bugs.freedesktop.org/show_bug.cgi?id=103829
> 
> shard-hsw        total:2667 pass:1535 dwarn:1   dfail:0   fail:10  skip:1121 time:9535s
> shard-snb        total:2667 pass:1311 dwarn:1   dfail:0   fail:13  skip:1342 time:8031s
> Blacklisted hosts:
> shard-apl        total:2667 pass:1660 dwarn:6   dfail:3   fail:43  skip:955 time:12343s
> 
> == Logs ==
> 
> For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7281/shards.html

All looks clear (if you squint over the pmu sore spot), pushed along
with the guc tidy.

Thanks for spotting the mistake and review,
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

end of thread, other threads:[~2017-11-24 17:11 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-24 13:37 [PATCH 1/2] drm/i915/guc: Advance over port[0] if set and not preempting Chris Wilson
2017-11-24 13:37 ` [PATCH 2/2] HAX Enable GuC Submission for CI Chris Wilson
2017-11-24 13:43 ` [PATCH 1/2] drm/i915/guc: Advance over port[0] if set and not preempting Chris Wilson
2017-11-24 13:50   ` Mika Kuoppala
2017-11-24 13:48 ` Mika Kuoppala
2017-11-24 14:16 ` ✓ Fi.CI.BAT: success for series starting with [1/2] " Patchwork
2017-11-24 15:11 ` [PATCH 1/2] " Michał Winiarski
2017-11-24 17:02 ` ✓ Fi.CI.IGT: success for series starting with [1/2] " Patchwork
2017-11-24 17:11   ` Chris Wilson

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.