[Intel-gfx] [PATCH] drm/i915: Pin tiled objects for L-shaped configs

Daniel Vetter daniel at ffwll.ch
Tue Nov 18 15:37:00 CET 2014


On Tue, Nov 18, 2014 at 02:01:37PM +0000, Chris Wilson wrote:
> On Tue, Nov 18, 2014 at 02:41:22PM +0100, Daniel Vetter wrote:
> >  struct intel_fbdev;
> >  struct intel_fbc_work;
> > diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> > index 1de94cc63517..196ebd07d118 100644
> > --- a/drivers/gpu/drm/i915/i915_gem.c
> > +++ b/drivers/gpu/drm/i915/i915_gem.c
> > @@ -2120,6 +2120,10 @@ i915_gem_object_get_pages_gtt(struct drm_i915_gem_object *obj)
> >  	if (i915_gem_object_needs_bit17_swizzle(obj))
> >  		i915_gem_object_do_bit_17_swizzle(obj);
> >  
> > +	if (obj->tiling_mode != I915_TILING_NONE &&
> > +	    dev_priv->quirks & QUIRK_PIN_SWIZZLED_PAGES)
> > +		i915_gem_object_pin_pages(obj);
> 
> Note that we have a WARN_ON(obj->pages_pin_count) in
> i915_gem_free_object() now.
> 
> if (dev_priv->quirks & QUIRK_PIN_SWIZZLED_PAGES)
>   obj->pages_pin_count = 0;
> 
> or we could just throw away the WARN_ON().

Shame on me for not noticing that. I think I'll just drop the pinning for
tiled objects manually, that way we can keep the WARN_ON. Given all the
tricks being pulled with pin refcounts I think that check is useful.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch



More information about the Intel-gfx mailing list