> Wiadomość napisana przez Sascha Hauer <s.ha...@pengutronix.de> w dniu
> 07.04.2022, o godz. 12:16:
>
>
> Yes, and it raises a few more ;)
pls see at end of email: DRI state with playback
>
>>
>> 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.
Indeed. This was from player sitting in UI (no playback).
Pls see at bottom of email state with video playback
(it has crtc=video_port0)
>
>> 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?
Yes.
> 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.
Pls see at bottom.
> This normalized-zpos puzzles me a bit.
I'm not surprised :-).
You are puzzled probably because rk35xx current VOP2 code requires - from me -
to force Z-position = 0 in Qt if I want to have GUI visible on screen.
Without this screen is black.
This seems to be i think - another issue to resolve (no any other SoC requires
this....).
I'm not sure where issue is - but as i need to do this only on VOP2 - i think
there is somewhere something not right in VOP2 code.
> 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.
It is because of me setting it to 0 (see explanations above)
>
>
DRI state with video playback:
root@Myth-Frontend-06c7e973c2f1:~ # cat /sys/kernel/debug/dri/0/state
plane[31]: Smart0-win0
crtc=video_port0
fb=55
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=1
color-encoding=ITU-R BT.601 YCbCr
color-range=YCbCr limited range
plane[37]: Esmart0-win0
crtc=video_port0
fb=65
allocated by = mythfrontend
refcount=2
format=NV12 little-endian (0x3231564e)
modifier=0x0
size=1920x1080
layers:
size[0]=1920x1080
pitch[0]=1920
offset[0]=0
obj[0]:
name=0
refcount=3
start=00000000
size=3657728
imported=yes
size[1]=960x540
pitch[1]=1920
offset[1]=2088960
obj[1]:
name=0
refcount=3
start=00000000
size=3657728
imported=yes
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)
fb=0
crtc-pos=0x0+0+0
src-pos=0.000000x0.000000+0.000000+0.000000
rotation=1
normalized-zpos=0
color-encoding=ITU-R BT.601 YCbCr
color-range=YCbCr limited range
crtc[49]: video_port0
enable=1
active=1
self_refresh_active=0
planes_changed=1
mode_changed=0
active_changed=0
connectors_changed=0
color_mgmt_changed=0
plane_mask=3
connector_mask=1
encoder_mask=1
mode: "1920x1080": 50 148500 1920 2448 2492 2640 1080 1084 1089 1125
0x40 0x5
connector[51]: HDMI-A-1
crtc=video_port0
self_refresh_aware=0