drm/nouveau: Stop unsetting mstc->port, use malloc refs
authorLyude Paul <lyude@redhat.com>
Fri, 11 Jan 2019 00:53:38 +0000 (19:53 -0500)
committerLyude Paul <lyude@redhat.com>
Fri, 11 Jan 2019 01:38:30 +0000 (20:38 -0500)
commitd79a3c52f34b648c56794e14364cc5169af2202f
tree15e307bc7f4aa6b86bb85190a2e7b9b4701997d3
parent81640f01c2aa47190d0f8efe3ee8ef307167efec
drm/nouveau: Stop unsetting mstc->port, use malloc refs

Same as we did for i915, but for nouveau this time. Additionally, we
grab a malloc reference to the port that lasts for the entire lifetime
of nv50_mstc, which gives us the guarantee that mstc->port will always
point to valid memory for as long as the mstc stays around.

Signed-off-by: Lyude Paul <lyude@redhat.com>
Reviewed-by: Ben Skeggs <bskeggs@redhat.com>
Cc: 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-16-lyude@redhat.com
drivers/gpu/drm/nouveau/dispnv50/disp.c