From: Federico Vaga <federico.vaga@gmail.com>
To: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>,
Pawel Osciak <pawel@osciak.com>,
Hans Verkuil <hans.verkuil@cisco.com>,
Mauro Carvalho Chehab <mchehab@infradead.org>,
Giancarlo Asnaghi <giancarlo.asnaghi@st.com>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
Jonathan Corbet <corbet@lwn.net>
Subject: Re: [PATCH v4 1/3] videobuf2-dma-contig: user can specify GFP flags
Date: Tue, 08 Jan 2013 11:15:28 +0100 [thread overview]
Message-ID: <1609748.zs7bdcvuG8@harkonnen> (raw)
In-Reply-To: <50EBC26E.5090803@samsung.com>
> > @@ -165,7 +161,8 @@ static void *vb2_dc_alloc(void *alloc_ctx, unsigned
> > long size)>
> > /* align image size to PAGE_SIZE */
> > size = PAGE_ALIGN(size);
> >
> > - buf->vaddr = dma_alloc_coherent(dev, size, &buf->dma_addr,
GFP_KERNEL);
> > + buf->vaddr = dma_alloc_coherent(dev, size, &buf->dma_addr,
> > +
GFP_KERNEL | conf->mem_flags);
>
> I think we can add GFP_DMA flag unconditionally to the vb2_dc_contig
> allocator.
> It won't hurt existing clients as most of nowadays platforms doesn't
> have DMA
> zone (GFP_DMA is ignored in such case), but it should fix the issues
> with some
> older and non-standard systems.
I did not set GFP_DMA fixed in the allocator because I do not want to brake
something in the future. On x86 platform GFP_DMA allocates under 16MB and this
limit can be too strict. When many other drivers use GFP_DMA we can saturate
this tiny zone.
As you said, this fix the issue with _older_ and _non-standard_ (like sta2x11)
systems. But this fix has effect on every other standard and new systems.
That's why I preferred to set the flag optionally.
--
Federico Vaga
next prev parent reply other threads:[~2013-01-08 10:10 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-06 17:29 [PATCH v4 1/3] videobuf2-dma-contig: user can specify GFP flags Federico Vaga
2013-01-06 17:29 ` [PATCH V4 2/3] sta2x11_vip: convert to videobuf2 and control framework Federico Vaga
2013-01-07 9:46 ` Hans Verkuil
2013-01-06 17:29 ` [PATCH V4 3/3] adv7180: remove {query/g_/s_}ctrl Federico Vaga
2013-01-08 6:53 ` [PATCH v4 1/3] videobuf2-dma-contig: user can specify GFP flags Marek Szyprowski
2013-01-08 10:15 ` Federico Vaga [this message]
2013-01-08 10:40 ` Marek Szyprowski
2013-01-08 14:58 ` Federico Vaga
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1609748.zs7bdcvuG8@harkonnen \
--to=federico.vaga@gmail.com \
--cc=corbet@lwn.net \
--cc=giancarlo.asnaghi@st.com \
--cc=hans.verkuil@cisco.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=mchehab@infradead.org \
--cc=mchehab@redhat.com \
--cc=pawel@osciak.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox