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.

Dual frame buffer on custom board

Hi,

I am using a custom board which is built using blaze as reference board.It has a resolution of 480*800.I use the latest release of Android ICS ie http://omappedia.org/wiki/4AI.1.4_OMAP4_Icecream_Sandwich_Release_Notes to boot the board and it is working fine.When i connect my HDMI the screen rotates by 270 deg ie persist.hwc.mirroring.transform is set to 3 and it goes into portrait mode.When i actually try to enable either overlay1 or overlay2 it does not happen at all.But overlay 0 is enabled and configured to lcd as the manager and overlay3 is enabled and configured to TV as the manager.overlay1 and 2 are disabled.Since overlay0 is configured as gfx and overlay3 is configured as vid pipeline i thought dual fb would as such work by default.ie two different contents on LCD and HDMI but a video gets played on the LCD as well a HDMI so how is it that ovl0 is able to play a video?Also when i try to make the persist.hwc.mirroring.transform to 0 the HDMI tries to set to 1080p resolution and it fails in the driver level saying

[  400.640411] omapdss HDMI: ENTER hdmi_display_enable
[  400.645751] omapdss HDMI: Set c-state constraint for HDMI
[  400.645751]
[  400.653289] HDCP: invalid AKSV
[  400.656677] hdcp_3des_cb: hdcp_keys not loaded = 0
[  400.661682] omapdss HDMI error: *** INVALID AKSV: 0 Do not perform HDCP AUTHENTICATION
[  400.670501] hdmi_power_on x_res= 1920 y_res = 1080
[  400.771362] omapdss DISPC error: timeout waiting for EVSYNC
[  400.778533] omapdss DISPC error: First SYNC_LOST..TV ignoring
[  400.794616] omapdss HDMI: Enter hdmi_display_disable
[  400.896362] omapdss DISPC error: timeout waiting for EVSYNC
[  400.902679] omapdss HDMI: Release c-state constraint for HDMI
Is there any kernel patches that have to be added for avoiding this error and setting the HDMI to 1080p resolution.
Regards,
Haran
  • Are any of these properties also set? If so, what are thier values?

    persist.hwc.docking.enabled

    persist.hwc.mirroring.enabled

    persist.hwc.avoid_mode_change

    persist.hwc.docking.transform

    persist.hwc.mirroring.transform

    persist.hwc.mirroring.region

     

    Also, I do not understand the actual question? You want the rotation to occur? or not? The complaint is that the mirroring transform happens or does not happen when you disable the overlays? Also since you are using mirroring, you definately want to set persist.hwc.mirroring.enabled to "1".

  • Hi,

    My actual question is i want two different contents on the HDMI and lcd but i am not able to achieve it.For eg i want a video to play on my HDMI and i want to browse on my LCD.How should i acheive it?

    Regards

    Haran

  • Well you only have limited control over this in Android. One thing you can do is set

    stop

    setprop persist.hwc.docking.enabled "1"

    start

    This will mirror only video layers to HDMI and all GFX layers will stay on the LCD.

    But if you are trying to use this as sort of a desktop extension, or like having twin montors used as a single vittual desktop as you seem to be describing above, Android won't do that.

  • The graphics and video pipeline depends on the overlay managers right.So when v configure ovl0 ie gfx overlay to lcd and when ovl 1 and 2 are disabled ie vid1 and vid2 and when ovl3 manger is set to tv and enabled then definitely the video has to play through the video pipeline only right but how is it playing on the lcd also.Since there was no proper documentation of DSS i was not able to clarify this doubt for a long time now.Can you pls clarify it.

    One more doubt is how does docking help me in this case?

    Regards

    Haran

  • Hi Haran,

    Like Matt has mentioned, Android supports two modes of operation namely Docking (Default Mode) & Cloning. Using the setprop  commands as detailed by Matt, you can choose enable one of them respectively.

    Docking Mode: When docking mode is enabled, among all the layers set with EXT_DISP gralloc usage bit, it will pick the layer with largest resolution and redirects it to HDMI TV and the other layers will be rendered on LCD.

    Example: If the video layer is having the largest resolution among all the layers composed by Surface Flinger such as Home Screen, Status Bar, Video Layer etc., then the video layer would be redirected to HDMI TV and the other layers would be rendered on LCD

    Cloning Mode: All the layers would be cloned on to HDMI TV utilizing the overlays of OMAP DSS Sub System. Among the four overlays, two overlays would be used to render Graphics and Video on to LCD and the other two overlays would be used to render Graphics and Video on to HDMI TV.

    In Android ICS, there is a vendor specific Hardware Composer (HWC) module which essentially decides which layer needs to be directed to which Display (LCD, HDMI) using which overlay (GFX, VID1, VID2, VID3) based on the set criteria such as Scaling Requirements, Format etc.,

    In case the number of layers or surfaces are more than the 4 overlays, then two or more surfaces or layers would be composed using SGX and then redirected using DSS overlays wherein the overlay manager of DSS would compose the layers on given display such LCD or HDMI accordingly.

    Even if you disable the overlays using sysfs command, upon refresh of the content on LCD or HDMI, the HWC would reconfigure the overlays based on the current set of layers and their characteristics to render them either using Docking or Cloning mode as requested.

    Hope this clarifies your queries.

    Thanks & Best Regards,

    Venkat

  • Hi,

    I did the following so that i could get access to the overlay 0 and 1 so that i could change the manager.

    setprop persist.hwc.mirroring.region ""

    setprop persist.hwc.mirroring.transform "0"

    But then i get the following error.

    [  400.640411] omapdss HDMI: ENTER hdmi_display_enable
    [  400.645751] omapdss HDMI: Set c-state constraint for HDMI
    [  400.645751]
    [  400.653289] HDCP: invalid AKSV
    [  400.656677] hdcp_3des_cb: hdcp_keys not loaded = 0
    [  400.661682] omapdss HDMI error: *** INVALID AKSV: 0 Do not perform HDCP AUTHENTICATION
    [  400.670501] hdmi_power_on x_res= 1920 y_res = 1080
    [  400.771362] omapdss DISPC error: timeout waiting for EVSYNC
    [  400.778533] omapdss DISPC error: First SYNC_LOST..TV ignoring
    [  400.794616] omapdss HDMI: Enter hdmi_display_disable
    [  400.896362] omapdss DISPC error: timeout waiting for EVSYNC
    [  400.902679] omapdss HDMI: Release c-state constraint for HDMI
    [  400.902679]

    So instead of 1080p i forced it to take 720p and it works fine by modifying the hwc file.

    So y is this error coming for me.I read somewhere that the processor will take some time to decode the first 1080p frame so i increased the delay but no use still i get the same error.

    Regards

    Haran

  • Hi Venkat,

    I was able to enable the cloning on my custom board so that dual frame buffer could be achieved but one problem while cloning is that the custom board directly pushes the data whatever is there on the lcd to hdmi hence i get a portrait view as it is on the lcd and not a landscape view so how can i get a landscape view on my HDMI even though it is a potrait view on the LCD.Can that be achieved?

    Regards

    Haran

  • Hi Haran,

    As per my understanding, the cloning feature would maintain the same view as that of the LCD on HDMI.

    Can you check if the HDMI displays a landscape view by rotating the device so that the UI is rendered in landscape view on the LCD?

    Thanks & Best Regards,

    Venkat

  • Hi Venkat,

    It worked for me fine...:)Thanks for ur support...

    Regards

    Haran

  • Hi Haran,

    You achieved the landscape view by rotating the device or did you modify the rotation parameter of overlay connected to HDMI display.

    Thanks & Best Regards,

    Venkat

  • Hi venkat,

    I modified the rotation parameter of overlay connected to HDMI display.

    Regards

    Haran

  • Hi Haran,

    Thanks for confirming the solution you used to resolve your issue as it would serve as a reference for others with similar problem.

    Thanks & Best Regards,

    Venkat

  • Hi All ,

          whether or not  keep same panel mode(such as landscape mode ) when display HDMI and LCD .Now my panel resolution 1200x1920 ,the portrait mode ,but i want to display landscape mode on the HDMI ,but it can occur :

    [   13.120178] misc dsscomp: [c6d4fc00] set ovl3 failed -22
    [   13.320159] misc dsscomp: [c6d4ec00] set ovl3 failed -22
    [   13.573059] misc dsscomp: [c6d4f400] set ovl3 failed -22
    [   13.772827] misc dsscomp: [c6d4fc00] set ovl3 failed -22"

    it is on queue.c file

    i know it beyong the tiler addr ,it is on base.c line 272 info.paddr>=0x60000000&&info.paddr<0x780000000. I want to know that addr is come form where,why on portrait mode panel is ok ,and on landscape fail ,and how to avoid this issue?

    thanks!

  • Hi Haran,


    How did you modified rotation parameter of overlay connected to HDMI display? From linux kernel which file should be changed? or can be done using sysfs or bootargs ?

    Thanks,

    Jeegar Patel

  • Hi Jeegar,

    You can change via sysfs...

    Regards

    Haran

  • Hi Haran,


    I am not able to rotate screen display by its display's rotate file or framebuffer's rotate file. And writing sysfs is not a solution because it will overwrite by hwc in while. So please say me from code how you did that?

    Thanks,

    jeegar

  • Hi,

    Try to comment out the hwc file rotation specific part so that you can control via sysfs and it will not get updated each and every time the screen gets refreshed.