This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Recently I need to get gray(luminance) data from camera at OMAP3 Linux platform
after some processing, I need output the frame data to LCD with predefined color palette table.
I know that LCD controller of OMAP3530 has LUT hardware for palette of color conversion.
but had no any idea to configure it at my application code, so can anyone help to show me
some example code to configure palette table, utilizing the hardware LUT unit and output to LCD?
If you can redirect to the related information or document, I will appreciate it also.
I don't think there is any support in the current Linux kernel for color indexed graphics, but it is fairly easy to enable from the application level through direct register configuration.
First, simply assume you are using the default 16 bit frame buffer and configure the display to the size you wish to display.
Next, change the DISPC_GFX_ATTRIBUTES register, bit field GFXFORMAT to be 0x03 (8 bit color index)
Next, declare an array of 256 unsigned integers and populate it with the RGB values you want for each color index entry.
Set DISPC_GFX_TABLE_BA to the physical address of the previously configured array (Note 1, this needs the physical address and not the virtual address so you will likely need to map it back. Note 2, this needs to be a 32 bit aligned address so depending on how the array is created it may be necessary to create an array of char slightly larger and populate the array such that the start is on a 32 bit boundary)
Check section 220.127.116.11.2 Color Look-Up Table/Gamma Table of the TRM for more details.
Set DISPC_CONFIG bit PALETTEGAMMATABLE to '0'
Set DISPC_CONFIG bit LOADMODE to 0x3
Set DISPC_CONTROL bit GOLCD or GODIGITAL depending on if you are displaying on the LCD/DVI or TV output.
To set registers you can use the source code for mem_util for an example of how to convert from virtual addresses to physical addresses.
We are glad that we were able to resolve this issue, and will now proceed to close this thread.
If you have further questions related to this thread, you may click "Ask a related question" below. The newly created question will be automatically linked to this question.
In reply to Steve Clynes:
Thanks for your reply, the information is very usefull.
but I have another further question about it. that is, how to retrieve back the translated
pixel RGB data which is lookup-ed by the LUT or palette table. it just drive LCD output hardware
peripheral? and can I restrict that just a small window region of screen to go through LUT for color
In reply to Cruise Huang:
Unfortunately there is no writeback path to memory, so no you cannot store the constructed RGB image back to memory for reading.
Regarding limiting the region to a small window this depends on exactly what you want to do.
The display sub system can display a frame buffer in a window on a larger display, but it is not possible to feed part of this window through the LUT.
Have a look at the following wiki page which might make it much clearer.
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.