On Wed, Jun 01, 2016 at 05:01:13PM +0100, Damien Lespiau wrote:
> We exit early if has_aliasing_ppgtt is 0, so towards the end of the
> function has_aliasing_ppgtt can only be 1.
> 
> Also:
> 
>       if (foo)
>               return 1;
>       else
>               return 0;
> 
> when foo is already a bool is really just:
> 
>       return foo;
> 
> Signed-off-by: Damien Lespiau <damien.lesp...@intel.com>
> ---
>  drivers/gpu/drm/i915/i915_gem_gtt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c 
> b/drivers/gpu/drm/i915/i915_gem_gtt.c
> index 4668477..6aae4b8 100644
> --- a/drivers/gpu/drm/i915/i915_gem_gtt.c
> +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
> @@ -161,7 +161,7 @@ int intel_sanitize_enable_ppgtt(struct drm_i915_private 
> *dev_priv,
>       if (INTEL_GEN(dev_priv) >= 8 && i915.enable_execlists)
>               return has_full_48bit_ppgtt ? 3 : 2;
>       else
> -             return has_aliasing_ppgtt ? 1 : 0;
> +             return has_aliasing_ppgtt;

/* full-ppgtt doesn't yet work reliably in legacy ringbuffer mode */
if (!i915.enable_execlists)
        return 1;

return has_full_48bit_ppgtt ? 3 : 2;

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to