From 2946294f9aa734efc5873ea2f34131d0a8c0f89a Mon Sep 17 00:00:00 2001 From: Florian Tobias Schandinat Date: Sat, 23 Apr 2011 23:52:45 +0000 Subject: viafb: add X server compatibility mode This patch adds a config option to be compatible with X servers like OpenChrome. This is required as for example the X server does not handle things like disabled IGAs/PLLs resulting in a potential freeze on X startup. With this option disabled we can provide some nice features like power management and not reinitializing the hardware on every mode switch (taking long time, causing flickering). Signed-off-by: Florian Tobias Schandinat --- drivers/video/Kconfig | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'drivers/video/Kconfig') diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index 6bafb51bb43..4923b5ec020 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig @@ -1607,6 +1607,17 @@ config FB_VIA_DIRECT_PROCFS correct output device configuration. Its use is strongly discouraged. +config FB_VIA_X_COMPATIBILITY + bool "X server compatibility" + depends on FB_VIA + default n + help + This option reduces the functionality (power saving, ...) of the + framebuffer to avoid negative impact on the OpenChrome X server. + If you use any X server other than fbdev you should enable this + otherwise it should be safe to disable it and allow using all + features. + endif config FB_NEOMAGIC -- cgit v1.2.3-70-g09d2 From f142b6196891660b329408e71573f97475823667 Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Thu, 3 Mar 2011 15:12:44 +0100 Subject: video i.MX: remove mx1 compile time dependencies MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit remove usage of CONFIG_ARCH_MX1. It's mostly unused anyway, replace it with cpu_is_mx1() where necessary. Also, depend on IMX_HAVE_PLATFORM_IMX_FB instead of the architectures directly. LAKML-Reference: 20110303141244.GQ29521@pengutronix.de Acked-by: Paul Mundt Signed-off-by: Uwe Kleine-König Signed-off-by: Sascha Hauer --- arch/arm/plat-mxc/devices/Kconfig | 1 - drivers/video/Kconfig | 5 +---- drivers/video/imxfb.c | 28 ++++++---------------------- 3 files changed, 7 insertions(+), 27 deletions(-) (limited to 'drivers/video/Kconfig') diff --git a/arch/arm/plat-mxc/devices/Kconfig b/arch/arm/plat-mxc/devices/Kconfig index a860b16d725..bd294add932 100644 --- a/arch/arm/plat-mxc/devices/Kconfig +++ b/arch/arm/plat-mxc/devices/Kconfig @@ -24,7 +24,6 @@ config IMX_HAVE_PLATFORM_IMXDI_RTC config IMX_HAVE_PLATFORM_IMX_FB bool - select HAVE_FB_IMX config IMX_HAVE_PLATFORM_IMX_I2C bool diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index e6a8d8c0101..62f337ab52b 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig @@ -8,9 +8,6 @@ menu "Graphics support" config HAVE_FB_ATMEL bool -config HAVE_FB_IMX - bool - config SH_MIPI_DSI tristate depends on (SUPERH || ARCH_SHMOBILE) && HAVE_CLK @@ -359,7 +356,7 @@ config FB_SA1100 config FB_IMX tristate "Freescale i.MX LCD support" - depends on FB && (HAVE_FB_IMX || ARCH_MX1 || ARCH_MX2) + depends on FB && IMX_HAVE_PLATFORM_IMX_FB select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT diff --git a/drivers/video/imxfb.c b/drivers/video/imxfb.c index ef72cb48383..d2ccfd6e662 100644 --- a/drivers/video/imxfb.c +++ b/drivers/video/imxfb.c @@ -65,12 +65,6 @@ #define CPOS_OP (1<<28) #define CPOS_CXP(x) (((x) & 3ff) << 16) -#ifdef CONFIG_ARCH_MX1 -#define CPOS_CYP(y) ((y) & 0x1ff) -#else -#define CPOS_CYP(y) ((y) & 0x3ff) -#endif - #define LCDC_LCWHB 0x10 #define LCWHB_BK_EN (1<<31) #define LCWHB_CW(w) (((w) & 0x1f) << 24) @@ -79,16 +73,6 @@ #define LCDC_LCHCC 0x14 -#ifdef CONFIG_ARCH_MX1 -#define LCHCC_CUR_COL_R(r) (((r) & 0x1f) << 11) -#define LCHCC_CUR_COL_G(g) (((g) & 0x3f) << 5) -#define LCHCC_CUR_COL_B(b) ((b) & 0x1f) -#else -#define LCHCC_CUR_COL_R(r) (((r) & 0x3f) << 12) -#define LCHCC_CUR_COL_G(g) (((g) & 0x3f) << 6) -#define LCHCC_CUR_COL_B(b) ((b) & 0x3f) -#endif - #define LCDC_PCR 0x18 #define LCDC_HCR 0x1C @@ -115,11 +99,7 @@ #define LCDC_RMCR 0x34 -#ifdef CONFIG_ARCH_MX1 -#define RMCR_LCDC_EN (1<<1) -#else -#define RMCR_LCDC_EN 0 -#endif +#define RMCR_LCDC_EN_MX1 (1<<1) #define RMCR_SELF_REF (1<<0) @@ -536,7 +516,11 @@ static void imxfb_enable_controller(struct imxfb_info *fbi) writel(readl(fbi->regs + LCDC_CPOS) & ~(CPOS_CC0 | CPOS_CC1), fbi->regs + LCDC_CPOS); - writel(RMCR_LCDC_EN, fbi->regs + LCDC_RMCR); + /* + * RMCR_LCDC_EN_MX1 is present on i.MX1 only, but doesn't hurt + * on other SoCs + */ + writel(RMCR_LCDC_EN_MX1, fbi->regs + LCDC_RMCR); clk_enable(fbi->clk); -- cgit v1.2.3-70-g09d2