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.

OpenGL support and the AM335x EVM Display Driver

Other Parts Discussed in Thread: DA8XX

I would like to learn more about the AM335x EVM's display driver and OpenGL support. It is my understanding that the OpenGL driver is dependent on the LCD Driver, which in turn is dependent on the actual LCD hardware. That whole chain is needed to be working in order for the EVM to run OpenGL code.

I would appreciate it if someone could point out to me any/all of the follow items:

* In the kernel source code, where is the EVM's LCD driver code?

* In the driver code, what is in there to support OpenGL?

* Where in the code base is support for OpenGL built it?

* If the EVM's display hardware was swapped for a different display, what would need to change in the kernel to ensure the display worked and worked with OpenGL?

  • Hi Mike,

    You can learn more about the LCD Controller linux support at the following wiki page:

    http://processors.wiki.ti.com/index.php/Sitara_SDK_Linux_LCDC

    The drivers are located in drivers/video/da8xx-fb.c.

    The Graphics SDK is another package that must be downloaded and compiled against your kernel; it allows OpenGL support on top of the LCD controller driver.  Note that it is the SGX core that provides support for hardware support for 3D graphics; the SGX core does all of the rendering and 3d graphics related tasks, and then supplies the completed frame to the LCD controller, which then sends it to yoru display.

    More info on Graphics SDK can be found here: http://processors.wiki.ti.com/index.php/Graphics_SDK_Quick_installation_and_user_guide

    If you are switching out LCDs or plugging into a different monitor via HDMI, you do not need to change the Graphics SDK.

  • Hi Josh,

    Thanks, that was a helpful start, but I still need some more information. First point:

    da8xx-fb.c -

    When I take a look at this file I see it's the "LCD Driver for TI Avalanche processors". Is the AM335x an "Avalanche" processor, or is this just reuse since the driver matches the AM335x?

    After you pointed out which video display driver was in use, I checked the kernel messages and I can see two power up messages:

    [ 0.089212] da8xx_lcdc.0: alias fck already exists
    [ 0.201172] da8xx_lcdc da8xx_lcdc.0: GLCD: Found LMT104 panel

    Are these both normal? A message of "fck already exists" seems to me that something is trying to be redundantly set.

    If a new LCD were to be used, I would think this file would be invalid and a totally new driver would be required (unless perhaps the new LCD was from the same family/manufacture as the one on the EVM) is that correct?

    Second point:

    SGX -

    You mentioned that the SGX core does the 3D graphics, and I read in the reference manual that the SGX is TI's instantiation of the PowerVR; so is this to say that PowerVR + The da8xx driver is all that is required to run OpenGL? in other words, when OpenGL calls are made in Qt code (for example) the requests go to the SGX that prepares the frame and sends it to the da8xx driver which displays it on the LCD. Is that the correct sequence of actions?

    As far as the drivers go. I see /dev/pvrsrvkm and that's the PowerVR kernel module. Does that talk to a "SGX" enity or a "PowerVR" entity?

    I'm very interested in how we go from the OpenGL C program down to the display. Is it fair to say:

    <OpenGL program> => pvrsrvkm => da8xx_fb => LCD

    is the whole of that chain, or is there more to it?

  • Hi Mike,

    Mike Worster said:

    When I take a look at this file I see it's the "LCD Driver for TI Avalanche processors". Is the AM335x an "Avalanche" processor, or is this just reuse since the driver matches the AM335x?

    AM335x reuses the driver from Avalanche--they both have the same LCD controller hardware.

    Mike Worster said:

    If a new LCD were to be used, I would think this file would be invalid and a totally new driver would be required (unless perhaps the new LCD was from the same family/manufacture as the one on the EVM) is that correct?

    You actually don't need to change the driver at all--the only necessary step is to pass the correct timings for the new LCD panel to the LCDC driver.  For an example, look at the LCDC porting overview.

    Mike Worster said:

    You mentioned that the SGX core does the 3D graphics, and I read in the reference manual that the SGX is TI's instantiation of the PowerVR; so is this to say that PowerVR + The da8xx driver is all that is required to run OpenGL? in other words, when OpenGL calls are made in Qt code (for example) the requests go to the SGX that prepares the frame and sends it to the da8xx driver which displays it on the LCD. Is that the correct sequence of actions?

    As far as the drivers go. I see /dev/pvrsrvkm and that's the PowerVR kernel module. Does that talk to a "SGX" enity or a "PowerVR" entity?

    I'm very interested in how we go from the OpenGL C program down to the display. Is it fair to say:

    <OpenGL program> => pvrsrvkm => da8xx_fb => LCD

    is the whole of that chain, or is there more to it?

    Your understanding is pretty much correct here.  The LCD Controller has no knowledge of OpenGL whatsoever--the only thing it knows is that it will be given a frame of data to display that corresponds to a certain format (bits per pixel, color space, etc).  The SGX core (PowerVR) has the hardware capability to do 3D graphics, and we can access this hardware capability in software through OpenGL.  So the SGX core prepares a frame of data to display per your OpenGL based software, and then it sends that completed frame of RGB data to the framebuffer, which the LCDC takes and sends to the LCD.

    Regards,

    Josh

  • Great answers Josh,

        I just have two more questions for you. I need to confirm that everything (in the chain for displaying the code to the LCD) is present and working.

       1) So how can I confirm everything I need is working?

        For example:

          I know I need the da8xx driver, and I can see it's present by the messages in the kernel during startup:

    [    0.089212]  da8xx_lcdc.0: alias fck already exists
    [    0.201172] da8xx_lcdc da8xx_lcdc.0: GLCD: Found LMT104 panel

        I guess I can tell it's working by the fact the display turns on? Do I have any other tools for this?

        How about the other software elements? pvrsrvkm will be required, and I can check for /dev/pvrsrvkm in the file system, but do I have anyone to check if it's  working? Are there any other elements I need to check for? (for example would bufferclass_ti.ko or omaplfb.ko?)

       2) A couple of our team members are missing pvrsrvkm in there build, so of the elements listed in #1 (and any you add to it) how do I build these elements?

        For example:

            More than a few of our developers have reported seeing /dev/pvrsrvkm in the TI sdk build, but not when they build the code on there own. There must be some flag, configuration, or something that we can check for? Are there instructions or could you provide some quick ones on the build settings?

    Thanks.

    -Mike

  • Hi Mike,

    I'm glad the info is helpful.

    Mike Worster said:

       1) So how can I confirm everything I need is working?

    There a couple simple things you can do:

    1) run "fbset" on the command line.  If it can find a /dev/fb0 device, it will come give you a dump of the current resolution, colorspace, and timings.

    2) run "ls /dev/fb*" to see if any framebuffer devices are available.

    There is a bit more info on this page from our wiki that might be useful to you: http://processors.wiki.ti.com/index.php/Sitara_SDK_Linux_LCDC_fbdev_User_Space

    Mike Worster said:

       2) A couple of our team members are missing pvrsrvkm in there build, so of the elements listed in #1 (and any you add to it) how do I build these elements?

    This process can be finicky I have noticed.  I am usually able to get the SGX drivers working by following the steps in this guide very closely, though: http://processors.wiki.ti.com/index.php/Graphics_SDK_Quick_installation_and_user_guide

    Let me know if that helps,

    Josh