Skip to contentSkip to conversation

drm/dp_mst: Remove drm_dp_mst_has_audio()

PATCH In review Lyude Paul 3 participants 4 messages Apr 3, 2020 – Apr 6, 2020

Subsystems (4)
lore
Share & tools
lore

Lyude Paul

author
#0 lore raw

PATCH 1/1 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.

Cc "Lee, Shawn C" <[email protected]>
Cc Sean Paul <[email protected]>
---
 drivers/gpu/drm/drm_dp_mst_topology.c         | 21 -------------------
 .../drm/i915/display/intel_display_debugfs.c  | 10 ++-------
 .../drm/i915/display/intel_display_types.h    |  2 +-
 drivers/gpu/drm/i915/display/intel_dp_mst.c   |  3 +--
 include/drm/drm_dp_mst_helper.h               |  2 --
 5 files changed, 4 insertions(+), 34 deletions(-)
drivers/gpu/drm/drm_dp_mst_topology.c +0 -21
index 1ff49547b2e8..129126091e90 100644
@@ -4063,27 +4063,6 @@ drm_dp_mst_detect_port(struct drm_connector *connector,
 }
 EXPORT_SYMBOL(drm_dp_mst_detect_port);
 
-/**
- * drm_dp_mst_port_has_audio() - Check whether port has audio capability or not
- * @mgr: manager for this port
- * @port: unverified pointer to a port.
- *
- * This returns whether the port supports audio or not.
- */
-bool drm_dp_mst_port_has_audio(struct drm_dp_mst_topology_mgr *mgr,
-					struct drm_dp_mst_port *port)
-{
-	bool ret = false;
-
-	port = drm_dp_mst_topology_get_port_validated(mgr, port);
-	if (!port)
-		return ret;
-	ret = port->has_audio;
-	drm_dp_mst_topology_put_port(port);
-	return ret;
-}
-EXPORT_SYMBOL(drm_dp_mst_port_has_audio);
-
 /**
  * drm_dp_mst_get_edid() - get EDID for an MST port
  * @connector: toplevel connector to get EDID for
drivers/gpu/drm/i915/display/intel_display_debugfs.c +2 -8
index 424f4e52f783..9f736420d83f 100644
@@ -631,15 +631,9 @@ static void intel_dp_info(struct seq_file *m,
 }
 
 static void intel_dp_mst_info(struct seq_file *m,
-			  struct intel_connector *intel_connector)
+			      struct intel_connector *intel_connector)
 {
-	struct intel_encoder *intel_encoder = intel_attached_encoder(intel_connector);
-	struct intel_dp_mst_encoder *intel_mst =
-		enc_to_mst(intel_encoder);
-	struct intel_digital_port *intel_dig_port = intel_mst->primary;
-	struct intel_dp *intel_dp = &intel_dig_port->dp;
-	bool has_audio = drm_dp_mst_port_has_audio(&intel_dp->mst_mgr,
-					intel_connector->port);
+	bool has_audio = intel_connector->port->has_audio;
 
 	seq_printf(m, "\taudio support: %s\n", yesno(has_audio));
 }
drivers/gpu/drm/i915/display/intel_display_types.h +1 -1
index 2bedd626c686..1de7bef0a49b 100644
@@ -436,7 +436,7 @@ struct intel_connector {
 	   state of connector->polled in case hotplug storm detection changes it */
 	u8 polled;
 
-	void *port; /* store this opaque as its illegal to dereference it */
+	struct drm_dp_mst_port *port;
 
 	struct intel_dp *mst_port;
 
drivers/gpu/drm/i915/display/intel_dp_mst.c +1 -2
index 61605eb8c2af..c35efc9e628d 100644
@@ -114,8 +114,7 @@ static int intel_dp_mst_compute_config(struct intel_encoder *encoder,
 
 	if (intel_conn_state->force_audio == HDMI_AUDIO_AUTO)
 		pipe_config->has_audio =
-			drm_dp_mst_port_has_audio(&intel_dp->mst_mgr,
-						  connector->port);
+			connector->port->has_audio;
 	else
 		pipe_config->has_audio =
 			intel_conn_state->force_audio == HDMI_AUDIO_ON;
include/drm/drm_dp_mst_helper.h +0 -2
index 7af51c947b81..2d7c26592c05 100644
@@ -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);
 
 
Signature · 6 lines
2.25.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#1 lore raw

[Intel-gfx] ✓ Fi.CI.BAT: success for drm/dp_mst: Remove drm_dp_mst_has_audio()

== Series Details ==

== Series Details ==

Series: drm/dp_mst: Remove drm_dp_mst_has_audio()
URL : https://patchwork.freedesktop.org/series/75488/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_8252 -> Patchwork_17209
====================================================

Summary
-------

**SUCCESS**

No regressions found.

