diff options
author | Lyude Paul <lyude@redhat.com> | 2020-04-06 22:06:42 +0200 |
---|---|---|
committer | Lyude Paul <lyude@redhat.com> | 2020-04-07 20:30:13 +0200 |
commit | 20c22ad3295766b9a7f6da29b3620f570993c2f3 (patch) | |
tree | 3bbadbd849c913922bb4f4d4e1d4265e7df0a8d1 /include/drm | |
parent | drm/i915/dp_mst: Cast intel_connector->port as drm_dp_mst_port (diff) | |
download | linux-20c22ad3295766b9a7f6da29b3620f570993c2f3.tar.xz linux-20c22ad3295766b9a7f6da29b3620f570993c2f3.zip |
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
Diffstat (limited to 'include/drm')
-rw-r--r-- | include/drm/drm_dp_mst_helper.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/include/drm/drm_dp_mst_helper.h b/include/drm/drm_dp_mst_helper.h index e36e53de269e..e689f8d25869 100644 --- a/include/drm/drm_dp_mst_helper.h +++ b/include/drm/drm_dp_mst_helper.h @@ -732,8 +732,6 @@ drm_dp_mst_detect_port(struct drm_connector *connector, struct drm_dp_mst_topology_mgr *mgr, struct drm_dp_mst_port *port); -bool drm_dp_mst_port_has_audio(struct drm_dp_mst_topology_mgr *mgr, - struct drm_dp_mst_port *port); struct edid *drm_dp_mst_get_edid(struct drm_connector *connector, struct drm_dp_mst_topology_mgr *mgr, struct drm_dp_mst_port *port); |