From f1509a467ce317f10a453956930f503a5f49ca9b Mon Sep 17 00:00:00 2001 From: Matt DeVillier Date: Thu, 17 Apr 2025 22:31:34 -0500 Subject: [PATCH] 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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/87495 Tested-by: build bot (Jenkins) Reviewed-by: Sean Rhodes Reviewed-by: Alicja Michalska --- src/mainboard/starlabs/starfighter/cfr.c | 9 +++++++++ src/mainboard/starlabs/starfighter/mainboard.c | 9 +++++++++ .../starfighter/variants/rpl/Makefile.mk | 2 ++ .../starfighter/variants/rpl/data_native_res.vbt | Bin 0 -> 9216 bytes 4 files changed, 20 insertions(+) create mode 100644 src/mainboard/starlabs/starfighter/variants/rpl/data_native_res.vbt diff --git a/src/mainboard/starlabs/starfighter/cfr.c b/src/mainboard/starlabs/starfighter/cfr.c index e8522f10eb..bbef3a7c26 100644 --- a/src/mainboard/starlabs/starfighter/cfr.c +++ b/src/mainboard/starlabs/starfighter/cfr.c @@ -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 diff --git a/src/mainboard/starlabs/starfighter/mainboard.c b/src/mainboard/starlabs/starfighter/mainboard.c index d394f2579d..e9c17e53ed 100644 --- a/src/mainboard/starlabs/starfighter/mainboard.c +++ b/src/mainboard/starlabs/starfighter/mainboard.c @@ -1,6 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0-only */ #include +#include #include #include #include @@ -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"; +} diff --git a/src/mainboard/starlabs/starfighter/variants/rpl/Makefile.mk b/src/mainboard/starlabs/starfighter/variants/rpl/Makefile.mk index 2a505c35c7..53efc2f0fe 100644 --- a/src/mainboard/starlabs/starfighter/variants/rpl/Makefile.mk +++ b/src/mainboard/starlabs/starfighter/variants/rpl/Makefile.mk @@ -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) diff --git a/src/mainboard/starlabs/starfighter/variants/rpl/data_native_res.vbt b/src/mainboard/starlabs/starfighter/variants/rpl/data_native_res.vbt new file mode 100644 index 0000000000000000000000000000000000000000..9020e8740d6c5e194e749680361434ccf102137a GIT binary patch literal 9216 zcmeHMUrbw782`?_ZRu)}PH^jR;u$Qg;DAfnkdY?b(t_*8pSCd4WhQj2Rf%j=#*`V8 zT_X=9i^)w)lr1J!6BC0E^5V07#O#I4Wbr{0-dq-6O!l_T`aAcQ*0LehIUTcK^WA%T zzVH0b_x;Yf=bn4-{;}Rs?jH#DMF;%H`&z;rk|2fT`pY=pFTJ7Rk@28^)IZ)kFdR6}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