summaryrefslogtreecommitdiff
path: root/config/submodule/coreboot/default/libgfxinit/patches
diff options
context:
space:
mode:
Diffstat (limited to 'config/submodule/coreboot/default/libgfxinit/patches')
-rw-r--r--config/submodule/coreboot/default/libgfxinit/patches/0001-g45-hw-gfx-gma-plls.adb-Make-reference-clock-frequen.patch42
-rw-r--r--config/submodule/coreboot/default/libgfxinit/patches/0002-re-try-EDID-reading-when-it-fails.patch38
2 files changed, 80 insertions, 0 deletions
diff --git a/config/submodule/coreboot/default/libgfxinit/patches/0001-g45-hw-gfx-gma-plls.adb-Make-reference-clock-frequen.patch b/config/submodule/coreboot/default/libgfxinit/patches/0001-g45-hw-gfx-gma-plls.adb-Make-reference-clock-frequen.patch
new file mode 100644
index 00000000..2d248941
--- /dev/null
+++ b/config/submodule/coreboot/default/libgfxinit/patches/0001-g45-hw-gfx-gma-plls.adb-Make-reference-clock-frequen.patch
@@ -0,0 +1,42 @@
+From ba078864500de99c26b6ea7e3fdcef19bca582a7 Mon Sep 17 00:00:00 2001
+From: Nicholas Chin <nic.c3.14@gmail.com>
+Date: Mon, 20 May 2024 10:10:03 -0600
+Subject: [PATCH 1/1] g45/hw-gfx-gma-plls.adb: Make reference clock frequency
+ configurable
+
+Instead of assuming a 96 MHz reference clock frequency, use the value
+specified by the new INTEL_GMA_DPLL_REF_FREQ Kconfig. This defaults to
+96 MHz to preserve the existing behavior. An example of where this is
+needed is the DPLL_REF_SSCLK input, which will typically be 100 MHz
+to support LVDS spread spectrum clocking.
+
+Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com>
+---
+ common/g45/hw-gfx-gma-plls.adb | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/common/g45/hw-gfx-gma-plls.adb b/common/g45/hw-gfx-gma-plls.adb
+index 67242f2..5e970d7 100644
+--- a/common/g45/hw-gfx-gma-plls.adb
++++ b/common/g45/hw-gfx-gma-plls.adb
+@@ -12,6 +12,8 @@
+ -- GNU General Public License for more details.
+ --
+
++with CB.Config;
++
+ with HW.Time;
+ with HW.GFX.GMA.Config;
+ with HW.GFX.GMA.Registers;
+@@ -460,7 +462,7 @@ is
+ (Display => Port_Cfg.Display,
+ Target_Dotclock => Target_Clock,
+ -- should be, but doesn't has to be always the same:
+- Reference_Clock => 96_000_000,
++ Reference_Clock => CB.Config.INTEL_GMA_DPLL_REF_FREQ,
+ Best_Clock => Clk,
+ Valid => Success);
+ else
+--
+2.39.2
+
diff --git a/config/submodule/coreboot/default/libgfxinit/patches/0002-re-try-EDID-reading-when-it-fails.patch b/config/submodule/coreboot/default/libgfxinit/patches/0002-re-try-EDID-reading-when-it-fails.patch
new file mode 100644
index 00000000..889218fe
--- /dev/null
+++ b/config/submodule/coreboot/default/libgfxinit/patches/0002-re-try-EDID-reading-when-it-fails.patch
@@ -0,0 +1,38 @@
+From cbac507d93dc357a75ccc11fdda5c7ed60935538 Mon Sep 17 00:00:00 2001
+From: Leah Rowe <leah@libreboot.org>
+Date: Sun, 13 Jul 2025 15:18:53 +0100
+Subject: [PATCH 1/1] re-try EDID reading when it fails
+
+some video converters are a bit buggy and have to be
+probed twice; linux works fine, but in these cases,
+coreboot won't set up the display.
+
+try it twice, to mitigate, when probing the EDID
+
+This entire function should probably be rewritten, since
+it's buggy in general.
+
+Signed-off-by: Leah Rowe <leah@libreboot.org>
+---
+ common/hw-gfx-gma-display_probing.adb | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/common/hw-gfx-gma-display_probing.adb b/common/hw-gfx-gma-display_probing.adb
+index 67f8ddf..0500217 100644
+--- a/common/hw-gfx-gma-display_probing.adb
++++ b/common/hw-gfx-gma-display_probing.adb
+@@ -122,6 +122,11 @@ is
+ Read_EDID (Raw_EDID, Port, Success);
+ end if;
+
++ if not Success then
++ Panel.Wait_On (Config_Helpers.To_Panel (Port));
++ Read_EDID (Raw_EDID, Port, Success);
++ end if;
++
+ if Success and then
+ ((not Is_DVI_I (Port) or EDID.Compatible_Display
+ (Raw_EDID, Config_Helpers.To_Display_Type (Port))) and
+--
+2.39.5
+