Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f6764815 authored by Lyude Paul's avatar Lyude Paul
Browse files

drm/dp_mst: Remove all evil duplicate state pointers



There's no reason to track the atomic state three times. Unfortunately,
this is currently what we're doing, and even worse is that there is only
one actually correct state pointer: the one in mst_state->base.state.
mgr->state never seems to be used, along with the one in
mst_state->state.

This confused me for over 4 hours until I realized there was no magic
behind these pointers. So, let's save everyone else from the trouble.

Signed-off-by: default avatarLyude Paul <lyude@redhat.com&gt;.>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20181023231251.16883-3-lyude@redhat.com
parent e4b0c868
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -409,7 +409,6 @@ struct drm_dp_payload {
struct drm_dp_mst_topology_state {
	struct drm_private_state base;
	int avail_slots;
	struct drm_atomic_state *state;
	struct drm_dp_mst_topology_mgr *mgr;
};

@@ -497,11 +496,6 @@ struct drm_dp_mst_topology_mgr {
	 */
	int pbn_div;

	/**
	 * @state: State information for topology manager
	 */
	struct drm_dp_mst_topology_state *state;

	/**
	 * @funcs: Atomic helper callbacks
	 */