Commit Graph

10861 Commits

Author SHA1 Message Date
Norman Feske
a8667a55bd test/framebuffer/intel: use VFS, not of fs session
This patch updates the intel_fb_controller test component to use the VFS
API instead of interacting with an file-system session directly.

Issue #4390
2022-02-15 10:11:11 +01:00
Norman Feske
22cce07ec8 fs_log: remove blocking call of get_acked_packet
This patch replaces formerly blocking packet-stream operations by
the explicit use of 'wait_and_dispatch_io_signal' for blocking.
It also removes a misleading comment that promised a fire-and-forget
behavior whereas the implementation relied on blocking I/O anyway.

Issue #4390
2022-02-15 10:11:11 +01:00
Norman Feske
480c0a7dee base-fiasco: silence recv_and_wait error messages
Errors during IPC receive-and-wait can occur at the server side when
a client is killed. This condition is not an error from the server's
perspective. We used to print a message nevertheless, since the
condition is rather exceptional. However, when printed during the
test-sequence test, the messages interfere with the pattern matching of
the depot_autopilot, flagging the successful test as an error.
2022-02-15 10:11:11 +01:00
Norman Feske
df2e7fa842 vfs_block_file_system: remove Signal_receiver
The VFS block plugin used to depend on the blocking semantics of the
packet stream's 'get_acked_packet'. This patch replaces this dependency
by the use of 'wait_and_dispatch_one_io_signal'. However, in order to
implement this change, the custom instance of a 'Signal_receiver' had to
be removed as well.

To keep this patch as little invasive as possible, it does not touch the
direct use of the block session's packet stream, which should better be
replaced by the 'Block::Connection::Job' API.

Issue #4390
2022-02-15 10:11:11 +01:00
Johannes Schlatow
7aa9cf9b37 uplink_client_base: add handlers for zynq_nic_drv
The zynq_nic_drv follows a zero-copy approach and thus uses the packet
buffers as DMA memory. In order to know when the RX DMA memory can be used
for another packet, a custom ack_avail_handler is needed.
Similarly, packets received from the Uplink session are not copied to a
DMA buffer but to directly passed on as DMA memory. For this purpose,
a a custom packet_avail handler is needed.

genodelabs/genode#4384
2022-02-15 10:11:11 +01:00
Norman Feske
ac691eb229 file_system/util.h: remove packet-stream helpers
The 'read' and 'write' utilities are from a time before the VFS API
as os/vfs.h was available. They rely on the (now removed) blocking
semantics of the packet-stream interface.

The only remaining legitimate use case of the direct interaction with
the file-system session without VFS is the back end of gcov, which needs
a way to exfiltrate the statistical data using a channel that is
independent from the libc or the VFS.

Issue #4390
2022-02-15 10:11:10 +01:00
Norman Feske
0f56e76e7a rom_to_file: use VFS instead of fs session
This patch replaces the former direct use of a file-system session by
the use of the VFS API.

Issue #4390
2022-02-15 10:11:10 +01:00
Norman Feske
84f8305cdf usb_report_filter: use VFS instead of fs session
This patch replaces the direct use of a file-system session via the
'file_system/util.h' helpers by the VFS using the os/vfs.h API. This
makes the component more flexible while removing the dependence from
read and write utilities of file_system/util.h, which happen to rely on
the (now removed) blocking packet-stream semantics.

Issue #4390
2022-02-15 10:10:03 +01:00
Norman Feske
911ff31709 dde_rump: use Block::Connection::Job API
This patch replaces the direct interaction with the packet stream of
the block session by the use of the 'Block::Connection::Job' API,
removing the reliance on blocking packet-stream semantics.

Since I/O signals can now occur during 'Backend::submit', the patch
conditions the periodic calls of 'rump_sys_sync' by taking the backend
state into account.

Issue #4390
2022-02-15 10:10:03 +01:00
Norman Feske
7605101665 fatfs: use Block::Connection::Job API
This patch removes the use of blocking packet-stream calls from the
backend of the fatfs library.

Issue #4390
2022-02-15 10:10:03 +01:00
Norman Feske
2b0e64e061 os: remove blocking semantics from packet stream
Fixes #4390
2022-02-15 10:10:03 +01:00
Norman Feske
59ca8f2489 block_request_stream.run: use valid length value
Since the change "block_tester: limit batching in sequential test", the
sequence test blocks infinitely when encountering a length value smaller
than the block size.
2022-02-15 10:10:02 +01:00
Norman Feske
f7ee1f64a9 block_tester: warn on wrong length argument
When specifying a low value, the tester won't spawn any job but stay
silent. The message helps diagnosing such configuration problems.
2022-02-15 10:10:02 +01:00
Norman Feske
64af1d2d84 test/fs_packet: don't block
This patch takes precautions against the use of blocking packet-stream
operations like 'submit_packet'.

