60 lines
2.5 KiB
Diff
60 lines
2.5 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Tyler Smith <74526874+tylertms@users.noreply.github.com>
|
|
Date: Sat, 14 Nov 2026 18:00:00 +0000
|
|
Subject: [PATCH] fix(nouveau): read a DisplayPort sink's EDID again without
|
|
zero-sized AUX transfers when the first read over GSP-RM gives none, ending
|
|
each I2C read with MOT cleared as NVIDIA's DisplayPort library does
|
|
|
|
---
|
|
drivers/gpu/drm/nouveau/nouveau_connector.c | 30 +++++++++++++++++++++
|
|
1 file changed, 30 insertions(+)
|
|
|
|
diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.c b/drivers/gpu/drm/nouveau/nouveau_connector.c
|
|
index 4cfc9c7c2ae0c77c64e7efe27d7927999e2a36dd..ea4a6cd1eb0e1a475d9c21cb75c3b8e0f041f34f 100644
|
|
--- a/drivers/gpu/drm/nouveau/nouveau_connector.c
|
|
+++ b/drivers/gpu/drm/nouveau/nouveau_connector.c
|
|
@@ -49,6 +49,8 @@
|
|
#include <nvif/class.h>
|
|
#include <nvif/if0011.h>
|
|
|
|
+#include <subdev/gsp.h>
|
|
+
|
|
struct drm_display_mode *
|
|
nouveau_conn_native_mode(struct drm_connector *connector)
|
|
{
|
|
@@ -598,6 +600,34 @@ nouveau_connector_detect(struct drm_connector *connector, bool force)
|
|
new_edid = drm_get_edid_switcheroo(connector, nv_encoder->i2c);
|
|
else
|
|
new_edid = drm_get_edid(connector, nv_encoder->i2c);
|
|
+
|
|
+ /*
|
|
+ * GSP-RM's DP_AUXCH_CTRL sends an address-only request
|
|
+ * only as an I2C write with MOT=0 (r535_dp_aux_xfer),
|
|
+ * so drm's bare address that ends an I2C read reaches
|
|
+ * the sink as a write start/stop and the read is never
|
|
+ * ended with MOT=0. Some sinks then answer the next
|
|
+ * EDID read from another offset and no block is valid.
|
|
+ * Read such a sink again without zero-sized transfers,
|
|
+ * where the last chunk of each message ends it, as
|
|
+ * NVIDIA's own DisplayPort library reads EDID through
|
|
+ * the same control, and keep that for this connector.
|
|
+ * The first read stays drm's own: without zero-sized
|
|
+ * transfers a segment write ends with a stop, which
|
|
+ * loses EDID blocks past the second.
|
|
+ */
|
|
+ if (!new_edid && nv_encoder->dcb->type == DCB_OUTPUT_DP &&
|
|
+ nv_encoder->i2c == &nv_connector->aux.ddc &&
|
|
+ !nv_connector->aux.no_zero_sized &&
|
|
+ nvkm_gsp_rm(nvxx_device(drm)->gsp)) {
|
|
+ nv_connector->aux.no_zero_sized = true;
|
|
+ new_edid = drm_get_edid(connector, nv_encoder->i2c);
|
|
+ if (new_edid)
|
|
+ NV_INFO(drm, "%s: EDID read without zero-sized AUX transfers\n",
|
|
+ connector->name);
|
|
+ else
|
|
+ nv_connector->aux.no_zero_sized = false;
|
|
+ }
|
|
} else {
|
|
ret = nvif_outp_edid_get(&nv_encoder->outp, (u8 **)&new_edid);
|
|
if (ret < 0) {
|