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.

Optimizing OMAP4 TILER Memory usage

Hi,

I am working with a custom OMAP4460 platform on which we require more TILER memory for media playback.  I have some questions on how to increase the TILER memory available for media playback.

As of now, on the custom platform using an LCD of resolution 1280 x 800 in landscape mode, the usage of TILER memory is as follows:

Reserved (A)                  : 32 MB - 2 buffers of 16 MB each, reserved by drivers/video/omap2/dsscomp/gralloc.c
SGX Swap chain (B)     : 24 MB - FB0: (1280 * 800 * 4 [bpp]) + 2MB [stride]) * 3 ), FB1: 1280 * 800 * 4 +2MB [stride]
Total used (A + B)          : 56 MB
Free Tiler Memory         : 128 M - Total Used (56 MB) = 72 MB

The above TILER memory usage is also confirmed by reading the SYSFS entry /d/tiler/map/4x4

My question is regarding the possibilities in increasing the TILER free memory. 

Our testing shows that 24MB for the SGX Swap chain is the optimal value.  I have also attempted to reduce the reserved memory (32 MB) by modifying TILER1D_SLOT_SIZE in drivers/video/omap2/dsscomp/gralloc.c.  This has been reduced to 2 buffers of 8MB each.  Though Android boots up fine, there are errors while attempting to obtain TILER memory.

Is there any way in which this reserved area can be reduced or removed to increase the available TILER memory?

The custom OMAP4460 platform is running on Android ICS based on TI's L27.IS.2.P2 release.  Release notes are available at http://www.omappedia.com/wiki/L27.IS.2.P2_OMAP4_Icecream_Sandwich_Release_Notes

Thanks and regards,
Kanagesh

  • Hi,

    In order to modify systems Tiler memory values or addresses it is required to do changes to RPMSG/Ducati code, the access to Ducati code is under NDA, I found next post that explains a little about the process, I only remember 1 or 2 posts about this, but this is one of them,

    http://e2e.ti.com/support/omap/f/849/p/178611/643392.aspx

    You can find some public information in next links,

    http://omapedia.org/wiki/Ducati_For_Dummies

    http://omapedia.org/wiki/Memory_Map_Information_-_Ducati

    http://omapedia.org/wiki/Category:RPMsg

    http://omapedia.org/wiki/Debugging_RPMsg

    You contact a TI Representative to get access to Ducati source code and ask if they have available some documents that explains how Ducati/Tiler memories are organized in Android.

  • Hello Manuel,

    Thank you for the inputs.

    We have access to the Ducati source code already.

    My question is more specific on how to reduce the 32MB (two chunks of 16 MB) reserved in the TILER memory region.  I understand that this reserved area is to support display rotation when the hardware platform is connected to a HDMI output (TV)  . This would be required only when the default orientation of LCD is in portrait mode.  

    On our custom platform, the default orientation of the LCD is in landscape mode.  Hence, this reserved area may not be needed (or can be reduced) since rotation when connected to a HDMI output would not be required?

    We have made some changes in the amount of memory reserved.  The default gralloc driver (drivers/video/omap2/dsscomp/gralloc.c) reserves two chunks of 16 MB each (TILER1D_SLOT_SIZE)  On reducing this size to 8 MB each, we see that Android comes up fine, video playback also is functional on the LCD.  However, when connected to a HDMI output, we see that display does not come up on HDMI.  The kernel reports a warning, which looks like an illegal access to a memory location.  Please find attached a captured log 6648.log.txt

    One observation made is that if the Android wallpaper is changed from the default static wallpaper to live wallpaper, this problem does not occur.  Display with HDMI TV and video playback works fine.

    May I request for your inputs on this?

    Thanks and regards,

    Kanagesh

  • Kanagesh,

    I understand the point about Tiler memory modification, I have made similar change but for other values in Ducati before but not for Tiler, I going to need some days to check some files in order to get more information for this release in specific.

    May I suggest you to contact TI representative and ask them if they have some file that explains this process of Tiler memory adjustments, I can think in one or two documents they should have available via TI representative, and ask for information\files about Tiler, I couldn't find much information for Tiler in omapedia.org.

  • Kanagesh,

    This is information I found, I know it is public forum then I going to try to go to the point.

    I found some documents that are related to information to this change, I think if you contact TI representative and they contact me and I can give them the filenames for they to check if it is ok to share those file. One of them describes briefly the optimization process you mentioned.

    In 4AI1.7 there is a file that is not in L27.IS.p2 that you are using, then it could mean that the adjustment for Android side and DSS could be different.

    arch/arm/plat-omap/android-display.c

    Check the comment about tiler1d_slotsz, could say that reducing the value could help but it was reduced for one case when screen rotation was not used. This is only a hint to follow because I am not sure about this change or of it in your actual release.

    And apart depending on full test case that you are using the memory reduction could not be complete or correct, that is something that could be needed to be checked, this because of what you say about HDMI configuration not working.

    I have not much experience doing Tiler changes, then I should leave the post open for others to help.

  • Hello Manuel,

    Thank you for pointing me to the document, let me get in touch with our TI representative.

    Once again, many thanks for your time and help.

    Regards,

    Kanagesh