Delete patches/deckhd.patch

This commit is contained in:
ferreo 2024-11-19 21:19:16 +01:00
parent 38834346b6
commit 447bda54b3

View File

@ -1,136 +0,0 @@
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;