]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ENGR00216013-4 vpu: add phy address check ioctl.
authorZhang Jiejing <jiejing.zhang@freescale.com>
Mon, 16 Jul 2012 05:53:26 +0000 (13:53 +0800)
committerOliver Wendt <ow@karo-electronics.de>
Mon, 30 Sep 2013 12:12:24 +0000 (14:12 +0200)
commit2fcd8c487d18496e013d796817487cfba5f0ba35
treedd536c220796185ce7728da13f67c4898435d5af
parent850f9b0d3860c34c09019187ae36a3646ce25eee
ENGR00216013-4 vpu: add phy address check ioctl.

this patch is adding a ioctl for vpu to check the phy addr before vpu
start using this addr, this use case is common in some Direct Render case,
the VPU 's framebuffer phy memory is allocate by GPU, if the address given
by GPU have some wrong, like pass a virtual address, vpu will hang the system.

Add this IOCTL to be the goalkeeper, this IOCTL can check whether the phy
address was virtual memory or the address is within phy memory of your DDR.

The phy memory valild check is now doing best effort:
1. check whether is was allocated by vmalloc(), which must be a phy un-continus
2. check whether is was beyound DDR's top address, usually the other driver
   pass a virtual address as a phy address.

Signed-off-by: Zhang Jiejing <jiejing.zhang@freescale.com>
drivers/mxc/vpu/mxc_vpu.c