drm/i915: Don't unset intel_connector->mst_port
authorLyude Paul <lyude@redhat.com>
Mon, 8 Oct 2018 23:24:32 +0000 (19:24 -0400)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Thu, 18 Oct 2018 01:23:50 +0000 (18:23 -0700)
commit80c188695a77eddaa6e8885510ff4ef59fd478c3
treea44fa5ca14184c2f8bbb5c88825a5d3076076ba4
parent708ea872601e56ef9ea8398c5a11938482bcbb4d
drm/i915: Don't unset intel_connector->mst_port

Currently we set intel_connector->mst_port to NULL to signify that the
MST port has been removed from the system so that we can prevent further
action on the port such as connector probes, mode probing, etc.
However, we're going to need access to intel_connector->mst_port in
order to fixup ->best_encoder() so that it can always return the correct
encoder for an MST port to prevent legacy DPMS prop changes from
failing. This should be safe, so instead keep intel_connector->mst_port
always set and instead just check the status of
drm_connector->regustered to signify whether or not the connector has
disappeared from the system.

Changes since v2:
- Add a comment to mst_port_gone (Jani Nikula)
- Change mst_port_gone to a u8 instead of a bool, per the kernel bot.
  Apparently bool is discouraged in structs these days
Changes since v4:
- Don't use mst_port_gone at all! Just check if the connector is
  registered or not - Daniel Vetter

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-4-lyude@redhat.com
(cherry picked from commit 6ed5bb1fbad34382c8cfe9a9bf737e9a43053df5)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
drivers/gpu/drm/i915/intel_dp_mst.c