On Sat, Jan 25, 2014 at 09:28:24PM +0100, Daniel Vetter wrote:
> On Thu, Jan 23, 2014 at 07:21:10PM -0800, Ben Widawsky wrote:
> > DRM gets very mad when you request an object which occupies a partial
> > page. As a DRM driver, i915 never really wants to anger DRM, and would
> > always just want the rounding done for us.
> > 
> > Signed-off-by: Ben Widawsky <[email protected]>
> > ---
> >  drivers/gpu/drm/i915/i915_gem.c | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/drivers/gpu/drm/i915/i915_gem.c 
> > b/drivers/gpu/drm/i915/i915_gem.c
> > index 024e454..8cd1134 100644
> > --- a/drivers/gpu/drm/i915/i915_gem.c
> > +++ b/drivers/gpu/drm/i915/i915_gem.c
> > @@ -4168,6 +4168,8 @@ struct drm_i915_gem_object 
> > *i915_gem_alloc_object(struct drm_device *dev,
> >     struct address_space *mapping;
> >     gfp_t mask;
> >  
> > +   size = round_up(size, PAGE_SIZE);
> > +
> 
> Nope, if there's some code that doesn't do page-aligend bo allocations it
> needs to be fixed there. If you want throw a WARN_ON and early return in
> here.
> -Daniel

Why?


-- 
Ben Widawsky, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to