MGS-5160 [#imx-1676] enable dummy draw to fix gpu hang and failures on 8MM
authorXianzhong <xianzhong.li@nxp.com>
Fri, 6 Sep 2019 14:27:49 +0000 (22:27 +0800)
committerXianzhong <xianzhong.li@nxp.com>
Tue, 17 Sep 2019 15:57:37 +0000 (23:57 +0800)
commit393e7e1ae2da9934f48fe12431b8dee72802bb38
treefe47f8702a17197e76348a74d171b3cbc261c823
parent35af8c6450a02b6d450f36d90c67a30e7f499fe7
MGS-5160 [#imx-1676] enable dummy draw to fix gpu hang and failures on 8MM

Problems:
- GPU hang when run Google Earth apk on 8MM EVK board
- Android DEQP/SKQP CTS have random failures
- Khronos ES20 CTS have random failures

Analysis:
GPU got stuck in shader module when process specific data format,
this is caused by VSI GCNanoUltra Errata(HBN1286), which does not set
the specific intermediate register to 0 in hardware reset sequence after power up,
this wrong register will cause the unexpected result when process specific data type,
wrong behavior will happen and may cause out of bound access in shader programming.

Fix:
GPU driver will submit the predefined command(dummy draw) with fake stream and shader,
also set scissor with (0,0,0,0) to avoid draw out, no pixel output on hardware pipeline,
this workaround can set the specific register to 0 as the effective SW remedy.

Impact:
No obvious functionality and performance impact with dummy draw workaround,
it only takes several cycles in command fetch --> vertex shader --> primitive,
and then cull out of reset of GPU pipelines.

This patch can fix the same GPU problem for 7ULP.

Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
(cherry picked from commit b14813c419b1f733c0945e99fc403b7a25774d24)
drivers/mxc/gpu-viv/hal/kernel/arch/gc_hal_kernel_hardware.c