* [Intel-gfx] [PATCH i-g-t] lib/i915: Fix is_physical_engine advancement
@ 2020-01-29 12:16 Chris Wilson
2020-01-29 12:35 ` Andi Shyti
0 siblings, 1 reply; 3+ messages in thread
From: Chris Wilson @ 2020-01-29 12:16 UTC (permalink / raw)
To: intel-gfx; +Cc: igt-dev
Update the local var e after iterating to the next engine when searching
for the next non-virtual engine. Otherwise, it is prone to loop forever.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Andi Shyti <andi.shyti@intel.com>
Cc: Petri Latvala <petri.latvala@intel.com>
---
lib/i915/gem_engine_topology.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/lib/i915/gem_engine_topology.c b/lib/i915/gem_engine_topology.c
index 43a99e0ff..9daa03df4 100644
--- a/lib/i915/gem_engine_topology.c
+++ b/lib/i915/gem_engine_topology.c
@@ -180,10 +180,8 @@ intel_get_current_physical_engine(struct intel_engine_data *ed)
{
struct intel_execution_engine2 *e;
- for (e = intel_get_current_engine(ed);
- e && e->is_virtual;
- intel_next_engine(ed))
- ;
+ while ((e = intel_get_current_engine(ed)) && e->is_virtual)
+ intel_next_engine(ed);
return e;
}
--
2.25.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Intel-gfx] [PATCH i-g-t] lib/i915: Fix is_physical_engine advancement
2020-01-29 12:16 [Intel-gfx] [PATCH i-g-t] lib/i915: Fix is_physical_engine advancement Chris Wilson
@ 2020-01-29 12:35 ` Andi Shyti
2020-01-29 12:37 ` Chris Wilson
0 siblings, 1 reply; 3+ messages in thread
From: Andi Shyti @ 2020-01-29 12:35 UTC (permalink / raw)
To: Chris Wilson; +Cc: igt-dev, intel-gfx
Hi Chris,
On Wed, Jan 29, 2020 at 12:16:02PM +0000, Chris Wilson wrote:
> Update the local var e after iterating to the next engine when searching
> for the next non-virtual engine. Otherwise, it is prone to loop forever.
Do I remember correctly that you sent this once already?
In any case,
Reviewed-by: Andi Shyti <andi.shyti@intel.com>
Thanks,
Andi
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Intel-gfx] [PATCH i-g-t] lib/i915: Fix is_physical_engine advancement
2020-01-29 12:35 ` Andi Shyti
@ 2020-01-29 12:37 ` Chris Wilson
0 siblings, 0 replies; 3+ messages in thread
From: Chris Wilson @ 2020-01-29 12:37 UTC (permalink / raw)
To: Andi Shyti; +Cc: igt-dev, intel-gfx
Quoting Andi Shyti (2020-01-29 12:35:38)
> Hi Chris,
>
> On Wed, Jan 29, 2020 at 12:16:02PM +0000, Chris Wilson wrote:
> > Update the local var e after iterating to the next engine when searching
> > for the next non-virtual engine. Otherwise, it is prone to loop forever.
>
> Do I remember correctly that you sent this once already?
If I have, I've forgotten. I feel like I've complained about it before
:)
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-01-29 12:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-29 12:16 [Intel-gfx] [PATCH i-g-t] lib/i915: Fix is_physical_engine advancement Chris Wilson
2020-01-29 12:35 ` Andi Shyti
2020-01-29 12:37 ` Chris Wilson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox