On Wed, Mar 25, 2015 at 04:53:38PM +0000, Tvrtko Ursulin wrote: > From: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx> > > New kernels add the ability to pad objects to specified size at execbuf time. > > Add the drm_intel_bo_pad_to_size API via which this padded size can be set. Looks good, exactly what I had in mind. > static int > +drm_intel_gem_bo_pad_to_size(drm_intel_bo *bo, uint64_t pad_to_size) > +{ > + drm_intel_bo_gem *bo_gem = (drm_intel_bo_gem *) bo; > + > + bo_gem->pad_to_size = bo->size < pad_size ? pad_size : 0; Probably best to return -EINVAL here rather than silently drop the request. Knowing our callers, they will ignore the error anyway. One thing I was considering inside the kernel was to allow the GTT allocation to be smaller than the object. I don't have a good usecase though, because with a subobject you are likely to want to use all of it at some point, so you will likely find it all bound anyway. (And I don't think the penalty for the occasional rebind is that onerous.) -Chris -- Chris Wilson, Intel Open Source Technology Centre _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/intel-gfx