[i.MX8QM] DRM plane assignment fails if DMABuf is in middle of screen on 4K monitor

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

[i.MX8QM] DRM plane assignment fails if DMABuf is in middle of screen on 4K monitor

896 Views
dothanhtrung
Contributor II

Hi,

 

Problem

I have an Apalis i.MX8 board with a 4K monitor. I am trying to make DMABuf be assigned to DRM plane in Weston.

It succeeds if the buffer is completely inside a half of screen (left or right).

If the buffer is at middle of screen, buffer cannot be assigned to DRM plane.

Please see the picture below.

multi_buffers.png

Above is result when display DMABufs on 4K (3840x2160) monitor:

  • 2 buffers are completely in the left half of screen (half screen width = 1920): The plane assignment is OKAY.
  • 1 buffer is at middle of screen: The middle buffer cannot be assigned to DRM plane.
  • 2 buffers are in left half and right half of screen, none at middle: The plane assignment is OKAY.

 

This problem doesn't happen if only one buffer is displayed.

single_buffer.png

 

How to reproduce

In my case, I implemented an application to create and display DMABuf, but the problem can be reproduced with `weston-simple-dmabuf-egl -g`.

1. Run `weston-simple-dmabuf-egl -g -s 1922`. Set size to 1922 to make sure output buffer will be middle of screen.

When only display one DMABuf, as we can see in `weston-debug` log, the plane assignment is okay.

 

Layer 5 (pos 0x50000000):                                                                                        
        View 0 (role xdg_toplevel, PID 1138, surface ID 3, top-level window 'simple-dmabuf-egl', 0xaaaac18d7440):      
                position: (1079, 3) -> (3001, 1925)  #### middle DMABuf                                                                  
                [fully opaque]                                                                                         
                outputs: 0 (HDMI-A-1) (primary)                                                                        
                dmabuf buffer                                                                                          
                        format: 0x34325258 XRGB8888                                                                    
                        modifier: 0x0
...
[atomic] drmModeAtomicCommit                                                                                           
        [repaint] Using mixed state composition                                                                        
        [repaint] view 0xaaaac18d7440 on Overlay plane 39 #### DMABuf was assigned

 

 

2. Run another `weston-simple-dmabuf-egl -g -s 200`.

After add another DMABuf, the middle DMABuf failed to be assigned to plane with error "kernel test failed".

 

Layer 5 (pos 0x50000000):                                                                                              
        View 0 (role xdg_toplevel, PID 1144, surface ID 3, top-level window 'simple-dmabuf-egl', 0xaaaac18bb190):      
                position: (2586, 1052) -> (2786, 1252)  #### right DMABuf                                                              
                [fully opaque]                                                                                         
                outputs: 0 (HDMI-A-1) (primary)                                                                        
                dmabuf buffer                                                                                          
                        format: 0x34325258 XRGB8888                                                                    
                        modifier: 0x0                                                                                  
        View 1 (role xdg_toplevel, PID 1138, surface ID 3, top-level window 'simple-dmabuf-egl', 0xaaaac18d7440):      
                position: (1079, 3) -> (3001, 1925)  #### middle DMABuf                                                                 
                [fully opaque]                                                                                         
                outputs: 0 (HDMI-A-1) (primary)                                                                        
                dmabuf buffer                                                                                          
                        format: 0x34325258 XRGB8888                                                                    
                        modifier: 0x0
...
[atomic] drmModeAtomicCommit                                                                                           
    [overlay] provisionally placing view 0xaaaac18bb190 on overlay 39 in mixed mode    #### right DMABuf            
        [view] view 0xaaaac18bb190 has been placed to overlay plane with computed zpos 3
...
[atomic] drmModeAtomicCommit                                                                                           
    [overlay] not placing view 0xaaaac18d7440 on overlay 46 in mixed mode: kernel test failed
...
[atomic] drmModeAtomicCommit                                                                                           
    [overlay] not placing view 0xaaaac18d7440 on overlay 53 in mixed mode: kernel test failed
...
[atomic] drmModeAtomicCommit                                                                                           
        [repaint] Using mixed state composition                                                                        
        [repaint] view 0xaaaac18bb190 on Overlay plane 39  #### right DMABuf                                                            
        [repaint] view 0xaaaac18d7440 using renderer composition #### middle DMABuf

 

 

Environment

  • Board: Apalis i.MX8 QM
  • Kernel: 5.4.193
  • Weston: lf-5.10.y-1.0.0
  • Monitor: 3840x2160

Weston configuration:

 

[core]
use-g2d=0
idle-time=0

 

 

Have you experienced this problem before or have any ideas about the cause of this issue?

 

Thank you very much,

Trung

Tags (3)
0 Kudos
Reply
1 Reply

885 Views
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello,

You better go with Apalis, since you are using a non nxp BSP, or you can try the latest BSP from:

https://www.nxp.com/design/software/embedded-software/i-mx-software/embedded-linux-for-i-mx-applicat...

Regards

0 Kudos
Reply