3388 Commits

Author SHA1 Message Date
Norman Feske
c0dfa3983c nitpicker: deliver input seq in clicked report
Issue #5496
Issue #5485
2025-04-11 19:27:57 +02:00
Norman Feske
c17653dafa nitpicker: handle touch independent from motion
This patch decouples nitpicker's handling of touch events from the
handling of pointer devices.

The mouse pointer is no longer following touch position but stays
independent.

The existing "hover" report has now a counterpart "touch" that reports
the most recently touched session, including the initial touch point
and last observed sequence number.

Issue #5496
Issue #5485
2025-04-11 18:30:00 +02:00
Sebastian Sumpf
a0c3b77f0e record_play_mixer: wakeup depleted record clients
In case a play-session client sends data too slow leading to
record-session client depletion after 250ms of inactivity, try to wakeup
depleted clients upon reception of fresh audio data from the
play-session. The _scheduler.consecutive check for triggering a wakeup
doesn't seem to suffice in case of occasionally slow play clients.

(This fixes the osci preset on the PinePhone)

issue #5496
2025-04-10 16:41:18 +02:00
Josef Söntgen
76ad585e56 Remove Block::Driver interface
This commit removes the aged Block::Driver interface that has already
been superseded by the Block::Request_stream API for some time now.
It is solely used by components whose existence is made redundant,
like 'lx_block', or old drivers, like the SD-Card driver for PL180
and old i.MX53/6 systems or the RPi 1, that have not seen active use
other than in the nightly CI runs.

Fixes #5522.
2025-04-10 16:32:58 +02:00
Josef Söntgen
5fdfc4fcea Remove lx_block component
The 'lx_block' component uses the aged Block::Driver framework
internally and most if not all use-cases where it could be employed
can be addressed by using the 'vfs_block' component instead.

This commit also removes some run-scripts that make use of 'lx_block'
whose components are already excercised otherwise.

Issue #5522.
2025-04-10 16:32:58 +02:00
Alexander Boettcher
856c48e1a1 nitpicker: enhance fallback bounding box check
Solely consider sessions with valid bounding boxes for the decision
to use the fallback bounding box or not. New started capture clients may
require some time between capture session creation and actually capture
screen creation at which the bounding box becomes valid.

Issue #5521
2025-04-10 15:53:14 +02:00
Norman Feske
9e96947ae9 capture session: specify viewport as rect
By giving the client a way to specify the origin of the viewport in
addition to the size, we can solve transformed (rotated, flipped)
output to screen buffers where the line length is larger than the
number of visible pixels.

Issue #5518
2025-04-10 15:39:28 +02:00
Norman Feske
016d63703d depot: update recipe hashes 2025-04-10 14:55:59 +02:00
Norman Feske
a2058a8d21 capture session: add viewport as buffer attribute
This patch adds the viewport area to the interface.
It is not evaluated by the nitpicker GUI server yet.

Issue #5518
2025-04-10 14:55:59 +02:00
Alexander Boettcher
5d8a8257d6 boot_fb: use physical resolution of framebuffer
due to requirements introduced by #5428 to avoid errors alike:

Warning: surface 1376x768 mismatches texture 1366x768

Side effect of this is, that also pixels are captured which are not visible on
screen actually.

Issue #5428
Issue #5501
2025-04-10 14:55:59 +02:00
Norman Feske
1ef80e86e2 base: introduce Local_rm for local Region_map
The new 'Local_rm' type offers a narrow interface for the interaction
with the component-local address space, managing the lifetime of
attachments by using the 'Allocation' API.

Fixes #5516
2025-04-10 14:55:57 +02:00
Norman Feske
84eb264786 util/attempt.h: mark 'Attempt' types as nodiscard
This catches bugs early on. E.g., when leaving an 'Allocation'
unused, it gets immediately deallocated, which is most probably not
intended. For regular 'Attempt' objects, this change encourages
the proper propagation of errors, or at least the logging of unexpected
conditions.

Fixes #5513
2025-04-10 14:55:21 +02:00
Norman Feske
e380d0da95 base: use 'Allocation' interface for mem alloc
This patch converts the memory-allocator interfaces ('Allocator',
'Range_allocator') and their implementations ('Heap', 'Sliced heap',
'Slab', 'Allocator_avl', 'Synced_allocator') to the new 'Allocation'
utility. The new interface resides at base/memory.h whereas the
traditional allocators implement the new interface.

