diff options
| author | Maarten Lankhorst <[email protected]> | 2015-08-27 11:13:31 +0000 |
|---|---|---|
| committer | Jani Nikula <[email protected]> | 2015-09-08 13:16:50 +0000 |
| commit | e85376cbd23299e4d40bace0cb5ab867b270fdbd (patch) | |
| tree | 8d171cd1a671c290e2b7f22162048fd6ef37ac02 /drivers/gpu/drm/i915/intel_dp_mst.c | |
| parent | drm/i915: Pass hpd_status_i915[] to intel_get_hpd_pins() in pre-g4x (diff) | |
| download | kernel-e85376cbd23299e4d40bace0cb5ab867b270fdbd.tar.gz kernel-e85376cbd23299e4d40bace0cb5ab867b270fdbd.zip | |
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 <[email protected]>
Reviewed-by: Ander Conselvan de Oliveira <[email protected]>
Signed-off-by: Jani Nikula <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_dp_mst.c')
| -rw-r--r-- | drivers/gpu/drm/i915/intel_dp_mst.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/intel_dp_mst.c b/drivers/gpu/drm/i915/intel_dp_mst.c index 983553cf8b74..3e4be5a3becd 100644 --- a/drivers/gpu/drm/i915/intel_dp_mst.c +++ b/drivers/gpu/drm/i915/intel_dp_mst.c @@ -173,6 +173,11 @@ static void intel_mst_pre_enable_dp(struct intel_encoder *encoder) return; } + /* MST encoders are bound to a crtc, not to a connector, + * force the mapping here for get_hw_state. + */ + found->encoder = encoder; + DRM_DEBUG_KMS("%d\n", intel_dp->active_mst_links); intel_mst->port = found->port; @@ -400,7 +405,7 @@ static const struct drm_encoder_funcs intel_dp_mst_enc_funcs = { static bool intel_dp_mst_get_hw_state(struct intel_connector *connector) { - if (connector->encoder) { + if (connector->encoder && connector->base.state->crtc) { enum pipe pipe; if (!connector->encoder->get_hw_state(connector->encoder, &pipe)) return false; |
