From: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
To: alan@linux.intel.com, greg@kroah.com, linux-kernel@vger.kernel.org
Subject: [PATCH] gma500: Add option to disable LVDS
Date: Tue, 10 May 2011 23:20:38 +0200 [thread overview]
Message-ID: <20110510212038.GA3279@patrik-macbook> (raw)
This patch adds the option to load the driver without LVDS support. Some platforms with the gma500 have nothing hooked up to LVDS but only uses SDVO. LVDS is still detected and added as an encoder which causes SDVO mode-setting to fail.
Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
---
diff --git a/drivers/staging/gma500/psb_drv.c b/drivers/staging/gma500/psb_drv.c
index 46ab028..f1c9f07 100644
--- a/drivers/staging/gma500/psb_drv.c
+++ b/drivers/staging/gma500/psb_drv.c
@@ -39,15 +39,18 @@ int drm_psb_debug;
static int drm_psb_trap_pagefaults;
int drm_psb_no_fb;
+int drm_psb_no_lvds;
static int psb_probe(struct pci_dev *pdev, const struct pci_device_id *ent);
MODULE_PARM_DESC(debug, "Enable debug output");
MODULE_PARM_DESC(no_fb, "Disable FBdev");
MODULE_PARM_DESC(trap_pagefaults, "Error and reset on MMU pagefaults");
+MODULE_PARM_DESC(no_lvds, "Disable LVDS");
module_param_named(debug, drm_psb_debug, int, 0600);
module_param_named(no_fb, drm_psb_no_fb, int, 0600);
module_param_named(trap_pagefaults, drm_psb_trap_pagefaults, int, 0600);
+module_param_named(no_lvds, drm_psb_no_lvds, int, 0600);
static struct pci_device_id pciidlist[] = {
@@ -663,7 +666,9 @@ static int psb_driver_load(struct drm_device *dev, unsigned long chipset)
drm_kms_helper_poll_init(dev);
}
- ret = psb_backlight_init(dev);
+ if (!drm_psb_no_lvds)
+ ret = psb_backlight_init(dev);
+
if (ret)
return ret;
#if 0
diff --git a/drivers/staging/gma500/psb_drv.h b/drivers/staging/gma500/psb_drv.h
index e19a454..4593c80 100644
--- a/drivers/staging/gma500/psb_drv.h
+++ b/drivers/staging/gma500/psb_drv.h
@@ -671,6 +671,7 @@ extern int psb_gem_fault(struct vm_area_struct *vma, struct vm_fault *vmf);
extern int drm_psb_debug;
extern int drm_psb_no_fb;
extern int drm_idle_check_interval;
+extern int drm_psb_no_lvds;
#define PSB_DEBUG_GENERAL(_fmt, _arg...) \
PSB_DEBUG(PSB_D_GENERAL, _fmt, ##_arg)
diff --git a/drivers/staging/gma500/psb_fb.c b/drivers/staging/gma500/psb_fb.c
index ae097cd..7c00952 100644
--- a/drivers/staging/gma500/psb_fb.c
+++ b/drivers/staging/gma500/psb_fb.c
@@ -719,7 +719,8 @@ static void psb_setup_outputs(struct drm_device *dev)
else
DRM_ERROR("DSI is not supported\n");
} else {
- psb_intel_lvds_init(dev, &dev_priv->mode_dev);
+ if (!drm_psb_no_lvds)
+ psb_intel_lvds_init(dev, &dev_priv->mode_dev);
psb_intel_sdvo_init(dev, SDVOB);
}
next reply other threads:[~2011-05-10 21:20 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-10 21:20 Patrik Jakobsson [this message]
2011-05-10 21:46 ` [PATCH] gma500: Add option to disable LVDS Alan Cox
2011-05-10 21:59 ` Greg KH
2011-05-10 23:18 ` Patrik Jakobsson
2011-05-11 9:10 ` Alan Cox
2011-05-11 12:41 ` Patrik Jakobsson
2011-05-11 16:59 ` Patrik Jakobsson
2011-05-11 13:02 ` Matthew Garrett
2011-05-11 13:35 ` Kristoffer Ericson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110510212038.GA3279@patrik-macbook \
--to=patrik.r.jakobsson@gmail.com \
--cc=alan@linux.intel.com \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox