From: Jiyu Yang Date: Fri, 5 Jan 2018 02:44:01 +0000 (+0800) Subject: gpu: fixed the fence struct since 4.9.68 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=628abcaef9009a793f243f9ea126d1d2f00bd82c;p=GitHub%2FLineageOS%2FG12%2Fandroid_hardware_amlogic_kernel-modules_mali-driver.git gpu: fixed the fence struct since 4.9.68 PD#151803 Change-Id: I5617acd8880666cf4ad24812ab248b904de58e52 --- diff --git a/mali/linux/mali_internal_sync.c b/mali/linux/mali_internal_sync.c index 43d34f1..d8939dc 100644 --- a/mali/linux/mali_internal_sync.c +++ b/mali/linux/mali_internal_sync.c @@ -695,7 +695,7 @@ static bool mali_internal_fence_signaled(struct fence *fence) ret = parent->ops->has_signaled(sync_pt); if (0 > ret) -#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 68) fence->error = ret; #else fence->status = ret; diff --git a/t83x/kernel/drivers/gpu/arm/midgard/mali_kbase_fence.h b/t83x/kernel/drivers/gpu/arm/midgard/mali_kbase_fence.h index f3ed025..d187e50 100644 --- a/t83x/kernel/drivers/gpu/arm/midgard/mali_kbase_fence.h +++ b/t83x/kernel/drivers/gpu/arm/midgard/mali_kbase_fence.h @@ -134,7 +134,7 @@ static inline bool kbase_fence_out_is_ours(struct kbase_jd_atom *katom) static inline int kbase_fence_out_signal(struct kbase_jd_atom *katom, int status) { -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 68)) katom->dma_fence.fence->error = status; #else katom->dma_fence.fence->status = status; diff --git a/t83x/kernel/drivers/gpu/arm/midgard/mali_kbase_sync_file.c b/t83x/kernel/drivers/gpu/arm/midgard/mali_kbase_sync_file.c index ef5b7ce..cb00c33 100644 --- a/t83x/kernel/drivers/gpu/arm/midgard/mali_kbase_sync_file.c +++ b/t83x/kernel/drivers/gpu/arm/midgard/mali_kbase_sync_file.c @@ -161,7 +161,7 @@ static void kbase_fence_wait_callback(struct dma_fence *fence, struct kbase_context *kctx = katom->kctx; /* Cancel atom if fence is erroneous */ -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 68)) if (dma_fence_is_signaled(kcb->fence) && kcb->fence->error) #else if (dma_fence_is_signaled(kcb->fence) && kcb->fence->status < 0) @@ -277,7 +277,7 @@ static void kbase_sync_fence_info_get(struct dma_fence *fence, * 1 : signaled */ if (dma_fence_is_signaled(fence)) { -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 68)) int status = fence->error; #else int status = fence->status;