Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/fb: revert the i915 Actually configure untiled displays from master

This code moved in here in master, so revert it the same way.

This is the same revert as 9fa246256e09 ("Revert "drm/i915/fbdev:
Actually configure untiled displays"") in drm-fixes.

Signed-off-by: Dave Airlie <airlied@redhat.com>

+5 -7
+5 -7
drivers/gpu/drm/drm_fb_helper.c
··· 2580 2580 { 2581 2581 struct drm_device *dev = fb_helper->dev; 2582 2582 unsigned int count = min(fb_helper->connector_count, BITS_PER_LONG); 2583 - unsigned long conn_configured, conn_seq; 2583 + unsigned long conn_configured, conn_seq, mask; 2584 2584 int i, j; 2585 2585 bool *save_enabled; 2586 2586 bool fallback = true, ret = true; ··· 2598 2598 drm_modeset_backoff(&ctx); 2599 2599 2600 2600 memcpy(save_enabled, enabled, count); 2601 - conn_seq = GENMASK(count - 1, 0); 2601 + mask = GENMASK(count - 1, 0); 2602 2602 conn_configured = 0; 2603 2603 retry: 2604 + conn_seq = conn_configured; 2604 2605 for (i = 0; i < count; i++) { 2605 2606 struct drm_fb_helper_connector *fb_conn; 2606 2607 struct drm_connector *connector; ··· 2614 2613 if (conn_configured & BIT(i)) 2615 2614 continue; 2616 2615 2617 - /* First pass, only consider tiled connectors */ 2618 - if (conn_seq == GENMASK(count - 1, 0) && !connector->has_tile) 2616 + if (conn_seq == 0 && !connector->has_tile) 2619 2617 continue; 2620 2618 2621 2619 if (connector->status == connector_status_connected) ··· 2715 2715 conn_configured |= BIT(i); 2716 2716 } 2717 2717 2718 - if (conn_configured != conn_seq) { /* repeat until no more are found */ 2719 - conn_seq = conn_configured; 2718 + if ((conn_configured & mask) != mask && conn_configured != conn_seq) 2720 2719 goto retry; 2721 - } 2722 2720 2723 2721 /* 2724 2722 * If the BIOS didn't enable everything it could, fall back to have the