Down the road, the traditional allocators can successively be decoupled
from the traditional 'Allocator' and 'Range_allocator' interfaces.

Issue #5502
Issue #5245
2025-04-10 14:55:21 +02:00
Norman Feske
fee2f354dc util/attempt.h: introduce 'Ok' type
This type alleviates the need to re-introduce custom '*_ok' types
whenever a result can be an error but no value.
2025-04-10 14:55:20 +02:00
Norman Feske
9febe62a78 app/dummy: use 'Ram' API
Issue #5502
2025-04-10 14:55:20 +02:00
Norman Feske
689fc1eb93 Introduce new 'Ram' API types
The new types in base/ram.h model different allocation scenarios and
error cases by mere C++ types without using exceptions. They are meant
to replace the former 'Ram_allocator' interface. As of now, the
'Unmapped_allocator' closely captures the former 'Ram_allocator'
semantics. The 'Constrained_allocator' is currently an alias for
'Unmapped_allocator' but is designated for eventually allocating
mapped RAM.

In contrast to the 'Ram_allocator' interface, which talked about
dataspace capabilites but left the lifetime management of the
allocated RAM to the caller, the new API represents an allocation
as a guard type 'Allocation', which deallocates on destruction by
default.

Allocation errors are captured by a 'Result' type that follows
the 'Attempt' pattern.

As a transitionary feature, the patch largely maintains API
compatibility with the original 'Ram_allocator' by providing
the original (exception-based) 'Ram_allocator::alloc' and
'Ram_allocator::free' methods as a wrapper around the new
'Ram::Constrained_allocator'. So components can be gradually
updated to the new 'Ram::' interface.

Issue #5502
2025-04-10 14:55:15 +02:00
Sebastian Sumpf
e5cbf602e0 gpu/intel: RC6 support
* add RC6 support for GPU GEN9 (Skylake+) and GEN12 (Tiger Lake+), RC6 is
  entered by software after CHECK_INACTIVEus of inactivity. When a new
  Vgpu is scheduled we trigger a resume from RC6.

* increase VGPU-watchdog timeout to 300ms

issue #5504
2025-04-10 14:27:21 +02:00
Sebastian Sumpf
721e2c634a gpu/intel: Make mmio member of Reset
issue #5504
2025-04-10 14:27:21 +02:00
Norman Feske
7e420a68a6 Remove C++ exceptions from 'Thread' API
After constructed, a 'Thread' object may remain in a dysfunctional state
should the stack allocation have failed. This condition is no longer
reflected as a C++ exception but as result value of 'Thread::info()'.

Keep 'Thread::name' as public constant because the stack is not always
available for storing the name.

The 'stack_top' accessor has been removed because this information is
already provided by 'Thread::info()'.

Issue #5245
2025-04-10 14:27:21 +02:00
Norman Feske
d726d70795 capture session: allow arbitrarily sized buffers
This patch reverts the 8px padding of capture buffers as introduced
by commit "nitpicker: alloc padded capture buffer". The padding was
introduced to ease the use of SIMD instructions operating on the capture
buffer (blit2front) assuming that practical screen dimensions are a
multiple of 8px. Unfortunately this assumption is wrong. E.g., some
laptops use a resolution of 1366x768. So the back2front copying cannot
sidestep the handling of the finicky special cases.

Issue #5428
Issue #5501
2025-04-10 14:26:47 +02:00
Norman Feske
3909f9b6e4 blit: lift 8x8 restriction from back2front
This patch allows for the use of the back2front operation with textures
that are not a multiple of 8x8 pixels, which makes the utility
compatible with screen resolutions like 1366x768. In such cases, the
implementation falls back to the non-SIMD variant.

Issue #5428
Issue #5501
2025-04-10 14:26:47 +02:00
Norman Feske
ff83de2bbc base: decouple 'Pd_session' from 'Ram_allocator'
With this patch, the 'Pd_session' interface no longer implements the
'Ram_allocator' interface, which allows us to change the
'Genode::Ram_allocator' semantics (as a subsequent step) without
affecting core's PD service.

The patch also replaces the client-local implementation of
'Pd_session_client::dataspace_size' by the proper RPC call 'ram_size' to
core, which mitigates the potential risk of de-referencing a dataspace
cap of an untrusted origin. E.g., in scenarios where the monitor
component requests the size of a dataspace allocated by the debugging
target.

