Skip to content

Commit 3ca09c5

Browse files
committed
fix(deck): Add patch to fix some invalid refresh rates (Thanks @matte_schwartz)
1 parent 66fdceb commit 3ca09c5

File tree

2 files changed

+65
-1
lines changed

2 files changed

+65
-1
lines changed
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
From 2e4d7ad1bf2cb98eb67ff8f9385cf6657cf2e912 Mon Sep 17 00:00:00 2001
2+
From: Matthew Schwartz <njtransit215@gmail.com>
3+
Date: Wed, 3 Jul 2024 15:20:08 -0700
4+
Subject: [PATCH] drm: Separate BOE and SDC OLED Deck panel valid refresh rates
5+
6+
OLED Decks with BOE panels seem to struggle with a few different
7+
specific modesets (51hz/55hz/65hz) that SDC panels have no issues with.
8+
To work around this, let's make use of Gamescope recognizing each
9+
display manufacturer to correct the bad modesets while leaving
10+
SDC panel units alone. This can be reverted if an underlying cause can
11+
be found in the kernel in the future.
12+
---
13+
src/Backends/DRMBackend.cpp | 16 +++++++++++++---
14+
1 file changed, 13 insertions(+), 3 deletions(-)
15+
16+
diff --git a/src/Backends/DRMBackend.cpp b/src/Backends/DRMBackend.cpp
17+
index 97ef446..9f93c7f 100644
18+
--- a/src/Backends/DRMBackend.cpp
19+
+++ b/src/Backends/DRMBackend.cpp
20+
@@ -554,7 +554,7 @@ static constexpr uint32_t s_kSteamDeckLCDRates[] =
21+
60,
22+
};
23+
24+
-static constexpr uint32_t s_kSteamDeckOLEDRates[] =
25+
+static constexpr uint32_t s_kSteamDeckOLEDSDCRates[] =
26+
{
27+
45, 47, 48, 49,
28+
50, 51, 53, 55, 56, 59,
29+
@@ -564,6 +564,16 @@ static constexpr uint32_t s_kSteamDeckOLEDRates[] =
30+
90,
31+
};
32+
33+
+static constexpr uint32_t s_kSteamDeckOLEDBOERates[] =
34+
+{
35+
+ 45, 47, 48, 49,
36+
+ 50, 53, 56, 59,
37+
+ 60, 62, 64, 66, 68,
38+
+ 72, 73, 76, 77, 78,
39+
+ 80, 81, 82, 84, 85, 86, 87, 88,
40+
+ 90,
41+
+};
42+
+
43+
static void update_connector_display_info_wl(struct drm_t *drm)
44+
{
45+
wlserver_lock();
46+
@@ -2128,12 +2138,12 @@ namespace gamescope
47+
if ( pProduct->product == kPIDGalileoSDC )
48+
{
49+
m_Mutable.eKnownDisplay = GAMESCOPE_KNOWN_DISPLAY_STEAM_DECK_OLED_SDC;
50+
- m_Mutable.ValidDynamicRefreshRates = std::span( s_kSteamDeckOLEDRates );
51+
+ m_Mutable.ValidDynamicRefreshRates = std::span( s_kSteamDeckOLEDSDCRates );
52+
}
53+
else if ( pProduct->product == kPIDGalileoBOE )
54+
{
55+
m_Mutable.eKnownDisplay = GAMESCOPE_KNOWN_DISPLAY_STEAM_DECK_OLED_BOE;
56+
- m_Mutable.ValidDynamicRefreshRates = std::span( s_kSteamDeckOLEDRates );
57+
+ m_Mutable.ValidDynamicRefreshRates = std::span( s_kSteamDeckOLEDBOERates );
58+
}
59+
else
60+
{
61+
--
62+
2.45.2
63+

spec_files/gamescope/gamescope.spec

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
Name: gamescope
88
Version: 100.%{gamescope_tag}
9-
Release: 8.bazzite
9+
Release: 9.bazzite
1010
Summary: Micro-compositor for video games on Wayland
1111

1212
License: BSD
@@ -18,6 +18,7 @@ Source0: stb.pc
1818
Patch0: chimeraos.patch
1919
Patch1: disable-steam-touch-click-atom.patch
2020
Patch2: deckhd.patch
21+
Patch3: drm-Separate-BOE-and-SDC-OLED-Deck-panel-rates.patch
2122

2223
BuildRequires: meson >= 0.54.0
2324
BuildRequires: ninja-build

0 commit comments

Comments
 (0)