aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_dp_mst.c
diff options
context:
space:
mode:
authorLyude Paul <lyude@redhat.com>2018-10-08 19:24:34 -0400
committerLyude Paul <lyude@redhat.com>2018-10-09 11:12:23 -0400
commita9f9ca33d1fe9325f414914be526c0fc4ba5281c (patch)
treeebb7b1a173a98b3d995d7d6101ab4841480e42b3 /drivers/gpu/drm/i915/intel_dp_mst.c
parentf67207d78ceaf98b7531bc22df6f21328559c8d4 (diff)
drm/i915: Fix intel_dp_mst_best_encoder()
Currently, i915 appears to rely on blocking modesets on no-longer-present MSTB ports by simply returning NULL for ->best_encoder(), which in turn causes any new atomic commits that don't disable the CRTC to fail. This is wrong however, since we still want to allow userspace to disable CRTCs on no-longer-present MSTB ports by changing the DPMS state to off and this still requires that we retrieve an encoder. So, fix this by always returning a valid encoder regardless of the state of the MST port. Changes since v1: - Remove mst atomic helper, since this got replaced with a much simpler solution Signed-off-by: Lyude Paul <lyude@redhat.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: stable@vger.kernel.org Link: https://patchwork.freedesktop.org/patch/msgid/20181008232437.5571-6-lyude@redhat.com
Diffstat (limited to 'drivers/gpu/drm/i915/intel_dp_mst.c')
-rw-r--r--drivers/gpu/drm/i915/intel_dp_mst.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/intel_dp_mst.c b/drivers/gpu/drm/i915/intel_dp_mst.c
index 0f14c0d1669c..7f155b4f1a7d 100644
--- a/drivers/gpu/drm/i915/intel_dp_mst.c
+++ b/drivers/gpu/drm/i915/intel_dp_mst.c
@@ -404,8 +404,6 @@ static struct drm_encoder *intel_mst_atomic_best_encoder(struct drm_connector *c
404 struct intel_dp *intel_dp = intel_connector->mst_port; 404 struct intel_dp *intel_dp = intel_connector->mst_port;
405 struct intel_crtc *crtc = to_intel_crtc(state->crtc); 405 struct intel_crtc *crtc = to_intel_crtc(state->crtc);
406 406
407 if (!READ_ONCE(connector->registered))
408 return NULL;
409 return &intel_dp->mst_encoders[crtc->pipe]->base.base; 407 return &intel_dp->mst_encoders[crtc->pipe]->base.base;
410} 408}
411 409