lkml.org 
[lkml]   [2017]   [Jan]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2 2/6] staging: fbtft: do not override DMA coherent mask
From
Date
On Mon, 2017-01-02 at 19:14 +0100, Noralf Trønnes wrote:
> Den 02.01.2017 12:35, skrev Andy Shevchenko:
> > Usually it's not consumer's business to override resources passed
> > from
> > provider, in particularly DMA coherent mask.

> > --- a/drivers/staging/fbtft/fbtft-core.c
> > +++ b/drivers/staging/fbtft/fbtft-core.c
> > @@ -841,7 +841,6 @@ struct fb_info *fbtft_framebuffer_alloc(struct
> > fbtft_display *display,
> >    if (txbuflen > 0) {
> >   #ifdef CONFIG_HAS_DMA
> >    if (dma) {
> > - dev->coherent_dma_mask = ~0;
>
> Can we make this conditional like in of_dma_configure():
>
>           if (!dev->coherent_dma_mask)
>                  dev->coherent_dma_mask = DMA_BIT_MASK(32);
>
> If not, I guess the mask has to be set before adding the spi device in
> fbtft_device.c to keep it from breaking.

Good point. I will check this.

>   txbuf = dmam_alloc_coherent(dev, txbuflen,
> >        &par-
> > >txbuf.dma, GFP_DMA);
> >    } else

--
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy

\
 
 \ /
  Last update: 2017-01-03 11:57    [W:1.632 / U:0.432 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site