summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJammy Zhou <Jammy.Zhou@amd.com>2015-05-07 11:38:28 +0800
committerAlex Deucher <alexander.deucher@amd.com>2015-07-30 00:11:10 -0400
commit696d78c5affba97ca973fdaf568fca58fcd00cb6 (patch)
treed418e8aa5b5566cf53641ca3b80f131f7815b5e4
parent8daefd7516aa96039353125d1dbf92ed62efb1ba (diff)
amdgpu: fix 32-on-64 support (v2)
0xffffffff was appended to the higher 32bit with (intptr_t) when use 32bit libdrm_amdgpu.so with 64bit kernel, and it caused segmentation fault for 32bit application. v2: switch to uintptr_t Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
-rw-r--r--amdgpu/amdgpu_bo.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/amdgpu/amdgpu_bo.c b/amdgpu/amdgpu_bo.c
index 9321f8b3..587c1d08 100644
--- a/amdgpu/amdgpu_bo.c
+++ b/amdgpu/amdgpu_bo.c
@@ -194,7 +194,7 @@ int amdgpu_bo_query_info(amdgpu_bo_handle bo,
/* Query buffer info. */
gem_op.handle = bo->handle;
gem_op.op = AMDGPU_GEM_OP_GET_GEM_CREATE_INFO;
- gem_op.value = (intptr_t)&bo_info;
+ gem_op.value = (uintptr_t)&bo_info;
r = drmCommandWriteRead(bo->dev->fd, DRM_AMDGPU_GEM_OP,
&gem_op, sizeof(gem_op));