Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

video: fbdev: imxfb: support AUS mode

Some displays require setting AUS mode in the LDCD AUS Mode Control
Register to work with the imxfb driver. Like the value of the Panel
Configuration Register, the AUS mode setting depends on the display
mode.

Allow setting AUS mode from the device tree by adding a boolean
property. Make this property optional to keep the DT ABI stable.
AUS mode can be set only on imx21 and compatible chipsets.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Cc: Sascha Hauer <kernel@pengutronix.de>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>

authored by

Martin Kaiser and committed by
Bartlomiej Zolnierkiewicz
b62ea411 0cb51f65

+18
+17
drivers/video/fbdev/imxfb.c
··· 117 117 118 118 #define IMXFB_LSCR1_DEFAULT 0x00120300 119 119 120 + #define LCDC_LAUSCR 0x80 121 + #define LAUSCR_AUS_MODE (1<<31) 122 + 120 123 /* Used fb-mode. Can be set on kernel command line, therefore file-static. */ 121 124 static const char *fb_mode; 122 125 ··· 161 158 dma_addr_t dbar2; 162 159 163 160 u_int pcr; 161 + u_int lauscr; 164 162 u_int pwmr; 165 163 u_int lscr1; 166 164 u_int dmacr; ··· 426 422 pcr |= imxfb_mode->pcr & ~(0x3f | (7 << 25)); 427 423 428 424 fbi->pcr = pcr; 425 + /* 426 + * The LCDC AUS Mode Control Register does not exist on imx1. 427 + */ 428 + if (!is_imx1_fb(fbi) && imxfb_mode->aus_mode) 429 + fbi->lauscr = LAUSCR_AUS_MODE; 429 430 430 431 /* 431 432 * Copy the RGB parameters for this display ··· 647 638 if (fbi->dmacr) 648 639 writel(fbi->dmacr, fbi->regs + LCDC_DMACR); 649 640 641 + if (fbi->lauscr) 642 + writel(fbi->lauscr, fbi->regs + LCDC_LAUSCR); 643 + 650 644 return 0; 651 645 } 652 646 ··· 745 733 746 734 imxfb_mode->bpp = bpp; 747 735 imxfb_mode->pcr = pcr; 736 + 737 + /* 738 + * fsl,aus-mode is optional 739 + */ 740 + imxfb_mode->aus_mode = of_property_read_bool(np, "fsl,aus-mode"); 748 741 749 742 return 0; 750 743 }
+1
include/linux/platform_data/video-imxfb.h
··· 50 50 struct imx_fb_videomode { 51 51 struct fb_videomode mode; 52 52 u32 pcr; 53 + bool aus_mode; 53 54 unsigned char bpp; 54 55 }; 55 56