External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17209/index.html

Possible new issues
-------------------

Here are the unknown changes that may have been introduced in Patchwork_17209:

### IGT changes ###

#### Suppressed ####

The following results come from untrusted machines, tests, or statuses. They do not affect the overall result.

* {igt@gem_wait@busy@all}:
- fi-bwr-2160: [PASS][1] -> [FAIL][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8252/fi-bwr-2160/igt@gem_wait@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17209/fi-bwr-2160/igt@gem_wait@[email protected]

Known issues
------------

Here are the changes found in Patchwork_17209 that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@i915_pm_rpm@module-reload:
- fi-icl-dsi: [PASS][3] -> [INCOMPLETE][4] ([i915#189])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8252/fi-icl-dsi/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17209/fi-icl-dsi/igt@[email protected]

{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).

[i915#189]: https://gitlab.freedesktop.org/drm/intel/issues/189

Participating hosts (51 -> 39)
------------------------------

Missing (12): fi-ilk-m540 fi-bdw-5557u fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-bsw-kefka fi-skl-lmem fi-kbl-7560u fi-byt-n2820 fi-byt-clapper fi-bsw-nick fi-bdw-samus

Build changes
-------------

* CI: CI-20190529 -> None
* Linux: CI_DRM_8252 -> Patchwork_17209

CI-20190529: 20190529
CI_DRM_8252: 3690abb8ed49d9a066f80de39e4e75792c86ac76 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5563: 7ab7807727262b7ed7e12197b78e867287a17ef6 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_17209: 021adaffa4ba4407444a9fec8a29e2c5cba3f755 @ git://anongit.freedesktop.org/gfx-ci/linux

== Linux commits ==

021adaffa4ba drm/dp_mst: Remove drm_dp_mst_has_audio()

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17209/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#2 lore raw

[Intel-gfx] ✓ Fi.CI.IGT: success for drm/dp_mst: Remove drm_dp_mst_has_audio()

In reply to Lyude Paul
== Series Details ==

== Series Details ==

Series: drm/dp_mst: Remove drm_dp_mst_has_audio()
URL : https://patchwork.freedesktop.org/series/75488/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_8252_full -> Patchwork_17209_full
====================================================

Summary
-------

**SUCCESS**

No regressions found.

New tests
---------

New tests have been introduced between CI_DRM_8252_full and Patchwork_17209_full:

### New IGT tests (3) ###

* igt@prime_busy@after-wait:
- Statuses :
- Exec time: [None] s

* igt@prime_busy@before:
- Statuses :
- Exec time: [None] s

* igt@prime_busy@hang-wait:
- Statuses :
- Exec time: [None] s

Known issues
------------

Here are the changes found in Patchwork_17209_full that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@gem_ctx_persistence@engines-mixed-process@rcs0:
- shard-apl: [PASS][1] -> [FAIL][2] ([i915#1528])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8252/shard-apl4/igt@gem_ctx_persistence@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17209/shard-apl3/igt@gem_ctx_persistence@[email protected]

* igt@gem_workarounds@suspend-resume-context:
- shard-apl: [PASS][3] -> [DMESG-WARN][4] ([i915#180]) +2 similar issues
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8252/shard-apl3/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17209/shard-apl6/igt@[email protected]

* igt@kms_cursor_crc@pipe-a-cursor-256x256-onscreen:
- shard-apl: [PASS][5] -> [FAIL][6] ([i915#54] / [i915#95])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8252/shard-apl7/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17209/shard-apl4/igt@[email protected]

* igt@kms_cursor_crc@pipe-a-cursor-suspend:
- shard-kbl: [PASS][7] -> [DMESG-WARN][8] ([i915#180]) +3 similar issues
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8252/shard-kbl3/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17209/shard-kbl7/igt@[email protected]

* igt@kms_cursor_crc@pipe-b-cursor-suspend:
- shard-skl: [PASS][9] -> [INCOMPLETE][10] ([i915#300])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8252/shard-skl10/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17209/shard-skl6/igt@[email protected]

* igt@kms_cursor_crc@pipe-c-cursor-64x21-offscreen:
- shard-skl: [PASS][11] -> [FAIL][12] ([i915#54])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8252/shard-skl2/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17209/shard-skl8/igt@[email protected]

* igt@kms_flip@flip-vs-expired-vblank:
- shard-glk: [PASS][13] -> [FAIL][14] ([i915#79])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8252/shard-glk8/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17209/shard-glk8/igt@[email protected]

* igt@kms_frontbuffer_tracking@fbc-suspend:
- shard-apl: [PASS][15] -> [DMESG-WARN][16] ([i915#180] / [i915#95])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8252/shard-apl6/igt@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17209/shard-apl6/igt@[email protected]

* igt@kms_plane_alpha_blend@pipe-c-coverage-7efc:
- shard-skl: [PASS][17] -> [FAIL][18] ([fdo#108145] / [i915#265]) +2 similar issues
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8252/shard-skl3/igt@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17209/shard-skl9/igt@[email protected]

* igt@kms_psr@psr2_primary_page_flip:
- shard-iclb: [PASS][19] -> [SKIP][20] ([fdo#109441]) +3 similar issues
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8252/shard-iclb2/igt@kms_psr@psr2_primary_page_flip.html
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17209/shard-iclb8/igt@kms_psr@psr2_primary_page_flip.html

#### Possible fixes ####

* {igt@gem_ctx_isolation@preservation-s3@bcs0}:
- shard-kbl: [DMESG-WARN][21] ([i915#180]) -> [PASS][22] +6 similar issues
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8252/shard-kbl4/igt@gem_ctx_isolation@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17209/shard-kbl6/igt@gem_ctx_isolation@[email protected]

* igt@gem_exec_balancer@smoke:
- shard-iclb: [SKIP][23] ([fdo#110854]) -> [PASS][24]
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8252/shard-iclb5/igt@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17209/shard-iclb1/igt@[email protected]

* igt@gem_exec_params@invalid-bsd-ring:
- shard-iclb: [SKIP][25] ([fdo#109276]) -> [PASS][26]
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8252/shard-iclb8/igt@[email protected]
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17209/shard-iclb1/igt@[email protected]

* igt@i915_suspend@debugfs-reader:
- shard-skl: [INCOMPLETE][27] ([i915#69]) -> [PASS][28]
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8252/shard-skl8/igt@[email protected]
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17209/shard-skl9/igt@[email protected]

* igt@kms_flip@2x-flip-vs-expired-vblank:
- shard-glk: [FAIL][29] ([i915#79]) -> [PASS][30]
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8252/shard-glk2/igt@[email protected]
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17209/shard-glk1/igt@[email protected]

* igt@kms_hdr@bpc-switch-dpms:
- shard-apl: [FAIL][31] ([i915#1188]) -> [PASS][32]
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8252/shard-apl2/igt@[email protected]
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17209/shard-apl8/igt@[email protected]

* igt@kms_hdr@bpc-switch-suspend:
- shard-skl: [FAIL][33] ([i915#1188]) -> [PASS][34]
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8252/shard-skl6/igt@[email protected]
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17209/shard-skl3/igt@[email protected]

* igt@kms_plane@plane-panning-bottom-right-suspend-pipe-c-planes:
- shard-apl: [DMESG-WARN][35] ([i915#180]) -> [PASS][36] +1 similar issue
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8252/shard-apl4/igt@[email protected]
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17209/shard-apl1/igt@[email protected]

* igt@kms_plane_lowres@pipe-a-tiling-x:
- shard-glk: [FAIL][37] ([i915#899]) -> [PASS][38]
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8252/shard-glk6/igt@[email protected]
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17209/shard-glk5/igt@[email protected]

* igt@kms_psr@psr2_no_drrs:
- shard-iclb: [SKIP][39] ([fdo#109441]) -> [PASS][40] +2 similar issues
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8252/shard-iclb1/igt@kms_psr@psr2_no_drrs.html
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17209/shard-iclb2/igt@kms_psr@psr2_no_drrs.html

* {igt@perf@polling-parameterized}:
- shard-iclb: [FAIL][41] ([i915#1542]) -> [PASS][42]
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8252/shard-iclb5/igt@[email protected]
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17209/shard-iclb3/igt@[email protected]

{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).

[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[fdo#110854]: https://bugs.freedesktop.org/show_bug.cgi?id=110854
[i915#1188]: https://gitlab.freedesktop.org/drm/intel/issues/1188
[i915#1528]: https://gitlab.freedesktop.org/drm/intel/issues/1528
[i915#1542]: https://gitlab.freedesktop.org/drm/intel/issues/1542
[i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180
[i915#265]: https://gitlab.freedesktop.org/drm/intel/issues/265
[i915#300]: https://gitlab.freedesktop.org/drm/intel/issues/300
[i915#54]: https://gitlab.freedesktop.org/drm/intel/issues/54
[i915#69]: https://gitlab.freedesktop.org/drm/intel/issues/69
[i915#79]: https://gitlab.freedesktop.org/drm/intel/issues/79
[i915#899]: https://gitlab.freedesktop.org/drm/intel/issues/899
[i915#95]: https://gitlab.freedesktop.org/drm/intel/issues/95

Participating hosts (10 -> 10)
------------------------------

No changes in participating hosts

Build changes
-------------

* CI: CI-20190529 -> None
* Linux: CI_DRM_8252 -> Patchwork_17209

CI-20190529: 20190529
CI_DRM_8252: 3690abb8ed49d9a066f80de39e4e75792c86ac76 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5563: 7ab7807727262b7ed7e12197b78e867287a17ef6 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_17209: 021adaffa4ba4407444a9fec8a29e2c5cba3f755 @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17209/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reviewed-by on v1 1/1
#3 lore raw
In reply to Lyude Paul
Quoted 8 lines · Lyude Paul

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.

Quoted 6 lines

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.

This is kind of burying the lede. I'd almost prefer a 2 patch series:

drm/i915: Allow connectors to directly access drm_dp_mst_port drm/dp_mst: Remove unused drm_dp_mst_port_has_audio()

That way if anyone objects to the idea of accessing mst_port directly from i915 driver, it's more obvious from the patch subject.

Nitpicks aside, the code looks good to me, it's a nice cleanup!

Quoted 106 lines
Cc "Lee, Shawn C" <[email protected]>
Cc Sean Paul <[email protected]>
---
 drivers/gpu/drm/drm_dp_mst_topology.c         | 21 -------------------
 .../drm/i915/display/intel_display_debugfs.c  | 10 ++-------
 .../drm/i915/display/intel_display_types.h    |  2 +-
 drivers/gpu/drm/i915/display/intel_dp_mst.c   |  3 +--
 include/drm/drm_dp_mst_helper.h               |  2 --
 5 files changed, 4 insertions(+), 34 deletions(-)
drivers/gpu/drm/drm_dp_mst_topology.c +0 -21
index 1ff49547b2e8..129126091e90 100644
@@ -4063,27 +4063,6 @@ drm_dp_mst_detect_port(struct drm_connector *connector,
 }
 EXPORT_SYMBOL(drm_dp_mst_detect_port);
 
-/**
- * drm_dp_mst_port_has_audio() - Check whether port has audio capability or not
- * @mgr: manager for this port
- * @port: unverified pointer to a port.
- *
- * This returns whether the port supports audio or not.
- */
-bool drm_dp_mst_port_has_audio(struct drm_dp_mst_topology_mgr *mgr,
-                                       struct drm_dp_mst_port *port)
-{
-       bool ret = false;
-
-       port = drm_dp_mst_topology_get_port_validated(mgr, port);
-       if (!port)
-               return ret;
-       ret = port->has_audio;
-       drm_dp_mst_topology_put_port(port);
-       return ret;
-}
-EXPORT_SYMBOL(drm_dp_mst_port_has_audio);
-
 /**
  * drm_dp_mst_get_edid() - get EDID for an MST port
  * @connector: toplevel connector to get EDID for
drivers/gpu/drm/i915/display/intel_display_debugfs.c +2 -8
index 424f4e52f783..9f736420d83f 100644
@@ -631,15 +631,9 @@ static void intel_dp_info(struct seq_file *m,
 }
 
 static void intel_dp_mst_info(struct seq_file *m,
-                         struct intel_connector *intel_connector)
+                             struct intel_connector *intel_connector)
 {
-       struct intel_encoder *intel_encoder = intel_attached_encoder(intel_connector);
-       struct intel_dp_mst_encoder *intel_mst =
-               enc_to_mst(intel_encoder);
-       struct intel_digital_port *intel_dig_port = intel_mst->primary;
-       struct intel_dp *intel_dp = &intel_dig_port->dp;
-       bool has_audio = drm_dp_mst_port_has_audio(&intel_dp->mst_mgr,
-                                       intel_connector->port);
+       bool has_audio = intel_connector->port->has_audio;
 
        seq_printf(m, "\taudio support: %s\n", yesno(has_audio));
 }
drivers/gpu/drm/i915/display/intel_display_types.h +1 -1
index 2bedd626c686..1de7bef0a49b 100644
@@ -436,7 +436,7 @@ struct intel_connector {
           state of connector->polled in case hotplug storm detection changes it */
        u8 polled;
 
-       void *port; /* store this opaque as its illegal to dereference it */
+       struct drm_dp_mst_port *port;
 
        struct intel_dp *mst_port;
 
drivers/gpu/drm/i915/display/intel_dp_mst.c +1 -2
index 61605eb8c2af..c35efc9e628d 100644
@@ -114,8 +114,7 @@ static int intel_dp_mst_compute_config(struct intel_encoder *encoder,
 
        if (intel_conn_state->force_audio == HDMI_AUDIO_AUTO)
                pipe_config->has_audio =
-                       drm_dp_mst_port_has_audio(&intel_dp->mst_mgr,
-                                                 connector->port);
+                       connector->port->has_audio;
        else
                pipe_config->has_audio =
                        intel_conn_state->force_audio == HDMI_AUDIO_ON;
include/drm/drm_dp_mst_helper.h +0 -3
index 7af51c947b81..2d7c26592c05 100644
@@ -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);
 
 
--
Quoted 2 lines

2.25.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx