Commits
Richard Liu committed 784b36e6d2a
MA-14133 Enable android out fence and normal out fence simultaneously Add android out-fence support for DRM, enable android out fence and normal out fence simultaneously. Android present fence depends on normal out fence which represents current frame on screen. Layer release fence depends on android out fence which should be signaled when it is off screen. Key changes: Add DRIVER_ATOMIC_ANDROID_FENCE feature to declare android out-fence support. Add ANDROID_OUT_FENCE_PTR property to transfer fence fd. Android fence is created when drm_atomic_commit called. Add drm_crtc_arm_fence_event to insert fence to queue. Add drm_crtc_handle_fence to signal buffer fence off screen. Add drm android out-fence to dcss crtc. This patch cherry-pick below four patches from L4.19 kernel and do some update based on L5.4 kernel changes. commit d939f92ae2ffde6b78d5f4befd409f448f0e78c9 Author: Ivan.liu <xiaowen.liu@nxp.com> MA-11972 Add android out-fence support for DRM. Android requires buffer fence signaled when it is off screen. But default out-fence can't meet that. Add DRIVER_ATOMIC_ANDROID_FENCE feature to declare android out-fence support. Add ANDROID_OUT_FENCE_PTR property to transfer fence fd. Android fence is created when drm_atomic_commit called. Add drm_crtc_arm_fence_event to insert fence to queue. Add drm_crtc_handle_fence to signal buffer fence off screen. commit a0391e0dc88450e624e8f57fa568ed043e0cee99 Author: Ivan.liu <xiaowen.liu@nxp.com> MA-11972-2 Add android out-fence support for DRM. Add drm android out-fence to dcss crtc. commit c3f41907367dcad63ae5a23391331dc2193d3918 Author: Ivan.liu <xiaowen.liu@nxp.com> MA-14133 Enable android out fence and normal out fence simultaneously. Refine fence generation codes to support android out fence and normal out fence. Android present fence depends on normal out fence which represents current frame on screen. Layer release fence depends on android out fence which should be signaled when it is off screen. commit 26262450de93647c809ad4970bce5ccce94fec62 Author: Ivan.liu <xiaowen.liu@nxp.com> MA-13203 Fix kernel panic when do video plaback with dual display on 8mq. Unable to handle kernel NULL pointer dereference at virtual address 00000000 Internal error: Oops: 96000004 [#1] PREEMPT SMP Hardware name: Freescale i.MX8MQ EVK (DT) PC is at dma_fence_signal_locked+0x50/0x178 LR is at dma_fence_signal_locked+0xbc/0x178 Call trace: [<ffff0000087b95f4>] dma_fence_signal_locked+0x50/0x178 [<ffff000008736700>] drm_crtc_handle_fence+0x7c/0xfc [<ffff000008760820>] dcss_crtc_irq_handler+0x54/0x6c [<ffff000008145edc>] __handle_irq_event_percpu+0x60/0x24c [<ffff00000814619c>] handle_irq_event+0x58/0xc0 The root cause is fence is copied to CRTC state and reused again. Set state fence to null when duplicate CRTC state to fix this issue. Change-Id: Id98b2a49be49574b836a508c182c3e3a99230ac4 Signed-off-by: Richard Liu <xuegang.liu@nxp.com>