gpu: arm: midgard: Fix the removal method of the fence 78/118678/5
authorHoegeun Kwon <hoegeun.kwon@samsung.com>
Mon, 13 Mar 2017 11:46:54 +0000 (20:46 +0900)
committerHoegeun Kwon <hoegeun.kwon@samsung.com>
Fri, 17 Mar 2017 04:40:35 +0000 (21:40 -0700)
commit5e35eeabbfb5dec4307aea4dc585fa6af28756d4
treed2e7dbdf5ef8b1031fabb7a84d44caad3706aa41
parente0ecd277a4fcb406ea12de11ea54810d10b34440
gpu: arm: midgard: Fix the removal method of the fence

Fix the fence removal method because of the fence list is removed
twice. This change is also updated from mali midgard r15p0 by ARM.

The GL application calls the flip ioctl and then calls the
eglFrontBufferSetSEC function to use the user space front
buffer. At this time, if the user space application is terminated,
in Kernel, the link is removed from the kbase_dma_fence_cancel_all_atoms() function, a following error occurs referring to the wrong link.

   Unable to handle kernel paging request at virtual address dead000000000108
   pgd = ffffffc09e385000
   [dead000000000108] *pgd=0000000000000000, *pud=0000000000000000
   Internal error: Oops: 96000044 [#1] PREEMPT SMP
   ...
   task: ffffffc09952ad00 ti: ffffffc086c70000 task.ti: ffffffc086c70000
   PC is at kbase_dma_fence_cancel_all_atoms+0x64/0xf8
   LR is at kbase_dma_fence_cancel_all_atoms+0xac/0xf8
   ...
   Call trace:
   [<ffffffc0004c9df8>] kbase_dma_fence_cancel_all_atoms+0x64/0xf8
   [<ffffffc0004b170c>] kbase_jd_zap_context+0x74/0xa0
   [<ffffffc0004b6078>] kbase_destroy_context+0x40/0x1e0
   [<ffffffc0004c0468>] kbase_release+0xe4/0x168
   ...

Change-Id: Ief351783808e63e01797fdfa2d7460dec013bff4
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
drivers/gpu/arm/midgard/r12p0_04rel0/mali_kbase_dma_fence.c