return (drm_slp_bo)bo;
}
-unsigned int
+void *
drm_slp_bo_map(drm_slp_bo bo, int device, int opt)
{
tbm_bo_handle bo_handle;
- unsigned int ret = 0;
+ void *ret = NULL;
bo_handle = tbm_bo_map ((tbm_bo)bo, device, opt);
if (bo_handle.ptr == NULL)
{
TBM_LOG ("[libdrm_slp:%d]: error bo_handle is null\n", getpid());
- return 0;
+ return NULL;
}
switch (device)
case TBM_DEVICE_2D:
case TBM_DEVICE_3D:
case TBM_DEVICE_MM:
- ret = (unsigned int)bo_handle.u32;
+ ret = (void *)((uintptr_t)bo_handle.u32);
break;
case TBM_DEVICE_CPU:
- ret = (unsigned int)bo_handle.ptr;
+ ret = bo_handle.ptr;
break;
default:
TBM_LOG ("[libdrm_slp:%d]: error wrong device type\n", getpid());
- return 0;
+ return NULL;
}
return ret;
/*Functions for bo*/
void drm_slp_bo_unref(drm_slp_bo bo);
drm_slp_bo drm_slp_bo_import(drm_slp_bufmgr bufmgr, unsigned int key);
-unsigned int drm_slp_bo_map(drm_slp_bo bo, int device, int opt);
+void *drm_slp_bo_map(drm_slp_bo bo, int device, int opt);
int drm_slp_bo_unmap(drm_slp_bo bo, int device);
#endif /* _DRM_SLP_BUFMGR_H_ */