LKML Archive on
help / color / mirror / Atom feed
From: Lyude Paul <>
Cc: "Sean Paul" <>,
	"Jani Nikula" <>,
	"Joonas Lahtinen" <>,
	"Rodrigo Vivi" <>,
	"David Airlie" <>,
	"Daniel Vetter" <>,
	"Chris Wilson" <>,
	"Ville Syrjälä" <>,
	"Imre Deak" <>,
	"Maarten Lankhorst" <>,
Subject: [PATCH v2 1/2] drm/i915/dp_mst: Cast intel_connector->port as drm_dp_mst_port
Date: Mon,  6 Apr 2020 16:06:41 -0400	[thread overview]
Message-ID: <> (raw)

The only reason for having this cast as void * before was because we
originally needed to use drm_dp_mst_get_port_validated() and friends in
order to (attempt to) safely access MST ports. However, we've since
improved how reference counting works with ports and mstbs such that we
can now rely on drm_dp_mst_port structs remaining in memory for as long
as the driver needs. This means we don't really need to cast this as
void* anymore, and can just access the struct directly.

We'll also need this for the next commit, so that we can remove

Signed-off-by: Lyude Paul <>
Reviewed-by: Sean Paul <>
 drivers/gpu/drm/i915/display/intel_display_types.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h b/drivers/gpu/drm/i915/display/intel_display_types.h
index 5a0adf14ebef..0ddc98afe252 100644
--- a/drivers/gpu/drm/i915/display/intel_display_types.h
+++ b/drivers/gpu/drm/i915/display/intel_display_types.h
@@ -438,7 +438,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;

             reply	other threads:[~2020-04-06 20:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-06 20:06 Lyude Paul [this message]
2020-04-06 20:06 ` [PATCH v2 2/2] drm/dp_mst: Remove drm_dp_mst_has_audio() Lyude Paul
2020-04-07  6:40 ` [PATCH v2 1/2] drm/i915/dp_mst: Cast intel_connector->port as drm_dp_mst_port Jani Nikula

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
    --subject='Re: [PATCH v2 1/2] drm/i915/dp_mst: Cast intel_connector->port as drm_dp_mst_port' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).