bjorn3
56808dbfb1
graphics/fbbootlogd: Remove input events background thread
2025-03-15 16:53:58 +01:00
bjorn3
943cbe3707
graphics/fbbootlogd: Remove workaround that prevents blocking on the graphics driver
...
Instead logd will no longer block on fbbootlogd to prevent the deadlock
that this worked around.
2025-03-15 16:53:44 +01:00
bjorn3
5d76acfd74
Update to redox-scheme 0.4
2025-03-14 22:11:30 +01:00
bjorn3
7bb1693e86
graphics/graphics-ipc: Fix Damage::clip
2025-03-13 19:04:28 +01:00
bjorn3
f2d3d16455
graphics/bgad: Use redox-scheme
2025-03-13 17:00:54 +01:00
bjorn3
09ef96ae80
graphics/drivers-graphics: Fix some comments and remove no longer necessary feature
2025-03-13 17:00:54 +01:00
bjorn3
be5b865058
graphics: Rename resource to framebuffer
...
This matches the Linux DRM name.
2025-03-06 21:41:26 +01:00
bjorn3
92295f2ea4
graphics/graphics-ipc: Use u32 fields in Damage
...
The fields should never be negative and this saves a couple of casts.
2025-03-06 20:49:21 +01:00
bjorn3
ee3382aed0
graphics/virtio-gpud: Add helper to submit a fenced request
...
This is necessary for implementing hardware cursor support.
2025-03-06 20:49:20 +01:00
bjorn3
fc92f0b0ce
graphics: Rename the legacy graphics API to the v1 graphics API
...
It is quite likely that the next graphics API won't be the last one and
as such would become a legacy API too. Consistently using version
numbers makes it easier to refer to the exact version you mean.
2025-03-06 20:49:20 +01:00
bjorn3
972e19e900
graphics: Always pass damage to graphics drivers
...
This way the drivers don't have to special case switching between VTs.
2025-03-06 20:49:17 +01:00
bjorn3
88cfa76e2c
graphics: Merge set_scanout and flush_resource into update_plane
...
The old api was pretty virtio-gpu specific. The new api is closed to how
atomic mode setting on Linux works.
2025-03-06 20:48:41 +01:00
bjorn3
e9d8d7ceaf
Implicitly create a new VT for each consumer
...
Instead of requiring the graphics driver to create a fixed set of VTs in
advance. This fixes the graphical interface when there is a graphics
driver but no boot framebuffer. Previously in that case vesad would exit
before it creates any VT and thus no consumer could show anything as
their VT was missing. In the future creating new VTs on the fly could
also allow a display manager to use a separate VT for each user session.
2025-03-02 20:28:34 +01:00
Jeremy Soller
2e82009412
Merge branch 'centralize_error_handling' into 'master'
...
Make all pcid_interface methods abort the process on errors
See merge request redox-os/drivers!242
2025-03-02 18:45:17 +00:00
bjorn3
39dd9118c0
graphics/fbcond: Handle missing graphics driver at startup
2025-03-02 19:19:08 +01:00
bjorn3
de0239d3ed
inputd: Automatically switch to first vt once created
2025-03-02 16:33:39 +01:00
bjorn3
e7fe3183b0
Make all pcid_interface methods abort the process on errors
...
Effectively the only way to recover from errors in the communication
with pcid is by restarting the driver from scratch possibly after
restarting pcid. As such moving the aborts from individual drivers to
pcid_interface simplifies drivers while at the same time allowing nicer
error messages.
2025-03-02 12:36:35 +01:00
bjorn3
fe31bd0578
inputd: Remove deactivate event
...
It is no longer useful now that virtio-gpud permanently takes over
control of the display when it starts.
2025-03-01 20:00:29 +01:00
bjorn3
4f2268bbfe
graphics/vesad: Exit gracefully when there is no boot framebuffer
2025-03-01 19:54:33 +01:00
bjorn3
d26ee5a58d
graphics/fbbootlogd: Handle non-existent graphics adapter
...
This ensures a serial console shows up with all non-graphics related
daemons started when there is no framebuffer passed by the bootloader.
2025-03-01 19:23:56 +01:00
bjorn3
68af18aead
graphics/vesad: Make some fields and methods private
2025-03-01 18:23:31 +01:00
bjorn3
91f814a42c
graphics/vesad: Simplify sync loop
...
LLVM should optimize it to pretty much the same code, but using a
regular for loop makes it's behavior clearer.
2025-03-01 18:22:18 +01:00
bjorn3
0c42f431bd
graphics/vesad: Merge screen.rs into scheme.rs
2025-03-01 18:09:23 +01:00
bjorn3
31450e5770
graphics/fbbootlogd: Get rid of fevent and tracking handles
...
Fbbootlogd doesn't do non-blocking operations, so fevent isn't needed.
And the kernel shouldn't pass closed handles to us and even if it does
due to a bug, it is harmless to silently ignore the fact that the handle
was closed.
2025-02-22 16:33:22 +01:00
bjorn3
4b61e7bc86
graphics/fbbootlogd: Inline TextScreen into FbbootlogScheme
2025-02-22 16:33:22 +01:00
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
5bfce514be
graphics/console-draw: Collapse consecutive damage entries
2024-12-28 15:18:55 +01:00
bjorn3
5af43fcaa2
graphics/vesad: Merge OffscreenBuffer into GraphicScreen
2024-12-28 14:51:02 +01:00
bjorn3
b5eeaed9e1
graphics/virtio-gpud: Use resource size rather than display size in set_scanout
...
This ensures we use the right size if the display got resized but the
resource hasn't been resized yet.
2024-12-28 14:32:56 +01:00
bjorn3
0b8648ff5b
graphics/virtio-gpud: Move some initialization code around
2024-12-28 14:16:56 +01:00
bjorn3
1ef298e576
graphics/virtio-gpud: Remove getters and setters for ResourceCreate2d
2024-12-28 14:04:10 +01:00
bjorn3
1d89ca7bd2
graphics/virtio-gpud: Remove unnecessary VolatileCell
...
The virtio queue abstraction already provides the necessary
synchronization to make everything data-race free without volatile
accesses.
2024-12-28 14:01:09 +01:00
bjorn3
9afe3b390b
graphics/vesad: Remove all usage of unstable features
2024-12-27 15:57:43 +01:00
bjorn3
ed9ad1aaf1
graphics/vesad: Remove old resizing code
...
Graphics clients will need to handle resizing themself anyway for
handoff between graphics drivers and as such don't need the graphics
to modify the framebuffer during resize.
2024-12-27 15:57:18 +01:00
Jeremy Soller
ee62075339
Merge branch 'unused_dup_impls' into 'master'
...
Remove all dup impls that only accept empty paths
See merge request redox-os/drivers!220
2024-12-27 14:14:23 +00: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
d7becba023
graphics/virtio-gpud: Don't crash when multiple displays are attached
2024-12-27 15:11:15 +01:00
bjorn3
d2f1af9ca7
Add driver-graphics crate
...
This unifies the driver interface handling between graphics drivers and
makes it easier to change all graphics drivers in lockstep when adding
new features.
2024-12-27 12:47:43 +01:00
bjorn3
b7f4af9bd2
graphics/virtio-gpud: Bring scheme impl closer in line with vesad
2024-12-26 22:19:35 +01:00
bjorn3
6f188cf7ef
graphics/fbcond: Unmap old offscreen buffer on handoff and resize
2024-12-26 21:58:41 +01:00
bjorn3
bf6e16c8c9
graphics/console-draw: Slightly simplify TextScreen::write
2024-12-26 21:58:07 +01:00
bjorn3
3fbf0fecbb
graphics/console-draw: Fix resizing to a smaller display
...
Without this commit ransid would generate move events with an
underflowed height which take forever to process.
2024-12-26 21:57:41 +01:00
bjorn3
1b6feeb7c7
graphics/virtio-gpud: Use VM window size as display size
...
Rather than hard coding 1920x1080. This doesn't yet handle resizing the
VM window at runtime though.
2024-12-26 20:59:08 +01:00
bjorn3
3ed3ff2edb
graphics/fbcond: Handle framebuffer resize during handoff
2024-12-26 20:57:53 +01:00
bjorn3
62f1a80c3e
graphics/virtio-gpud: Move resources from Display to GpuScheme
...
Resources are global for the entire virtio-gpud device, not local to a
single display. In the future resource creation will become entirely
detached from specific displays.
2024-12-26 17:53:45 +01:00
bjorn3
2344206c21
graphics/virtio-gpud: Bundle resource id and resource mapping
2024-12-26 17:36:40 +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