Re: [PATCH] drm/i915: Pass vmas to i915_error_object_create

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
> > ---
> >  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
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx





[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux