linux-imx/drivers/gpu/imx/dpu-blit
Guangliu Ding c6e5ded297 LF-11688-2 gpu: imx: dpu-blit: fix dma fence stress test hang
The stress test is blocked in dma_fence_default_wait and missing
dpu_be_fence signaling leads to weston hang.
The root cause is unreasonable calling sequence of irq_handler and
atomic_inc.
We use refcnt in dpu_be_fence to sync dual dpu on 8QM. To avoid this
issue, we set refcnt = dpu_num when get_fence. Then each dpu blitter
will decrease the refcnt in irq_handler when doing sync and finally
signal the fence.

The same issue with LF-11223.

[ 1212.771073] sysrq: Show Blocked State
[ 1212.774848] task:kworker/u12:36 state stack:0 pid:975 tgid:975 ppid:2 flags:0x00000208
[ 1212.784142] Workqueue: events_unbound commit_work
[ 1212.788846] Call trace:
[ 1212.791282] __switch_to+0xe4/0x128
[ 1212.794765] __schedule+0x2d0/0x83c
[ 1212.798249] schedule+0x34/0xc8
[ 1212.801386] schedule_timeout+0xfc/0x108
[ 1212.805304] dma_fence_default_wait+0x1b8/0x1ec
[ 1212.809828] dma_fence_wait_timeout+0x84/0xa4
[ 1212.814178] drm_atomic_helper_wait_for_fences+0x174/0x234
[ 1212.819656] commit_tail+0x38/0x18c
[ 1212.823131] commit_work+0x14/0x20
[ 1212.826519] process_one_work+0x138/0x248
[ 1212.830524] worker_thread+0x320/0x438
[ 1212.834268] kthread+0x110/0x114
[ 1212.837492] ret_from_fork+0x10/0x20

Signed-off-by: Guangliu Ding <guangliu.ding@nxp.com>
Reviewed-by: Jiyu Yang <jiyu.yang@nxp.com>
Tested-by: Jared Hu <jared.hu@nxp.com>
2024-04-02 14:01:55 +08:00
..
dpu-blit-registers.h MGS-6488-2 gpu: imx: dpu-blit: Implement DPU fence with IRQ_COMCTRL_SW 2023-10-30 17:49:40 +08:00
dpu-blit.c LF-11688-2 gpu: imx: dpu-blit: fix dma fence stress test hang 2024-04-02 14:01:55 +08:00
dpu-blit.h MGS-6488-2 gpu: imx: dpu-blit: Implement DPU fence with IRQ_COMCTRL_SW 2023-10-30 17:49:40 +08:00
Kconfig
Makefile