Since 'ram_size' is an RPC call, it cannot be const. Hence, the
'Ram_alloctor::dataspace_size' has become non-const.

The new 'Pd_ram_allocator' implements the 'Ram_allocator' interface by
using a PD session.

Issue #5502
2025-04-10 14:24:31 +02:00
Christian Helmuth
1f181f6ce3 genode_c_api: errors on socket/nic_client init
Prevent uncaught exceptiosn in (NIC-client) initialization but report
as errors from genode_socket_init() / genode_nic_client_create().
2025-04-10 14:24:11 +02:00
Alexander Boettcher
14cfc765c6 intel/gpu: allocate aperture on demand
in order to support running intel/gpu next to boot_fb, which has access
to part of the mmio aperture. The aperture is tried to be accessed not
before a Platform client (intel/display) or the first GPU client
appears.

Fixes #5497
2025-04-10 14:24:11 +02:00
Christian Helmuth
5619ccd940 Set USB bios_handoff="no" in run scripts
This is the default setting in Sculpt currently, so use it also
for testing.
2025-04-10 14:24:11 +02:00
Norman Feske
af3e8725ca Rename 'Constrained_ram_*' to 'Accounted_ram_*'
Fixes #5495
2025-04-10 14:24:11 +02:00
Johannes Schlatow
1df55bd2dc platform: use default domain only as fallback
The default IOMMU domain is used as a default if the kernel has IOMMU
support and if devices are not linked explicitly linked to a IOMMU
device. As soon as an IOMMU device is present, the kernel IOMMU is never
used. Hence, there is no point in maintaining the default domain if
there are other domains present.

genodelabs/genode#5494
2025-04-10 14:24:11 +02:00
Johannes Schlatow
e4704a1d39 platform: fix potential double insertion
When a session component has multiple IOMMU domains and `add_range()`
fails not on the first but on another domain, the range is not removed
from the first domain. This causes double insertion on the next try.

genodelabs/genode#5494
2025-04-10 14:24:11 +02:00
Norman Feske
7187499133 block_tester: modernize internal structure
Don't copy Xml_node, remove the use of exceptions, split test mechanics
from the scenario's data representation, avoid inheritance, use const
where possible.

Note that this patch also changes the batching of the <replay> scenario.
Unlike the other scenarios, it did not use to cap the maximum number of
jobs according to 'batch' attribute. The interpretation of the 'batch'
attribute has now been unified.

Issue #5411
Fixes #5489
2025-04-10 14:24:11 +02:00
Johannes Schlatow
9fdffcaa81 event_filter: add touch-gesture filter
Add configurable swipe and hold gestures.

genodelabs/genode#5491
2025-04-10 14:24:11 +02:00
Norman Feske
6edbfbf7c3 gems: don't copy Xml_node
Issue #5411
2025-04-10 14:24:11 +02:00
Norman Feske
636eb7b53f os: don't copy Xml_node
As this patch changes 'Vfs::File_system_factory::create', the
VFS plugins must be adapted, now taking 'Xml_node const &' as
argument.

Issue #5411
2025-04-10 14:18:41 +02:00
Norman Feske
25d4b8f944 vfs_block.run: add missing build of vfs libs 2025-04-10 14:15:34 +02:00
Norman Feske
97ea0d15ec sandbox: don't copy Xml_node
Issue #5411
2025-04-10 14:14:07 +02:00
Norman Feske
7aefaff646 os/buffered_xml.h: don't copy Xml_node
The public 'xml' const member replaces 'with_xml_node()' and the 'xml()'
accessor.

Issue #5411
2025-04-10 14:14:07 +02:00
Norman Feske
05d69a0bb3 os: increase mtime resolution to milliseconds
This patch changes the 'Timestamp' type of the VFS and file-system
session to an unsigned 64-bit value holding the number of milliseconds
since the UNIX epoch (beginning of 1970).

The special case of an invalid timestamp has been removed as it was
never consistently handled anyway.

In contrast to the POSIX timespec, which represents tv_sec and tv_nsec
both as signed values, this patch uses an unsigned value because the
interpretation of negative tv_sec and tv_nsec values is muddy.
Hypothetical modification times older that 1970 are capped at 1970.

