summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell King <rmk@arm.linux.org.uk>2014-08-26 12:01:19 +0100
committerRussell King <rmk@arm.linux.org.uk>2014-08-26 19:07:43 +0100
commit5411a9c5e97a6f3f18393f0bc18ca62ce1630b81 (patch)
treec4bc954e41349f71084b13213ed058062472e678
parentc76cacbca07f5749a5dd58ba176f0429e65da038 (diff)
Fix viv_map_user_memory() for 4.6.9 iMX GCABI
The 4.6.9 iMX GCABI has a .physical member added to the MapUserMemory structure, which must be initialised to ~0 to map by virtual address. Introduce a new conditional "GCABI_MAPUSERMEMORY_HAS_PHYSICAL" to indicate the presence of this member and arrange to initialise it appropriately in viv_map_user_memory(). Signed-off-by: Russell King <rmk@arm.linux.org.uk>
-rw-r--r--src/etnaviv/viv.c3
-rw-r--r--src/include_imx6_v4_6_9/gc_abi.h3
2 files changed, 6 insertions, 0 deletions
diff --git a/src/etnaviv/viv.c b/src/etnaviv/viv.c
index b14341e..7a9e544 100644
--- a/src/etnaviv/viv.c
+++ b/src/etnaviv/viv.c
@@ -585,6 +585,9 @@ int viv_map_user_memory(struct viv_conn *conn, void *memory, size_t size, viv_us
.u = {
.MapUserMemory = {
.memory = PTR_TO_VIV(memory),
+#ifdef GCABI_MAPUSERMEMORY_HAS_PHYSICAL
+ .physical = ~0UL,
+#endif
.size = size
}
}
diff --git a/src/include_imx6_v4_6_9/gc_abi.h b/src/include_imx6_v4_6_9/gc_abi.h
index 3d220da..78dba92 100644
--- a/src/include_imx6_v4_6_9/gc_abi.h
+++ b/src/include_imx6_v4_6_9/gc_abi.h
@@ -43,6 +43,9 @@
#define GCABI_UINT64_POINTERS
#define GCABI_UINT64_IOCTL_DATA
+// Interface has a .physical member in MapUserMemory
+#define GCABI_MAPUSERMEMORY_HAS_PHYSICAL
+
/* IOCTL structure for userspace driver*/
typedef struct
{