-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeckhd.patch
136 lines (130 loc) · 5.39 KB
/
deckhd.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
diff --git a/src/Backends/DRMBackend.cpp b/src/Backends/DRMBackend.cpp
index 85e5126..be418b4 100644
--- a/src/Backends/DRMBackend.cpp
+++ b/src/Backends/DRMBackend.cpp
@@ -2149,6 +2149,7 @@ namespace gamescope
( m_Mutable.szMakePNP == "WLC"sv && m_Mutable.szModel == "ANX7530 U"sv ) ||
( m_Mutable.szMakePNP == "ANX"sv && m_Mutable.szModel == "ANX7530 U"sv ) ||
( m_Mutable.szMakePNP == "VLV"sv && m_Mutable.szModel == "ANX7530 U"sv ) ||
+ ( m_Mutable.szMakePNP == "DHD"sv && m_Mutable.szModel == "DeckHD-1200p"sv ) ||
( m_Mutable.szMakePNP == "VLV"sv && m_Mutable.szModel == "Jupiter"sv ) ||
( m_Mutable.szMakePNP == "VLV"sv && m_Mutable.szModel == "Galileo"sv );
@@ -2160,6 +2161,7 @@ namespace gamescope
{
static constexpr uint32_t kPIDGalileoSDC = 0x3003;
static constexpr uint32_t kPIDGalileoBOE = 0x3004;
+ static constexpr uint32_t kPIDJupiterDHD = 0x4001;
if ( pProduct->product == kPIDGalileoSDC )
{
@@ -2171,6 +2173,10 @@ namespace gamescope
m_Mutable.eKnownDisplay = GAMESCOPE_KNOWN_DISPLAY_STEAM_DECK_OLED_BOE;
m_Mutable.ValidDynamicRefreshRates = std::span( s_kSteamDeckOLEDRates );
}
+ else if (pProduct-> product == kPIDJupiterDHD ) {
+ m_Mutable.eKnownDisplay = GAMESCOPE_KNOWN_DISPLAY_STEAM_DECK_LCD_DHD;
+ m_Mutable.ValidDynamicRefreshRates = std::span( s_kSteamDeckLCDRates );
+ }
else
{
m_Mutable.eKnownDisplay = GAMESCOPE_KNOWN_DISPLAY_STEAM_DECK_LCD;
@@ -2200,7 +2206,8 @@ namespace gamescope
drm_log.infof( "[colorimetry]: Steam Deck LCD detected. Using known colorimetry" );
m_Mutable.DisplayColorimetry = displaycolorimetry_steamdeck_measured;
}
- else
+ else if (m_Mutable.eKnownDisplay == GAMESCOPE_KNOWN_DISPLAY_STEAM_DECK_OLED_BOE ||
+ m_Mutable.eKnownDisplay == GAMESCOPE_KNOWN_DISPLAY_STEAM_DECK_OLED_SDC )
{
// Steam Deck OLED has calibrated chromaticity coordinates in the EDID
// for each unit.
@@ -2330,7 +2337,7 @@ namespace gamescope
.uMinContentLightLevel = nits_to_u16_dark( 0 ),
};
}
- else if ( eKnownDisplay == GAMESCOPE_KNOWN_DISPLAY_STEAM_DECK_LCD )
+ else if ( eKnownDisplay == GAMESCOPE_KNOWN_DISPLAY_STEAM_DECK_LCD || eKnownDisplay == GAMESCOPE_KNOWN_DISPLAY_STEAM_DECK_LCD_DHD )
{
// Set up some HDR fallbacks for undocking
return BackendConnectorHDRInfo
diff --git a/src/gamescope_shared.h b/src/gamescope_shared.h
index ed30d8c..3b60774 100644
--- a/src/gamescope_shared.h
+++ b/src/gamescope_shared.h
@@ -8,6 +8,7 @@ namespace gamescope
{
GAMESCOPE_KNOWN_DISPLAY_UNKNOWN,
GAMESCOPE_KNOWN_DISPLAY_STEAM_DECK_LCD, // Jupiter
+ GAMESCOPE_KNOWN_DISPLAY_STEAM_DECK_LCD_DHD, // Jupiter Deck HD
GAMESCOPE_KNOWN_DISPLAY_STEAM_DECK_OLED_SDC, // Galileo SDC
GAMESCOPE_KNOWN_DISPLAY_STEAM_DECK_OLED_BOE, // Galileo BOE
};
diff --git a/src/modegen.cpp b/src/modegen.cpp
index d174c2d..5dd1136 100644
--- a/src/modegen.cpp
+++ b/src/modegen.cpp
@@ -293,13 +293,32 @@ unsigned int galileo_boe_vfp[] =
172,152,136,120,100,84,68,52,36,20,8
};
-#define GALILEO_MIN_REFRESH 45
+//SD LCD Stock Timings
+#define JUPITER_BOE_PID 0x3001
+#define JUPITER_B_PID 0x3002
+#define JUPITER_HFP 40
+#define JUPITER_HSYNC 4
+#define JUPITER_HBP 40
+#define JUPITER_VFP 30
+#define JUPITER_VSYNC 4
+#define JUPITER_VBP 8
+//SD LCD DeckHD Timings
+#define JUPITER_DHD_PID 0x4001
+#define JUPITER_DHD_HFP 40
+#define JUPITER_DHD_HSYNC 20
+#define JUPITER_DHD_HBP 40
+#define JUPITER_DHD_VFP 18
+#define JUPITER_DHD_VSYNC 2
+#define JUPITER_DHD_VBP 20
+//SD OLED SDC Timings
#define GALILEO_SDC_PID 0x3003
#define GALILEO_SDC_VSYNC 1
#define GALILEO_SDC_VBP 22
+//SD OLED BOE Timings
#define GALILEO_BOE_PID 0x3004
#define GALILEO_BOE_VSYNC 2
#define GALILEO_BOE_VBP 30
+#define GALILEO_MIN_REFRESH 45
#define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0]))
unsigned int get_galileo_vfp( int vrefresh, unsigned int * vfp_array, unsigned int num_rates )
@@ -344,17 +363,28 @@ void generate_fixed_mode(drmModeModeInfo *mode, const drmModeModeInfo *base, int
mode->vsync_end = mode->vsync_start + vsync;
mode->vtotal = mode->vsync_end + vbp;
} else {
- if ( eKnownDisplay == gamescope::GAMESCOPE_KNOWN_DISPLAY_STEAM_DECK_LCD )
+ if ( eKnownDisplay == gamescope::GAMESCOPE_KNOWN_DISPLAY_STEAM_DECK_LCD_DHD ) {
+ mode->hdisplay = 1200;
+ mode->hsync_start = mode->hdisplay + JUPITER_DHD_HFP;
+ mode->hsync_end = mode->hsync_start + JUPITER_DHD_HSYNC;
+ mode->htotal = mode->hsync_end + JUPITER_DHD_HBP;
+
+ mode->vdisplay = 1920;
+ mode->vsync_start = mode->vdisplay + JUPITER_DHD_VFP;
+ mode->vsync_end = mode->vsync_start + JUPITER_DHD_VSYNC;
+ mode->vtotal = mode->vsync_end + JUPITER_DHD_VBP;
+ }
+ else if ( eKnownDisplay == gamescope::GAMESCOPE_KNOWN_DISPLAY_STEAM_DECK_LCD )
{
mode->hdisplay = 800;
- mode->hsync_start = 840;
- mode->hsync_end = 844;
- mode->htotal = 884;
+ mode->hsync_start = mode->hdisplay + JUPITER_HFP;
+ mode->hsync_end = mode->hsync_start + JUPITER_HSYNC;
+ mode->htotal = mode->hsync_end + JUPITER_HBP;
mode->vdisplay = 1280;
- mode->vsync_start = 1310;
- mode->vsync_end = 1314;
- mode->vtotal = 1322;
+ mode->vsync_start = mode->vdisplay + JUPITER_VFP;
+ mode->vsync_end = mode->vsync_start + JUPITER_VSYNC;
+ mode->vtotal = mode->vsync_end + JUPITER_VBP;
}
mode->clock = ( ( mode->htotal * mode->vtotal * vrefresh ) + 999 ) / 1000;