gpu: add 32bit kernel support [1/1]
authorJiyu Yang <jiyu.yang@amlogic.com>
Mon, 22 Oct 2018 07:21:58 +0000 (15:21 +0800)
committerJiyu Yang <jiyu.yang@amlogic.com>
Tue, 23 Oct 2018 05:23:40 +0000 (22:23 -0700)
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 <Jiyu.Yang@amlogic.com>
bifrost/r10p0/kernel/drivers/gpu/arm/midgard/mali_kbase_core_linux.c
bifrost/r9p0/kernel/drivers/gpu/arm/midgard/mali_kbase_core_linux.c
dvalin/kernel/drivers/gpu/arm/midgard/mali_kbase_core_linux.c

index 22c995a22196eda8e9c43268dba5ad51e8707ddb..3c9c806d5aa01b57d3721d8b9f9057791092b674 100644 (file)
@@ -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)
index a6b0ac7731b12134236a3fd1875cb8c2f517d6cc..c776e08470a7d9b6e644514a1d06b7ca063cf5ab 100644 (file)
@@ -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)
index d696b404f378140c2532cb97d9bf23280c1109b0..772b993285322623f8dce1d7f8cecf713a5d006d 100755 (executable)
@@ -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)