* [PATCH] drm/i915: Don't skip request retirement if the active list is empty
@ 2015-05-28 15:32 ville.syrjala
2015-05-28 15:47 ` Chris Wilson
2015-05-31 10:14 ` shuang.he
0 siblings, 2 replies; 7+ messages in thread
From: ville.syrjala @ 2015-05-28 15:32 UTC (permalink / raw)
To: intel-gfx
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
Apparently we can have requests even if though the active list is empty,
so do the request retirement regardless of whether there's anything
on the active list.
The way it happened here is that during suspend intel_ring_idle()
notices the olr hanging around and then proceeds to get rid of it by
adding a request. However since there was nothing on the active lists
i915_gem_retire_requests() didn't clean those up, and so the idle work
never runs, and we leave the GPU "busy" during suspend resulting in a
WARN later.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
drivers/gpu/drm/i915/i915_gem.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index be35f04..c35e035 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -2813,9 +2813,6 @@ i915_gem_retire_requests_ring(struct intel_engine_cs *ring)
{
WARN_ON(i915_verify_lists(ring->dev));
- if (list_empty(&ring->active_list))
- return;
-
/* Retire requests first as we use it above for the early return.
* If we retire requests last, we may use a later seqno and so clear
* the requests lists without clearing the active list, leading to
--
2.3.6
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] drm/i915: Don't skip request retirement if the active list is empty
2015-05-28 15:32 [PATCH] drm/i915: Don't skip request retirement if the active list is empty ville.syrjala
@ 2015-05-28 15:47 ` Chris Wilson
2015-05-28 16:03 ` Ville Syrjälä
2015-05-29 12:22 ` Jani Nikula
2015-05-31 10:14 ` shuang.he
1 sibling, 2 replies; 7+ messages in thread
From: Chris Wilson @ 2015-05-28 15:47 UTC (permalink / raw)
To: ville.syrjala; +Cc: intel-gfx
On Thu, May 28, 2015 at 06:32:36PM +0300, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Apparently we can have requests even if though the active list is empty,
> so do the request retirement regardless of whether there's anything
> on the active list.
>
> The way it happened here is that during suspend intel_ring_idle()
> notices the olr hanging around and then proceeds to get rid of it by
> adding a request. However since there was nothing on the active lists
> i915_gem_retire_requests() didn't clean those up, and so the idle work
> never runs, and we leave the GPU "busy" during suspend resulting in a
> WARN later.
Whlist I agree (I use list_empty(&ring->request_list);) I strongly
suspect something (i.e. execlists) isn't managing the active_list
correctly. Pretty much the only thing that can generate a request
without an object (and so avoid touching the active_list) is a CS flip,
and I doubt you are using those...
Anyway,
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: stable@vger.linux.org
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] drm/i915: Don't skip request retirement if the active list is empty
2015-05-28 15:47 ` Chris Wilson
@ 2015-05-28 16:03 ` Ville Syrjälä
2015-05-28 16:12 ` Chris Wilson
2015-05-29 12:22 ` Jani Nikula
1 sibling, 1 reply; 7+ messages in thread
From: Ville Syrjälä @ 2015-05-28 16:03 UTC (permalink / raw)
To: Chris Wilson, intel-gfx
On Thu, May 28, 2015 at 04:47:49PM +0100, Chris Wilson wrote:
> On Thu, May 28, 2015 at 06:32:36PM +0300, ville.syrjala@linux.intel.com wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >
> > Apparently we can have requests even if though the active list is empty,
> > so do the request retirement regardless of whether there's anything
> > on the active list.
> >
> > The way it happened here is that during suspend intel_ring_idle()
> > notices the olr hanging around and then proceeds to get rid of it by
> > adding a request. However since there was nothing on the active lists
> > i915_gem_retire_requests() didn't clean those up, and so the idle work
> > never runs, and we leave the GPU "busy" during suspend resulting in a
> > WARN later.
>
> Whlist I agree (I use list_empty(&ring->request_list);) I strongly
> suspect something (i.e. execlists) isn't managing the active_list
> correctly. Pretty much the only thing that can generate a request
> without an object (and so avoid touching the active_list) is a CS flip,
> and I doubt you are using those...
Oh, I forgot to mention that this was in ringbuffer mode. I guess I
should try execlist too.
>
> Anyway,
> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: stable@vger.linux.org
> -Chris
>
> --
> Chris Wilson, Intel Open Source Technology Centre
--
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] drm/i915: Don't skip request retirement if the active list is empty
2015-05-28 16:03 ` Ville Syrjälä
@ 2015-05-28 16:12 ` Chris Wilson
0 siblings, 0 replies; 7+ messages in thread
From: Chris Wilson @ 2015-05-28 16:12 UTC (permalink / raw)
To: Ville Syrjälä; +Cc: intel-gfx
On Thu, May 28, 2015 at 07:03:23PM +0300, Ville Syrjälä wrote:
> On Thu, May 28, 2015 at 04:47:49PM +0100, Chris Wilson wrote:
> > On Thu, May 28, 2015 at 06:32:36PM +0300, ville.syrjala@linux.intel.com wrote:
> > > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > >
> > > Apparently we can have requests even if though the active list is empty,
> > > so do the request retirement regardless of whether there's anything
> > > on the active list.
> > >
> > > The way it happened here is that during suspend intel_ring_idle()
> > > notices the olr hanging around and then proceeds to get rid of it by
> > > adding a request. However since there was nothing on the active lists
> > > i915_gem_retire_requests() didn't clean those up, and so the idle work
> > > never runs, and we leave the GPU "busy" during suspend resulting in a
> > > WARN later.
> >
> > Whlist I agree (I use list_empty(&ring->request_list);) I strongly
> > suspect something (i.e. execlists) isn't managing the active_list
> > correctly. Pretty much the only thing that can generate a request
> > without an object (and so avoid touching the active_list) is a CS flip,
> > and I doubt you are using those...
>
> Oh, I forgot to mention that this was in ringbuffer mode. I guess I
> should try execlist too.
Now I am even more curious where the partial request came from. Anyhow,
it is immaterial since olr is just a great big wart overdue for
replacement.
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] drm/i915: Don't skip request retirement if the active list is empty
2015-05-28 15:47 ` Chris Wilson
2015-05-28 16:03 ` Ville Syrjälä
@ 2015-05-29 12:22 ` Jani Nikula
2015-06-15 11:38 ` Jani Nikula
1 sibling, 1 reply; 7+ messages in thread
From: Jani Nikula @ 2015-05-29 12:22 UTC (permalink / raw)
To: Chris Wilson, ville.syrjala; +Cc: intel-gfx
On Thu, 28 May 2015, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> On Thu, May 28, 2015 at 06:32:36PM +0300, ville.syrjala@linux.intel.com wrote:
>> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>>
>> Apparently we can have requests even if though the active list is empty,
>> so do the request retirement regardless of whether there's anything
>> on the active list.
>>
>> The way it happened here is that during suspend intel_ring_idle()
>> notices the olr hanging around and then proceeds to get rid of it by
>> adding a request. However since there was nothing on the active lists
>> i915_gem_retire_requests() didn't clean those up, and so the idle work
>> never runs, and we leave the GPU "busy" during suspend resulting in a
>> WARN later.
>
> Whlist I agree (I use list_empty(&ring->request_list);) I strongly
> suspect something (i.e. execlists) isn't managing the active_list
> correctly. Pretty much the only thing that can generate a request
> without an object (and so avoid touching the active_list) is a CS flip,
> and I doubt you are using those...
>
> Anyway,
> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: stable@vger.linux.org
Pushed to drm-intel-fixes, thanks for the patch and review.
BR,
Jani.
> -Chris
>
> --
> Chris Wilson, Intel Open Source Technology Centre
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] drm/i915: Don't skip request retirement if the active list is empty
2015-05-28 15:32 [PATCH] drm/i915: Don't skip request retirement if the active list is empty ville.syrjala
2015-05-28 15:47 ` Chris Wilson
@ 2015-05-31 10:14 ` shuang.he
1 sibling, 0 replies; 7+ messages in thread
From: shuang.he @ 2015-05-31 10:14 UTC (permalink / raw)
To: shuang.he, lei.a.liu, intel-gfx, ville.syrjala
Tested-By: Intel Graphics QA PRTS (Patch Regression Test System Contact: shuang.he@intel.com)
Task id: 6497
-------------------------------------Summary-------------------------------------
Platform Delta drm-intel-nightly Series Applied
PNV 276/276 276/276
ILK 303/303 303/303
SNB -1 315/315 314/315
IVB 343/343 343/343
BYT 287/287 287/287
BDW 320/320 320/320
-------------------------------------Detailed-------------------------------------
Platform Test drm-intel-nightly Series Applied
*SNB igt@pm_rpm@dpms-mode-unset-non-lpsp PASS(1) DMESG_WARN(1)
(dmesg patch applied)WARNING:at_drivers/gpu/drm/i915/intel_uncore.c:#assert_device_not_suspended[i915]()@WARNING:.* at .* assert_device_not_suspended+0x
Note: You need to pay more attention to line start with '*'
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] drm/i915: Don't skip request retirement if the active list is empty
2015-05-29 12:22 ` Jani Nikula
@ 2015-06-15 11:38 ` Jani Nikula
0 siblings, 0 replies; 7+ messages in thread
From: Jani Nikula @ 2015-06-15 11:38 UTC (permalink / raw)
To: Chris Wilson, ville.syrjala; +Cc: intel-gfx
On Fri, 29 May 2015, Jani Nikula <jani.nikula@linux.intel.com> wrote:
> On Thu, 28 May 2015, Chris Wilson <chris@chris-wilson.co.uk> wrote:
>> On Thu, May 28, 2015 at 06:32:36PM +0300, ville.syrjala@linux.intel.com wrote:
>>> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>>>
>>> Apparently we can have requests even if though the active list is empty,
>>> so do the request retirement regardless of whether there's anything
>>> on the active list.
>>>
>>> The way it happened here is that during suspend intel_ring_idle()
>>> notices the olr hanging around and then proceeds to get rid of it by
>>> adding a request. However since there was nothing on the active lists
>>> i915_gem_retire_requests() didn't clean those up, and so the idle work
>>> never runs, and we leave the GPU "busy" during suspend resulting in a
>>> WARN later.
>>
>> Whlist I agree (I use list_empty(&ring->request_list);) I strongly
>> suspect something (i.e. execlists) isn't managing the active_list
>> correctly. Pretty much the only thing that can generate a request
>> without an object (and so avoid touching the active_list) is a CS flip,
>> and I doubt you are using those...
>>
>> Anyway,
>> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
>> Cc: stable@vger.linux.org
>
> Pushed to drm-intel-fixes, thanks for the patch and review.
Reverted from drm-intel-fixes because I misapplied it, and applied to
drm-intel-next-fixes instead. Sorry for the noise.
BR,
Jani.
>
> BR,
> Jani.
>
>
>> -Chris
>>
>> --
>> Chris Wilson, Intel Open Source Technology Centre
>> _______________________________________________
>> Intel-gfx mailing list
>> Intel-gfx@lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
>
> --
> Jani Nikula, Intel Open Source Technology Center
--
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-06-15 11:40 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-28 15:32 [PATCH] drm/i915: Don't skip request retirement if the active list is empty ville.syrjala
2015-05-28 15:47 ` Chris Wilson
2015-05-28 16:03 ` Ville Syrjälä
2015-05-28 16:12 ` Chris Wilson
2015-05-29 12:22 ` Jani Nikula
2015-06-15 11:38 ` Jani Nikula
2015-05-31 10:14 ` shuang.he
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox