Re: [PATCH v9 00/23] drm/rockchip: RK356x VOP2 support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Apr 06, 2022 at 06:00:00PM +0200, Piotr Oniszczuk wrote:
> 
> 
> > Wiadomość napisana przez Sascha Hauer <s.hauer@xxxxxxxxxxxxxx> w dniu 06.04.2022, o godz. 16:58:
> > 
> > On Wed, Apr 06, 2022 at 11:47:22AM +0200, Piotr Oniszczuk wrote:
> >> 
> >> 
> >> Sascha,
> >> 
> >> Having vop2 finally working with drm planes rendering i discovered another issue: overlay osd is invisible at playback. 
> >> 
> >> context: player draws video on plane #X and osd on overlay plane #Y
> >> When user do i.e. seek at playback - app uses overlay OSD plane to display OSD to user. This approach is used by majority of players (KODI, etc.)
> >> 
> >> This works well on all platforms i have  - except rk3566 
> >> 
> >> For me it looks like z-order vop2 issue or alpha blending issue.
> >> As this is only on rk3566 and only on drm-planes mode - issue is vop2 related imho.
> > 
> > During my testing I haven't seen any z-order issues, but that doesn't
> > mean much. With Weston I can currently only use the AFBC enabled cluster
> > windows and with modetest I can only use the non-cluster windows. Are
> > you able to find out which window is used for the OSD?
> > 
> > Sascha
> > 
> > -- 
> > Pengutronix e.K.                           |                             |
> > Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
> > 31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
> > Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
> 
> WiIl this answer to your Q?

Yes, and it raises a few more ;)

> 
> player:
> 
> 2022-04-06 17:52:26.424487 I Display: Geometry: 1920x1080+0+0 Size(Qt): 930mmx530mm
> 2022-04-06 17:52:26.424922 I /dev/dri/card0 Qt EGLFS/KMS Fd:5 Crtc id:49 Connector id:51 Atomic: 1
> 2022-04-06 17:52:26.425061 I /dev/dri/card0: Authenticated
> 2022-04-06 17:52:26.534362 I /dev/dri/card0: Found 3 planes; 3 for this CRTC
> 2022-04-06 17:52:26.534384 I /dev/dri/card0: Selected Plane #37 Overlay for video
> 2022-04-06 17:52:26.534430 I /dev/dri/card0: Supported DRM video formats: NV12,NV16,NV24,YVYU,VYUY
> 2022-04-06 17:52:26.534437 I /dev/dri/card0: Selected Plane #43 Overlay for GUI
> 2022-04-06 17:52:26.534480 I /dev/dri/card0: DRM device retrieved from Qt
> 2022-04-06 17:52:26.534489 I /dev/dri/card0: Multi-plane setup: Requested: 1 Setup: 1
> 
> so:
> plane #37 is where video is drawing
> plane #43 is GUI/OSD
> 
> 
> dri state:
> 
> root@Myth-Frontend-06c7e973c2f1:~ # cat /sys/kernel/debug/dri/0/state
> plane[31]: Smart0-win0
>         crtc=video_port0
>         fb=58
>                 allocated by = mythfrontend
>                 refcount=2
>                 format=XR24 little-endian (0x34325258)
>                 modifier=0x0
>                 size=1920x1080
>                 layers:
>                         size[0]=1920x1080
>                         pitch[0]=7680
>                         offset[0]=0
>                         obj[0]:
>                                 name=0
>                                 refcount=4
>                                 start=00000000
>                                 size=8294400
>                                 imported=no
>         crtc-pos=1920x1080+0+0
>         src-pos=1920.000000x1080.000000+0.000000+0.000000
>         rotation=1
>         normalized-zpos=0
>         color-encoding=ITU-R BT.601 YCbCr
>         color-range=YCbCr limited range

Ok, this seems to be the base plane.

> plane[37]: Esmart0-win0
>         crtc=(null)

crtc=null? Did you capture the state without a video playing? Otherwise
I would expect a crtc associated here.

>         fb=0
>         crtc-pos=1920x1080+0+0
>         src-pos=1920.000000x1080.000000+0.000000+0.000000
>         rotation=1
>         normalized-zpos=0
>         color-encoding=ITU-R BT.601 YCbCr
>         color-range=YCbCr limited range
> plane[43]: Cluster0-win0
>         crtc=(null)

This plane is selected for OSD by your application. The cluster windows
can't show a regular linear framebuffer, they can only do AFBC. You'll
see that in modetest:

	in_formats blob decoded:
                 XR24:  ARM_BLOCK_SIZE=16x16,
			 ARM_BLOCK_SIZE=16x16,MODE=SPARSE
			 ARM_BLOCK_SIZE=16x16,MODE=YTR
			 ARM_BLOCK_SIZE=16x16,MODE=CBR
			 ARM_BLOCK_SIZE=16x16,MODE=YTR|SPARSE
			 ARM_BLOCK_SIZE=16x16,MODE=SPARSE|CBR
			 ARM_BLOCK_SIZE=16x16,MODE=YTR|CBR
			 ARM_BLOCK_SIZE=16x16,MODE=YTR|SPARSE|CBR
			 ARM_BLOCK_SIZE=16x16,MODE=YTR|SPLIT|SPARSE
		...

The other windows show "XR24: LINEAR" here. Does your application use
the GPU to render the OSD? Otherwise I doubt your application can
handle this format, so it should not use this layer.

>         fb=0
>         crtc-pos=0x0+0+0
>         src-pos=0.000000x0.000000+0.000000+0.000000
>         rotation=1
>         normalized-zpos=0

I would be interested in this output when the player is actually playing
something. This normalized-zpos puzzles me a bit. Normally it should be
unique over all enabled planes for a CRTC. Maybe 0 is ok here because
it's currently not associated to any CRTC.

Sascha


-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux