1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <x86emu/x86emu.h>
4 #include <arch/interrupt.h>
5 #include <console/console.h>
9 static int active_lfp
, pfit
, display
, panel_type
;
11 int intel_vga_int15_handler(void)
15 printk(BIOS_DEBUG
, "%s: AX=%04x BX=%04x CX=%04x DX=%04x\n",
16 __func__
, X86_AX
, X86_BX
, X86_CX
, X86_DX
);
21 * Set Panel Fitting Hook:
22 * bit 2 = Graphics Stretching
23 * bit 1 = Text Stretching
24 * bit 0 = Centering (do not set with bit1 or bit2)
25 * 0 = video BIOS default
33 * Boot Display Device Hook:
47 case 0x5f40: /* Boot Panel Type */
48 X86_AX
= 0x005f; // Success
50 printk(BIOS_DEBUG
, "DISPLAY=%x\n", X86_CL
);
55 * Hook to select active LFP configuration:
56 * 00h = No LVDS, VBIOS does not enable LVDS
57 * 01h = Int-LVDS, LFP driven by integrated LVDS decoder
58 * 02h = SVDO-LVDS, LFP driven by SVDO decoder
59 * 03h = eDP, LFP Driven by Int-DisplayPort encoder
66 switch ((X86_CX
>> 8) & 0xff) {
80 /* Get SG/Non-SG mode */
86 /* Interrupt was not handled */
88 "Unknown INT15 5f70 function: 0x%02x\n",
89 ((X86_CX
>> 8) & 0xff));
95 printk(BIOS_DEBUG
, "Unknown INT15 function %04x!\n", X86_AX
);
101 void install_intel_vga_int15_handler(int active_lfp_
, int pfit_
, int display_
, int panel_type_
)
103 active_lfp
= active_lfp_
;
106 panel_type
= panel_type_
;
107 mainboard_interrupt_handlers(0x15, &intel_vga_int15_handler
);