monitor: Allow DPI connectors to be built-in displays

Needed for the Pinenote built-in display to be detected by Mutter
https://pine64.org/devices/pinenote/

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3067>
This commit is contained in:
Petr Hodina 2024-03-13 11:58:50 +01:00 committed by Marge Bot
parent 8002919f7b
commit e2b42cdfd9
3 changed files with 4 additions and 0 deletions

View File

@ -402,6 +402,7 @@ meta_monitor_is_laptop_panel (MetaMonitor *monitor)
case META_CONNECTOR_TYPE_eDP: case META_CONNECTOR_TYPE_eDP:
case META_CONNECTOR_TYPE_LVDS: case META_CONNECTOR_TYPE_LVDS:
case META_CONNECTOR_TYPE_DSI: case META_CONNECTOR_TYPE_DSI:
case META_CONNECTOR_TYPE_DPI:
return TRUE; return TRUE;
default: default:
return FALSE; return FALSE;

View File

@ -1579,6 +1579,7 @@ make_connector_name (drmModeConnector *drm_connector)
"eDP", "eDP",
"Virtual", "Virtual",
"DSI", "DSI",
"DPI",
}; };
if (drm_connector->connector_type < G_N_ELEMENTS (connector_type_names)) if (drm_connector->connector_type < G_N_ELEMENTS (connector_type_names))

View File

@ -755,6 +755,8 @@ output_info_get_connector_type_from_name (const MetaOutputInfo *output_info)
return META_CONNECTOR_TYPE_HDMIA; return META_CONNECTOR_TYPE_HDMIA;
if (g_str_has_prefix (name, "VGA")) if (g_str_has_prefix (name, "VGA"))
return META_CONNECTOR_TYPE_VGA; return META_CONNECTOR_TYPE_VGA;
if (g_str_has_prefix (name, "DPI"))
return META_CONNECTOR_TYPE_DPI;
/* SNA uses DP, not DisplayPort. Test for both. */ /* SNA uses DP, not DisplayPort. Test for both. */
if (g_str_has_prefix (name, "DP") || g_str_has_prefix (name, "DisplayPort")) if (g_str_has_prefix (name, "DP") || g_str_has_prefix (name, "DisplayPort"))
return META_CONNECTOR_TYPE_DisplayPort; return META_CONNECTOR_TYPE_DisplayPort;