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

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

 




> Wiadomość napisana przez Sascha Hauer <s.hauer@xxxxxxxxxxxxxx> w dniu 11.04.2022, o godz. 11:08:
> 
> Ok, so #37 for video, #43 for GUI.
> 
> Where is the OSD rendered? Is it rendered on the GUI layer?

Yes

> 
>> .......
>> 
>> 
>> playback:
>> .....
>> 2022-04-08 17:48:55.457823 I DRMVideo: Using Plane #37 for video
>> .....
>> 
>> DRI state with zpos=0, kms_id=0 and ongoing playback:
>> 
>> 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
> 
> Base plane.
> 
>> 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=1
>>        color-encoding=ITU-R BT.601 YCbCr
>>        color-range=YCbCr limited range
> 
> Video plane, rendered full screen above the base plane without alpha.
> 
>> 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
> 
> Here should be the GUI, but this plane is not active.

I suspect this is because above DRI state report was with user-forced Qt vars.
This was because to get UI non-black screen.
I done this by request to provide DRI state with video playback. (to get playback I need UI to navigate)
By this DRI state report might misleading as i'm manually forcing Qt KMS_Index/Zpos. 

> 
> With this state I would expect to see a full screen video without
> anything on it. Is that the case? If yes, then fine.

yes. this is a case.
so this is fine.

So I think non-visible OSD issue is side effect of other, root cause issue: issue causing user to force Qt vars to get UI on VOP2

Context: (my view):

We have stack of 3 components interacting:
1.player (draws video to DRM plane)
2.Qt (draws UI to GL to DRM plane)
3.DRM (mixing planes+displaying) 

Stack coperation:
a. DRM reports available planes+attributes to player
b. player - accordingly to above report - sets Qt (KMS/Zpos, etc).
c. user starting player. player uses Qt for drawing UI 
d. user asks for playback
e. player draws (by Qt) OSD  and directly video (accordingly to Qt setup in (b)

With VOP2 i have issue at (c): screen is black.
Above procedure works fully automated on all other platforms i have/supporting. 

For me most probable hypothesis:

1\
- In steep (b) Qt is set (or configured to use DRM) in way that UI resulting with black screen
- this is because in (a) player receives (wrong?) DRM report - and by this Qt is wrongly set
This may explain we have issue at (c)

2\
- In steep (b) Qt is set & using DRM in way that UI should work ok
- but VOP2 draws black screen (by some reason)
This may explain we have issue at (c)


Alternative hypothesis:
DRM properly realises (a)
Player wrongly realises (b)
This hypothesis is way less probable (for me) because:
1. procedure (a)...(e) works well on all other SoC. No need from user to overwrite automatically detected/set of Qt vars.
2. vop2 is single requiring from user overwrite of autodetected Qt vars. to get non-black screen UI.

I'm a bit out of ideas how to progress with this.

As (a)...(e) concept works ok (and afaik also is used by other players exploiting DRM planes rendering) - i'm not sure should I play with (b) because of VOP2 black-screen?


   
BTW:
this is DRI state when there is no any Qt.vars overwrites.
(so all is autodetected/setup like in other  working SoCs; VOP2 gives here black screen UI):

2022-04-08 17:47:57.035668 I /dev/dri/card0 Qt EGLFS/KMS Fd:5 Crtc id:49 Connector id:51 Atomic: 1
2022-04-08 17:47:57.035806 I /dev/dri/card0: Authenticated
2022-04-08 17:47:57.145447 I /dev/dri/card0: Found 3 planes; 3 for this CRTC
2022-04-08 17:47:57.145469 I /dev/dri/card0: Selected Plane #37 Overlay for video
2022-04-08 17:47:57.145515 I /dev/dri/card0: Supported DRM video formats: NV12,NV16,NV24,YVYU,VYUY
2022-04-08 17:47:57.145523 I /dev/dri/card0: Selected Plane #43 Overlay for GUI
2022-04-08 17:47:57.145567 I /dev/dri/card0: DRM device retrieved from Qt
2022-04-08 17:47:57.145574 I /dev/dri/card0: Multi-plane setup: Requested: 1 Setup: 1

plane[31]: Smart0-win0
        crtc=video_port0
        fb=53
                allocated by = [fbcon]
                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=3
                                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
plane[37]: Esmart0-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
plane[43]: Cluster0-win0
        crtc=video_port0
        fb=58
                allocated by = mythfrontend
                refcount=2
                format=AR24 little-endian (0x34325241)
                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
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=5
        connector_mask=1
        encoder_mask=1
        mode: "1920x1080": 60 148500 1920 2008 2052 2200 1080 1084 1089 1125 0x48 0x5
connector[51]: HDMI-A-1
        crtc=video_port0
        self_refresh_aware=0  







[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