drm/nouveau/kms/nv50-: Don't create MSTMs for eDP connectors
authorLyude Paul <lyude@redhat.com>
Fri, 13 Sep 2019 22:03:50 +0000 (18:03 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 11 Oct 2019 16:21:03 +0000 (18:21 +0200)
commit198bc7040c484d4c7be04b4eb64d5c19fbf466ce
tree49bb88fcda89c1784e8fde945684543c4198a20c
parent7a85c86735516cdb4c44b882244fe48f3608ee7d
drm/nouveau/kms/nv50-: Don't create MSTMs for eDP connectors

commit 698c1aa9f83b618de79e9e5e19a58f70a4a6ae0f upstream.

On the ThinkPad P71, we have one eDP connector exposed along with 5 DP
connectors, resulting in a total of 11 TMDS encoders. Since the GPU on
this system is also capable of MST, we create an additional 4 fake MST
encoders for each DP port. Unfortunately, we also do this for the eDP
port as well, resulting in:

  1 eDP port: +1 TMDS encoder
              +4 DPMST encoders
  5 DP ports: +2 TMDS encoders
              +4 DPMST encoders
      *5 ports
      == 35 encoders

Which breaks things, since DRM has a hard coded limit of 32 encoders.
So, fix this by not creating MSTMs for any eDP connectors. This brings
us down to 31 encoders, although we can do better.

This fixes driver probing for nouveau on the ThinkPad P71.

Signed-off-by: Lyude Paul <lyude@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/nouveau/dispnv50/disp.c