@@ -35,8 +35,8 @@ static bool nv_alloc_object(const int fd, const uint32_t driverMajorVersion, con
35
35
.hObjectParent = hObjectParent ,
36
36
.hObjectNew = * hObjectNew ,
37
37
.hClass = hClass ,
38
- .pRightsRequested = (NvP64 )NULL ,
39
- .pAllocParms = (NvP64 )params ,
38
+ .pRightsRequested = (NvP64 )( uintptr_t ) NULL ,
39
+ .pAllocParms = (NvP64 )( uintptr_t ) params ,
40
40
.paramsSize = paramSize
41
41
};
42
42
@@ -105,7 +105,7 @@ static bool nv_rm_control(const int fd, const NvHandle hClient, const NvHandle h
105
105
.hObject = hObject ,
106
106
.cmd = cmd ,
107
107
.flags = flags ,
108
- .params = (NvP64 )params ,
108
+ .params = (NvP64 )( uintptr_t ) params ,
109
109
.paramsSize = paramSize
110
110
};
111
111
@@ -552,7 +552,7 @@ bool alloc_memory(const NVDriverContext *context, const uint32_t size, int *fd)
552
552
553
553
struct drm_nvidia_gem_import_nvkms_memory_params params = {
554
554
.mem_size = imageSizeInBytes ,
555
- .nvkms_params_ptr = (uint64_t ) & nvkmsParams ,
555
+ .nvkms_params_ptr = (uint64_t )( uintptr_t ) & nvkmsParams ,
556
556
.nvkms_params_size = context -> driverMajorVersion == 470 ? 0x20 : sizeof (nvkmsParams ) //needs to be 0x20 in the 470 series driver
557
557
};
558
558
int drmret = ioctl (context -> drmFd , DRM_IOCTL_NVIDIA_GEM_IMPORT_NVKMS_MEMORY , & params );
0 commit comments