Skip to content
Snippets Groups Projects
Commit 69ba8803 authored by Troy Kisky's avatar Troy Kisky
Browse files

mxc_ipuv3_fb: add IPU_PIX_FMT_UPS051

parent 13523fcd
No related branches found
No related tags found
No related merge requests found
...@@ -496,6 +496,19 @@ static int mxcfb_probe(u32 interface_pix_fmt, uint8_t disp, ...@@ -496,6 +496,19 @@ static int mxcfb_probe(u32 interface_pix_fmt, uint8_t disp,
struct fb_info *fbi; struct fb_info *fbi;
struct mxcfb_info *mxcfbi; struct mxcfb_info *mxcfbi;
int ret = 0; int ret = 0;
int xres = mode->xres;
int gdfIndex = GDF_16BIT_565RGB;
int bytes_per_pixel = 2;
struct fb_videomode umode;
if (interface_pix_fmt == IPU_PIX_FMT_UPS051) {
interface_pix_fmt = IPU_PIX_FMT_RGB565;
umode = *mode;
umode.xres = xres * 3 / 2;
mode = &umode;
gdfIndex = GDF_24BIT_888RGB;
bytes_per_pixel = 3;
}
/* /*
* Initialize FB structures * Initialize FB structures
...@@ -546,16 +559,16 @@ static int mxcfb_probe(u32 interface_pix_fmt, uint8_t disp, ...@@ -546,16 +559,16 @@ static int mxcfb_probe(u32 interface_pix_fmt, uint8_t disp,
mxcfb_set_par(fbi); mxcfb_set_par(fbi);
panel.winSizeX = mode->xres; panel.winSizeX = xres;
panel.winSizeY = mode->yres; panel.winSizeY = mode->yres;
panel.plnSizeX = mode->xres; panel.plnSizeX = xres;
panel.plnSizeY = mode->yres; panel.plnSizeY = mode->yres;
panel.frameAdrs = (u32)fbi->screen_base; panel.frameAdrs = (u32)fbi->screen_base;
panel.memSize = fbi->screen_size; panel.memSize = fbi->screen_size;
panel.gdfBytesPP = 2; panel.gdfBytesPP = bytes_per_pixel;
panel.gdfIndex = GDF_16BIT_565RGB; panel.gdfIndex = gdfIndex;
ipu_dump_registers(); ipu_dump_registers();
......
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#define IPU_PIX_FMT_RGB332 fourcc('R', 'G', 'B', '1') /*< 8 RGB-3-3-2 */ #define IPU_PIX_FMT_RGB332 fourcc('R', 'G', 'B', '1') /*< 8 RGB-3-3-2 */
#define IPU_PIX_FMT_RGB555 fourcc('R', 'G', 'B', 'O') /*< 16 RGB-5-5-5 */ #define IPU_PIX_FMT_RGB555 fourcc('R', 'G', 'B', 'O') /*< 16 RGB-5-5-5 */
#define IPU_PIX_FMT_RGB565 fourcc('R', 'G', 'B', 'P') /*< 1 6 RGB-5-6-5 */ #define IPU_PIX_FMT_RGB565 fourcc('R', 'G', 'B', 'P') /*< 1 6 RGB-5-6-5 */
#define IPU_PIX_FMT_UPS051 fourcc('U', 'P', 'S', '0') /*< 24 RG BR GB, 1.5 clks/pixel */
#define IPU_PIX_FMT_RGB666 fourcc('R', 'G', 'B', '6') /*< 18 RGB-6-6-6 */ #define IPU_PIX_FMT_RGB666 fourcc('R', 'G', 'B', '6') /*< 18 RGB-6-6-6 */
#define IPU_PIX_FMT_BGR666 fourcc('B', 'G', 'R', '6') /*< 18 BGR-6-6-6 */ #define IPU_PIX_FMT_BGR666 fourcc('B', 'G', 'R', '6') /*< 18 BGR-6-6-6 */
#define IPU_PIX_FMT_BGR24 fourcc('B', 'G', 'R', '3') /*< 24 BGR-8-8-8 */ #define IPU_PIX_FMT_BGR24 fourcc('B', 'G', 'R', '3') /*< 24 BGR-8-8-8 */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment