mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-16 14:18:27 +00:00
gpu_session: rename Gpu::Virtual_address:va
rename 'va' into 'value' to stay consistent with other types. issue #4713
This commit is contained in:
committed by
Christian Helmuth
parent
d10c7c31a4
commit
f1bc791c22
@ -62,7 +62,7 @@ enum { verbose_ioctl = false };
|
|||||||
namespace Utils
|
namespace Utils
|
||||||
{
|
{
|
||||||
Gpu::Virtual_address limit_to_48bit(Gpu::Virtual_address addr) {
|
Gpu::Virtual_address limit_to_48bit(Gpu::Virtual_address addr) {
|
||||||
return Gpu::Virtual_address { addr.va & ((1ULL << 48) - 1) }; }
|
return Gpu::Virtual_address { addr.value & ((1ULL << 48) - 1) }; }
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace Gpu
|
namespace Gpu
|
||||||
@ -582,12 +582,12 @@ struct Drm::Context
|
|||||||
if (b.busy)
|
if (b.busy)
|
||||||
Genode::warning("handle: ", obj[i].handle, " reused but is busy");
|
Genode::warning("handle: ", obj[i].handle, " reused but is busy");
|
||||||
|
|
||||||
if (b.gpu_vaddr_valid && b.gpu_vaddr.va != obj[i].offset) {
|
if (b.gpu_vaddr_valid && b.gpu_vaddr.value != obj[i].offset) {
|
||||||
_unmap_buffer_gpu(b);
|
_unmap_buffer_gpu(b);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!b.gpu_vaddr_valid)
|
if (!b.gpu_vaddr_valid)
|
||||||
_map_buffer_gpu(b, Gpu::Virtual_address { .va = obj[i].offset });
|
_map_buffer_gpu(b, Gpu::Virtual_address { .value = obj[i].offset });
|
||||||
|
|
||||||
if (!b.gpu_vaddr_valid) {
|
if (!b.gpu_vaddr_valid) {
|
||||||
Genode::error("handle: ", obj[i].handle,
|
Genode::error("handle: ", obj[i].handle,
|
||||||
|
@ -493,9 +493,9 @@ class Lima::Call
|
|||||||
arg.offset = reinterpret_cast<::uint64_t>(b.mmap_addr());
|
arg.offset = reinterpret_cast<::uint64_t>(b.mmap_addr());
|
||||||
|
|
||||||
Gpu::Virtual_address const va = b.va;
|
Gpu::Virtual_address const va = b.va;
|
||||||
if (va.va == (Gpu::addr_t)-1)
|
if (va.value == (Gpu::addr_t)-1)
|
||||||
return;
|
return;
|
||||||
arg.va = (uint32_t)va.va;
|
arg.va = (uint32_t)va.value;
|
||||||
|
|
||||||
result = 0;
|
result = 0;
|
||||||
});
|
});
|
||||||
@ -683,7 +683,7 @@ class Lima::Call
|
|||||||
{
|
{
|
||||||
return _apply_handle(gem_close.handle,
|
return _apply_handle(gem_close.handle,
|
||||||
[&] (Lima::Buffer &b) {
|
[&] (Lima::Buffer &b) {
|
||||||
_va_alloc.free((void *)b.va.va);
|
_va_alloc.free((void *)b.va.value);
|
||||||
destroy(_heap, &b);
|
destroy(_heap, &b);
|
||||||
}) ? 0 : -1;
|
}) ? 0 : -1;
|
||||||
}
|
}
|
||||||
|
@ -67,7 +67,7 @@ struct Gpu::Sequence_number
|
|||||||
|
|
||||||
struct Gpu::Virtual_address
|
struct Gpu::Virtual_address
|
||||||
{
|
{
|
||||||
Genode::uint64_t va;
|
Genode::uint64_t value;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -2023,19 +2023,19 @@ class Gpu::Session_component : public Genode::Session_object<Gpu::Session>
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
_vgpu.rcs_map_ppgtt(va.va, phys_addr + offset, size);
|
_vgpu.rcs_map_ppgtt(va.value, phys_addr + offset, size);
|
||||||
} catch (Level_4_translation_table::Double_insertion) {
|
} catch (Level_4_translation_table::Double_insertion) {
|
||||||
error("PPGTT: Double insertion: va: ", Hex(va.va), " offset: ", Hex(offset),
|
error("PPGTT: Double insertion: va: ", Hex(va.value), " offset: ", Hex(offset),
|
||||||
"size: ", Hex(size));
|
"size: ", Hex(size));
|
||||||
throw Mapping_vram_failed();
|
throw Mapping_vram_failed();
|
||||||
} catch(...) {
|
} catch(...) {
|
||||||
error("PPGTT: invalid address/range/alignment: va: ", Hex(va.va),
|
error("PPGTT: invalid address/range/alignment: va: ", Hex(va.value),
|
||||||
" offset: ", Hex(offset),
|
" offset: ", Hex(offset),
|
||||||
"size: ", Hex(size));
|
"size: ", Hex(size));
|
||||||
throw Mapping_vram_failed();
|
throw Mapping_vram_failed();
|
||||||
}
|
}
|
||||||
|
|
||||||
new (_heap) Vram_local::Mapping(vram_local.mappings, offset, va.va, size);
|
new (_heap) Vram_local::Mapping(vram_local.mappings, offset, va.value, size);
|
||||||
};
|
};
|
||||||
|
|
||||||
if (_resource_guard.avail_caps() == false)
|
if (_resource_guard.avail_caps() == false)
|
||||||
@ -2065,11 +2065,11 @@ class Gpu::Session_component : public Genode::Session_object<Gpu::Session>
|
|||||||
vram_local.mappings.with_element(offset,
|
vram_local.mappings.with_element(offset,
|
||||||
[&] (Vram_local::Mapping &mapping) {
|
[&] (Vram_local::Mapping &mapping) {
|
||||||
|
|
||||||
if (mapping.ppgtt_va != va.va) {
|
if (mapping.ppgtt_va != va.value) {
|
||||||
Genode::error("VRAM: not mapped at ", Hex(va.va), " offset: ", Hex(offset));
|
Genode::error("VRAM: not mapped at ", Hex(va.value), " offset: ", Hex(offset));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
_vgpu.rcs_unmap_ppgtt(va.va, mapping.ppgtt_va_size);
|
_vgpu.rcs_unmap_ppgtt(va.value, mapping.ppgtt_va_size);
|
||||||
destroy(_heap, &mapping);
|
destroy(_heap, &mapping);
|
||||||
},
|
},
|
||||||
[&] () { error("VRAM: nothing mapped at offset ", Hex(offset)); }
|
[&] () { error("VRAM: nothing mapped at offset ", Hex(offset)); }
|
||||||
|
Reference in New Issue
Block a user