linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Wrong use of GFP_DMA32 in drivers/media/platform/vivid/vivid-osd.c
@ 2018-03-29 13:28 Hans de Goede
  0 siblings, 0 replies; only message in thread
From: Hans de Goede @ 2018-03-29 13:28 UTC (permalink / raw)
  To: Hans Verkuil, Linux Media Mailing List

Hi Hans, et. al.,

While debugging another GFP_DMA32 problem I did a quick
grep for GFP_DMA32 on the kernel, this result stood out:

drivers/media/platform/vivid/vivid-osd.c
373:    dev->video_vbase = kzalloc(dev->video_buffer_size, GFP_KERNEL | GFP_DMA32);

Because it is making the same mistake as I was, you cannot use
GDP_DMA32 with kmalloc and friends, it will end up being
ignored. If you need memory below 4G you must call alloc_pages
for get_free_pages with GFP_DMA32 to get it.

Regards,

Hans

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-03-29 13:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-29 13:28 Wrong use of GFP_DMA32 in drivers/media/platform/vivid/vivid-osd.c Hans de Goede

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).