drm/nouveau: Use atomic VCPI helpers for MST
authorLyude Paul <lyude@redhat.com>
Fri, 11 Jan 2019 00:53:43 +0000 (19:53 -0500)
committerLyude Paul <lyude@redhat.com>
Fri, 11 Jan 2019 01:45:54 +0000 (20:45 -0500)
commit232c9eec417a6591f681f4c2b1f260924845e0a7
tree5ec3eb91b977072f023635df7238b77b08008936
parent5e187a01426d220df1ab3c58f40cefd40094695e
drm/nouveau: Use atomic VCPI helpers for MST

Currently, nouveau uses the yolo method of setting up MST displays: it
uses the old VCPI helpers (drm_dp_find_vcpi_slots()) for computing the
display configuration. These helpers don't take care to make sure they
take a reference to the mstb port that they're checking, and
additionally don't actually check whether or not the topology still has
enough bandwidth to provide the VCPI tokens required.

So, drop usage of the old helpers and move entirely over to the atomic
helpers.

Changes since v6:
* Cleanup atomic check logic and remove a bunch of unneeded checks -
  danvet
Changes since v5:
* Update nv50_msto_atomic_check() and nv50_mstc_atomic_check() to the
  new requirements for drm_dp_atomic_find_vcpi_slots() and
  drm_dp_atomic_release_vcpi_slots()

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