With the change of issue #4388, the ready-to-submit signals are no
longer implicitly handled. Hence, a call of submit_packet to a
saturated submit queue blocks infinitely.

Issue #4390
2022-02-15 10:10:02 +01:00
Norman Feske
7e3828b726 test/fs_packet: coding style 2022-02-15 10:10:02 +01:00
Norman Feske
11622fa038 file_system_session: merge ack and submit sigh
Fixes #4388
2022-02-15 10:10:02 +01:00
Christian Prochaska
2591c61e7d libusb: guard USB session packet allocator
Fixes #4389
2022-02-15 10:10:02 +01:00
Norman Feske
e98760a3d5 cpu_sampler.run: increase timeout
The previous timeout sometimes triggered with nova and foc on x86_32.
2022-02-15 10:10:02 +01:00
Norman Feske
ab0cba8ead base-hw: improve comments in kernel/interface.h 2022-02-15 10:10:02 +01:00
Norman Feske
90c446e565 base-hw: remove throw from ipc_reply_wait
Even though the use of the C++ exception mechanism (and the implicit use
of the cxx heap) is not a problem at the server side, this patch
nevertheless replaces the exception-based return-value handling to make
the code consistent with the ipc_call path.

Issue #3612
2022-02-15 10:10:02 +01:00
Norman Feske
3e4af3a567 base-hw: remove throw from ipc_call code path
This eliminates the dependency of the IPC-call operation from the cxx
heap.

Fixes #3612
2022-02-15 10:10:02 +01:00
Johannes Schlatow
0bb2e61e9e Allow derived classes of Genode::Array
genodelabs/genode#4382
2022-02-15 10:10:01 +01:00
Christian Helmuth
41a579e978 vbox6: fix warnings on disabled assertions 2022-02-15 10:10:01 +01:00
Sebastian Sumpf
299a35d943 libdrm/iris: check if VFS '<gpu/>' is present
On startup check if '/dev/gpu' is present and issue an error in case it
is not.

issue #4380
2022-02-15 10:10:01 +01:00
Sebastian Sumpf
cd4d00f31a gpu/intel: remove deadlock during session destruction
* use 'Id_space::apply_any' instead of 'for_each' to destroy session local
  buffer objects
* save session capability in session because 'cap()' is not valid in
  'Session_component' destructor because it was dissolved before calling
  'Root::_destruct_session', the cap is necessary to remove owned
  buffers from the EP

issue #4380
2022-02-15 10:10:01 +01:00
Stefan Kalkowski
7248957553 rpi_fb_drv: avoid alignment fault by own blit func
Fix #4331
2022-02-15 10:10:01 +01:00
Sebastian Sumpf
4cb8c91b08 libdrm/iris: import GPU buffers lazy optimization
Do not import a freshly allocated buffer to all contexts eagerly.
Instead check buffer list in context's 'exec_buffer' call and import
only buffers needed and not present before GPU execution. This leads to
improved performance for applications that use many OpenGL contexts
(e.g., VirtualBox 6).

issue #4380
2022-02-15 10:10:01 +01:00
Sebastian Sumpf
3c97fdbc0e libdrm/mesa/iris: Don't use Genode::Env any more
'vfs_gpu_env' handles this now for all applications.

issue #4380
2022-02-15 10:10:01 +01:00
Sebastian Sumpf
a3976f0468 vfs_gpu: offer 'vfs_gpu_env' call
* retrieve Genode::Env from plugin, this way no mesa applications need to
  be changed.
* add 'vfs_gpu' api
* remove when all required functionality is implemented within the plugin.

issue #4380
2022-02-15 10:10:01 +01:00
Sebastian Sumpf
b98e07ed34 vbox6: basic 3D support
Implement GLX and X functionality through Mesa's EGL interface. This
requires multiple OpenGL contexts and in turn GEM context support in
libdrm/iris, as implemented in libdrm and intel_gpu_drv.

Update recipes and machine.vbox6 files accordingly,

issue #4380
2022-02-15 10:10:01 +01:00
Christian Helmuth
27883c976c vbox6: 3D support skeleton
files required for VBox6's VMSVGA/VBoxSVGA with 3D accelaration
(accelerate3D="true").

issue #4380
2022-02-15 10:10:01 +01:00
Sebastian Sumpf
c35d2aff45 libdrm/iris: add gem context support
Retrieve multiple GPU sessions from VFS plugin, take advantage of buffer
import/export functionallity in order to implement gem context support.
Multiple contexts share all GPU buffers, but use different GPU sessions
and thus, differnt page tables and hardware contexts.

issue #4380
2022-02-15 10:10:01 +01:00
Sebastian Sumpf
7cc1741611 gpu/intel: buffer import/export support
Implement the import/export functionality of GPU buffers.

issue #4380
2022-02-15 10:10:01 +01:00
Sebastian Sumpf
a900594978 gpu_session: add import/export of buffers
Add 'export_buffer'/'import_buffer' calls in order to support buffer
sharing between GPU sessions.

