return 1;
}
+struct efifb_mode_fixup {
+ unsigned int width;
+ unsigned int height;
+ unsigned int linelength;
+};
+
+static int __init
+efifb_check_and_swap_width_height(const struct dmi_system_id *id)
+{
+ const struct efifb_mode_fixup *data = id->driver_data;
+ struct screen_info *si = &screen_info;
+
+ if (data->width == si->lfb_width && data->height == si->lfb_height) {
+ swap(si->lfb_width, si->lfb_height);
+ si->lfb_linelength = data->linelength;
+ si->lfb_size = data->linelength * data->width;
+ }
+
+ return 1;
+}
+
+static const struct efifb_mode_fixup efifb_steamdeck_mode_fixup __initconst = {
+ .width = 1280,
+ .height = 800,
+ .linelength = 3328,
+};
+
/*
* Some devices have a portrait LCD but advertise a landscape resolution (and
* pitch). We simply swap width and height for these devices so that we can
},
.callback = efifb_swap_width_height,
},
+ {
+ /* Valve Steam Deck (Jupiter) */
+ .matches = {
+ DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Valve"),
+ DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Jupiter"),
+ DMI_EXACT_MATCH(DMI_PRODUCT_VERSION, "1"),
+ },
+ .callback = efifb_check_and_swap_width_height,
+ .driver_data = (void *)&efifb_steamdeck_mode_fixup,
+ },
+ {
+ /* Valve Steam Deck (Galileo) */
+ .matches = {
+ DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Valve"),
+ DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Galileo"),
+ DMI_EXACT_MATCH(DMI_PRODUCT_VERSION, "1"),
+ },
+ .callback = efifb_check_and_swap_width_height,
+ .driver_data = (void *)&efifb_steamdeck_mode_fixup,
+ },
{},
};