mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-05-02 05:13:57 +00:00
drm/i915/fbdev: Stop repeating tile configuration on stagnation
If we cease making progress in finding matching outputs for a tiled
configuration, stop looping over the remaining unconfigured outputs.
v2: Use conn_seq (instead of pass) to only apply tile configuration on
first pass.
Fixes: b0ee9e7fa5
("drm/fb: add support for tiled monitor configurations. (v2)")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tomasz Lis <tomasz.lis@intel.com>
Cc: Dave Airlie <airlied@redhat.com>
Cc: Daniel Vetter <daniel.vetter@intel.com>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Sean Paul <seanpaul@chromium.org>
Cc: <stable@vger.kernel.org> # v3.19+
Reviewed-by: Tomasz Lis <tomasz.lis@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170224114306.4400-1-chris@chris-wilson.co.uk
This commit is contained in:
parent
8d0e9bcb2b
commit
754a76591b
1 changed files with 4 additions and 6 deletions
|
@ -350,14 +350,13 @@ static bool intel_fb_initial_config(struct drm_fb_helper *fb_helper,
|
||||||
bool *enabled, int width, int height)
|
bool *enabled, int width, int height)
|
||||||
{
|
{
|
||||||
struct drm_i915_private *dev_priv = to_i915(fb_helper->dev);
|
struct drm_i915_private *dev_priv = to_i915(fb_helper->dev);
|
||||||
unsigned long conn_configured, mask;
|
unsigned long conn_configured, conn_seq, mask;
|
||||||
unsigned int count = min(fb_helper->connector_count, BITS_PER_LONG);
|
unsigned int count = min(fb_helper->connector_count, BITS_PER_LONG);
|
||||||
int i, j;
|
int i, j;
|
||||||
bool *save_enabled;
|
bool *save_enabled;
|
||||||
bool fallback = true;
|
bool fallback = true;
|
||||||
int num_connectors_enabled = 0;
|
int num_connectors_enabled = 0;
|
||||||
int num_connectors_detected = 0;
|
int num_connectors_detected = 0;
|
||||||
int pass = 0;
|
|
||||||
|
|
||||||
save_enabled = kcalloc(count, sizeof(bool), GFP_KERNEL);
|
save_enabled = kcalloc(count, sizeof(bool), GFP_KERNEL);
|
||||||
if (!save_enabled)
|
if (!save_enabled)
|
||||||
|
@ -367,6 +366,7 @@ static bool intel_fb_initial_config(struct drm_fb_helper *fb_helper,
|
||||||
mask = GENMASK(count - 1, 0);
|
mask = GENMASK(count - 1, 0);
|
||||||
conn_configured = 0;
|
conn_configured = 0;
|
||||||
retry:
|
retry:
|
||||||
|
conn_seq = conn_configured;
|
||||||
for (i = 0; i < count; i++) {
|
for (i = 0; i < count; i++) {
|
||||||
struct drm_fb_helper_connector *fb_conn;
|
struct drm_fb_helper_connector *fb_conn;
|
||||||
struct drm_connector *connector;
|
struct drm_connector *connector;
|
||||||
|
@ -380,7 +380,7 @@ retry:
|
||||||
if (conn_configured & BIT(i))
|
if (conn_configured & BIT(i))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (pass == 0 && !connector->has_tile)
|
if (conn_seq == 0 && !connector->has_tile)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (connector->status == connector_status_connected)
|
if (connector->status == connector_status_connected)
|
||||||
|
@ -491,10 +491,8 @@ retry:
|
||||||
conn_configured |= BIT(i);
|
conn_configured |= BIT(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((conn_configured & mask) != mask) {
|
if ((conn_configured & mask) != mask && conn_configured != conn_seq)
|
||||||
pass++;
|
|
||||||
goto retry;
|
goto retry;
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If the BIOS didn't enable everything it could, fall back to have the
|
* If the BIOS didn't enable everything it could, fall back to have the
|
||||||
|
|
Loading…
Add table
Reference in a new issue