diff options
author | Russell King <rmk@arm.linux.org.uk> | 2014-08-26 12:01:19 +0100 |
---|---|---|
committer | Russell King <rmk@arm.linux.org.uk> | 2014-08-26 19:07:43 +0100 |
commit | 5411a9c5e97a6f3f18393f0bc18ca62ce1630b81 (patch) | |
tree | c4bc954e41349f71084b13213ed058062472e678 /src | |
parent | c76cacbca07f5749a5dd58ba176f0429e65da038 (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>
Diffstat (limited to 'src')
-rw-r--r-- | src/etnaviv/viv.c | 3 | ||||
-rw-r--r-- | src/include_imx6_v4_6_9/gc_abi.h | 3 |
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 { |