[Intel-gfx] [PATCH] drm/i915: Remove unnecessary null check in execlists_context_unqueue

Jani Nikula jani.nikula at linux.intel.com
Wed May 27 02:49:52 PDT 2015


On Mon, 27 Apr 2015, Michel Thierry <michel.thierry at intel.com> wrote:
> commit 53292cdb066950611e5bc2e0eb109c7edb42af78 ("drm/i915: Workaround
> to avoid lite restore with HEAD==TAIL") added a check for req0 != null
> which is unnecessary.
>
> The only way req0 could be null is if the list was empty, and this is
> already addressed at the beginning of execlists_context_unqueue().
>
> Reported-by: Dan Carpenter <dan.carpenter at oracle.com>
> Signed-off-by: Michel Thierry <michel.thierry at intel.com>

Reviewed-by: Jani Nikula <jani.nikula at intel.com>


> ---
>  drivers/gpu/drm/i915/intel_lrc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
> index fa129b8..199a154 100644
> --- a/drivers/gpu/drm/i915/intel_lrc.c
> +++ b/drivers/gpu/drm/i915/intel_lrc.c
> @@ -432,7 +432,7 @@ static void execlists_context_unqueue(struct intel_engine_cs *ring)
>  		 * WaIdleLiteRestore: make sure we never cause a lite
>  		 * restore with HEAD==TAIL
>  		 */
> -		if (req0 && req0->elsp_submitted) {
> +		if (req0->elsp_submitted) {
>  			/*
>  			 * Apply the wa NOOPS to prevent ring:HEAD == req:TAIL
>  			 * as we resubmit the request. See gen8_emit_request()
> -- 
> 2.1.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Jani Nikula, Intel Open Source Technology Center


More information about the Intel-gfx mailing list