bazzite/spec_files/gamescope/legion_go.patch
2024-03-18 14:42:04 -07:00

31 lines
912 B
Diff

diff --git a/src/drm.cpp b/src/drm.cpp
index acff5e5..fdf58ee 100644
--- a/src/drm.cpp
+++ b/src/drm.cpp
@@ -101,6 +101,12 @@ static uint32_t galileo_display_rates[] =
90,
};
+static uint32_t legion_go_display_rates[] =
+{
+ 60,
+ 144,
+};
+
static uint32_t get_conn_display_info_flags(struct drm_t *drm, struct connector *connector)
{
if (!connector)
@@ -911,8 +917,11 @@ static void parse_edid( drm_t *drm, struct connector *conn)
conn->valid_display_rates = std::span(galileo_display_rates);
} else {
conn->is_galileo_display = 0;
- if ( conn->is_steam_deck_display )
+ if ( conn->is_steam_deck_display ) {
conn->valid_display_rates = std::span(steam_deck_display_rates);
+ } else if ( strcmp(conn->make_pnp, "LEN") == 0 && strcmp(conn->model, "Go Display") == 0 ) {
+ conn->valid_display_rates = std::span(legion_go_display_rates);
+ }
}
drm_hdr_parse_edid(drm, conn, edid);