drm/dp_mst: Remove drm_dp_mst_has_audio()
authorLyude Paul <lyude@redhat.com>
Mon, 6 Apr 2020 20:06:42 +0000 (16:06 -0400)
committerLyude Paul <lyude@redhat.com>
Tue, 7 Apr 2020 18:30:13 +0000 (14:30 -0400)
commit20c22ad3295766b9a7f6da29b3620f570993c2f3
tree3bbadbd849c913922bb4f4d4e1d4265e7df0a8d1
parent75727b30809266decfe21ed1143ef5cfd27bac89
drm/dp_mst: Remove drm_dp_mst_has_audio()

Drive-by fix I noticed the other day - drm_dp_mst_has_audio() only ever
made sense back when we still had to validate ports before accessing
them in order to (attempt to) avoid NULL dereferences. Since we have
proper reference counting that guarantees we always can safely access
the MST port, there's no use in keeping this function around as all it
does is validate the port pointer before checking the audio status.

Note - drm_dp_mst_port->has_audio is technically protected by
drm_device->mode_config.connection_mutex, since it's only ever updated
from drm_dp_mst_get_edid(). Additionally, we change the declaration for
port in struct intel_connector to be properly typed, so we can directly
access it.

Changes since v1:
* Change type of intel_connector->port in a separate patch - Sean Paul

Cc: "Lee, Shawn C" <shawn.c.lee@intel.com>
Reviewed-by: Sean Paul <sean@poorly.run>
Signed-off-by: Lyude Paul <lyude@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200406200646.1263435-2-lyude@redhat.com
drivers/gpu/drm/drm_dp_mst_topology.c
drivers/gpu/drm/i915/display/intel_display_debugfs.c
drivers/gpu/drm/i915/display/intel_dp_mst.c
include/drm/drm_dp_mst_helper.h