0

Recently, I have started using dumpsys SurfaceFlinger to gather some information about android graphics. I currently work on a development board called Odroid-XU3. The display is a Dell monitor which is connected to the board through HDMI cable.

In the very last few lines of the output of the above command, I have two displays, while I only expect to have one. One of them is Display[0] and the other one is Display[1]. The type column of each of the displays could be HWC or GLES. Some times they are both HWC or GLES and some other times one is HWC and the other one is GLES.

What is the difference between Display[0] and Display[1]? I have tried to find a documentation to understand how to interpret the output of the aforementioned command, but I have not found anything useful.

Matt
  • 796
  • 12
  • 25

1 Answers1

1

It would help to have the dumpsys output in your question, but I can make a couple of general observations.

display[0] is the device's built-in display. display[1] is an "external" display, in your case HDMI. These two indices are hard-wired. (Well, they were as of KitKat; I don't know if they've since un-hard-wired things.) Virtual displays start at index 2.

The chunk of text below the display is the hardware composer dump. It displays the layers on the screen, with a bunch of information about the position, rotation, and format of each layer.

The closest thing to documentation can be found in the HWC section of the graphics architecture doc. Given the level of the system you're working with, I would recommend you read the entire document. Beyond that, you can try to discern the meaning from the source code.

The arch doc does explain the difference between "HWC" and "GLES" in the output: "HWC" means the surface lives on a display overlay, while "GLES" means the surface is being composed with the GPU instead.

fadden
  • 51,356
  • 5
  • 116
  • 166
  • Display[1] is indeed for the external display. I just unplugged the display and only see Display[0] in the output. The only problem is that my board does not have any other display, e.g. I can only see the UI through my external display. So I'm not sure what Display[0] corresponds to. – Matt Jun 22 '15 at 16:59
  • When I last looked at SurfaceFlinger, it was really determined to have a "primary" built-in display. This didn't make sense for various applications (like TV set-top boxes), but the assumption was wired in. I don't remember if there's overhead incurred from unnecessary composition on the non-existent display -- if the Surfaces are "GLES" it may be composing them with the GPU. – fadden Jun 23 '15 at 05:02
  • It might be producing unnecessary output. – Matt Jun 23 '15 at 18:14