Fixes #3511
2025-04-10 14:14:07 +02:00
Johannes Schlatow
9e2e592283 sculpt_manager: touch control of popup dialog
When trying to control the popup dialog with touch events, the dialog
was immediately closed (on any touch). This was a consequence of
evaluating the dialog's hover state without waiting for the
corresponding hover report. For regular motiong events, the hover report
is updated when the pointer moves. For touch events, however, the
hover report is only updated when the touch occurs. We therefore need to
wait for the hover report that corresponds to the touch event before
deciding about closing the popup dialog.

Since menu_view's hover report is not updated for clicks/touches outside any
dialog, we are now using nitpicker's hover report, which also got
augmented by the sequence number in order to be correlated with the
click/touch event.

Fixes #5485
2025-04-10 14:13:26 +02:00
Norman Feske
1336495858 nitpicker: re-eval pointer on panorama change
Whenever the panorama changes, eagerly re-evaluate the validity of the
current pointer position. Otherwise, the pointer may stay at an invisible
position until the next input motion happens. During this intermediate
phase, the position featured in the hover report cannot reliably be
matched against the panorama report (as needed by the sculpt manager
to let the leitzentrale GUI follow the pointer).

Issue #5370
2025-04-10 14:13:26 +02:00
Norman Feske
38650149b6 nitpicker: report both xpos,ypos for pointer
Don't omit either attribute whenever the value is 0. If the pointer is
defined, both attributes are reported. This way, the presence/absence
of the attribute expresses the validity of the pointer.

Issue #5370
2025-04-10 14:13:26 +02:00
Norman Feske
2e48641c13 nitpicker: don't use fallback if capture present
This patch prevents the use of stale information (bounding box of most
recently closed capture session) unless no capture session is present.
Otherwise, an intermediately but no longer present capture client
(a high-res display at boot positioned at panorama position (0, 0))
would permit the pointer to move at the originally occupied area even
though the current capture client do not capture this whole area.

Issue #5370
2025-04-10 14:13:26 +02:00
Benjamin Lamowski
8561f7724d fb_sdl: don't treat host warning as error
The sdl2-compat library from version 2.30.54 will issue the warning
"#warning SDL_config.h might be incomplete, good luck"
on unrecognized platforms, introduced with commit f4abaea[1].

Add -Wno-error=cpp for fb_sdl to prevent this warning to be treated as
an error.

Fixes #5476

[1] f4abaea268u
2025-04-10 14:13:26 +02:00
Sebastian Sumpf
92086cce68 genode_c_api/socket: add label to socket init
Add label argument to genode_socket_init that can be/is used to label
possible connecions.

issue #5471
2025-04-10 14:13:26 +02:00
Sebastian Sumpf
ed77207963 os: move vfs/lxip to vfs/ip from dde_linux
Because the sources are now used by lwip/lxip, make them accessible in a
public place.

issue #5471
2025-04-10 14:13:25 +02:00
Sebastian Sumpf
67c7313f5e genode_c_api/nic_client: add link_state support
Support for the link state signal was missing.

issue #5471
2025-04-10 14:12:38 +02:00
Sebastian Sumpf
488fcfd1a3 genode_c_api/socket: add wakeup_remote + sock_info
* add genode_socket_wakeup_remote and genode_socket_register_wakeup
  which are used to support Vfs::Remote_io on the IP stack side

* add genode_socket_info in order to retrieve the address configuration
  from the IP stack

issue #5471
2025-04-10 14:12:38 +02:00
Sebastian Sumpf
0e48ea08cf os: move genode_c_api/nic_client from lxip to os
The Nic-client C-API is based on the Uplink C-API.

issue #5471
2025-04-10 14:12:37 +02:00
Sebastian Sumpf
a57ebc55fa os: move genode_c_api/socket.h from lxip to os
Move lxip local socket C-API to os/include/genode_c_api

issue #5471
2025-04-10 14:12:37 +02:00
Josef Söntgen
8b5b5cda76 vfs/xoroshiro: add PRNG plugin using Xoroshiro128+
This plugin provides a PRNG based on the Xoroshiro128+ algorithm
that reseeds itself after a specific amount of state was consumed.

For more detailed information please take a look at its README in
'repos/os/src/lib/vfs/xoroshiro/README'.

Fixes #5407
2025-04-10 14:12:37 +02:00
Christian Helmuth
2d89b53b0c depot: update recipe hashes 2025-02-27 12:53:40 +01:00
Christian Helmuth
cd40a5be96 tool: have_cmd_arg -> have_cmd_switch (run, autopilot, dts)
Issue #5432
2025-02-27 12:53:40 +01:00