Commit Graph

1235 Commits

Author SHA1 Message Date
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
Jeremy Soller 911f966e15 Merge branch 'input_improvements' into 'master'
Couple of graphics and input subsystem refactorings

See merge request redox-os/drivers!216
2024-12-24 19:37:59 +00: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 aa35e573cf input: Introduce ProducerHandle type 2024-12-24 15:28:56 +01:00
bjorn3 e3eb5fbb5d input/ps2d: Use redox_event 2024-12-24 15:28:56 +01:00
bjorn3 0789069afc input: Move all input drivers to a subdirectory 2024-12-24 15:28:56 +01:00
Jeremy Soller 9cf225fdc1 Merge branch 'misc_changes' into 'master'
graphics: Couple of misc changes

See merge request redox-os/drivers!215
2024-12-24 14:17:43 +00: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 a88f2c4b53 graphics/vesad: Remove support for reading resize events
Nobody actually listens for them from vesad itself anyway. Instead they
listen for them from inputd.
2024-12-24 14:49:42 +01:00
Jeremy Soller a09d0fb761 Merge branch 'fix_vesad_damage_clip' into 'master'
vesad: Fix damage clipping

See merge request redox-os/drivers!214
2024-12-23 20:33:50 +00:00
bjorn3 db9ee0a495 vesad: Fix damage clipping
oops
2024-12-23 21:29:57 +01:00
Jeremy Soller 4c1658bbfe Merge branch 'graphics_handover' into 'master'
graphics: Implement handoff from vesad to virtio-gpud

See merge request redox-os/drivers!213
2024-12-23 19:10:21 +00:00
bjorn3 05a6058131 Rustfmt 2024-12-23 19:05:00 +01:00
bjorn3 0019eecadd virtio-gpud: Don't process flush requests for background VT's
This ensures that the foreground VT doesn't lockup if a background VT
spams us with flush requests. In the future we may want to add a
scheduler or collapse redundant flush requests.
2024-12-23 19:02:24 +01:00
bjorn3 025086acd1 virtio-gpud: Add offset method to XferToHost2d
This will hopefully avoid confusion if someone in the future changes the
XferToHost2d in flush to pass a smaller GpuRect. Without adjusting
offset this would cause glitches.
2024-12-23 19:02:24 +01:00
bjorn3 f6cc7d25df graphics: Unify damage clipping 2024-12-23 19:02:24 +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
Jeremy Soller 8df2350641 Merge branch 'virtio_gpud_multiple_vts' into 'master'
virtio-gpud: Handle multiple VT's

See merge request redox-os/drivers!212
2024-12-23 17:02:29 +00:00
bjorn3 b9189b91cf virtio-gpud: Couple minor improvements 2024-12-23 13:40:09 +01:00
bjorn3 b0f682c95d virtio-gpud: Handle multiple VT's
The code will become simpler once handoff is implemented such that
virtio-gpud no longer needs to support reset and reinitialization of the
virtio gpu device.
2024-12-23 13:40:09 +01:00
bjorn3 31deddd0d5 virtio-gpud: Claim a new VT
Before these changes virtio-gpud effectively didn't do anything and
vesad's framebuffer was kept instead.
2024-12-23 12:50:41 +01:00
Jeremy Soller f954cd4ab7 Merge branch 'fbcond_nonblocking' into 'master'
fbcond: Make sure we never block on the graphics driver

See merge request redox-os/drivers!211
2024-12-22 20:13:22 +00: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
Jeremy Soller 8b601fb155 Merge branch 'inputd_pull_vt_events' into 'master'
inputd: Major refactorings to the inputd interface

See merge request redox-os/drivers!210
2024-12-22 16:56:49 +00:00
Jeremy Soller 78256bad96 Merge branch 'migrate_gpu_drivers_to_redox_scheme' into 'master'
Migrate gpu drivers to redox-scheme

See merge request redox-os/drivers!209
2024-12-22 16:56:01 +00:00
bjorn3 8e92e2c743 inputd: Let graphics drivers pull vt activation events from inputd
Previously inputd would directly push vt activation events to the
graphics driver, which required being quite lazy to prevent deadlocks as
well as the graphics driver having a location where events can be pushed
to. By having graphics drivers pull the vt activation events instead,
the effective control flow becomes simpler and it becomes easier to
correctly handle multiple graphics drivers on the system. For example it
becomes possible for multiple graphics drivers to present displays for a
single VT as well as making it easier to provide a handoff from the
early framebuffer to a real graphics driver.
2024-12-22 17:18:24 +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 436a16b069 virtio-gpud: Migrate to redox-scheme 2024-12-22 16:44:27 +01:00
bjorn3 7565720f34 vesad: Migrate to redox-scheme 2024-12-22 16:43:17 +01:00
Jeremy Soller 64ede1f3d5 Merge branch 'inputd_redox_scheme' into 'master'
Various inputd improvements

See merge request redox-os/drivers!208
2024-12-22 02:26:13 +00:00
bjorn3 3c00151d49 inputd: Remove the vt handle mutex 2024-12-21 16:15:19 +01:00
bjorn3 cf84e71220 inputd: Use std's concurrency primitives instead of spin 2024-12-21 16:00:34 +01:00
bjorn3 08f619bc22 inputd: Remove usage of Arc for Vt
Storing the vt index instead of a direct reference to the vt is just as
easy.
2024-12-21 15:58:07 +01:00
bjorn3 6a1cb33105 inputd: Misc changes 2024-12-21 15:52:36 +01:00
bjorn3 f4193c6886 inputd: Avoid panic when client tried to perform invalid operation 2024-12-21 15:43:23 +01:00
bjorn3 0b2111b029 Port inputd to redox-scheme 2024-12-21 14:53:12 +01:00
Jeremy Soller 1d2f3b4836 Merge branch 'irq' into 'master'
Fix Raspberry 3

See merge request redox-os/drivers!207
2024-12-18 18:20:41 +00:00
Andrey Turkin 63b1d2cf8a bcm2835-sdhcid: remap mmio range as instructed by DTB 2024-12-18 21:16:33 +03:00
Andrey Turkin e5e753a426 Sync up with changes to kernel's phandle irq scheme 2024-12-18 21:16:30 +03:00
Andrey Turkin 2f9e28e23e Rerun cargo fmt to bring CI back to norm 2024-12-18 21:16:17 +03:00
Jeremy Soller 5cf8bfda72 xhcid: remove transfer states on dead rings 2024-11-11 14:27:32 -07:00
Jeremy Soller 842fc73a34 Track all drivers launched for a port 2024-11-11 12:51:22 -07:00
Jeremy Soller 191c7973a9 Fix deadlock in xhcid detach_device 2024-11-11 12:10:01 -07:00
Jeremy Soller 6044ca0471 Merge branch 'fix_deadlock_in_usb_driver' into 'master'
Fixed the deadlock by only addressing devices in response to attach requests....

See merge request redox-os/drivers!199
2024-11-05 17:35:57 +00:00