[1/4] drm/nouveau: dispnv50: Don't create MSTMs for eDP connectors

Submitted by Lyude Paul on Sept. 13, 2019, 10:03 p.m.

Details

Message ID 20190913220355.6883-1-lyude@redhat.com
State New
Headers show
Series "Series without cover letter" ( rev: 2 1 ) in Nouveau

Not browsing as part of any series.

Commit Message

Lyude Paul Sept. 13, 2019, 10:03 p.m.
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
---
 drivers/gpu/drm/nouveau/dispnv50/disp.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c b/drivers/gpu/drm/nouveau/dispnv50/disp.c
index 307584107d77..b46be8a091e9 100644
--- a/drivers/gpu/drm/nouveau/dispnv50/disp.c
+++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c
@@ -1603,7 +1603,8 @@  nv50_sor_create(struct drm_connector *connector, struct dcb_output *dcbe)
 			nv_encoder->aux = aux;
 		}
 
-		if ((data = nvbios_dp_table(bios, &ver, &hdr, &cnt, &len)) &&
+		if (nv_connector->type != DCB_CONNECTOR_eDP &&
+		    (data = nvbios_dp_table(bios, &ver, &hdr, &cnt, &len)) &&
 		    ver >= 0x40 && (nvbios_rd08(bios, data + 0x08) & 0x04)) {
 			ret = nv50_mstm_new(nv_encoder, &nv_connector->aux, 16,
 					    nv_connector->base.base.id,

Comments

Hi,

[This is an automated email]

This commit has been processed because it contains a -stable tag.
The stable tag indicates that it's relevant for the following trees: all

The bot has tested the following trees: v5.2.14, v4.19.72, v4.14.143, v4.9.192, v4.4.192.

v5.2.14: Build OK!
v4.19.72: Build OK!
v4.14.143: Failed to apply! Possible dependencies:
    07bbc1c5f49b ("drm/nouveau/core/memory: split info pointers from accessor pointers")
    0b11b30de9d2 ("drm/nouveau/mmu/nv04-nv4x: move global vmm to nvkm_mmu")
    11fc017dfb1e ("drm/nouveau/kms/nv50: prepare for double-buffered LUTs")
    1590700d94ac ("drm/nouveau/kms/nv50-: split each resource type into their own source files")
    269fe32d3343 ("drm/nouveau/bar: swap oneinit/init ordering, and rename bar3 to bar2")
    30ed49b55b6e ("drm/nouveau/kms/nv50-: move code underneath dispnv50/")
    34508f9d260c ("drm/nouveau/kms/nv50-: determine MST support from DP Info Table")
    5b17f3624efa ("drm/nouveau/mmu/nv04: implement vmm on top of new base")
    5e075fdeb166 ("drm/nouveau/mmu: automatically handle "un-bootstrapping" of vmm")
    6359c982243e ("drm/nouveau/mmu/gp10b: fork from gf100")
    7f53d6dc9a72 ("drm/nouveau/core/memory: comptag allocation")
    806a73356537 ("drm/nouveau/mmu: implement base for new vm management")
    90df522912ac ("drm/nouveau/kms/nv50: use INTERPOLATE_257_UNITY_RANGE LUT on newer chipsets")
    997a89003c2d ("drm/nouveau/core/memory: add reference counting")
    b86a45877ead ("drm/nouveau/mmu/gp100: fork from gf100")
    c83c4097eba8 ("drm/nouveau/mmu: define user interfaces to mmu memory allocation")
    cedc4d57df26 ("drm/nouveau/mmu/gm20b: fork from gf100")
    d1f6c8d2e9df ("drm/nouveau/mmu/gk20a: fork from gf100")
    db018585a51a ("drm/nouveau/mmu/gk104: fork from gf100")
    e1e33c791a23 ("drm/nouveau/mmu/gm200: fork from gf100")
    e69dae85c90b ("drm/nouveau/bar/nv50,g84: drop mmu invalidate")
    e75182f68b7b ("drm/nouveau/kms/nv50: use "low res" lut for indexed mode")
    eaf1a69110f4 ("drm/nouveau/mmu: add base for type-based memory allocation")
    f4778f08a038 ("drm/nouveau/kms/nv50: fix handling of gamma since atomic conversion")
    f5650478ab07 ("drm/nouveau/disp/nv50-: pass nvkm_memory objects for channel push buffers")

v4.9.192: Failed to apply! Possible dependencies:
    11fc017dfb1e ("drm/nouveau/kms/nv50: prepare for double-buffered LUTs")
    34508f9d260c ("drm/nouveau/kms/nv50-: determine MST support from DP Info Table")
    3dbd036b8419 ("drm/nouveau/kms/nv50: separate out mode commit")
    52aa30f2524d ("drm/nouveau/kms/nv50: switch mst sink back into sst mode")
    6bbab3b6b656 ("drm/nouveau/kms/nv50: separate out base/ovly channel usage bounds commit")
    a7ae1561909d ("drm/nouveau/kms/nv50: separate out lut commit")
    ad6336195393 ("drm/nouveau/kms/nv50: separate out core surface commit")
    ea8ee39002a1 ("drm/nouveau/kms/nv50: separate out cursor surface commit")
    f4778f08a038 ("drm/nouveau/kms/nv50: fix handling of gamma since atomic conversion")

v4.4.192: Failed to apply! Possible dependencies:
    13a3d91f17a5 ("drm: Pass 'name' to drm_encoder_init()")
    34508f9d260c ("drm/nouveau/kms/nv50-: determine MST support from DP Info Table")
    3dbd036b8419 ("drm/nouveau/kms/nv50: separate out mode commit")
    52aa30f2524d ("drm/nouveau/kms/nv50: switch mst sink back into sst mode")
    a7ae1561909d ("drm/nouveau/kms/nv50: separate out lut commit")
    ad6336195393 ("drm/nouveau/kms/nv50: separate out core surface commit")
    b516a9efb7af ("drm: Move LEAVE/ENTER_ATOMIC_MODESET to fbdev helpers")
    f4778f08a038 ("drm/nouveau/kms/nv50: fix handling of gamma since atomic conversion")


NOTE: The patch will not be queued to stable trees until it is upstream.

How should we proceed with this patch?

--
Thanks,
Sasha