vop2: 3566 vs 3568: green screen on 3566; on 3568 all ok...

Piotr Oniszczuk piotr.oniszczuk at gmail.com
Tue Dec 26 03:22:47 PST 2023


Andy,

pls see inline

> Wiadomość napisana przez Andy Yan <andy.yan at rock-chips.com> w dniu 26.12.2023, o godz. 02:41:
> 
> Hi Piotr,
> 
> On 12/25/23 20:14, Piotr Oniszczuk wrote:
>> Andy,
>> Thx for looking on this!
>> Before passing dri state logs - let me give some context why i’m asking here for help.
>> I’m developing 2 distros with goal to offer user convenient run of multimedia players (Kodi and MythTV): appliance and general distro.
>> Goal is out of box run of Kodi/MythTV in 2 rendering modes: EGL DAMBuf and DRM direct planes.
>> Currently i have out-of-box (no any SoC specific configs in Kodi/MythTV) for: rk3328/rk3399/H6/H313/H616/rpi3/rpi4.
>> Issues ia have are with: rk3566 and rk3568
>>  
> 
> Yes, it is a cool project, I run it on rk3566-box-demo for a while last year.

Many thx for kind words! 

> 
>> Vanilla 6.6.8 kernel on 3568 not offers me well working out-of-box Kodi/MythTV in DRM direct planes - but i was able to patch vop2 to get such out-of-box operation (pls see patch below).
>> I have also issue with 3566 - where i also developed patch (also see below) - but i’m not able to get 3566 fully working (EGL DMAbuf is ok; in DRM Planes GUI is ok, but video playback gives part screen green part black; green/black border is vibrantly changing at playback)
>> Logs:
> 
> 
> The dri/state dump already indicates the root case of the problem:
> 
> For rk3566/rk3568, the Cluster windows only support AFBC based RGB or YUV format,
> linear formats(such as NV12 you used for Cluster0-win0 on rk3566) are not supported, these
> linear formats are only support by Esmart(RGB/YUV),smart(RGB only) windows.
> 
> Compared with rk3568 you use, the NV12 is committed to Esmart1, and XRGB UI is
> committed to Esmart0.
> But on rk3566, there are only three windows/plane you can use, if you can only decoder
> linear NV12, it should be committed to Esmart0, and use Smart0 for UI.
> 
> 
> But when the vop2 drivers first lands, it mistakenly add linear formats(NV12/NV16) to
> Cluster windows format lists, this will mislead user space.
> 
> I have a patch series to fix this that already be merged in linux 6.7[0]
> 
> Feel free to let me know if you still have problem.
> 
> [0] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=01d5a75370a60c3a8d691347ae6ebb2a9f8dc44a

Perfect.

Above patch + vop2_win_data rk3568_vop_win_data[] reordering to:

Esmart1-win0
Esmart0-win0
Smart0-win0
Smart1-win0
Cluster0-win0
Cluster1-win0

makes Kodi and MythTV working out-of-box with EGL DMAbuf and DRM planes HW decoded video rendering :-)

So with your help we have single 6.6.8 kernel offering EGL DMAbuf and DRM planes HW decoded video rendering on rk3328/rk3399/rk3566/rk3568/H6/H313/H616/H618/rpi3/rpi4

once again: many thx

(p.s: it looks like only thing missing in 356x to be perfect open-source multimedia soc is: lack of rkvdec2 for hevc/vp9 hw decoding. Are there any plans from rock-chips to help foss to bring-up mainline kernel support for rkvdec2?)
   




More information about the Linux-rockchip mailing list