[Intel-gfx] [PATCH v2 3/5] drm/i915: Remove unnecessary ggtt_offset_bias from i915_gem_context

Chris Wilson chris at chris-wilson.co.uk
Wed Jul 18 12:28:53 UTC 2018


Quoting Jakub BartmiĊ„ski (2018-07-18 12:54:10)
> diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
> index 35d37af0cb9a..7a3c8921f688 100644
> --- a/drivers/gpu/drm/i915/intel_lrc.c
> +++ b/drivers/gpu/drm/i915/intel_lrc.c
> @@ -1363,8 +1363,8 @@ static int __context_pin(struct i915_gem_context *ctx, struct i915_vma *vma)
>         }
>  
>         flags = PIN_GLOBAL | PIN_HIGH;
> -       if (ctx->ggtt_offset_bias)
> -               flags |= PIN_OFFSET_BIAS | ctx->ggtt_offset_bias;
> +       if (ctx->i915->ggtt.pin_bias)
> +               flags |= PIN_OFFSET_BIAS | ctx->i915->ggtt.pin_bias;

static inline u32 i915_ggtt_pin_bias(struct i915_vma *vma)
{
	return i915_vm_to_ggtt(vma->vm)->pin_bias;
}

To include | PIN_OFFSET_BIAS or not? Probably not. Retcon that earlier
in the series.
-Chris


More information about the Intel-gfx mailing list