Re: [Intel-gfx] [PATCH] drm/i915: Empty the ring before disabling

2017-10-27 Thread Chris Wilson
Quoting Ville Syrjälä (2017-10-27 12:27:59) > On Fri, Oct 27, 2017 at 12:56:39AM +0100, Chris Wilson wrote: > > An interesting snippet from Sandybridge's prm: > > > > "Although a Ring Buffer can be enabled in the non-empty state, it must > > not be disabled unless it is empty. Attempting to disabl

Re: [Intel-gfx] [PATCH] drm/i915: Empty the ring before disabling

2017-10-27 Thread Ville Syrjälä
On Fri, Oct 27, 2017 at 12:56:39AM +0100, Chris Wilson wrote: > An interesting snippet from Sandybridge's prm: > > "Although a Ring Buffer can be enabled in the non-empty state, it must > not be disabled unless it is empty. Attempting to disable a Ring Buffer > in the non-empty state is UNDEFINED.

Re: [Intel-gfx] [PATCH] drm/i915: Empty the ring before disabling

2017-10-27 Thread Chris Wilson
Quoting Mika Kuoppala (2017-10-27 07:44:31) > Chris Wilson writes: > > > An interesting snippet from Sandybridge's prm: > > > > "Although a Ring Buffer can be enabled in the non-empty state, it must > > not be disabled unless it is empty. Attempting to disable a Ring Buffer > > in the non-empty s

Re: [Intel-gfx] [PATCH] drm/i915: Empty the ring before disabling

2017-10-26 Thread Mika Kuoppala
Chris Wilson writes: > An interesting snippet from Sandybridge's prm: > > "Although a Ring Buffer can be enabled in the non-empty state, it must > not be disabled unless it is empty. Attempting to disable a Ring Buffer > in the non-empty state is UNDEFINED." > > Let's avoid the undefined behaviou

[Intel-gfx] [PATCH] drm/i915: Empty the ring before disabling

2017-10-26 Thread Chris Wilson
An interesting snippet from Sandybridge's prm: "Although a Ring Buffer can be enabled in the non-empty state, it must not be disabled unless it is empty. Attempting to disable a Ring Buffer in the non-empty state is UNDEFINED." Let's avoid the undefined behaviour as we disable the rings prior to