Is there a document somewhere that tells how to program the IPU to use 8-bit color and a look-up table? Or does anyone have any tips on getting this working? The only thing I can find is this note in IMX6DQRM.pdf:
The Look-Up Table Memory (LUT- Look Up Table) must be loaded at the IDMAC initialization step.
The LUT output format must match the IPU internal format RGBA 8888 where R is placed in
MSB and A is placed in LSB. The A field is used only for graphics data.
Also, I can't find a IPU_PIX_FMT that looks appropriate for 8-bit color from a LUT.
Using this video mode specification:
#
# DirectFB video modes, should be placed into "/etc"
#
mode "1280x1024 60Hz 8bit"
# D: 99.00 MHz, H: 64.119 KHz, V: 60.09 Hz
geometry 1280 1024 1280 3072 8
timings 10101 72 64 37 2 128 4
hsync high
vsync high
endmode
This is my best guess as to what the values in the struct fb_var_screeninfo should be:
/dev/fb0
screen_info:
xres = 1280
yres = 1024
xres_virtual = 1280
yres_virtual = 1024
xoffset = 0
yoffset = 0
bits_per_pixel = 8
grayscale = 0
red = {offset=5,length=3,msb_right=0}
green = {offset=2,length=3,msb_right=0}
blue = {offset=0,length=2,msb_right=0}
transp = {offset=0,length=0,msb_right=0}
nonstd = 0
activate = 0
height = 4294967295
width = 4294967295
accel_flags = 0
pixclock = 10101
left_margin = 72
right_margin = 64
upper_margin = 37
lower_margin = 2
hsync_len = 128
vsync_len = 4
sync = 3
vmode = 0
rotate = 0
However, when I try to switch to this video mode (from the command line or otherwise), this is what happens:
root@iMX6QSABRELite:/opt/mjovanovich$ echo "U:1280x1024p-60" > /sys/class/graphics/fb0/mode
imx-ipuv3 imx-ipuv3.0: warning: wait for bg sync eof timeout
imx-ipuv3 imx-ipuv3.0: IPU Warning - IPU_INT_STAT_5 = 0x08800000
imx-ipuv3 imx-ipuv3.0: IPU Warning - IPU_INT_STAT_10 = 0x00080000
imx-ipuv3 imx-ipuv3.0: mxc ipu: unimplemented pixel format
imx-ipuv3 imx-ipuv3.0: Unsupported burst size 1
imx-ipuv3 imx-ipuv3.0: mxc ipu: unimplemented pixel format
imx-ipuv3 imx-ipuv3.0: mxc ipu: unimplemented pixel format
imx-ipuv3 imx-ipuv3.0: Unsupported burst size 1
imx-ipuv3 imx-ipuv3.0: mxc ipu: unimplemented pixel format
imx-ipuv3 imx-ipuv3.0: mxc ipu: unimplemented pixel format
mxc_sdc_fb mxc_sdc_fb.0: timeout when waiting for flip irq
mxc_sdc_fb mxc_sdc_fb.0: timeout when waiting for flip irq
mxc_sdc_fb mxc_sdc_fb.0: timeout when waiting for flip irq
root@iMX6QSABRELite:/opt/mjovanovich$ ./fbcolormap
root@iMX6QSABRELite:/opt/mjovanovich$
After this, no more video signal goes out to the monitor. Un-blanking doesn't help either, using this command:
echo "0" > /sys/class/graphics/fb0/blank
If I use 16, 24, or 32 bits per pixel (e.g. in /etc/fb.modes change the "8" at the end of the geometry line to "16"), the video mode works fine.
See attached code for fbcolormap, which executes with no errors, so I'm guessing that if the IPU can be programmed correctly, then the LUT might work.
Original Attachment has been moved to: fbcolormap.cpp.zip