From: Jiyu Yang Date: Mon, 22 Oct 2018 07:21:58 +0000 (+0800) Subject: gpu: add 32bit kernel support [1/1] X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=546aaec970845731fd8063048b6e2ddb0a428e04;p=GitHub%2FLineageOS%2FG12%2Fandroid_hardware_amlogic_kernel-modules_mali-driver.git gpu: add 32bit kernel support [1/1] PD#SWPL-684 Problem: the 32 bit kernel can't work Solution: introduce FMODE_UNSIGNED_OFFSET to allow negative file offsets Verify: run on the u212, which can boot into home. Change-Id: I9af133e945911c5f4287c9a566ea38524f665dab Signed-off-by: Jiyu Yang --- diff --git a/bifrost/r10p0/kernel/drivers/gpu/arm/midgard/mali_kbase_core_linux.c b/bifrost/r10p0/kernel/drivers/gpu/arm/midgard/mali_kbase_core_linux.c index 22c995a..3c9c806 100644 --- a/bifrost/r10p0/kernel/drivers/gpu/arm/midgard/mali_kbase_core_linux.c +++ b/bifrost/r10p0/kernel/drivers/gpu/arm/midgard/mali_kbase_core_linux.c @@ -401,6 +401,7 @@ static int kbase_open(struct inode *inode, struct file *filp) init_waitqueue_head(&kctx->event_queue); filp->private_data = kctx; + filp->f_mode |= FMODE_UNSIGNED_OFFSET; kctx->filp = filp; if (kbdev->infinite_cache_active_default) diff --git a/bifrost/r9p0/kernel/drivers/gpu/arm/midgard/mali_kbase_core_linux.c b/bifrost/r9p0/kernel/drivers/gpu/arm/midgard/mali_kbase_core_linux.c index a6b0ac7..c776e08 100644 --- a/bifrost/r9p0/kernel/drivers/gpu/arm/midgard/mali_kbase_core_linux.c +++ b/bifrost/r9p0/kernel/drivers/gpu/arm/midgard/mali_kbase_core_linux.c @@ -359,6 +359,7 @@ static int kbase_open(struct inode *inode, struct file *filp) init_waitqueue_head(&kctx->event_queue); filp->private_data = kctx; + filp->f_mode |= FMODE_UNSIGNED_OFFSET; kctx->filp = filp; if (kbdev->infinite_cache_active_default) diff --git a/dvalin/kernel/drivers/gpu/arm/midgard/mali_kbase_core_linux.c b/dvalin/kernel/drivers/gpu/arm/midgard/mali_kbase_core_linux.c index d696b40..772b993 100755 --- a/dvalin/kernel/drivers/gpu/arm/midgard/mali_kbase_core_linux.c +++ b/dvalin/kernel/drivers/gpu/arm/midgard/mali_kbase_core_linux.c @@ -407,6 +407,7 @@ static int kbase_open(struct inode *inode, struct file *filp) init_waitqueue_head(&kctx->event_queue); filp->private_data = kctx; + filp->f_mode |= FMODE_UNSIGNED_OFFSET; kctx->filp = filp; if (kbdev->infinite_cache_active_default)