Commit Graph

156 Commits

Author SHA1 Message Date
Antoine Reversat a43de9ea5d Run cargo fmt 2026-05-06 17:04:19 -04:00
Migue Magic e577bfc2ea Optimize console-draw write function 2026-05-03 09:06:37 -06:00
bjorn3 009ffe1dbc Fix compilation 2026-04-27 22:09:53 +02:00
Migue Magic 180bfe15a7 Fix typos across 3 drivers 2026-04-27 12:27:11 -06:00
bjorn3 daf726c30d scheme-utils: Have FpathWriter handle writing the scheme name 2026-04-19 19:07:41 +02:00
bjorn3 64d23e9e05 scheme-utils: Introduce FpathWriter helper 2026-04-19 19:07:41 +02:00
bjorn3 28900f7c49 scheme-utils: Introduce Blocking as counterpart to ReadinessBased for blocking schemes 2026-04-19 11:05:04 +02:00
bjorn3 6686c73d26 Implement on_close method of SchemeSync instead of using a separate method 2026-04-19 10:42:19 +02:00
bjorn3 01183044a3 Workaround deadlock in initnsmgr 2026-04-18 12:58:41 +02:00
bjorn3 6311833765 drivers/graphics/bgad: Remove bgad
The only thing it does it changing the size of the region that the
graphics adapter sees as framebuffer. It doesn't actually tell vesad to
resize the framebuffer nor does it implement an actual full graphics
driver. For basic usage the bootloader setup framebuffer is sufficient
and for anything more advanced, virtio-gpu is a much better option that
we already have a full graphics driver for.
2026-04-14 21:18:43 +02:00
bjorn3 317a0178b6 Introduce scheme-utils crate and HandleMap type
HandleMap deduplicates the id assignment for handles and unlike most
existing implementations handles overflow just fine.
2026-04-13 22:19:07 +02:00
Jeremy Soller 6deaaa71a7 Merge branch 'check-shadow-buf' into 'main'
drivers/graphics: Add API to check if shadow buffer present

See merge request redox-os/base!222
2026-04-12 06:49:51 -06:00
Wildan M c2f46bf383 drivers/graphics: Add API to check if shadow buffer present 2026-04-12 12:39:09 +07:00
bjorn3 071ce1e98f drivers/graphics/ihdgd: Fix a couple of warnings 2026-04-05 13:06:06 +02:00
bjorn3 21d1db3538 drivers/graphics/driver-graphics: Extract activate_vt method 2026-04-05 12:56:30 +02:00
bjorn3 bf5286d25d drivers/graphics: Replace CpuBackedBuffer::sync_range with CpuBackedBuffer::sync_rect
This can be a bit more efficient by doing bounds checks before the main
loop.
2026-03-28 16:53:59 +01:00
Jeremy Soller 58459178b0 Merge branch 'gpu_drm36' into 'main'
drivers/graphics/ihdgd: Implement support for mapping memory to the GPU

See merge request redox-os/base!208
2026-03-27 20:40:22 -06:00
bjorn3 6473d987c3 drivers/graphics/ihdgd: List correct pipes for Alchemist 2026-03-28 00:02:38 +01:00
bjorn3 f152bbad23 drivers/graphics/ihdgd: Implement support for mapping memory to the GPU
This is done by adding entries to the global GTT page table. At startup
it only contains entries for a small chunk of memory reserved for the
GPU. This small chunk is rarely enough to contain all framebuffers we
need to allocate.
2026-03-27 22:45:26 +01:00
bjorn3 70bba179c4 drivers/graphics/ihdgd: Introduce GpuBuffer
Unlike DeviceFb a GpuBuffer only has a size, not a width, height and
stride. In the future GpuBuffer can be used for dumb buffers as well as
any other kind of memory we may need to allocate on the gpu.
2026-03-23 22:23:32 +01:00
Jeremy Soller 107f8696fd Merge branch 'gpu_drm35' into 'main'
Couple of GPU buffer improvements

