• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Digital Signal Processors (DSP) » DaVinci™ Video Processors » DM37x DaVinci Video Processor Forum » Lookup Table in the Display Subsystem for Gamma correction
Share
DaVinci™ Video Processors
  • Forums
  • Announcements
Options
  • Subscribe via RSS

Lookup Table in the Display Subsystem for Gamma correction

Lookup Table in the Display Subsystem for Gamma correction

This question is answered
Lucas
Posted by Lucas
on Apr 13 2012 13:30 PM
Prodigy90 points

We have a DM3730 connected with an LCD Display. Unfortunately, the display is very dark and my experiments suggest that it still needs to be gamma corrected. Reading the TI documentation I found that the Display Subsystem has a Palette/gamma lookup-table. If I understand correctly, I have to create a lookup-table in main memory, pass its address into the DISPC_GFX_TABLE_BA (0x4805 04B8) Register (translate virtual address to physical address?) and then the lookup-table is loaded into the internal DSS memory.  
We run the Linux Kernel 2.6.32 and I found the definition "#define DISPC_GFX_TABLE_BA 0x00B8" in the Linux kernel source tree under drivers/video/omap/dispc.c. But it seems like that the register is not actually used anywhere. Are there any examples of using the lookup-table and is this even the best approach to correct the color of our display?

Thank you

(Reposted here, because I accidentally posted this in the DM3xx Forum)

EDIT for clarification: I am trying to transfer a gamma table from user space into the Palette/gamma lookup-table of the Display Subsystem. I found a related post (http://e2e.ti.com/support/dsp/omap_applications_processors/f/447/t/59105.aspx) and there, it is suggested that I set the lookup-table from the application layer.

Quote (emphasis mine): "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)"

But how can I map a virtual address from user space back to a physical address? He suggests to look at mem_util (https://gstreamer.ti.com/gf/project/am_sysinfo/scmsvn/?action=browse&path=%2Ftrunk%2Fmem_util%2Fmem_util.c&revision=2&sortby=log&view=markup), but this maps physical addresses to virtual addresses, as far as I can see, and not the other way around.

DM37x DSS LCD Linux Driver
Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • Lucas
    Posted by Lucas
    on Apr 19 2012 07:56 AM
    Verified Answer
    Verified by Lucas
    Prodigy90 points

    I figured a out a way to do this:

    • Create gamma lookup table inside my application
    • Call "Dmai_init()"
    • Reserve memory with "Memory_contigAlloc"
    • Copy array into region
    • Translate virtual address to physical address with "Memory_getBufferPhysicalAddress"
    • Set "DISPC_GFX_ATTRIBUTES"
    • Set "DISPC_GFX_TABLE_BA" to physical address
    • Set DISPC_CONFIG
    • Set DISPC_CONTROL

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
TI E2E™ Community
  • Support Forums
  • Blogs
  • Videos
  • Groups
  • Site Support & Feedback
  • Settings
TI E2E™ Community Groups
  • TI University Program
  • Make the Switch
  • Microcontroller Projects
  • Motor Drive & Control
Other Communities
  • Deyisupport
  • Designsomething.org
  • beagleboard.org
  • TI on Element 14
  • TI on TechXchangeSM
Other Technical & Support Resources
  • WEBENCH® Design Center
  • Product Information Centers
  • Technical Documents
  • TI Design Network
  • TI Technical Articles
  • TI Training

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.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
embedded processors, along with software, tools and the industry’s largest sales/support staff.

© Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy Policy | Terms of Use