intel/display: handle all connectors disabled case

If all connectors are set to disabled by configuration, the connectors
stayed enabled since the new configuration reveals no preferred or minimal
resolution/mode. Instead, use the last set resolution in order to get to the
disabling code.
This commit is contained in:
Alexander Boettcher 2023-07-10 15:34:36 +02:00 committed by Norman Feske
parent d6da06913e
commit 0f70cafb91
2 changed files with 13 additions and 5 deletions

View File

@ -262,7 +262,7 @@ append config {
</route>
</start>}
append_if $use_fb_controller {
append_if $use_fb_controller config {
<start name="intel_fb_controller" priority="-1">
<resource name="RAM" quantum="1M"/>
<config>

View File

@ -153,7 +153,7 @@ static void preferred_mode(struct drm_device const * const dev,
}
drm_connector_list_iter_end(&conn_iter);
/* no modes on any connector, happens during early bootup */
/* no mode due to early bootup or all connectors are disabled by config */
if (!min_mode->hdisplay || !min_mode->vdisplay)
return;
@ -245,9 +245,17 @@ static bool reconfigure(struct drm_client_dev * const dev)
preferred_mode(dev->dev, &mode_preferred, &mode_minimum);
/* no valid modes on any connector on early boot */
if (!mode_minimum.hdisplay || !mode_minimum.vdisplay)
return false;
if (!mode_minimum.hdisplay || !mode_minimum.vdisplay) {
/* no valid modes on any connector on early boot */
if (!dumb_fb.fb_id)
return false;
/* valid connectors but all are disabled by config */
mode_minimum.hdisplay = dumb_fb.width;
mode_minimum.vdisplay = dumb_fb.height;
mode_preferred = mode_minimum;
}
if (mode_larger(&mode_preferred, &mode_minimum))
mode_real = mode_preferred;