mb/starlabs/starfighter: Add CFR option to use native panel resolution

Add a CFR option to boot using the native panel resolution, rather than
a fixed/scaled video mode. This option selects between two VBT files:
one with the 'fixed mode' flag enabled, and one with it disabled.

This feature is mainly a workaround to a GNOME-related bug which
causes the creation of a 2nd display at the boot resolution. This
2nd display being a lower/different resolution than the native
panel resolution causes severe flickering/artifacting rendering
the display unusable unless this 2nd phantom display is disabled
on every boot.

Change-Id: I9e39258ce0171aab425150679d1ce30d69b2b1ef
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/87495
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-by: Alicja Michalska <ahplka19@gmail.com>
This commit is contained in:
Matt DeVillier 2025-04-17 22:31:34 -05:00
commit f1509a467c
4 changed files with 20 additions and 0 deletions

View file

@ -165,6 +165,14 @@ static const struct sm_object bluetooth_rtd3 = SM_DECLARE_BOOL({
.default_value = true,
});
static const struct sm_object display_native_res = SM_DECLARE_BOOL({
.opt_name = "display_native_res",
.ui_name = "Display: Use Native Resolution",
.ui_helptext = "Enabled: use the native panel resolution at boot.\n"
"Disabled: use a fixed/scaled video mode at boot.",
.default_value = false,
});
static struct sm_obj_form performance = {
.ui_name = "Performance",
.obj_list = (const struct sm_object *[]) {
@ -213,6 +221,7 @@ static struct sm_obj_form devices = {
#if CONFIG(SOC_INTEL_TIGERLAKE) || CONFIG(SOC_INTEL_ALDERLAKE) || CONFIG(SOC_INTEL_RAPTORLAKE)
&gna,
#endif
&display_native_res,
#if CONFIG(EC_STARLABS_LID_SWITCH)
&lid_switch,
#endif

View file

@ -1,6 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <device/device.h>
#include <drivers/intel/gma/opregion.h>
#include <soc/ramstage.h>
#include <option.h>
#include <variants.h>
@ -25,3 +26,11 @@ static void init_mainboard(void *chip_info)
struct chip_operations mainboard_ops = {
.init = init_mainboard,
};
const char *mainboard_vbt_filename(void)
{
if (get_uint_option("display_native_res", 0) == 1)
return "vbt_native_res.bin";
return "vbt.bin";
}

View file

@ -7,3 +7,5 @@ romstage-y += romstage.c
ramstage-y += devtree.c
ramstage-y += gpio.c
ramstage-y += hda_verb.c
$(call add_vbt_to_cbfs, vbt_native_res.bin, data_native_res.vbt)