[Intel-gfx] [PATCH] drm/i915: Pass vmas to i915_error_object_create
Chris Wilson
chris at chris-wilson.co.uk
Mon Nov 3 21:55:33 CET 2014
On Mon, Nov 03, 2014 at 03:31:09PM +0100, Daniel Vetter wrote:
> On Fri, Oct 31, 2014 at 05:38:31PM +0200, Mika Kuoppala wrote:
> > to move the interface to the ppgtt era.
> >
> > Signed-off-by: Mika Kuoppala <mika.kuoppala at intel.com>
> > ---
> > drivers/gpu/drm/i915/i915_gpu_error.c | 49 +++++++++++++++++++----------------
> > 1 file changed, 27 insertions(+), 22 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/i915_gpu_error.c b/drivers/gpu/drm/i915/i915_gpu_error.c
> > index d17360b..a3e62f00 100644
> > --- a/drivers/gpu/drm/i915/i915_gpu_error.c
> > +++ b/drivers/gpu/drm/i915/i915_gpu_error.c
> > @@ -561,16 +561,20 @@ static void i915_error_state_free(struct kref *error_ref)
> >
> > static struct drm_i915_error_object *
> > i915_error_object_create(struct drm_i915_private *dev_priv,
> > - struct drm_i915_gem_object *src,
> > - struct i915_address_space *vm)
> > + struct i915_vma *vma)
> > {
> > struct drm_i915_error_object *dst;
> > - struct i915_vma *vma = NULL;
> > + struct drm_i915_gem_object *src;
> > int num_pages;
> > bool use_ggtt;
> > int i = 0;
> > u32 reloc_offset;
> >
> > + if (WARN_ON(vma == NULL))
> > + return NULL;
Silly, handling NULL here makes the callsites much cleaner. Why didn't
you just reuse my ealier patch?
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
More information about the Intel-gfx
mailing list