summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Stultz <john.stultz@linaro.org>2020-09-15 20:44:57 +0000
committerYongQin Liu <yongqin.liu@linaro.org>2020-10-19 16:35:20 +0000
commit65fa85a0996e2409bfc11484ac2c42978114f3ac (patch)
treec8dc7a5b86ed1b2b2ab888062c59cb80ce655b5b
parent319b25c57e722992763703bff69417ec99a8db64 (diff)
So the utgard driver for hikey hasn't ever really been configured to actually use the dmabuf fences. This results in the sync fence to not properly have the fence ops configured, and due to changes in the userland usage, we're now hitting null pointer dereferences. I took a brief swing at trying to properly enable CONFIG_MALI_DMA_BUF_FENCE=y and reworking the use of the old reservation_objects but even after doing that I was still hitting crashes in mali_timeline.c So for now, lets just skip the fence call here if it is null and avoid the crash. Change-Id: Ic8b310e0e331ebed584a0517e1bc09a44ff9fe60 Signed-off-by: John Stultz <john.stultz@linaro.org> (cherry picked from commit 02c93ad6d923bf1f32d82a513362c2baef52784e)
-rw-r--r--drivers/gpu/arm/utgard/common/mali_timeline_fence_wait.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/arm/utgard/common/mali_timeline_fence_wait.c b/drivers/gpu/arm/utgard/common/mali_timeline_fence_wait.c
index 1ab13f50997f..a25f75533992 100644
--- a/drivers/gpu/arm/utgard/common/mali_timeline_fence_wait.c
+++ b/drivers/gpu/arm/utgard/common/mali_timeline_fence_wait.c
@@ -113,7 +113,8 @@ static mali_bool mali_timeline_fence_wait_check_status(struct mali_timeline_syst
#elif LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
if (0 < atomic_read(&sync_fence->status)) {
#else
- if (0 == sync_fence->fence->ops->signaled(sync_fence->fence)) {
+ if (sync_fence->fence->ops->signaled &&
+ (0 == sync_fence->fence->ops->signaled(sync_fence->fence))) {
#endif
ret = MALI_FALSE;