diff options
author | Lyude Paul <lyude@redhat.com> | 2019-01-10 19:53:33 -0500 |
---|---|---|
committer | Lyude Paul <lyude@redhat.com> | 2019-01-10 20:12:23 -0500 |
commit | 79a47cd36c8ddbf4435cd658d00c61cc2d9741cd (patch) | |
tree | 0567a4747e4e4a458f86bde93d75497d2074ebd4 /drivers/gpu/drm/i915/intel_dp_mst.c | |
parent | cfe9f90358d97a83253443b0182bff1222d3a7ac (diff) | |
download | linux-stable-79a47cd36c8ddbf4435cd658d00c61cc2d9741cd.tar.gz linux-stable-79a47cd36c8ddbf4435cd658d00c61cc2d9741cd.tar.bz2 linux-stable-79a47cd36c8ddbf4435cd658d00c61cc2d9741cd.zip |
drm/i915: Keep malloc references to MST ports
So that the ports stay around until we've destroyed the connectors, in
order to ensure that we don't pass an invalid pointer to any MST helpers
once we introduce the new MST VCPI helpers.
Changes since v1:
* Move drm_dp_mst_get_port_malloc() to where we assign
intel_connector->port - danvet
Signed-off-by: Lyude Paul <lyude@redhat.com>
Reviewed-by: Daniel Vetter <daniel@ffwll.ch>
Cc: David Airlie <airlied@redhat.com>
Cc: Jerry Zuo <Jerry.Zuo@amd.com>
Cc: Harry Wentland <harry.wentland@amd.com>
Cc: Juston Li <juston.li@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190111005343.17443-11-lyude@redhat.com
Diffstat (limited to 'drivers/gpu/drm/i915/intel_dp_mst.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_dp_mst.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_dp_mst.c b/drivers/gpu/drm/i915/intel_dp_mst.c index f05427b74e34..631fd1537252 100644 --- a/drivers/gpu/drm/i915/intel_dp_mst.c +++ b/drivers/gpu/drm/i915/intel_dp_mst.c @@ -457,6 +457,7 @@ static struct drm_connector *intel_dp_add_mst_connector(struct drm_dp_mst_topolo intel_connector->get_hw_state = intel_dp_mst_get_hw_state; intel_connector->mst_port = intel_dp; intel_connector->port = port; + drm_dp_mst_get_port_malloc(port); connector = &intel_connector->base; ret = drm_connector_init(dev, connector, &intel_dp_mst_connector_funcs, |