Commit Graph

32 Commits

Author SHA1 Message Date
bjorn3 e973f89139 Remove unnecessary feature gates
Some of these have been stabilized while others were likely no longer
used at all.
2025-02-22 14:38:33 +01:00
bjorn3 5fc04c332d graphics: Move Damage from inputd to graphics-ipc 2024-12-28 16:26:18 +01:00
bjorn3 7b11acbc46 graphics: Introduce graphics-ipc crate
While for now this for now only includes helpers for the current limited
display interface which is relatively simple to implement manually, in
the future we will likely need a more complex interface with gpu drivers
that would be hard to get right without a common crate proving the
interface.
2024-12-28 16:21:58 +01:00
bjorn3 b1743d800c Remove all dup impls that only accept empty paths
Those dups are handled by the kernel already by creating a new reference
to the underlying file descriptor.
2024-12-27 15:13:42 +01:00
bjorn3 6f188cf7ef graphics/fbcond: Unmap old offscreen buffer on handoff and resize 2024-12-26 21:58:41 +01:00
bjorn3 3ed3ff2edb graphics/fbcond: Handle framebuffer resize during handoff 2024-12-26 20:57:53 +01:00
bjorn3 8eabb75524 Update redox-scheme to 0.3.0 2024-12-26 15:50:30 +01:00
bjorn3 12fc959737 graphics/fbcond: Move blocking operations back to the main thread
With fbbootlogd split out it is no longer essential to avoid blocking
operations on the main thread of fbcond. Moving them back to the main
thread simplifies things a fair bit.
2024-12-24 21:39:41 +01:00
bjorn3 4e2f1a730c graphics: Introduce a separate daemon for the boot log
The daemon responsible for the boot log must never ever block to avoid
deadlocks, but doing so while still accepting keyboard input is
non-trivial. This commit splits the boot log out from fbcond into a
separate daemon to make this a lot easier to implement. This will also
allow making fbcond blocking again, which will simplify some things.
2024-12-24 21:39:41 +01:00
bjorn3 5a1648fdca graphics/fbcond: Migrate to redox-scheme 2024-12-24 16:56:11 +01:00
bjorn3 f4897c59b4 graphics/fbcond: Inline some helpers 2024-12-24 16:34:25 +01:00
bjorn3 84eed1ad0e graphics: Introduce new ConsumerHandle type
This type has a method to open the current display.
2024-12-24 14:49:42 +01:00
bjorn3 a82fa31437 graphics/fbcond: Get display path in the background thread 2024-12-24 14:49:42 +01:00
bjorn3 05a6058131 Rustfmt 2024-12-23 19:05:00 +01:00
bjorn3 f2156d4654 graphics: Optimize the damage buffer api
It is now possible to write multiple damage locations in a single write
call. Vesad also no longer processes damage for background vt's. The
entire framebuffer will be redrawn once the vt switches to the
foreground anyway. And finally fsync now consistently redraws the entire
screen rather than having different behavior between vesad and
virtio-gpud.
2024-12-23 19:02:24 +01:00
bjorn3 4c4ab2de44 graphics: Implement handoff from vesad to virtio-gpud
With this virtio-gpud no longer has to support getting deactivated at
any time to hand back control to vesad. This makes it much easier to add
many new features that a proper graphics driver is supposed to support.

Be aware that virtio-gpud waits for the vsync on every flush request.
Fbcond and orbital are not really happy about this right now and when
something changes multiple times within a single frame, flush requests
queue up, causing the ui to hang until all flush requests are finished.
It is still possible to switch to another VT though which won't hang.
2024-12-23 18:59:18 +01:00
bjorn3 c97652a508 fbcond: Make sure we never block on the graphics driver
To prevent deadlocks if the graphics driver in turn tries to write to
fbcond for log messages.
2024-12-22 19:56:04 +01:00
bjorn3 5f7ee8f646 Use inputd's Damage everywhere instead of separate SyncRect types 2024-12-22 19:48:27 +01:00
bjorn3 15cee6bb48 fbcond: Resize ransid console on every write
This is necessary to correctly handle async changes to the framebuffer
size in the future.
2024-12-22 18:37:13 +01:00
bjorn3 99a00abeca fbcond: Split a couple of helper functions out of open_vt 2024-12-22 18:08:32 +01:00
bjorn3 273cbda872 inputd: Split ControlHandle and DisplayHandle
ControlHandle is used to switch the active vt, while DisplayHandle is
used by display drivers to register new vt's. There are entirely
unrelated tasks and the fact that they had been merged together has been
confusing me for a while.

Also changed activating a VT to no longer create a new vt when none
existed previously. The target graphics driver may not be able to handle
the new VT. inputd -A already didn't allow activating non-existent VT's
as it first tried to open a consumer handle for the target VT.
2024-12-22 16:46:02 +01:00
bjorn3 857773393d Ensure fields of SyncRect are not reordered
Without repr(C), repr(packed) technically allows reordering fields.
2024-07-19 21:56:56 +02:00
bjorn3 b33ea2b53a Fix a FIXME in display_fd_unmap
The len method on raw pointers has been stabilized.
2024-07-19 21:50:15 +02:00
bjorn3 747898dfb2 Run rustfmt on the entire graphics subsystem 2024-07-19 21:24:48 +02:00
bjorn3 ebb2243538 Remove all traces of VtMode
It isn't used anywhere anymore.
2024-07-19 21:18:09 +02:00
bjorn3 2fc3923d46 Fix fbcon 2024-07-12 12:05:31 +02:00
bjorn3 fd8dabd1bc Use the new scheme format in most places
The graphics subsystem still uses the old format as orbital manually
parses the fpath result.
2024-07-11 21:14:45 +02:00
4lDO2 4c35e88997 Use latest event queue interface everywhere. 2024-03-31 14:30:04 +02:00
Jacob Lorentzon ff956fd3bb Switch to libredox where applicable (fixed) 2024-03-18 22:09:25 +00:00
Jeremy Soller 98078650f8 Revert "Switch to libredox where applicable."
This reverts commit 2e7dbf1cc1.
2024-03-18 15:00:52 -06:00
4lDO2 2e7dbf1cc1 Switch to libredox where applicable. 2024-03-18 19:23:05 +01:00
bjorn3 887412daf5 Move all graphics related drivers to graphics/ 2024-02-29 15:41:05 +01:00