Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Lyude Paul <lyude@redhat.com>
To: dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org,
	nouveau@lists.freedesktop.org
Subject: [PATCH 6/6] drm/i915: Start using struct drm_dp_mst_port again
Date: Fri, 16 Nov 2018 19:21:20 -0500	[thread overview]
Message-ID: <20181117002120.28703-7-lyude@redhat.com> (raw)
In-Reply-To: <20181117002120.28703-1-lyude@redhat.com>

Originally we started storing pointers to the drm_dp_mst_port struct for
each intel_connector as void* to stop people from trying to dereference
them. Now that we've removed the public struct definition for
drm_dp_mst_port however, it's no longer possible to dereference the port
structure even when using the proper type. So, move back to struct
drm_dp_mst_port from void* for clarity.

Signed-off-by: Lyude Paul <lyude@redhat.com>
---
 drivers/gpu/drm/i915/intel_dp_mst.c | 2 +-
 drivers/gpu/drm/i915/intel_drv.h    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_dp_mst.c b/drivers/gpu/drm/i915/intel_dp_mst.c
index 4de247ddf05f..3408efe67694 100644
--- a/drivers/gpu/drm/i915/intel_dp_mst.c
+++ b/drivers/gpu/drm/i915/intel_dp_mst.c
@@ -39,7 +39,7 @@ static bool intel_dp_mst_compute_config(struct intel_encoder *encoder,
 	struct intel_digital_port *intel_dig_port = intel_mst->primary;
 	struct intel_dp *intel_dp = &intel_dig_port->dp;
 	struct drm_connector *connector = conn_state->connector;
-	void *port = to_intel_connector(connector)->port;
+	struct drm_dp_mst_port *port = to_intel_connector(connector)->port;
 	struct drm_atomic_state *state = pipe_config->base.state;
 	int bpp;
 	int lane_count, slots = 0;
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index f575ba2a59da..1bb69097d6cb 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -415,7 +415,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;
 
-- 
2.19.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2018-11-17  0:21 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-17  0:21 [PATCH 0/6] Remove all bad dp_mst_port uses and hide struct def Lyude Paul
2018-11-17  0:21 ` [PATCH 1/6] drm/dp_mst: Add drm_dp_get_payload_info() Lyude Paul
     [not found]   ` <20181117002120.28703-2-lyude-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2018-11-27 21:23     ` Daniel Vetter
2018-11-27 21:28       ` [Nouveau] " Lyude Paul
     [not found] ` <20181117002120.28703-1-lyude-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2018-11-17  0:21   ` [PATCH 2/6] drm/nouveau: Use drm_dp_get_payload_info() for getting payload/vcpi Lyude Paul
2018-11-17  0:21   ` [PATCH 5/6] drm/dp_mst: Hide drm_dp_mst_port contents from drivers Lyude Paul
2018-11-24 15:55   ` [PATCH 0/6] Remove all bad dp_mst_port uses and hide struct def Karol Herbst
2018-11-17  0:21 ` [PATCH 3/6] drm/nouveau: Stop reading port->mgr in nv50_mstc_get_modes() Lyude Paul
2018-11-17 12:24   ` Sasha Levin
2018-11-17  0:21 ` [PATCH 4/6] drm/nouveau: Stop reading port->mgr in nv50_mstc_detect() Lyude Paul
2018-11-17 12:24   ` Sasha Levin
2018-11-27 18:28     ` Lyude Paul
2018-11-17  0:21 ` Lyude Paul [this message]
2018-11-17  0:52 ` ✓ Fi.CI.BAT: success for Remove all bad dp_mst_port uses and hide struct def Patchwork
2018-11-17 10:08 ` ✓ Fi.CI.IGT: " Patchwork
2018-11-27 22:17 ` [PATCH 0/6] " Ben Skeggs

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=20181117002120.28703-7-lyude@redhat.com \
    --to=lyude@redhat.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=nouveau@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox