Opened 11 years ago

Closed 3 years ago

Last modified 3 years ago

#10570 closed enhancement (fixed)

Native video mode with VESA through vesa bios live patching

Reported by: pulkomandy Owned by: pulkomandy
Priority: normal Milestone: R1/beta4
Component: Drivers/Graphics/VESA Version: R1/Development
Keywords: PatchVBios Cc:
Blocked By: Blocking:
Platform: All

Description (last modified by diver)

This is a trick used in the Clover bootloader to get native video modes from VESA. The idea is to patch the VESA BIOS (which is shadowed in RAM) and replace the video mode tables with the EDID data.

This gets native video mode on ATI, NVidia and Intel cards, without the need to write an actual driver. Their Vesa BIOS is smart enough to accept any resolution in the table.

http://forum.voodooprojects.org/index.php/topic,1227.0.html

https://github.com/CloverHackyColor/CloverBootloader/blob/master/Library/VideoBiosPatchLib/

Attachments (1)

log-hrev55602+4.zip (21.0 KB ) - added by alpopa 3 years ago.

Download all attachments as: .zip

Change History (16)

comment:1 by diver, 10 years ago

Description: modified (diff)

comment:2 by waddlesplash, 8 years ago

Component: Drivers/GraphicsDrivers/Graphics/VESA
Keywords: PatchVBios added

comment:4 by waddlesplash, 6 years ago

Ha, it seems the VBE driver for NewOS that was donated to us (but left unused) in #7172 supports this also.

comment:5 by pulkomandy, 6 years ago

Note that the support is for specific BIOS kinds (one has to know how the resolutions are encoded to find what looks reasonably like modelines in the BIOS), I guess that driver only supports old nVidia cards. So the code in Clover is probably more useful these days?

comment:6 by diver, 4 years ago

Description: modified (diff)

comment:7 by pulkomandy, 3 years ago

Owner: changed from nobody to pulkomandy
Status: newin-progress

comment:8 by pulkomandy, 3 years ago

This should now work using hte patch series ending in https://review.haiku-os.org/c/haiku/+/4629 . I could only test Intel video cards. I will post a link to the generated image on the forum when the buildbot has provided one, and ask for more testing.

by alpopa, 3 years ago

Attachment: log-hrev55602+4.zip added

comment:9 by pulkomandy, 3 years ago

KERN: vesa: applied patch0 in 0 locations
KERN: vesa: applied patch1 in 0 locations
KERN: vesa: applied patch2 in 0 locations
KERN: vesa: applied patch3 in 0 locations
KERN: vesa: video mode patching failed!

So it looks like the code I based this on is not compatible with your video card. Or maybe I did not port it correctly.

KERN: PCI:   vendor 10de: NVIDIA Corporation
KERN: PCI:   device 1c81: GP107 [GeForce GTX 1050]

I will try to investigate and better detect supported cards.

comment:10 by pulkomandy, 3 years ago

For reference the nVidia support is originally from https://notabug.org/niconiconi/nvresolution

comment:11 by diver, 3 years ago

Fixed in hrev55922?

comment:12 by waddlesplash, 3 years ago

Milestone: UnscheduledR1/beta4
Resolution: fixed
Status: in-progressclosed

Indeed, at least basic support is done. Further problems with the feature should be reported in separate tickets.

comment:13 by pulkomandy, 3 years ago

Was this merged? None of it was working on anything but intel cards last time I checked.

comment:14 by waddlesplash, 3 years ago

I just merged it. Most of the work had +2s from various people in previous versions (before rebases), and none of it was marked WIP or -1, so I merged it...

comment:15 by pulkomandy, 3 years ago

Yes, the code is OK, but it doesn't work on current hardware. NVidia changed the format of their BIOS tables and I don't think anyone tested it on AMD yet or it didn't work.

Seems a bit early to close the ticket, I'd say?

Note: See TracTickets for help on using tickets.