drm/i915: Fix broken mst get_hw_state.
connector->encoder is initialized as NULL. Fix this by setting it in during pre enable. MST connectors are not read out during initial hw readout, and have no fixed encoder mappings. So it's harmless to return false when the connector has never been assigned to an encoder. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Ander Conselvan de Oliveira <conselvan2@gmail.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
This commit is contained in:

committed by
Jani Nikula

parent
4e3d1e26c2
commit
e85376cbd2
@@ -6305,7 +6305,7 @@ static void intel_connector_check_state(struct intel_connector *connector)
|
||||
connector->base.name);
|
||||
|
||||
if (connector->get_hw_state(connector)) {
|
||||
struct drm_encoder *encoder = &connector->encoder->base;
|
||||
struct intel_encoder *encoder = connector->encoder;
|
||||
struct drm_connector_state *conn_state = connector->base.state;
|
||||
|
||||
I915_STATE_WARN(!crtc,
|
||||
@@ -6317,13 +6317,13 @@ static void intel_connector_check_state(struct intel_connector *connector)
|
||||
I915_STATE_WARN(!crtc->state->active,
|
||||
"connector is active, but attached crtc isn't\n");
|
||||
|
||||
if (!encoder)
|
||||
if (!encoder || encoder->type == INTEL_OUTPUT_DP_MST)
|
||||
return;
|
||||
|
||||
I915_STATE_WARN(conn_state->best_encoder != encoder,
|
||||
I915_STATE_WARN(conn_state->best_encoder != &encoder->base,
|
||||
"atomic encoder doesn't match attached encoder\n");
|
||||
|
||||
I915_STATE_WARN(conn_state->crtc != encoder->crtc,
|
||||
I915_STATE_WARN(conn_state->crtc != encoder->base.crtc,
|
||||
"attached encoder crtc differs from connector crtc\n");
|
||||
} else {
|
||||
I915_STATE_WARN(crtc && crtc->state->active,
|
||||
|
Reference in New Issue
Block a user