MGS-2857 [#imx-530] fix spinlock in gpu kernel driver
authorXianzhong <xianzhong.li@nxp.com>
Tue, 2 May 2017 07:41:18 +0000 (15:41 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 20:22:05 +0000 (15:22 -0500)
commit22bc5fce9a3860d8f127463fe0d55393f6260d38
tree67d70dc0bfc7967be203182cb65af3c3f73e3694
parent3f32b027edc009b91be16384bec8945d4849bcd3
MGS-2857 [#imx-530] fix spinlock in gpu kernel driver

there are two critical problems with spinlock in gpu driver:
1. spin_unlock is missing when pte_offset_map_lock return invalid pte pointer,
this will cause dead lock in stress case.
2. pte_unmap is missing in spinlock debug build, this will cause kernel panic,
which can be reproduced when enable CONFIG_DEBUG_SPINLOCK in kernel build.

Date: May 02, 2017
Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c