my device is imx6q. If Multiple screenrecord at the same time, the device screen is flash,as shown in the appendix below。The screen is flash while surfaceflinger has two or more virtualdisplaysurface. I found the second virtualdisplaysurface hwcId=-12. Have anyone ever met the same problem and what is the root cause?
dumpsys SurfaceFlinger info:
Build configuration: [sf] [libui] [libgui]
Sync configuration: [using: EGL_ANDROID_native_fence_sync EGL_KHR_wait_sync]
DispSync configuration: app phase 1000000 ns, sf phase 1000000 ns, present offset 0 ns (refresh 16949152 ns)
Static screen stats:
< 1 frames: 26.563 s (20.9%)
< 2 frames: 47.140 s (37.2%)
< 3 frames: 2.559 s (2.0%)
< 4 frames: 5.184 s (4.1%)
< 5 frames: 4.024 s (3.2%)
< 6 frames: 2.813 s (2.2%)
< 7 frames: 0.867 s (0.7%)
7+ frames: 37.721 s (29.7%)
Buffering stats:
[Layer name] <Active time> <Two buffer> <Double buffered> <Triple buffered>
[com.autonavi.amapauto/com.autonavi.amapauto.MainMapActivity] 35.57 0.004 1.000 0.000
[SurfaceView - com.autonavi.amapauto/com.autonavi.amapauto.MainMapActivity] 13.78 1.000 1.000 0.000
[com.adayo.navigationbar/com.adayo.navigationbar.serviceterm.LocalPromptActivity] 0.26 0.000 1.000 0.000
Visible layers (count = 8)
+ LayerDim 0xb1fce800 (animation background stackId=1)
Region transparentRegion (this=0xb1fcea30, count=1)
[ 0, 0, 0, 0]
Region visibleRegion (this=0xb1fce808, count=1)
[ 0, 0, 0, 0]
Region surfaceDamageRegion (this=0xb1fce844, count=1)
[ 0, 0, 0, 0]
layerStack= 0, z= 21009, pos=(-256,-120), size=(1536, 720), crop=( 0, 0, -1, -1), finalCrop=( 0, 0, -1, -1), isOpaque=0, invalidate=0, alpha=0x00, flags=0x00000001, tr=[1.]
client=0xb1c22000
format= 0, activeBuffer=[ 0x 0: 0, 0], queued-frames=0, mRefreshPending=0
mTexName=4 mCurrentTexture=-1
mCurrentCrop=[0,0,0,0] mCurrentTransform=0
mAbandoned=0
-BufferQueue mMaxAcquiredBufferCount=1, mMaxDequeuedBufferCount=2, mDequeueBufferCannotBlock=0 mAsyncMode=0, default-size=[1536x720], default-format=1, transform-hint=00, FIFO(0)={}
[00:0x0] state=FREE
[01:0x0] state=FREE
[02:0x0] state=FREE
+ Layer 0xa815b400 (com.adayo.navigationbar/com.adayo.navigationbar.LuancherActivity)
Region transparentRegion (this=0xa815b630, count=1)
[ 0, 0, 0, 0]
Region visibleRegion (this=0xa815b408, count=1)
[ 0, 0, 0, 0]
Region surfaceDamageRegion (this=0xa815b444, count=1)
[ 0, 0, 0, 0]
layerStack= 0, z= 21020, pos=(0,0), size=(1024, 480), crop=( 0, 0,1024, 480), finalCrop=( 0, 0, 0, 0), isOpaque=1, invalidate=0, alpha=0xff, flags=0x00000003, tr=[1.00, 0.]
client=0xa8212800
format= 1, activeBuffer=[1024x 480:1024, 1], queued-frames=0, mRefreshPending=0
mTexName=5 mCurrentTexture=-1
mCurrentCrop=[0,0,0,0] mCurrentTransform=0
mAbandoned=0
-BufferQueue mMaxAcquiredBufferCount=1, mMaxDequeuedBufferCount=2, mDequeueBufferCannotBlock=0 mAsyncMode=0, default-size=[1024x480], default-format=1, transform-hint=00, FIFO(0)={}
[00:0x0] state=FREE
[01:0x0] state=FREE
[02:0x0] state=FREE
+ LayerDim 0xa9412000 (SurfaceView - com.autonavi.amapauto/com.autonavi.amapauto.MainMapActivity)
Region transparentRegion (this=0xa9412230, count=1)
[ 0, 0, 0, 0]
Region visibleRegion (this=0xa9412008, count=1)
[ 0, 0, 0, 0]
Region surfaceDamageRegion (this=0xa9412044, count=1)
[ 0, 0, 0, 0]
layerStack= 0, z= 21024, pos=(0,0), size=( 909, 480), crop=( 0, 0, 909, 480), finalCrop=( 0, 0, -1, -1), isOpaque=0, invalidate=0, alpha=0xff, flags=0x00000002, tr=[1.00, 0.]
client=0xa8212a40
format= 0, activeBuffer=[ 0x 0: 0, 0], queued-frames=0, mRefreshPending=0
mTexName=10 mCurrentTexture=-1
mCurrentCrop=[0,0,0,0] mCurrentTransform=0
mAbandoned=0
-BufferQueue mMaxAcquiredBufferCount=1, mMaxDequeuedBufferCount=2, mDequeueBufferCannotBlock=0 mAsyncMode=0, default-size=[1x1], default-format=1, transform-hint=00, FIFO(0)={}
[00:0x0] state=FREE
[01:0x0] state=FREE
[02:0x0] state=FREE
+ Layer 0xb1fcfc00 (com.android.systemui.ImageWallpaper)
Region transparentRegion (this=0xb1fcfe30, count=1)
[ 0, 0, 0, 0]
Region visibleRegion (this=0xb1fcfc08, count=1)
[ 0, 0, 0, 0]
Region surfaceDamageRegion (this=0xb1fcfc44, count=1)
[ 0, 0, 0, 0]
layerStack= 0, z= 21025, pos=(0,-272), size=(1243,1024), crop=( 0, 0,1243,1024), finalCrop=( 0, 0, -1, -1), isOpaque=1, invalidate=0, alpha=0x00, flags=0x00000003, tr=[1.00,]
client=0xb1c22040
format= 2, activeBuffer=[1243x1024:1248, 2], queued-frames=0, mRefreshPending=0
mTexName=3 mCurrentTexture=0
mCurrentCrop=[0,0,0,0] mCurrentTransform=0
mAbandoned=0
-BufferQueue mMaxAcquiredBufferCount=1, mMaxDequeuedBufferCount=2, mDequeueBufferCannotBlock=0 mAsyncMode=0, default-size=[1243x1024], default-format=2, transform-hint=00, FIFO(0)={}
[00:0x0] state=FREE
[01:0x0] state=FREE
[02:0x0] state=FREE
+ Layer 0xb1fcd400 (SurfaceView - com.autonavi.amapauto/com.autonavi.amapauto.MainMapActivity)
Region transparentRegion (this=0xb1fcd630, count=1)
[ 0, 0, 0, 0]
Region visibleRegion (this=0xb1fcd408, count=1)
[ 0, 0, 909, 480]
Region surfaceDamageRegion (this=0xb1fcd444, count=1)
[ 0, 0, 0, 0]
layerStack= 0, z= 21025, pos=(0,0), size=( 909, 480), crop=( 0, 0, 909, 480), finalCrop=( 0, 0, -1, -1), isOpaque=1, invalidate=0, alpha=0xff, flags=0x00000002, tr=[1.00, 0.]
client=0xa8212a40
format= 4, activeBuffer=[ 909x 480: 912, 4], queued-frames=0, mRefreshPending=0
mTexName=9 mCurrentTexture=2
mCurrentCrop=[0,0,0,0] mCurrentTransform=0
mAbandoned=0
-BufferQueue mMaxAcquiredBufferCount=1, mMaxDequeuedBufferCount=2, mDequeueBufferCannotBlock=0 mAsyncMode=0, default-size=[909x480], default-format=4, transform-hint=00, FIFO(0)={}
[00:0xa8239940] state=DEQUEUED, 0xa817f040 [ 909x 480: 912, 4]
>[02:0xa823a840] state=ACQUIRED, 0xa817fd00 [ 909x 480: 912, 4]
[01:0xa82399e0] state=FREE , 0xa817f340 [ 909x 480: 912, 4]
+ Layer 0xa815dc00 (com.autonavi.amapauto/com.autonavi.amapauto.MainMapActivity)
Region transparentRegion (this=0xa815de30, count=1)
[ 0, 0, 0, 0]
Region visibleRegion (this=0xa815dc08, count=1)
[ 0, 0, 909, 480]
Region surfaceDamageRegion (this=0xa815dc44, count=1)
[ 95, 35, 123, 63]
layerStack= 0, z= 21030, pos=(0,0), size=(1024, 480), crop=( 0, 0, 909, 480), finalCrop=( 0, 0, -1, -1), isOpaque=0, invalidate=0, alpha=0xff, flags=0x00000000, tr=[1.00, 0.]
client=0xa8212a40
format= 1, activeBuffer=[1024x 480:1024, 1], queued-frames=2, mRefreshPending=0
mTexName=7 mCurrentTexture=1
mCurrentCrop=[0,0,0,0] mCurrentTransform=0
mAbandoned=0
-BufferQueue mMaxAcquiredBufferCount=1, mMaxDequeuedBufferCount=2, mDequeueBufferCannotBlock=0 mAsyncMode=0, default-size=[1024x480], default-format=1, transform-hint=00, FIFO(2)={02E
00:0xb1c0c6e0 crop=[0,0,0,0], xform=0x00, time=0x1ec5eeb122, scale=FREEZE
}
[00:0xb1c0c6e0] state=QUEUED , 0xb1c04380 [1024x 480:1024, 1]
>[01:0xa823a700] state=ACQUIRED, 0xa817fb80 [1024x 480:1024, 1]
[02:0xa823a660] state=QUEUED , 0xa817f940 [1024x 480:1024, 1]
+ Layer 0xa815c800 (StatusBar)
Region transparentRegion (this=0xa815ca30, count=1)
[ 0, 0, 0, 0]
Region visibleRegion (this=0xa815c808, count=1)
[ 0, 0, 0, 0]
Region surfaceDamageRegion (this=0xa815c844, count=1)
[ 0, 0, 0, 0]
layerStack= 0, z= 161000, pos=(0,0), size=(1024, 1), crop=( 0, 0, -1, -1), finalCrop=( 0, 0, -1, -1), isOpaque=0, invalidate=0, alpha=0xff, flags=0x00000001, tr=[1.00, 0.]
client=0xb1c22040
format= 1, activeBuffer=[ 0x 0: 0, 0], queued-frames=0, mRefreshPending=0
mTexName=6 mCurrentTexture=-1
mCurrentCrop=[0,0,0,0] mCurrentTransform=0
mAbandoned=0
-BufferQueue mMaxAcquiredBufferCount=1, mMaxDequeuedBufferCount=2, mDequeueBufferCannotBlock=0 mAsyncMode=0, default-size=[1024x1], default-format=1, transform-hint=00, FIFO(0)={}
[02:0xb1c0c8c0] state=FREE , 0xb1c04500 [1024x 1:1024, 1]
[01:0xb1c0c820] state=FREE , 0xb1c04080 [1024x 1:1024, 1]
[00:0xb1c0c780] state=FREE , 0xb1c04140 [1024x 1:1024, 1]
+ Layer 0xa815a000 ()
Region transparentRegion (this=0xa815a230, count=1)
[ 0, 0, 0, 0]
Region visibleRegion (this=0xa815a008, count=1)
[909, 0, 1024, 480]
Region surfaceDamageRegion (this=0xa815a044, count=1)
[ 0, 0, 0, 0]
layerStack= 0, z= 211000, pos=(909,0), size=( 115, 480), crop=( 0, 0, 115, 480), finalCrop=( 0, 0, -1, -1), isOpaque=0, invalidate=0, alpha=0xff, flags=0x00000000, tr=[1.00, ]
client=0xa8212f40
format= 1, activeBuffer=[ 115x 480: 128, 1], queued-frames=0, mRefreshPending=0
mTexName=2 mCurrentTexture=0
mCurrentCrop=[0,0,0,0] mCurrentTransform=0
mAbandoned=0
-BufferQueue mMaxAcquiredBufferCount=1, mMaxDequeuedBufferCount=2, mDequeueBufferCannotBlock=0 mAsyncMode=0, default-size=[115x480], default-format=1, transform-hint=00, FIFO(0)={}
>[00:0xa823a020] state=ACQUIRED, 0xa817e080 [ 115x 480: 128, 1]
[02:0xa823a2a0] state=DEQUEUED, 0xa817de40 [ 115x 480: 128, 1]
[01:0xa823a200] state=FREE , 0xa817f100 [ 115x 480: 128, 1]
Displays (3 entries)
+ DisplayDevice: NdkMediaCodec
type=2, hwcId=2, layerStack=0, (1024x 480), ANativeWindow=0xb1fff808, orient= 0 (type=00000000), flips=1553, isSecure=1, powerMode=2, activeConfig=0, numLayers=3
v:[0,0,1024,480], f:[0,0,1024,480], s:[0,0,1024,480],transform:[[1.000,0.000,-0.000][0.000,1.000,-0.000][0.000,0.000,1.000]]
+ DisplayDevice: NdkMediaCodec
type=2, hwcId=-12, layerStack=0, (1024x 480), ANativeWindow=0xa7f72008, orient= 0 (type=00000000), flips=594, isSecure=1, powerMode=2, activeConfig=0, numLayers=3
v:[0,0,1024,480], f:[0,0,1024,480], s:[0,0,1024,480],transform:[[1.000,0.000,-0.000][0.000,1.000,-0.000][0.000,0.000,1.000]]
+ DisplayDevice: Built-in Screen
type=0, hwcId=0, layerStack=0, (1024x 480), ANativeWindow=0xb1fff008, orient= 0 (type=00000000), flips=4251, isSecure=1, powerMode=2, activeConfig=0, numLayers=3
v:[0,0,1024,480], f:[0,0,1024,480], s:[0,0,1024,480],transform:[[1.000,0.000,-0.000][0.000,1.000,-0.000][0.000,0.000,1.000]]
mAbandoned=0
-BufferQueue mMaxAcquiredBufferCount=2, mMaxDequeuedBufferCount=1, mDequeueBufferCannotBlock=0 mAsyncMode=0, default-size=[1024x480], default-format=1, transform-hint=00, FIFO(0)={}
[00:0xa93b23c0] state=DEQUEUED, 0xb1fc3a80 [1024x 480:1024, 1]
>[01:0xa93b25a0] state=ACQUIRED, 0xb1fc3c00 [1024x 480:1024, 1]
[02:0xa93e2440] state=FREE , 0xa817d0c0 [1024x 480:1024, 1]
SurfaceFlinger global state:
EGL implementation : 1.5
EGL_KHR_fence_sync EGL_KHR_reusable_sync EGL_KHR_wait_sync EGL_KHR_image EGL_KHR_image_base EGL_KHR_image_pixmap EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_gl_renderbufc
GLES: Vivante Corporation, Vivante GC2000, OpenGL ES 3.0 V6.2.0.p2.79565
GL_EXT_debug_marker GL_OES_vertex_type_10_10_10_2 GL_OES_vertex_half_float GL_OES_element_index_uint GL_OES_mapbuffer GL_OES_vertex_array_object GL_OES_compressed_ETC1_RGB8_texture GL_OES_compre
Region undefinedRegion (this=0xa93e6b6c, count=1)
[909, 0, 1024, 480]
orientation=0, isDisplayOn=1
last eglSwapBuffers() time: 10870.000000 us
last transaction time : 89.333000 us
transaction-flags : 00000000
refresh-rate : 59.000002 fps
x-dpi : 159.567993
y-dpi : 160.421005
gpu_to_cpu_unsupported : 0
eglSwapBuffers time: 3650.000000 us
transaction time: 0.000000 us
VSYNC state: enabled
soft-vsync: disabled
numListeners=21,
events-delivered: 4638
0xb1c1a000: count=-1
0xb1c1a028: count=-1
0xb1c1a050: count=-1
0xb1c1a078: count=-1
0xb1c1a0a0: count=-1
0xb1c1a0c8: count=-1
0xb1c1a140: count=-1
0xb1f9c310: count=-1
0xb1f9c338: count=-1
0xb1f9c388: count=-1
0xb1f9c450: count=-1
0xb1f9c4c8: count=-1
0xb1f9c540: count=-1
0xb1f9c568: count=-1
0xb1f9c590: count=-1
0xb1f9c6a8: count=-1
0xb1f9c6f8: count=-1
0xb1f9c8d8: count=-1
0xb1f9cc20: count=-1
0xb1f9cc70: count=-1
0xb1f9cc98: count=-1
h/w composer state:
h/w composer present and enabled
Hardware Composer state (version 01030000):
mDebugForceFakeVSync=0
Display[0] configurations (* current):
* 0: 1024x480, xdpi=159.567993, ydpi=160.421005, refresh=16949152, colorMode=0
numHwLayers=4, flags=00000000
type | handle | hint | flag | tr | blnd | format | source crop (l,t,r,b) | frame | name
-----------+----------+------+------+----+------+-------------+--------------------------------+------------------------+------
HWC | a817fd00 | 0000 | 0000 | 00 | 0100 | RGB_565 | 0.0, 0.0, 909.0, 480.0 | 0, 0, 909, 480 | SurfaceView - com.autonavi.amapauto/com.autonavi.amapauto.MainMapActivity
HWC | a817f940 | 0000 | 0000 | 00 | 0105 | RGBA_8888 | 0.0, 0.0, 909.0, 480.0 | 0, 0, 909, 480 | com.autonavi.amapauto/com.autonavi.amapauto.MainMapActivity
HWC | a817e080 | 0000 | 0000 | 00 | 0105 | RGBA_8888 | 0.0, 0.0, 115.0, 480.0 | 909, 0, 1024, 480 |
FB TARGET | b1fc3c00 | 0000 | 0000 | 00 | 0105 | RGBA_8888 | 0.0, 0.0, 1024.0, 480.0 | 0, 0, 1024, 480 | HWC_FRAMEBUFFER_TARGET
Display[2] configurations (* current):
* 0: 1024x480, xdpi=213.000000, ydpi=213.000000, refresh=4294967040, colorMode=0
numHwLayers=4, flags=00000000
type | handle | hint | flag | tr | blnd | format | source crop (l,t,r,b) | frame | name
-----------+----------+------+------+----+------+-------------+--------------------------------+------------------------+------
HWC | a817fd00 | 0000 | 0000 | 00 | 0100 | RGB_565 | 0.0, 0.0, 909.0, 480.0 | 0, 0, 909, 480 | SurfaceView - com.autonavi.amapauto/com.autonavi.amapauto.MainMapActivity
HWC | a817f940 | 0000 | 0000 | 00 | 0105 | RGBA_8888 | 0.0, 0.0, 909.0, 480.0 | 0, 0, 909, 480 | com.autonavi.amapauto/com.autonavi.amapauto.MainMapActivity
HWC | a817e080 | 0000 | 0000 | 00 | 0105 | RGBA_8888 | 0.0, 0.0, 115.0, 480.0 | 909, 0, 1024, 480 |
FB TARGET | a817fa00 | 0000 | 0000 | 00 | 0105 | RGBA_8888 | 0.0, 0.0, 1024.0, 480.0 | 0, 0, 1024, 480 | HWC_FRAMEBUFFER_TARGET
Allocated buffers:
0xa817d0c0: 1920.00 KiB | 1024 (1024) x 480 | 1 | 0x00001b00 | FramebufferSurface
0xa817de40: 240.00 KiB | 115 ( 128) x 480 | 1 | 0x00000b00 |
0xa817e080: 240.00 KiB | 115 ( 128) x 480 | 1 | 0x00000b00 |
0xa817f040: 855.00 KiB | 909 ( 912) x 480 | 4 | 0x00000b00 | SurfaceView - com.autonavi.amapauto/com.autonavi.amapauto.MainMapActivity
0xa817f100: 240.00 KiB | 115 ( 128) x 480 | 1 | 0x00000b00 |
0xa817f340: 855.00 KiB | 909 ( 912) x 480 | 4 | 0x00000b00 | SurfaceView - com.autonavi.amapauto/com.autonavi.amapauto.MainMapActivity
0xa817f580: 1920.00 KiB | 1024 (1024) x 480 | 1 | 0x00000b00 | com.adayo.navigationbar/com.adayo.navigationbar.LuancherActivity
0xa817f940: 1920.00 KiB | 1024 (1024) x 480 | 1 | 0x00000b00 | com.autonavi.amapauto/com.autonavi.amapauto.MainMapActivity
0xa817fb80: 1920.00 KiB | 1024 (1024) x 480 | 1 | 0x00000b00 | com.autonavi.amapauto/com.autonavi.amapauto.MainMapActivity
0xa817fd00: 855.00 KiB | 909 ( 912) x 480 | 4 | 0x00000b00 | SurfaceView - com.autonavi.amapauto/com.autonavi.amapauto.MainMapActivity
0xb1c04080: 4.00 KiB | 1024 (1024) x 1 | 1 | 0x00000b00 | StatusBar
0xb1c04140: 4.00 KiB | 1024 (1024) x 1 | 1 | 0x00000b00 | StatusBar
0xb1c04380: 1920.00 KiB | 1024 (1024) x 480 | 1 | 0x00000b00 | com.autonavi.amapauto/com.autonavi.amapauto.MainMapActivity
0xb1c04500: 4.00 KiB | 1024 (1024) x 1 | 1 | 0x00000b00 | StatusBar
0xb1c045c0: 4992.00 KiB | 1243 (1248) x 1024 | 2 | 0x00000b00 | com.android.systemui.ImageWallpaper
0xb1fc3a80: 1920.00 KiB | 1024 (1024) x 480 | 1 | 0x00001b00 | FramebufferSurface
0xb1fc3c00: 1920.00 KiB | 1024 (1024) x 480 | 1 | 0x00001b00 | FramebufferSurface
Total allocated (estimate): 21729.00 KB
Hello,
Can you please tell me which Android version are you using and if you are using our Sabresd board?
Best Regards,
Diego.
Hello,
Is there a possibility that you can upgrade to our newer Android version (7.1.2)?
Some errors were fixed in that version, probably the error that you are facing was fixed.
Best regards,
Diego.
Hello,
Thanks for your reply. I can not upgrade to Android 7.1.1. Can you tell me what is the root cause? Is it a mistake about surfaceflinger or a mistake in the hwcomposer hardware device?
Best regards.
Hello,
Let me see if I can reproduce your error. However, can you please tell me if you are using our demo image, or is an Android image made by yourself using our BSP.
Best Regards,
Diego.