drm/i915: Fix intel_dp_mst_best_encoder()
authorLyude Paul <lyude@redhat.com>
Mon, 8 Oct 2018 23:24:34 +0000 (19:24 -0400)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Thu, 18 Oct 2018 01:23:55 +0000 (18:23 -0700)
commit4bbf0d4749e707b6b262d576a9a9ef5c63b52dd4
tree5ec92c014341a95b9ef690e325450f2916cd4699
parentc02ba4ef16eefe663fdefcccaa57fad32d5481bf
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
(cherry picked from commit a9f9ca33d1fe9325f414914be526c0fc4ba5281c)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
drivers/gpu/drm/i915/intel_dp_mst.c