drm/i915: Set best_encoder field of connector_state also when disabling
authorAnder Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Tue, 31 Mar 2015 08:35:00 +0000 (11:35 +0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 1 Apr 2015 12:14:58 +0000 (14:14 +0200)
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: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
[danvet: Add commit message augmentation Ander supplied.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_display.c

index d3cdc12a6330c6d62e7c710c25041bd325fc687a..84f5b417ad3cb90a4b8130ce720973b3a0b6e77d 100644 (file)
@@ -12100,6 +12100,7 @@ intel_modeset_stage_output_state(struct drm_device *dev,
                                connector->encoder = connector->new_encoder;
                } else {
                        connector_state->crtc = NULL;
+                       connector_state->best_encoder = NULL;
                }
        }
        for_each_intel_crtc(dev, crtc) {
This page took 0.032175 seconds and 5 git commands to generate.