diff --git a/repos/libports/src/lib/libdrm/ioctl_iris.cc b/repos/libports/src/lib/libdrm/ioctl_iris.cc index e55ef0642a..1b527127a9 100644 --- a/repos/libports/src/lib/libdrm/ioctl_iris.cc +++ b/repos/libports/src/lib/libdrm/ioctl_iris.cc @@ -176,8 +176,8 @@ struct Gpu::Buffer Genode::Dataspace_capability map_cap { }; Offset map_offset { 0 }; - Gpu_virtual_address gpu_vaddr { }; - Gpu::Info::Execution_buffer_sequence seqno { }; + Gpu_virtual_address gpu_vaddr { }; + Gpu::Sequence_number seqno { }; bool gpu_vaddr_valid { false }; bool busy { false }; @@ -1149,7 +1149,7 @@ class Drm_call _buffer_space.for_each([&] (Buffer &h) { if (!h.busy) return; - if (h.seqno.id > gpu_info.last_completed.id) return; + if (h.seqno.value > gpu_info.last_completed.value) return; h.busy = false; /* diff --git a/repos/os/include/gpu_session/client.h b/repos/os/include/gpu_session/client.h index cb067ab5ac..06a3d9a408 100644 --- a/repos/os/include/gpu_session/client.h +++ b/repos/os/include/gpu_session/client.h @@ -5,7 +5,7 @@ */ /* - * Copyright (C) 2017 Genode Labs GmbH + * Copyright (C) 2017-2021 Genode Labs GmbH * * This file is part of the Genode OS framework, which is distributed * under the terms of the GNU Affero General Public License version 3. @@ -40,8 +40,8 @@ class Gpu::Session_client : public Genode::Rpc_client Info info() const override { return call(); } - Gpu::Info::Execution_buffer_sequence exec_buffer(Buffer_id id, - Genode::size_t size) override { + Gpu::Sequence_number exec_buffer(Buffer_id id, + Genode::size_t size) override { return call(id, size); } void completion_sigh(Genode::Signal_context_capability sigh) override { diff --git a/repos/os/include/gpu_session/gpu_session.h b/repos/os/include/gpu_session/gpu_session.h index c6d129d1a3..5fc134900e 100644 --- a/repos/os/include/gpu_session/gpu_session.h +++ b/repos/os/include/gpu_session/gpu_session.h @@ -5,7 +5,7 @@ */ /* - * Copyright (C) 2017 Genode Labs GmbH + * Copyright (C) 2017-2021 Genode Labs GmbH * * This file is part of the Genode OS framework, which is distributed * under the terms of the GNU Affero General Public License version 3. @@ -24,10 +24,19 @@ namespace Gpu { struct Buffer; using Buffer_id = Genode::Id_space::Id; + struct Sequence_number; struct Info; struct Session; } +/* + * Execution buffer sequence number + */ +struct Gpu::Sequence_number +{ + Genode::uint64_t value; +}; + /* * Gpu information @@ -46,9 +55,7 @@ struct Gpu::Info size_t aperture_size; Context_id ctx_id; - struct Execution_buffer_sequence { - Genode::uint64_t id; - } last_completed; + Sequence_number last_completed; struct Revision { Genode::uint8_t value; } revision; struct Slice_mask { unsigned value; } slice_mask; @@ -57,7 +64,7 @@ struct Gpu::Info struct Subslices { unsigned value; } subslices; Info(Chip_id chip_id, Features features, size_t aperture_size, - Context_id ctx_id, Execution_buffer_sequence last, + Context_id ctx_id, Sequence_number last, Revision rev, Slice_mask s_mask, Subslice_mask ss_mask, Eu_total eu, Subslices subslice) : @@ -109,7 +116,7 @@ struct Gpu::Session : public Genode::Session * * \throw Invalid_state is thrown if the provided buffer is not valid, e.g not mapped */ - virtual Gpu::Info::Execution_buffer_sequence exec_buffer(Buffer_id id, Genode::size_t size) = 0; + virtual Gpu::Sequence_number exec_buffer(Buffer_id id, Genode::size_t size) = 0; /** * Register completion signal handler @@ -188,7 +195,7 @@ struct Gpu::Session : public Genode::Session *******************/ GENODE_RPC(Rpc_info, Info, info); - GENODE_RPC_THROW(Rpc_exec_buffer, Gpu::Info::Execution_buffer_sequence, exec_buffer, + GENODE_RPC_THROW(Rpc_exec_buffer, Gpu::Sequence_number, exec_buffer, GENODE_TYPE_LIST(Invalid_state), Gpu::Buffer_id, Genode::size_t); GENODE_RPC(Rpc_completion_sigh, void, completion_sigh, diff --git a/repos/os/src/drivers/gpu/intel/main.cc b/repos/os/src/drivers/gpu/intel/main.cc index 64c048aab4..6b80b40b54 100644 --- a/repos/os/src/drivers/gpu/intel/main.cc +++ b/repos/os/src/drivers/gpu/intel/main.cc @@ -1565,7 +1565,7 @@ class Gpu::Session_component : public Genode::Session_object { Genode::size_t const aperture_size = Igd::Device::Vgpu::APERTURE_SIZE; return Info(_device.id(), _device.features(), aperture_size, - _vgpu.id(), { .id = _vgpu.completed_seqno() }, + _vgpu.id(), { .value = _vgpu.completed_seqno() }, _device._revision, _device._slice_mask, _device._subslice_mask, @@ -1573,8 +1573,8 @@ class Gpu::Session_component : public Genode::Session_object _device._subslices); } - Gpu::Info::Execution_buffer_sequence exec_buffer(Buffer_id id, - Genode::size_t) override + Gpu::Sequence_number exec_buffer(Buffer_id id, + Genode::size_t) override { bool found = false; @@ -1593,7 +1593,7 @@ class Gpu::Session_component : public Genode::Session_object throw Gpu::Session::Invalid_state(); _device.vgpu_activate(_vgpu); - return { .id = _vgpu.current_seqno() }; + return { .value = _vgpu.current_seqno() }; } void completion_sigh(Genode::Signal_context_capability sigh) override