panfrost: cast bo_handles pointer to uintptr_t first
authorMateusz Krzak <kszaquitto@gmail.com>
Sun, 7 Apr 2019 07:26:15 +0000 (09:26 +0200)
committerEric Anholt <eric@anholt.net>
Fri, 12 Apr 2019 16:33:00 +0000 (16:33 +0000)
Required for 64-bit kernel to interpret the pointer from 32-bit userspace.

Signed-off-by: Mateusz Krzak <kszaquitto@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
src/gallium/drivers/panfrost/pan_drm.c

index 4b8c197be0e5e2d0d1fe36364ae1430707c085dc..9aabd96769beba9c6160e6d3cd01b255a74e8bd6 100644 (file)
@@ -231,7 +231,7 @@ panfrost_drm_submit_job(struct panfrost_context *ctx, u64 job_desc, int reqs, st
        bo_handles[submit.bo_handle_count++] = ctx->tiler_heap.gem_handle;
        bo_handles[submit.bo_handle_count++] = ctx->varying_mem.gem_handle;
        bo_handles[submit.bo_handle_count++] = ctx->misc_0.gem_handle;
-       submit.bo_handles = (u64)bo_handles;
+       submit.bo_handles = (u64) (uintptr_t) bo_handles;
 
         /* Dump memory _before_ submitting so we're not corrupted with actual GPU results */
         pantrace_dump_memory();