Skip to content
Commit d13a0139 authored by Masami Hiramatsu's avatar Masami Hiramatsu Committed by Mauro Carvalho Chehab
Browse files

media: vb2: Fix videobuf2 to map correct area



Fixes vb2_vmalloc_get_userptr() to ioremap correct area.
Since the current code does ioremap the page address, if the offset > 0,
it does not do ioremap the last page and results in kernel panic.

This fixes to pass the size + offset to ioremap so that ioremap
can map correct area. Also, this uses __pfn_to_phys() to get the physical
address of given PFN.

Signed-off-by: default avatarMasami Hiramatsu <mhiramat@kernel.org>
Reported-by: default avatarTakao Orito <orito.takao@socionext.com>
Reported-by: default avatarFumihiro ATSUMI <atsumi@infinitegra.co.jp>
Reviewed-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 14351d44
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment