On Tue, 10 Apr 2012 16:25:54 +0200, Daniel Vetter <daniel.vet...@ffwll.ch> 
wrote:
> We don't need the pt_addr for the !dmar case, so drop the else and
> move the if (dmar) condition out of the loop.
> 
> Noticed-by: Konstantin Belousov <kostik...@gmail.com>
> Signed-Off-by: Daniel Vetter <daniel.vet...@ffwll.ch>
> ---
>  drivers/gpu/drm/i915/i915_gem_gtt.c |    7 +++----
>  1 files changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c 
> b/drivers/gpu/drm/i915/i915_gem_gtt.c
> index 4fb875d..bea6187 100644
> --- a/drivers/gpu/drm/i915/i915_gem_gtt.c
> +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
> @@ -98,9 +98,9 @@ int i915_gem_init_aliasing_ppgtt(struct drm_device *dev)
>                       goto err_pt_alloc;
>       }
>  
> -     for (i = 0; i < ppgtt->num_pd_entries; i++) {
> +     if (dev_priv->mm.gtt->needs_dmar) {
> +             for (i = 0; i < ppgtt->num_pd_entries; i++) {
>               dma_addr_t pt_addr;
Whitespace damage.
-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

Reply via email to