I got bored, and started messing with the code. Found a
apply_dcb_connector_quirks function on nouveau_bios.c, made by Ben
Skeggs to fix a similar problem I had with a different card, and seems
pretty easy to extend it for this new card. But my C skills are very
rusty and it feels "too easy" to be true, so now it scares me to build
and run my own patch.

Can somebody have a look at it and hit me in the head if I'm doing it wrong?


-- 
GatoLoko


diff --git a/drivers/gpu/drm/nouveau/nouveau_bios.c b/drivers/gpu/drm/nouveau/nouveau_bios.c
index 7b7a184..d37ddc9 100644
--- a/drivers/gpu/drm/nouveau/nouveau_bios.c
+++ b/drivers/gpu/drm/nouveau/nouveau_bios.c
@@ -5948,6 +5948,13 @@ apply_dcb_connector_quirks(struct nvbios *bios, int idx)
 		if (cte->type == DCB_CONNECTOR_HDMI_1)
 			cte->type = DCB_CONNECTOR_DVI_I;
 	}
+	/* XFX GT-240X-YA */
+	if (nv_match_device(dev, 0x0ca3, 0x1682, 0x3003)) {
+		if (cte->type == DCB_CONNECTOR_DVI_I_1)
+			cte->type = DCB_CONNECTOR_VGA;
+		if (cte->type == DCB_CONNECTOR_VGA_1)
+			cte->type = DCB_CONNECTOR_DVI_I;
+	}
 }
 
 static void

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Nouveau mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau

Reply via email to