loader: disable scaling on nvidia VESA BIOS
cf. https://patchwork.kernel.org/patch/7113461/ Change-Id: I3f564bd1037aeb4b539f495d57397446ae14e5ed
This commit is contained in:
parent
38c4c8bfa9
commit
d18fe1c54c
@ -439,12 +439,30 @@ vesa_get_vbe_info_block(vbe_info_block *info)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void
|
||||||
|
vesa_fixups(vbe_info_block *info)
|
||||||
|
{
|
||||||
|
const char *oem_string = (const char *)info->oem_string;
|
||||||
|
|
||||||
|
if (!strcmp(oem_string, "NVIDIA")) {
|
||||||
|
dprintf("Disabling nvidia scaling.\n");
|
||||||
|
struct bios_regs regs;
|
||||||
|
regs.eax = 0x4f14;
|
||||||
|
regs.ebx = 0x0102;
|
||||||
|
regs.ecx = 1; // centered unscaled
|
||||||
|
call_bios(0x10, ®s);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static status_t
|
static status_t
|
||||||
vesa_init(vbe_info_block *info, video_mode **_standardMode)
|
vesa_init(vbe_info_block *info, video_mode **_standardMode)
|
||||||
{
|
{
|
||||||
if (vesa_get_vbe_info_block(info) != B_OK)
|
if (vesa_get_vbe_info_block(info) != B_OK)
|
||||||
return B_ERROR;
|
return B_ERROR;
|
||||||
|
|
||||||
|
vesa_fixups(info);
|
||||||
|
|
||||||
// fill mode list and find standard video mode
|
// fill mode list and find standard video mode
|
||||||
|
|
||||||
video_mode *standardMode = NULL;
|
video_mode *standardMode = NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user