Commit 1758030
committed
Fix rendering and VT management issues in fbdev
This fixes critical bugs in the Linux framebuffer backend:
1. BPP crash prevention
- Return false instead of break for unsupported bits per pixel
- Prevents array out-of-bounds access in put_span table
2. Damage callback logic
- Fix inverted condition that prevented screen updates
- !tx->vt_active && MAP_FAILED → tx->vt_active && != MAP_FAILED
- Enables all rendering when VT is active
3. VT restoration in error path
- Restore VT mode before closing fd on init failure
- Prevents blank TTY after failed initialization
4. Poll function registration (lines 350-353, 376)
- Add twin_fbdev_poll() stub for dispatch compatibility
Tested-on: lima ARM64 Linux (virtio_gpudrmfb 1280x800@32bpp)1 parent 26e8cab commit 1758030
1 file changed
+22
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
155 | | - | |
| 155 | + | |
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
| |||
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
192 | | - | |
| 192 | + | |
193 | 193 | | |
194 | 194 | | |
195 | 195 | | |
| |||
302 | 302 | | |
303 | 303 | | |
304 | 304 | | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
305 | 308 | | |
306 | 309 | | |
307 | 310 | | |
| |||
325 | 328 | | |
326 | 329 | | |
327 | 330 | | |
328 | | - | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
329 | 338 | | |
330 | 339 | | |
331 | 340 | | |
| |||
334 | 343 | | |
335 | 344 | | |
336 | 345 | | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
337 | 355 | | |
338 | 356 | | |
339 | 357 | | |
| |||
355 | 373 | | |
356 | 374 | | |
357 | 375 | | |
| 376 | + | |
358 | 377 | | |
359 | 378 | | |
360 | 379 | | |
0 commit comments