summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorStefan Agner <stefan.agner@toradex.com>2014-04-29 12:50:00 +0200
committerStefan Agner <stefan.agner@toradex.com>2014-04-29 12:56:41 +0200
commit304c30ac23aa0181e5709d2e38bbfe1997eb25c1 (patch)
tree42af6036f727c3f0eb4137a85b31cee5906075e0 /drivers
parent0ee9e84781aa368c96544e6e96a4696a5a7ba00a (diff)
arm: tegra: dc: disable dc when framebuffer off detected
Don't initialize the whole display controller (dc) when framebuffer mode is set to off. This avoids creation of the /dev/tegra_dc_x device. The tegra X driver requires for each tegra_dc_x device an framebuffer device with the same id. This patch avoids creation of both, which makes the tegra X driver load correctly. Note: Turning off tegrafb0 still leads to kernel crash due to hard coded device enumeration.
Diffstat (limited to 'drivers')
-rw-r--r--drivers/video/tegra/dc/dc.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/video/tegra/dc/dc.c b/drivers/video/tegra/dc/dc.c
index d4c3f8bc9a49..d8e731999b88 100644
--- a/drivers/video/tegra/dc/dc.c
+++ b/drivers/video/tegra/dc/dc.c
@@ -1703,9 +1703,18 @@ static int tegra_dc_probe(struct nvhost_device *ndev,
struct resource *fb_mem = NULL;
int ret = 0;
void __iomem *base;
+ char *option = NULL;
+ char driver[10];
int irq;
int i;
+ /* try to use kernel cmd line specified mode */
+ sprintf(driver, "tegrafb%d", ndev->id);
+ fb_get_options(driver, &option);
+
+ if (option != NULL && !strcmp(option, "off"))
+ return -ENOENT;
+
if (!ndev->dev.platform_data) {
dev_err(&ndev->dev, "no platform data\n");
return -ENOENT;