1
0
Fork 0
alistair23-linux/drivers/mxc
Richard Liu 8c5e7b55ac MA-17341-2 [#imx-2211] Fix kernel panic when do stop on android
There is kernel panic when stop android or kill surfaceflinger
after enable framebuffer tile compression on 8mq board.
The root cause of the issue is dcss driver not api to receive
ts fd, gpu driver will set the ts_dma_buf in _SetVidMemMetadata(),
dcss driver get the ts buffer physical address from ts_dma_buf,
when stop android framebuffer and matched ts buffer will free,
previous ts_dma_buf get from ts_fd will be invalid, when dcss
driver use this ts_dma_buf will cause problem. It is a common
issue, if Linux Weston do the similar stop should also meet
the same panic issue.

Keep a reference for ts_dma_buf in _SetVidMemMetadata(),
decrease the reference in _dmabuf_release() can avoid the
panic issue.

Kernel panic log:
[   41.007431] kernel BUG at drivers/gpu/drm/drm_gem.c:154!
[   41.139375] Call trace:
[   41.141824]  drm_gem_object_init+0xb8/0xbc
[   41.145920]  drm_gem_cma_prime_import_sg_table+0x84/0xdc
[   41.151233]  drm_gem_prime_import_dev+0xe8/0x194
[   41.160036]  dcss_plane_atomic_set_base+0x31c/0x3d0
[   41.164915]  dcss_plane_atomic_update+0x450/0x46c
[   41.164923]  drm_atomic_helper_commit_planes+0x130/0x31c
[   41.182255]  dcss_drm_atomic_commit_tail+0xcc/0x150
[   41.187139]  dcss_commit_work+0x10/0x1c
[   41.197322]  process_one_work+0x2d8/0x580
[   41.201333]  worker_thread+0x28c/0x518
[   41.205085]  kthread+0x14c/0x15c
[   41.208316]  ret_from_fork+0x10/0x18

Change-Id: I385851b436d1fead1131ce25f496bdd5d3d14264
Signed-off-by: Richard Liu <xuegang.liu@nxp.com>
(cherry picked from commit 9ef46bda523088bfba51b7432acd2c1e21e547d5)
2020-09-04 10:39:10 +08:00
..
gpu-viv MA-17341-2 [#imx-2211] Fix kernel panic when do stop on android 2020-09-04 10:39:10 +08:00
hantro MLK-24009-4 arm64: imx8mq: vpu: g1/g2: fix build issue as module 2020-05-15 12:39:05 +08:00
hantro_845 MLK-24373-2 arm64: imx8mp: vpu: g1/g2: fix potential deadlock issue 2020-07-17 15:25:53 +08:00
hantro_845_h1 MLK-24009-3 arm64: imx8mm: vpu: h1: fix build issue as module 2020-05-15 12:39:05 +08:00
hantro_vc8000e MLK-24009-1 arm64: imx8mp: vpu: vc8000e: fix build issue as module 2020-05-15 12:39:05 +08:00
hdmi-cec
ipu3 MLK-24090 mxc: ipu3: ipu_device: Fix AB-BA deadlock between vdoa_lock and ipu_ch_tbl.lock 2020-05-22 09:32:52 +08:00
mipi
mlb
sim MLK-24364 mxc: sim: add runtime pm support 2020-07-02 21:32:13 +08:00
vpu
vpu_malone MLK-24477-4:[8QM_MEK/8QXP_MEK]mxc:vpu_malone: report color space by try_fmt 2020-08-17 11:26:25 +08:00
vpu_windsor LF-2111: mxc: vpu_windsor: Avoid hide parameter 2020-08-13 17:20:32 +08:00
xuvi MLK-23791 XUVI/PPM: MU: enable runtime PM for MU3 2020-04-19 09:57:33 +08:00
Kconfig MLK-23394-5: XUVI/PPM: add build for XUVI/PPM. 2020-03-05 08:16:44 +08:00
Makefile MLK-23394-5: XUVI/PPM: add build for XUVI/PPM. 2020-03-05 08:16:44 +08:00