Mesa (master): panfrost: cast bo_handles pointer to uintptr_t first

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Apr 12 16:33:13 UTC 2019


Module: Mesa
Branch: master
Commit: 411da8b80d34552141920ed07dd6d174e5c72307
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=411da8b80d34552141920ed07dd6d174e5c72307

Author: Mateusz Krzak <kszaquitto at gmail.com>
Date:   Sun Apr  7 09:26:15 2019 +0200

panfrost: cast bo_handles pointer to uintptr_t first

Required for 64-bit kernel to interpret the pointer from 32-bit userspace.

Signed-off-by: Mateusz Krzak <kszaquitto at gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa at rosenzweig.io>

---

 src/gallium/drivers/panfrost/pan_drm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/panfrost/pan_drm.c b/src/gallium/drivers/panfrost/pan_drm.c
index 4b8c197be0e..9aabd96769b 100644
--- a/src/gallium/drivers/panfrost/pan_drm.c
+++ b/src/gallium/drivers/panfrost/pan_drm.c
@@ -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();




More information about the mesa-commit mailing list