drm/amd/display: Always allocate initial connector state state
authorNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Tue, 4 Jun 2019 19:21:14 +0000 (15:21 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 11 Jun 2019 17:40:21 +0000 (12:40 -0500)
commitf04bee34d6e35df26cbb2d65e801adfd0d8fe20d
treeb2b679cca0d430db03c322f18805c7e6e7343e6d
parent4b7ef85cc65e7ae137c43a0269365289f1b5ee68
drm/amd/display: Always allocate initial connector state state

[Why]
Unlike our regular connectors, MST connectors don't start off with
an initial connector state. This causes a NULL pointer dereference to
occur when attaching the bpc property since it tries to modify the
connector state.

We need an initial connector state on the connector to avoid the crash.

[How]
Use our reset helper to allocate an initial state and reset the values
to their defaults. We were already doing this before, just not for
MST connectors.

Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Reviewed-by: Leo Li <sunpeng.li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c