Commit f61cccf3 authored by Ander Conselvan de Oliveira's avatar Ander Conselvan de Oliveira Committed by Daniel Vetter

drm/i915: Set best_encoder field of connector_state also when disabling

The best_encoder field of connector_state wasn't properly set when a
connector was being disabled, leading to an incosistent atomic state.

For now, this doesn't cause anything to blow up, because everywhere
we're using connector_state->best_encoder there is a check for
connector_state->crtc which is properly initialized. I reached the issue
while testing some patches I haven't sent out yet, that remove the usage
of intel_connector->new_encoder from check_digital_port_conflicts(). In
that case, it would be possible to trigger the converted version of the
WARN in that function.
Signed-off-by: default avatarAnder Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
[danvet: Add commit message augmentation Ander supplied.]
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 88ac7939
...@@ -12100,6 +12100,7 @@ intel_modeset_stage_output_state(struct drm_device *dev, ...@@ -12100,6 +12100,7 @@ intel_modeset_stage_output_state(struct drm_device *dev,
connector->encoder = connector->new_encoder; connector->encoder = connector->new_encoder;
} else { } else {
connector_state->crtc = NULL; connector_state->crtc = NULL;
connector_state->best_encoder = NULL;
} }
} }
for_each_intel_crtc(dev, crtc) { for_each_intel_crtc(dev, crtc) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment