drm/nouveau: add module option to disable TV detection

Previous thread: microblaze: Support word copying in copy_tofrom_user by Linux Kernel Mailing List on Thursday, April 1, 2010 - 10:59 am. (1 message)

Next thread: drm/nv50: Make ctxprog wait until interrupt handler is done. by Linux Kernel Mailing List on Thursday, April 1, 2010 - 10:59 am. (1 message)
From: Linux Kernel Mailing List
Date: Thursday, April 1, 2010 - 10:59 am

Gitweb:     http://git.kernel.org/linus/f4053509669f904aec70c51e2ff75563ba7ae823
Commit:     f4053509669f904aec70c51e2ff75563ba7ae823
Parent:     965cf68e8797932e9cd49238a6dd39423ac9b256
Author:     Ben Skeggs <bskeggs@redhat.com>
AuthorDate: Mon Mar 15 09:43:51 2010 +1000
Committer:  Ben Skeggs <bskeggs@redhat.com>
CommitDate: Mon Mar 15 09:47:00 2010 +1000

    drm/nouveau: add module option to disable TV detection
    
    Intended to be used as a workaround in cases where we falsely detect
    that a TV is connected when it's not.
    
    Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
---
 drivers/gpu/drm/nouveau/nouveau_connector.c |    2 +-
 drivers/gpu/drm/nouveau/nouveau_drv.c       |    4 ++++
 drivers/gpu/drm/nouveau/nouveau_drv.h       |    1 +
 3 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.c b/drivers/gpu/drm/nouveau/nouveau_connector.c
index 24327f4..14afe1e 100644
--- a/drivers/gpu/drm/nouveau/nouveau_connector.c
+++ b/drivers/gpu/drm/nouveau/nouveau_connector.c
@@ -302,7 +302,7 @@ nouveau_connector_detect(struct drm_connector *connector)
 
 detect_analog:
 	nv_encoder = find_encoder_by_type(connector, OUTPUT_ANALOG);
-	if (!nv_encoder)
+	if (!nv_encoder && !nouveau_tv_disable)
 		nv_encoder = find_encoder_by_type(connector, OUTPUT_TV);
 	if (nv_encoder) {
 		struct drm_encoder *encoder = to_drm_encoder(nv_encoder);
diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.c b/drivers/gpu/drm/nouveau/nouveau_drv.c
index 0f7e2d0..60a709c 100644
--- a/drivers/gpu/drm/nouveau/nouveau_drv.c
+++ b/drivers/gpu/drm/nouveau/nouveau_drv.c
@@ -87,6 +87,10 @@ MODULE_PARM_DESC(override_conntype, "Ignore DCB connector type");
 int nouveau_override_conntype = 0;
 module_param_named(override_conntype, nouveau_override_conntype, int, 0400);
 
+MODULE_PARM_DESC(tv_disable, "Disable TV-out detection\n");
+int nouveau_tv_disable = 0;
+module_param_named(tv_disable, nouveau_tv_disable, int, 0400);
+
 ...
Previous thread: microblaze: Support word copying in copy_tofrom_user by Linux Kernel Mailing List on Thursday, April 1, 2010 - 10:59 am. (1 message)

Next thread: drm/nv50: Make ctxprog wait until interrupt handler is done. by Linux Kernel Mailing List on Thursday, April 1, 2010 - 10:59 am. (1 message)