diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2015-12-10 11:22:31 -0500 |
---|---|---|
committer | Jani Nikula <jani.nikula@intel.com> | 2015-12-22 07:28:16 -0500 |
commit | 0bff4858653312a10c83709e0009c3adb87e6f1e (patch) | |
tree | f9bc2c4393dc76d86c108d181b7069d178274f4c /drivers/gpu/drm/i915/intel_display.c | |
parent | 152b22627c67c6e5f29ad6ec939ac7e6f52e6c7d (diff) |
drm/i915: Unbreak check_digital_port_conflicts()
Atomic changes broke check_digital_port_conflicts(). It needs to look
at the global situation instead of just trying to find a conflict
within the current atomic state.
This bug made my HSW explode spectacularly after I had split the DDI
encoders into separate DP and HDMI encoders. With the fix, things
seem much more solid.
I hope holding the connection_mutex is enough protection that we can
actually walk the connectors even if they're not part of the current
atomic state...
v2: Regenerate the patch so that it actually applies (Jani)
Cc: stable@vger.kernel.org
Cc: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Fixes: 5448a00d3f06 ("drm/i915: Don't use staged config in check_digital_port_conflicts()")
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1449764551-12466-1-git-send-email-ville.syrjala@linux.intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_display.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_display.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 7d01b986a012..f1598f765e3a 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
@@ -12270,18 +12270,22 @@ static void intel_dump_pipe_config(struct intel_crtc *crtc, | |||
12270 | static bool check_digital_port_conflicts(struct drm_atomic_state *state) | 12270 | static bool check_digital_port_conflicts(struct drm_atomic_state *state) |
12271 | { | 12271 | { |
12272 | struct drm_device *dev = state->dev; | 12272 | struct drm_device *dev = state->dev; |
12273 | struct intel_encoder *encoder; | ||
12274 | struct drm_connector *connector; | 12273 | struct drm_connector *connector; |
12275 | struct drm_connector_state *connector_state; | ||
12276 | unsigned int used_ports = 0; | 12274 | unsigned int used_ports = 0; |
12277 | int i; | ||
12278 | 12275 | ||
12279 | /* | 12276 | /* |
12280 | * Walk the connector list instead of the encoder | 12277 | * Walk the connector list instead of the encoder |
12281 | * list to detect the problem on ddi platforms | 12278 | * list to detect the problem on ddi platforms |
12282 | * where there's just one encoder per digital port. | 12279 | * where there's just one encoder per digital port. |
12283 | */ | 12280 | */ |
12284 | for_each_connector_in_state(state, connector, connector_state, i) { | 12281 | drm_for_each_connector(connector, dev) { |
12282 | struct drm_connector_state *connector_state; | ||
12283 | struct intel_encoder *encoder; | ||
12284 | |||
12285 | connector_state = drm_atomic_get_existing_connector_state(state, connector); | ||
12286 | if (!connector_state) | ||
12287 | connector_state = connector->state; | ||
12288 | |||
12285 | if (!connector_state->best_encoder) | 12289 | if (!connector_state->best_encoder) |
12286 | continue; | 12290 | continue; |
12287 | 12291 | ||