Reduce CAP costs for Gpu::Connection from 256 to 32.

issue #4380
2022-02-15 10:10:01 +01:00
Sebastian Sumpf
567b9dfa39 libdrm/iris: use VFS/GPU plugin
Synchronize GPU completion by calling 'read' of the vfs_gpu plugin. This
enables pthreads to wait for GPU completions instead of the main EP.

issue #4380
2022-02-15 10:10:01 +01:00
Sebastian Sumpf
b3e12dcece vfs_gpu: VFS plugin that handles GPU completions
When a <gpu> node is present in the VFS, the plugin opens a
Gpu::Connection for each open call to the 'gpu' node and installs a
completion signal handler. A read only to the fd returned only comes
back if a completion signal has been received between two read
transctions to the fd.

For now the Gpu::Connections can be retrieved by calling the
'vfs_gpu_connection(unsigned long id)' function. The id can be obtained
using 'stat' on the 'gpu' device and is located in the inode (st_ino)
field of the stat buffer.

issue #4380
2022-01-19 15:01:26 +01:00
Sebastian Sumpf
b7d25636e5 mesa_gpu-iris: iris is linked into mesa already
* remove from library dependency

issue #4380
2022-01-19 15:01:24 +01:00
Sebastian Sumpf
ce409a2438 libdrm/iris: map PPGTT buffers lazy + lseek
* let iris handle buffer management, this implies that BOs are mapped to
  the PPGTT during buffer execution and unmapped by iris later, for this
  to work buffers need to be unmapped when allocating cached BOs
  (vma_free) which requires a patch

* support lseek (drm_lseek for now) for determining object size

issue #4380
2022-01-19 15:01:22 +01:00
Sebastian Sumpf
96ab58691a gpu/intel: PPGTT allocation optimization
Use range allocator as cache for page mappings instead of allocating
from platform driver for each page table.

issue #4380
2022-01-19 15:01:19 +01:00
Josef Söntgen
94405e9280 libdrm/iris: remove tiling short-cut
Instead of ignoring the request, we store the tiling information and
apply them when the buffer is mapped via 'MMAP_GTT'.

issue #4380
2022-01-19 15:01:11 +01:00
Josef Söntgen
e77a54614d libdrm/iris: introduce session resource accounting
Track RAM and CAP resource usage locally and upgrade the session quota
on demand.

issue #4380
2022-01-19 15:01:05 +01:00
Josef Söntgen
83cc36ef0b gpu/intel: account session resources
Account RAM and CAP resources for GPU sessions and trigger client
upgrades before allocating resources at the multiplexer. This prevents
the multiplexer from running out of resources.

issue #4380
2022-01-19 15:00:47 +01:00
Alexander Boettcher
3a39cb86e9 nova: read out more accurate tsc frequency
on newer CPUs.

Fixes #4336
2022-01-19 14:16:53 +01:00
Martin Stein
94121e7cd7 uplink_client_base: no deref of invalid connection
Imagine receiving the signal for an available TX ack or an available RX packet
at the Uplink connection but a later received signal for a link-state change
(to link state "down") at the same connection is handled first and destructs
the Uplink connection before the handling of the former signals. In this case,
the methods 'Uplink_client_base::_conn_tx_handle_ack_avail' and
'Uplink_client_base::_conn_rx_handle_packet_avail' must be guarded against an
unconstructed '_conn' member, but they weren't so far.

Fixes #4384
2022-01-19 14:13:48 +01:00
Martin Stein
83626b18f0 uplink_client_base: remove unused code
So far, the generic Uplink connection code considered NIC drivers to transmit
connection RX packets in three different manners. Most of the drivers follow
the "normal" way of transmission with only one driver callback from generic
code. The monolithic USB NIC-driver, however, used to send in a "burst" mode
that required a dedicated path with multiple driver callbacks in the generic
code. And then there were drivers that had a fully custom function for doing
transmissions.

Also for handling connection TX acks, there was a "normal" and a
"custom handler" way.

Today, all NIC drivers in the Genode repos and the Genode-World repo follow the
"normal" way. Therefor, the unused code can be removed.

Ref #4384
2022-01-19 14:13:38 +01:00
Christian Helmuth
65284b29f8 depot: update recipe hashes 2022-01-19 12:38:13 +01:00
Christian Helmuth
36b46f30f5 Add board-specific allwinner repo to .gitignore 2022-01-19 12:38:13 +01:00
Norman Feske
388a29b299 Road map for 2022 2022-01-19 12:38:13 +01:00
Sebastian Sumpf
f16c1b5ea8 usb_host: handle full packet stream correctly
Thanks to Peter for the fix!

Fixes #4383
2022-01-19 12:38:13 +01:00
Christian Helmuth
a80b2ee6e2 Increase cap quota of drivers_nic-imx6/7 for sel4 2022-01-19 12:38:13 +01:00