[Intel-gfx] [PATCH 2/7] drm/i915: Use GGTT view when (un)pinning objects to planes

Daniel Vetter daniel at ffwll.ch
Wed Mar 18 06:57:34 PDT 2015


On Wed, Mar 18, 2015 at 03:52:31PM +0200, Joonas Lahtinen wrote:
> On ti, 2015-03-17 at 15:45 +0000, Tvrtko Ursulin wrote:
> > @@ -3993,7 +3994,9 @@ i915_gem_object_pin_to_display_plane(struct drm_i915_gem_object *obj,
> >  	 * (e.g. libkms for the bootup splash), we have to ensure that we
> >  	 * always use map_and_fenceable for all scanout buffers.
> >  	 */
> > -	ret = i915_gem_obj_ggtt_pin(obj, alignment, PIN_MAPPABLE);
> > +	ret = i915_gem_object_ggtt_pin(obj, view, alignment,
> > +				       view->type == I915_GGTT_VIEW_NORMAL ?
> > +				       PIN_MAPPABLE : 0);
> 
> I'm slightly concerned about making an assumption that other but normal
> views need not to be mappable (when none are defined). As discussed in
> IRC, this should be moved later into the series when we actually know
> about the other views.

Just an aside: As soon as we have partial ggtt views we don't need to pin
anything display related as mappable any more - we only do this to make
sure we can serve any gtt mmap faults on frontbuffers, just in case.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


More information about the Intel-gfx mailing list