summaryrefslogtreecommitdiff
path: root/rust/kernel/alloc
diff options
context:
space:
mode:
authorTim Douglas <me@timdoug.com>2026-11-17 20:58:59 -0500
committerHelge Deller <deller@gmx.de>2026-11-19 07:08:56 +0100
commitfa9bebccf45571bd710b0591359b28d5354e7e7a (patch)
tree212652c145c3e52942e6962f647e2baa3e62eb79 /rust/kernel/alloc
parent3e973ab62c86d620b2db9e90eb8fc3b065929e6e (diff)
fbdev: valkyriefb: keep the framebuffer mapping size fixed
When /dev/fb0 is mapped before a depth change, as with Xorg's fbdev driver, the mapping may be too short for the new mode. At 640x480, a full frame at 16 bpp is 600 KiB, so drawing it through the original 300 KiB mapping from 8 bpp can fault. Set smem_len to the usable video RAM by subtracting the 4 KiB offset already applied to smem_start, then keep that size across mode changes. On a Performa 6200CD using a kernel with local platform support, a write past the mapping caused a fault during an Xorg test at 16 bpp. With the corrected mapping size in the test kernel, twm and xterm were displayed successfully in Xorg at 640x480 and 16 bpp. In a test on a Quadra 630 in MAME with Linux v7.4-rc3, /dev/fb0 was mapped at 8 bpp and the depth was changed to 16 bpp with the original mapping still in place. A SIGSEGV was reported during the 16 bpp draw before the fix, and all 480 lines were drawn afterward. AI assistance was used to investigate the mapping size and draft the fix. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Tim Douglas <me@timdoug.com> Cc: stable@vger.kernel.org Signed-off-by: Helge Deller <deller@gmx.de>
Diffstat (limited to 'rust/kernel/alloc')
0 files changed, 0 insertions, 0 deletions