summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-tegra/Kconfig9
-rw-r--r--arch/arm/mach-tegra/board-cardhu-panel.c8
-rw-r--r--drivers/video/tegra/dc/dc.c2
3 files changed, 18 insertions, 1 deletions
diff --git a/arch/arm/mach-tegra/Kconfig b/arch/arm/mach-tegra/Kconfig
index e90ff587cc44..b9627372564f 100644
--- a/arch/arm/mach-tegra/Kconfig
+++ b/arch/arm/mach-tegra/Kconfig
@@ -578,3 +578,12 @@ config TEGRA_SKIN_THROTTLE
Enable throttling to control the temperature of the skin/case
of the device.
endif
+
+config TEGRA_DC_USE_HW_BPP
+ bool "Default Bits Per Pixel value from tegra DC hardware"
+ depends on TEGRA_DC
+ default n
+ help
+ Programs platform data to inform DC driver to use current
+ hardware value for bits per pixel setting. Useful for
+ preserving and displaying framebuffer content from bootloader.
diff --git a/arch/arm/mach-tegra/board-cardhu-panel.c b/arch/arm/mach-tegra/board-cardhu-panel.c
index 530fcfc4ba09..d7101af55712 100644
--- a/arch/arm/mach-tegra/board-cardhu-panel.c
+++ b/arch/arm/mach-tegra/board-cardhu-panel.c
@@ -678,7 +678,11 @@ static struct tegra_fb_data cardhu_fb_data = {
.win = 0,
.xres = 1366,
.yres = 768,
+#ifdef CONFIG_TEGRA_DC_USE_HW_BPP
+ .bits_per_pixel = -1,
+#else
.bits_per_pixel = 32,
+#endif
.flags = TEGRA_FB_FLIP_ON_PROBE,
};
@@ -686,7 +690,11 @@ static struct tegra_fb_data cardhu_hdmi_fb_data = {
.win = 0,
.xres = 640,
.yres = 480,
+#ifdef CONFIG_TEGRA_DC_USE_HW_BPP
+ .bits_per_pixel = -1,
+#else
.bits_per_pixel = 32,
+#endif
.flags = TEGRA_FB_FLIP_ON_PROBE,
};
diff --git a/drivers/video/tegra/dc/dc.c b/drivers/video/tegra/dc/dc.c
index de865e4e2da3..a3011b873aae 100644
--- a/drivers/video/tegra/dc/dc.c
+++ b/drivers/video/tegra/dc/dc.c
@@ -1846,7 +1846,7 @@ static int tegra_dc_probe(struct nvhost_device *ndev,
dev_info(&ndev->dev, "probed\n");
if (dc->pdata->fb) {
- if (dc->pdata->fb->bits_per_pixel == -1) {
+ if (dc->enabled && dc->pdata->fb->bits_per_pixel == -1) {
unsigned long fmt;
tegra_dc_writel(dc,
WINDOW_A_SELECT << dc->pdata->fb->win,