See merge request redox-os/base!198
2026-03-23 07:23:21 -06:00
bjorn3 d274ac2817 drivers/graphics: Return proper pitch to the drm client for dumb buffers 2026-03-22 19:53:38 +01:00
bjorn3 8ae815aca7 drivers/graphics: Replace width and height methods on Buffer with size
A buffer is not necessarily a framebuffer. It may also be a blob of
bytes.
2026-03-22 19:46:32 +01:00
auronandace e3c6ca1573 upgrade to latest spin crate and add to workspace 2026-03-22 15:43:32 +00:00
auronandace 557a3d1954 consolidate several dependencies into the workspace 2026-03-22 15:11:33 +00:00
bjorn3 fcee1d7d86 drivers/graphics/ihdgd: Measure fb stride in bytes rather than pixels
This is how stride is generally stored.
2026-03-22 12:54:34 +01:00
bjorn3 7177fe0a86 drivers/graphics: Implement shadow buffer for dumb buffers
This is necessary to get even remotely acceptable performance when dumb
buffers are backed by write-combining memory.
2026-03-21 19:01:54 +01:00
bjorn3 e6efc5f99b drivers/graphics/fbcond: Fix log message 2026-03-21 18:02:38 +01:00
bjorn3 05ca76bf59 drivers/inputd: Remove some leftover code from the old way display resizing was handled 2026-03-21 13:49:46 +01:00
bjorn3 afa6b64104 drivers/graphics/ihdgd: Introduce DeviceFb::alloc 2026-03-21 13:31:05 +01:00
bjorn3 56552cc6b3 drivers/graphics/ihdgd: Introduce helpers to fetch current plane state 2026-03-21 13:31:05 +01:00
bjorn3 36a9669c57 drivers/graphics/ihdgd: Pass DeviceFb to Plane::set_framebuffer 2026-03-21 13:31:04 +01:00
bjorn3 b1e4bcf54b drivers/graphics/ihdgd: Extract most of the plane configuration into separate functions 2026-03-21 13:21:29 +01:00
bjorn3 f5ce77203e drivers/graphics/ihdgd: Initialize planes inside GraphicsAdapter::init 2026-03-20 23:22:17 +01:00
bjorn3 6def27936a drivers/graphics: Pass KmsCrtcState to set_crtc 2026-03-20 23:19:50 +01:00
bjorn3 925951ce85 drivers/graphics: Make KmsCrtcState::fb_id an Option 2026-03-20 23:19:50 +01:00
bjorn3 d08300c8b5 drivers/graphics: Make objects generic over GraphicsAdapter rather than specific driver data 2026-03-20 23:19:50 +01:00
bjorn3 5e7fc9d71a drivers/graphics: Remove refcounting for all KmsObject's
Doing the refcounting outside the enum doesn't allow refcounting a
downcasted object. And most objects don't need refcounting after all.
2026-03-20 23:19:50 +01:00
bjorn3 781aa57e4a drivers/graphics: Fix resizing text VTs
This fixes a regression introduced in a40be7b44
2026-03-20 20:24:18 +01:00
bjorn3 eaa390156d drivers/graphics: Split out state modified during atomic mode setting 2026-03-19 23:39:32 +01:00
bjorn3 5b88dadc4f drivers/graphics: Move connector<->crtc binding to KmsConnector
A connector can only get input from one CRTC and the CRTC_ID property is
on the connector. There is no CONNECTOR_IDS property on CRTCs.
2026-03-19 23:25:37 +01:00
bjorn3 e49dc8e8be drivers/graphics: Introduce define_object_props helper macro 2026-03-19 22:56:46 +01:00
bjorn3 dcf1e5cdd6 drivers/graphics: Derive property values from object fields 2026-03-19 22:46:44 +01:00
bjorn3 ee1b5377db drivers/graphics: Remove KmsObject and rename KmsObjectKind to KmsObject 2026-03-19 22:45:21 +01:00
bjorn3 79e9e0987d drivers/graphics: Move property values into individual objects 2026-03-19 22:26:55 +01:00
bjorn3 4ccdb59a47 drivers/graphics: Dedup property value conversion code
This will make it easier to change the way properties are represented
internally.
2026-03-19 19:45:55 +01:00
bjorn3 cd5e1ab4f4 drivers/graphics: Nicer debug printing of properties 2026-03-18 21:14:44 +01:00
bjorn3 e586c26fc7 drivers/graphics: Move enum variant fixed size name computation to property add time 2026-03-18 21:09:56 +01:00
bjorn3 919bad8f1e drivers/graphics: Replace magic constant with definition from drm-fourcc crate 2026-03-18 20:53:46 +01:00
bjorn3 89be881a08 drivers/graphics: Remove an orbclient compat hack
Orbital now handles this instead.
2026-03-17 23:04:07 +01:00