Commit Graph

46 Commits

Author SHA1 Message Date
bjorn3 2a71d48a76 inputd: Don't crash when receiving input while there is no active vt 2025-03-01 19:24:30 +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 5fc04c332d graphics: Move Damage from inputd to graphics-ipc 2024-12-28 16:26:18 +01:00
bjorn3 8eabb75524 Update redox-scheme to 0.3.0 2024-12-26 15:50:30 +01:00
bjorn3 aa35e573cf input: Introduce ProducerHandle type 2024-12-24 15:28:56 +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 f6cc7d25df graphics: Unify damage clipping 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 5f7ee8f646 Use inputd's Damage everywhere instead of separate SyncRect types 2024-12-22 19:48:27 +01: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 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
Timothy Finnegan 4dedbac4e5 Fixed the deadlock by only addressing devices in response to attach requests.... 2024-11-05 17:35:57 +00:00
bjorn3 7935ed0248 Deduplicate setup_logging between all drivers
This will make it easier to change the way logging is done for all
drivers. This also fixes the log category for a couple of drivers as
well as makes failing to set the logger a fatal error. Only when a
logger is already set is it impossible to set another logger.
2024-07-24 22:00:40 +02:00
bjorn3 ebb2243538 Remove all traces of VtMode
It isn't used anywhere anymore.
2024-07-19 21:18:09 +02:00
bjorn3 5f1fdec858 Remove inputd -G
Ever since fbcond got moved out of vesad it has been doing the exact
same as inputd -A.
2024-07-19 21:11:02 +02:00
4lDO2 d9e5c6644d Update deps and fix inputd.
Scheme names are not allowed to contain slashes, so it should look for a
`.` in e.g. `display.vesa:/path/to/...`.
2024-07-16 14:17:19 +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
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 b3b1fb1726 Remove VtMode::Text
It isn't used anywhere.
2024-01-13 19:36:08 +01:00
4lDO2 2e1e007836 Fix inputd path parsing. 2023-12-12 12:03:03 +01:00
4lDO2 a6fee75f15 Phase out / in scheme names. 2023-11-09 14:39:57 +01:00
Jeremy Soller 61e9512468 Update redox_syscall to 0.4 2023-09-07 20:49:37 -06:00
Jeremy Soller f9415ac75e Merge branch 'core' into 'master'
inputd: fix panic when no devices are available

See merge request redox-os/drivers!113
2023-08-31 13:26:04 +00:00
Anhad Singh 74241e0273 inputd: fix panic when no devices are available
Signed-off-by: Anhad Singh <andypython@protonmail.com>
2023-08-31 16:14:14 +10:00
Jeremy Soller 9d7e19cc0d Merge branch 'core' into 'master'
virtio-core: add support for legacy transport

See merge request redox-os/drivers!112
2023-08-23 12:26:44 +00:00
Anhad Singh 6a5e9d2613 virtio-core: add support for legacy transport
Signed-off-by: Anhad Singh <andypython@protonmail.com>
2023-08-23 15:03:46 +10:00
Ian Douglas Scott d56767216f inputd: Don't panic on open with invalid path 2023-08-03 19:05:33 -07:00
Anhad Singh 71a6eb1bb2 inputd: add -A command to activate a VT
Signed-off-by: Anhad Singh <andypython@protonmail.com>
2023-07-25 19:20:04 +10:00
Anhad Singh ed995306bd inputd: minor clippy fixes
Signed-off-by: Anhad Singh <andypython@protonmail.com>
2023-07-25 16:36:46 +10:00
Anhad Singh 820b8370ae virtio-gpu: remove the +1 workaround
Signed-off-by: Anhad Singh <andypython@protonmail.com>
2023-07-25 16:34:25 +10:00
Anhad Singh 440d6381f9 inputd: rework display events
Signed-off-by: Anhad Singh <andypython@protonmail.com>
2023-07-22 18:34:20 +10:00
Anhad Singh a153c8bc1c inputd: correctly pass on resize events
Signed-off-by: Anhad Singh <andypython@protonmail.com>
2023-07-20 19:20:56 +10:00
Anhad Singh e457f03935 virtio-gpu: handling GPU resets
Signed-off-by: Anhad Singh <andypython@protonmail.com>
2023-07-20 17:34:59 +10:00
Anhad Singh 95a84c8cbf inputd: fix failure to switch VT after inital switch
Signed-off-by: Anhad Singh <andypython@protonmail.com>
2023-07-15 16:29:48 +10:00
Anhad Singh c5729befe5 inputd: do not reswitch if the same
Signed-off-by: Anhad Singh <andypython@protonmail.com>
2023-07-07 17:03:14 +10:00
Anhad Singh 5c4e7b36fa make getty work
Signed-off-by: Anhad Singh <andypython@protonmail.com>
2023-07-07 16:51:46 +10:00
Anhad Singh 07039e8321 drivers: run fmt.sh
Signed-off-by: Anhad Singh <andypython@protonmail.com>
2023-07-05 11:14:06 +10:00
Anhad Singh 2f2720263f drivers: add inputd
Take out the input coalescing from `vesad` into `inputd`.

Signed-off-by: Anhad Singh <andypython@protonmail.com>
2023-07-05 11:12:53 +10:00