drm/amdgpu/display: create fake mst encoders ahead of time (v4)
authorAlex Deucher <alexander.deucher@amd.com>
Fri, 10 Jul 2020 21:50:00 +0000 (17:50 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 14 Jul 2020 19:11:07 +0000 (15:11 -0400)
commit3168470142e0a82b5732c04ed4c031a9322ae170
tree5925ad5ac4daec912f9986831c145cd24411505c
parentd845a2051b6b673fab4229b920ea04c7c4352b51
drm/amdgpu/display: create fake mst encoders ahead of time (v4)

Prevents a warning in the MST create connector case.

v2: create global fake encoders rather per connector fake encoders
to avoid running out of encoder indices.

v3: use the actual number of crtcs on the asic rather than the max
to conserve encoders.

v4: v3 plus missing hunk I forgot to git add.

Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1108
Fixes: c6385e503aeaf9 ("drm/amdgpu: drop legacy drm load and unload callbacks")
Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org # 5.7.x
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.h