diff mbox

[09/19] drm/i915/execlists: HWACK checking superseded checking port[0].count

Message ID 20180517074055.14638-9-chris@chris-wilson.co.uk (mailing list archive)
State New, archived
Headers show

Commit Message

Chris Wilson May 17, 2018, 7:40 a.m. UTC
The HWACK bit more generically solves the problem of resubmitting ESLP
while the hardware is still processing the current ELSP write. We no
longer need to check port[0].count itself.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/intel_lrc.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Tvrtko Ursulin May 17, 2018, 10:55 a.m. UTC | #1
On 17/05/2018 08:40, Chris Wilson wrote:
> The HWACK bit more generically solves the problem of resubmitting ESLP
> while the hardware is still processing the current ELSP write. We no
> longer need to check port[0].count itself.
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
>   drivers/gpu/drm/i915/intel_lrc.c | 2 --
>   1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
> index 49283b3d3ebb..857ab04452f0 100644
> --- a/drivers/gpu/drm/i915/intel_lrc.c
> +++ b/drivers/gpu/drm/i915/intel_lrc.c
> @@ -608,8 +608,6 @@ static bool __execlists_dequeue(struct intel_engine_cs *engine)
>   		GEM_BUG_ON(!execlists_is_active(execlists,
>   						EXECLISTS_ACTIVE_USER));
>   		GEM_BUG_ON(!port_count(&port[0]));
> -		if (port_count(&port[0]) > 1)
> -			return false;
>   
>   		/*
>   		 * If we write to ELSP a second time before the HW has had
> 

Looks indeed the same behaviour. Both before and after we wait for 
preempted event before can submit more to the same port.

Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Regards,

Tvrtko
Chris Wilson May 17, 2018, 5:03 p.m. UTC | #2
Quoting Tvrtko Ursulin (2018-05-17 11:55:29)
> 
> On 17/05/2018 08:40, Chris Wilson wrote:
> > The HWACK bit more generically solves the problem of resubmitting ESLP
> > while the hardware is still processing the current ELSP write. We no
> > longer need to check port[0].count itself.
> > 
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > ---
> >   drivers/gpu/drm/i915/intel_lrc.c | 2 --
> >   1 file changed, 2 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
> > index 49283b3d3ebb..857ab04452f0 100644
> > --- a/drivers/gpu/drm/i915/intel_lrc.c
> > +++ b/drivers/gpu/drm/i915/intel_lrc.c
> > @@ -608,8 +608,6 @@ static bool __execlists_dequeue(struct intel_engine_cs *engine)
> >               GEM_BUG_ON(!execlists_is_active(execlists,
> >                                               EXECLISTS_ACTIVE_USER));
> >               GEM_BUG_ON(!port_count(&port[0]));
> > -             if (port_count(&port[0]) > 1)
> > -                     return false;
> >   
> >               /*
> >                * If we write to ELSP a second time before the HW has had
> > 
> 
> Looks indeed the same behaviour. Both before and after we wait for 
> preempted event before can submit more to the same port.
> 
> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Pushed this one as I think it's a nice standalone cleanup and been
meaning to do it for a while.
-Chris
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
index 49283b3d3ebb..857ab04452f0 100644
--- a/drivers/gpu/drm/i915/intel_lrc.c
+++ b/drivers/gpu/drm/i915/intel_lrc.c
@@ -608,8 +608,6 @@  static bool __execlists_dequeue(struct intel_engine_cs *engine)
 		GEM_BUG_ON(!execlists_is_active(execlists,
 						EXECLISTS_ACTIVE_USER));
 		GEM_BUG_ON(!port_count(&port[0]));
-		if (port_count(&port[0]) > 1)
-			return false;
 
 		/*
 		 * If we write to ELSP a second time before the HW has had