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

drm/tilcdc: support pixel widths greater than 1024

TI LCD controller version 2 has an extended eleventh
bit that enables horizontal resolutions greater than
1024 pixels to be specified (upto 2048). This patch
adds support for setting this bit on LCDC V2.

Signed-off-by: Darren Etheridge <detheridge@ti.com>
Acked-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>

authored by

Darren Etheridge and committed by
Dave Airlie
6bf02c66 abbee623

+16
+15
drivers/gpu/drm/tilcdc/tilcdc_crtc.c
··· 310 310 ((vsw & 0x3f) << 10); 311 311 tilcdc_write(dev, LCDC_RASTER_TIMING_1_REG, reg); 312 312 313 + /* 314 + * be sure to set Bit 10 for the V2 LCDC controller, 315 + * otherwise limited to 1024 pixels width, stopping 316 + * 1920x1080 being suppoted. 317 + */ 318 + if (priv->rev == 2) { 319 + if ((mode->vdisplay - 1) & 0x400) { 320 + tilcdc_set(dev, LCDC_RASTER_TIMING_2_REG, 321 + LCDC_LPP_B10); 322 + } else { 323 + tilcdc_clear(dev, LCDC_RASTER_TIMING_2_REG, 324 + LCDC_LPP_B10); 325 + } 326 + } 327 + 313 328 /* Configure display type: */ 314 329 reg = tilcdc_read(dev, LCDC_RASTER_CTRL_REG) & 315 330 ~(LCDC_TFT_MODE | LCDC_MONO_8BIT_MODE | LCDC_MONOCHROME_MODE |
+1
drivers/gpu/drm/tilcdc/tilcdc_regs.h
··· 80 80 #define LCDC_INVERT_PIXEL_CLOCK BIT(22) 81 81 #define LCDC_INVERT_HSYNC BIT(21) 82 82 #define LCDC_INVERT_VSYNC BIT(20) 83 + #define LCDC_LPP_B10 BIT(26) 83 84 84 85 /* LCDC Block */ 85 86 #define LCDC_PID_REG 0x0