解决方案 »

  1.   

    你是做系统吗?你要先确认下你用的方案的hdmi输出的做法是什么样子的,各家都不太一样,最好直接问方案商。
      

  2.   

    谢谢回答BSP提供方应该不会就这些问题作解答的,原始BSP是三星的,然后移植过来发现问题不少,就自己排查了些。
      

  3.   

    三星的话,应该是通过android层的hwc来实现的,你可以dumpsys SurfaceFlinger 确认下是不是有两个display 设备。如果是hwc实现的话,那原因应该是hdmi和panel在方向上的差异,你可以debug下LocalDisplay里面的configureDisplayInTransactionLocked(),这个是在输出前设置display的信息的,可以尝试调整下hdmi display的方向。
      

  4.   

    看来你也是做系统的呀。这是我dumpsys之后的信息:
    Visible layers (count = 4)
    + Layer 0x8450c8 (com.android.systemui.ImageWallpaper)
          z=    21010, pos=(-533,-444), size=(2985,1920), isOpaque=1, needsDithering=0, invalidate=0, alpha=0xff, flags=0x00000000, tr=[1.00, 0.00][0.00, 1.00]
          client=0x8405b0, identity=4
          format= 2, activeBuffer=[2985x1920:2986,  1], transform-hint=0x00, queued-frames=0
                mBufferCount=4, mSynchronousMode=1, default-size=[2985x1920], mPixelFormat=1, mTexName=6
                current: {crop=[0,0,-1,-1], transform=0x00, current=-1}
                next   : {crop=[0,0,-1,-1], transform=0x00, FIFO(0)={}}
                 [00] state=FREE    , crop=[0,0,-1,-1], transform=0x00, timestamp=12718397758
                 [01] state=FREE    , crop=[0,0,-1,-1], transform=0x00, timestamp=0
                 [02] state=FREE    , crop=[0,0,-1,-1], transform=0x00, timestamp=0
                 [03] state=FREE    , crop=[0,0,-1,-1], transform=0x00, timestamp=0
      Region transparentRegion (this=0x845268, count=1)
        [  0,   0,   0,   0]
      Region transparentRegionScreen (this=0x8450fc, count=1)
        [  0,   0,   0,   0]
      Region visibleRegionScreen (this=0x8450d8, count=1)
        [  0,   0, 1920, 1032]
    + Layer 0x83e948 (com.android.launcher/com.android.launcher2.Launcher)
          z=    21015, pos=(0,0), size=(1920,1032), isOpaque=0, needsDithering=0, invalidate=0, alpha=0xff, flags=0x00000000, tr=[1.00, 0.00][0.00, 1.00]
          client=0x843958, identity=16
          format= 1, activeBuffer=[1920x1032:1920,  1], transform-hint=0x00, queued-frames=0
                mBufferCount=4, mSynchronousMode=1, default-size=[1920x1032], mPixelFormat=1, mTexName=9
                current: {crop=[0,0,-1,-1], transform=0x00, current=1}
                next   : {crop=[0,0,-1,-1], transform=0x00, FIFO(0)={}}
                 [00] state=FREE    , crop=[0,0,-1,-1], transform=0x00, timestamp=23780590389, 0x841c30 [1920x1032:1920,  1]
                >[01] state=QUEUED  , crop=[0,0,-1,-1], transform=0x00, timestamp=26119057723, 0x852970 [1920x1032:1920,  1]
                 [02] state=FREE    , crop=[0,0,-1,-1], transform=0x00, timestamp=0
                 [03] state=FREE    , crop=[0,0,-1,-1], transform=0x00, timestamp=0
      Region transparentRegion (this=0x83eae8, count=1)
        [  0,   0,   0,   0]
      Region transparentRegionScreen (this=0x83e97c, count=1)
        [  0,   0,   0,   0]
      Region visibleRegionScreen (this=0x83e958, count=1)
        [  0,   0, 1920, 1032]
    + Layer 0x843000 (StatusBar)
          z=   141000, pos=(0,1032), size=(1920,  48), isOpaque=1, needsDithering=0, invalidate=0, alpha=0xff, flags=0x00000000, tr=[1.00, 0.00][0.00, 1.00]
          client=0x8405b0, identity=3
          format= 4, activeBuffer=[1920x  48:1920,  4], transform-hint=0x00, queued-frames=0
                mBufferCount=2, mSynchronousMode=1, default-size=[1920x48], mPixelFormat=4, mTexName=5
                current: {crop=[0,0,-1,-1], transform=0x00, current=0}
                next   : {crop=[0,0,-1,-1], transform=0x00, FIFO(0)={}}
                >[00] state=QUEUED  , crop=[0,0,-1,-1], transform=0x00, timestamp=26098821390, 0x8404e0 [1920x  48:1920,  4]
                 [01] state=FREE    , crop=[0,0,-1,-1], transform=0x00, timestamp=23885046430, 0x841d18 [1920x  48:1920,  4]
      Region transparentRegion (this=0x8431a0, count=1)
        [  0,   0,   0,   0]
      Region transparentRegionScreen (this=0x843034, count=1)
        [  0,   0,   0,   0]
      Region visibleRegionScreen (this=0x843010, count=1)
        [  0, 1032, 1920, 1080]
    + Layer 0x83aca8 (Sprite)
          z=   231000, pos=(1913,-6), size=(  22,  28), isOpaque=0, needsDithering=0, invalidate=0, alpha=0xff, flags=0x00000000, tr=[1.00, 0.00][0.00, 1.00]
          client=0x843620, identity=5
          format= 1, activeBuffer=[  22x  28:  22,  1], transform-hint=0x00, queued-frames=0
                mBufferCount=2, mSynchronousMode=1, default-size=[22x28], mPixelFormat=1, mTexName=3
                current: {crop=[0,0,-1,-1], transform=0x00, current=0}
                next   : {crop=[0,0,-1,-1], transform=0x00, FIFO(0)={}}
                >[00] state=QUEUED  , crop=[0,0,-1,-1], transform=0x00, timestamp=14202493509, 0x83a4f0 [  22x  28:  22,  1]
                 [01] state=FREE    , crop=[0,0,-1,-1], transform=0x00, timestamp=0
      Region transparentRegion (this=0x83ae48, count=1)
        [  0,   0,   0,   0]
      Region transparentRegionScreen (this=0x83acdc, count=1)
        [  0,   0,   0,   0]
      Region visibleRegionScreen (this=0x83acb8, count=1)
        [1913,   0, 1920,  22]
    Purgatory state (0 entries)
    SurfaceFlinger global state:
    GLES: ARM, Mali-400 MP, OpenGL ES-CM 1.1
    EGL : 1.4 Linux-r2p4-02rel0
    EXTS: GL_OES_byte_coordinates GL_OES_fixed_point GL_OES_single_precision GL_OES_matrix_get GL_OES_read_format GL_OES_compressed_paletted_texture GL_OES_point_size_array GL_OES_point_sprite GL_OES_texture_npot GL_OES_query_matrix GL_OES_matrix_palette GL_OES_extended_matrix_palette GL_OES_compressed_ETC1_RGB8_texture GL_OES_EGL_image GL_OES_draw_texture GL_OES_depth_texture GL_OES_packed_depth_stencil GL_EXT_texture_format_BGRA8888 GL_OES_framebuffer_object GL_OES_stencil8 GL_OES_depth24 GL_ARM_rgba8 GL_OES_EGL_image_external GL_OES_EGL_sync GL_OES_rgb8_rgba8 GL_EXT_multisampled_render_to_texture GL_OES_texture_cube_map GL_EXT_discard_framebuffer
      Region WormholeRegion (this=0x821b44, count=1)
        [  0,   0,   0,   0]
      orientation=0, canDraw=1
      last eglSwapBuffers() time: 19329.708000 us
      last transaction time     : 5.541000 us
      refresh-rate              : 63.345001 fps
      x-dpi                     : 159.895081
      y-dpi                     : 160.421051
      h/w composer present and enabled
    Hardware Composer state:
      numHwLayers=4, flags=00000000
       type   |  handle  |   hints  |   flags  | tr | blend |  format  |       source crop         |           frame           name
    ----------+----------+----------+----------+----+-------+----------+---------------------------+--------------------------------
           FB | 0084aa88 | 00000000 | 00000000 | 00 | 00100 | 00000001 | [    0,    0, 2985, 1920] | [ -533, -444, 2452, 1476] com.android.systemui.ImageWallpaper
           FB | 00852970 | 00000000 | 00000000 | 00 | 00105 | 00000001 | [    0,    0, 1920, 1032] | [    0,    0, 1920, 1032] com.android.launcher/com.android.launcher2.Launcher
           FB | 008404e0 | 00000000 | 00000000 | 00 | 00100 | 00000004 | [    0,    0, 1920,   48] | [    0, 1032, 1920, 1080] StatusBar
           FB | 0083a4f0 | 00000000 | 00000000 | 00 | 00105 | 00000001 | [    0,    0,   22,   28] | [ 1913,   -6, 1935,   22] Sprite
    Allocated buffers:
      0x83a4f0:    2.41 KiB |   22 (  22) x   28 |        1 | 0x00000933
      0x8404e0:  180.00 KiB | 1920 (1920) x   48 |        4 | 0x00000933
      0x841c30: 7740.00 KiB | 1920 (1920) x 1032 |        1 | 0x00000f02
      0x841d18:  180.00 KiB | 1920 (1920) x   48 |        4 | 0x00000933
      0x84aa88: 22395.00 KiB | 2985 (2986) x 1920 |        1 | 0x00000f02
      0x852970: 7740.00 KiB | 1920 (1920) x 1032 |        1 | 0x00000f02
    Total allocated (estimate): 38237.41 KB
    我之前一直在device/samsung/exynos4/libhdmi/目录里面调的,主要还在看SecHdmi.cpp这个文件,主要是没有方向,摸索了很久了,我现在按照你的方向先看一看,谢谢!
      

  5.   


    你好,我在我的源码里搜不到跟configureDisplayInTransactionLocked有关的文件,可否给个参考呢?
      

  6.   

    你这个好像不是用的hwc来做的,那就不用看那个代码了。