diff options
| author | salmonik <salmonik@tuta.io> | 2026-08-01 21:30:48 +0200 |
|---|---|---|
| committer | salmonik <salmonik@tuta.io> | 2026-08-01 21:30:48 +0200 |
| commit | d9c47d52039be7a61d3e9d3652f73322fb6f47ba (patch) | |
| tree | 6e195f0819c97378ec5e0a3a049365d5e1f59ea5 /CONTEXT.md | |
| parent | rsnix v0.5.0: graphics layer + cursor compositor (diff) | |
| download | rs-dos-d9c47d52039be7a61d3e9d3652f73322fb6f47ba.tar.gz rs-dos-d9c47d52039be7a61d3e9d3652f73322fb6f47ba.zip | |
rsnix v0.5.1: force the GUI canvas to 800x600 via GOP SetMode
The kernel used to inherit whatever GOP mode the firmware picked
(QEMU/OVMF gave 1280x800). Now every surface derives from a fixed
800x600 canvas:
- uefi: typed EfiGopQueryMode/SetMode/GetMode fn pointers in
GraphicsOutputProtocol (were raw *mut c_void, never called).
- gop::select_gop_mode: scan the mode list for an exact 800x600
(32-bit BGR/RGB only, the driver assumes 4 Bpp), SetMode it; fall
back to the smallest mode that fits the canvas, then to the
firmware's choice. SetMode may move both the mode info pointer and
the framebuffer base, so both are re-read after the switch. Boot
log: 'gop: mode 3 selected — 800x600 (was 1280x800)'.
- tests: relative assertions are resolution-agnostic; test-gfx and
test-mouse had a boot-log race (shell line prints before the cursor
task line) — now wait for the cursor line instead of grepping once.
All four suites pass at 800x600. 0 build warnings.
Diffstat (limited to 'CONTEXT.md')
| -rw-r--r-- | CONTEXT.md | 16 |
1 files changed, 12 insertions, 4 deletions
| @@ -113,10 +113,10 @@ Workspace version is `a.b.c` (single version for all crates): | |||
| 113 | 113 | ||
| 114 | Bump the workspace version in the root `Cargo.toml` when a change of | 114 | Bump the workspace version in the root `Cargo.toml` when a change of |
| 115 | that class lands — do not leave the version to drift. Current: | 115 | that class lands — do not leave the version to drift. Current: |
| 116 | `0.5.0` — the GUI era landed (graphics layer + cursor compositor) as a | 116 | `0.5.1` — the GUI era landed with 0.5.0 (graphics layer + cursor |
| 117 | `b` bump from the 0.4.0 input foundation; a future major GUI overhaul | 117 | compositor) and the canvas was fixed at 800×600 as a `c` bump; a |
| 118 | (graphics windows beyond the text surface) would be the `a` bump | 118 | future major GUI overhaul (graphics windows beyond the text surface) |
| 119 | (1.0.0). | 119 | would be the `a` bump (1.0.0). |
| 120 | 120 | ||
| 121 | ## Project layout | 121 | ## Project layout |
| 122 | 122 | ||
| @@ -515,6 +515,14 @@ Workspace of four crates, all built for the `x86_64-unknown-uefi` target: | |||
| 515 | the cursor tip is white on the display but absent from the shadow | 515 | the cursor tip is white on the display but absent from the shadow |
| 516 | (overlay purity), and prints PASS/FAIL per stage. | 516 | (overlay purity), and prints PASS/FAIL per stage. |
| 517 | 517 | ||
| 518 | - **Canvas resolution fixed at 800×600** — `gop::init` scans the GOP | ||
| 519 | mode list and calls `SetMode` for an exact 800×600 (BGR/RGB 32-bit; | ||
| 520 | QEMU std-vga lists it as mode 3, real GPUs list it as a standard | ||
| 521 | mode), falling back to the smallest mode that fits, then to the | ||
| 522 | firmware's choice. Everything derives from it: the vt text grid, | ||
| 523 | the cursor clamp, the demo strip. `SetMode` may move the info | ||
| 524 | pointer and framebuffer base, so they are re-read after the switch. | ||
| 525 | |||
| 518 | Verified in QEMU (`make test-gfx`): `fill_rect/shadow: OK`, | 526 | Verified in QEMU (`make test-gfx`): `fill_rect/shadow: OK`, |
| 519 | `display push: OK`, `cursor overlay: OK`, `cursor not in shadow: | 527 | `display push: OK`, `cursor overlay: OK`, `cursor not in shadow: |
| 520 | OK`, `gfx check: PASS`; the demo draws; the cursor tracks injected | 528 | OK`, `gfx check: PASS`; the demo draws; the cursor tracks injected |
