[Intel-gfx] [RFC 01/14] drm/i915: allocate gem memory for mipi dbi cmd buffer

Daniel Vetter daniel at ffwll.ch
Mon Jun 15 03:30:49 PDT 2015


On Mon, Jun 01, 2015 at 02:03:15PM +0300, Ville Syrjälä wrote:
> On Fri, May 29, 2015 at 07:10:53PM +0200, Daniel Vetter wrote:
> > On Fri, May 29, 2015 at 01:59:01PM +0300, Ville Syrjälä wrote:
> > > On Fri, May 29, 2015 at 04:06:53PM +0530, Gaurav K Singh wrote:
> > > > Allocate gem memory for MIPI DBI command buffer. This memory
> > > > will be used when sending command via DBI interface.
> > > 
> > > Why would you allocate this via gem? AFAICS you only feed the bus
> > > address to the hardware. Using the dma-api would seem like the right
> > > choice here, but I'm not sure how to deal with the dma mask.
> > 
> > Yeah dma_alloc_coherent is what you want here. The mask can be ignored,
> > it should be suitable already.
> 
> Umm, this thing seems to limited to 32bit addresses. And we set the mask
> to 39 or 40 bits depending on the gen.

Well that's what we have dma_set_coherent_mask for, hooray. Not the first
one, see the other hacks with comments in i915_driver_load.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


More information about the Intel-gfx mailing list