mirror of
https://github.com/genodelabs/genode.git
synced 2025-03-15 08:41:01 +00:00
libdrm: explicitly convert values to __u64
Prevent errors like follows. error: invalid cast from type ‘size_t’ {aka ‘long unsigned int’} to type ‘__u64’ {aka ‘long long unsigned int’} Issue #5431
This commit is contained in:
parent
b5a074dba1
commit
e90a4a905a
@ -163,7 +163,7 @@ void Etnaviv::serialize(drm_etnaviv_gem_submit *submit, char *content)
|
||||
};
|
||||
for_each_object((drm_etnaviv_gem_submit_bo*)submit->bos,
|
||||
submit->nr_bos, copy_bos);
|
||||
submit->bos = reinterpret_cast<__u64>(new_start);
|
||||
submit->bos = __u64(new_start);
|
||||
}
|
||||
|
||||
/* next are the relocs */
|
||||
@ -177,7 +177,7 @@ void Etnaviv::serialize(drm_etnaviv_gem_submit *submit, char *content)
|
||||
};
|
||||
for_each_object((drm_etnaviv_gem_submit_reloc*)submit->relocs,
|
||||
submit->nr_relocs, copy_relocs);
|
||||
submit->relocs = reinterpret_cast<__u64>(new_start);
|
||||
submit->relocs = __u64(new_start);
|
||||
}
|
||||
|
||||
/* next are the pmrs */
|
||||
@ -190,7 +190,7 @@ void Etnaviv::serialize(drm_etnaviv_gem_submit *submit, char *content)
|
||||
};
|
||||
for_each_object((drm_etnaviv_gem_submit_pmr*)submit->pmrs,
|
||||
submit->nr_pmrs, copy_pmrs);
|
||||
submit->pmrs = reinterpret_cast<__u64>(new_start);
|
||||
submit->pmrs = __u64(new_start);
|
||||
}
|
||||
|
||||
/* next is the cmd stream */
|
||||
@ -200,7 +200,7 @@ void Etnaviv::serialize(drm_etnaviv_gem_submit *submit, char *content)
|
||||
char * const dst = content + offset;
|
||||
Genode::memcpy(dst, reinterpret_cast<void const*>(submit->stream), submit->stream_size);
|
||||
offset += submit->stream_size;
|
||||
submit->stream = reinterpret_cast<__u64>(new_start);
|
||||
submit->stream = __u64(new_start);
|
||||
}
|
||||
|
||||
/* copy submit object last but into the front */
|
||||
|
@ -166,7 +166,7 @@ void Lima::serialize(drm_lima_gem_submit *submit, char *content)
|
||||
};
|
||||
for_each_object((drm_lima_gem_submit_bo*)submit->bos,
|
||||
submit->nr_bos, copy_bos);
|
||||
submit->bos = reinterpret_cast<__u64>(new_start);
|
||||
submit->bos = __u64(new_start);
|
||||
}
|
||||
|
||||
/* next is the frame */
|
||||
@ -176,7 +176,7 @@ void Lima::serialize(drm_lima_gem_submit *submit, char *content)
|
||||
char * const dst = content + offset;
|
||||
Genode::memcpy(dst, reinterpret_cast<void const*>(submit->frame), submit->frame_size);
|
||||
offset += submit->frame_size;
|
||||
submit->frame = reinterpret_cast<__u64>(new_start);
|
||||
submit->frame = __u64(new_start);
|
||||
}
|
||||
|
||||
/* copy submit object last but into the front */
|
||||
@ -730,7 +730,7 @@ class Lima::Call
|
||||
(void)_apply_handle(arg.handle, [&] (Vram &b) {
|
||||
if (!b.mmap(_env))
|
||||
return;
|
||||
arg.offset = reinterpret_cast<::uint64_t>(b.mmap_addr());
|
||||
arg.offset = __u64(b.mmap_addr());
|
||||
|
||||
Gpu::Virtual_address const va = b.va;
|
||||
if (va.value == (Gpu::addr_t)-1)
|
||||
|
Loading…
x
Reference in New Issue
Block a user