summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLyude Paul <lyude@redhat.com>2018-10-08 19:24:34 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-09-16 08:21:51 +0200
commit4b2dfc0e2d44e7fdd8fd5d6b1d25eef0c10cf3f7 (patch)
tree6cf5d6cc9a8c5c0152e486d1168c9c9396f23758
parent796469e361ed70d19d35b564a440befc5883a32b (diff)
downloadlinux-stable-4b2dfc0e2d44e7fdd8fd5d6b1d25eef0c10cf3f7.tar.gz
linux-stable-4b2dfc0e2d44e7fdd8fd5d6b1d25eef0c10cf3f7.tar.bz2
linux-stable-4b2dfc0e2d44e7fdd8fd5d6b1d25eef0c10cf3f7.zip
drm/i915: Fix intel_dp_mst_best_encoder()
[ Upstream commit a9f9ca33d1fe9325f414914be526c0fc4ba5281c ] 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 Signed-off-by: Sasha Levin <sashal@kernel.org>
-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 1fec0c71b4d9..58ba14966d4f 100644
--- a/drivers/gpu/drm/i915/intel_dp_mst.c
+++ b/drivers/gpu/drm/i915/intel_dp_mst.c
@@ -408,8 +408,6 @@ static struct drm_encoder *intel_mst_atomic_best_encoder(struct drm_connector *c
struct intel_dp *intel_dp = intel_connector->mst_port;
struct intel_crtc *crtc = to_intel_crtc(state->crtc);
- if (!READ_ONCE(connector->registered))
- return NULL;
return &intel_dp->mst_encoders[crtc->pipe]->base.base;
}