[DEV] Working on ArchLinux Kernel 5.4 Vendor

Hi! Have compared the libgbm of mesa vs mali blob libgbm,

Using libgbm mesa can start wayland with hw acceleration but cant start any EGL program.

It is not a problem : "eglQueryDisplayAttribEXT’ not resolved " because mesa libgbm says also says it.
But with libgbm of mali blobs at fail of start says it:

[drm:meson_hdmitx_get_modes [aml_drm]] ERROR Get hdmi para by vic [1] failed.
[drm:meson_hdmitx_update_hdcp [aml_drm]] ERROR No valid hdcp mode exit, maybe hdcp havenot init.

Any idea to solve it? Many thanks

Thanks for it but not works :S my problem is the meson_hdmitx_get_modes :frowning:

Log of meson_hdmitx_get_modes

233.158995] [drm:build_hdmitx_attr_str [aml_drm]] *ERROR* Unknown colospace valu 4
[  233.159952] [drm] build_hdmitx_attr_str:rgb,10bit = 4+10
[  233.160649] sname = (null)
[  233.161011] char_clk = 185625
[  233.161435] cd = 5
[  233.161694] cs = 0
[  233.161977] [drm] color property setting successfully
[  233.162652] [drm:build_hdmitx_attr_str [aml_drm]] *ERROR* Unknown colospace valu 4
[  233.163613] [drm] build_hdmitx_attr_str:rgb,10bit = 4+10
[  233.164305] [drm] [meson_hdmitx_encoder_atomic_mode_set]end
[  233.165032] [drm] am_meson_crtc_atomic_enable:in
[  233.165659] [drm] am_meson_crtc_atomic_enable: 1080p60hz, 0
[  233.166374] hdmitx: recalc before 1080p60hz 60 1, frac 0
[  233.167058] recalc after 1080p60hz 2997 50, frac 1
[  233.167688] vout_viu_mux_clear_t7: index=1, mux_sel=0x33
[  233.168378] vout_viu_mux_clear_t7: viu_mux reg=0x3c
[  233.169029] [drm] am_meson_crtc_atomic_enable-0:out
[  233.169676] [drm] [meson_hdmitx_encoder_atomic_enable]
[  233.170394] vlock: event MODE_CHANGE_PRE 0
[  233.170876] vrr: [0]: aml_vrr_register_device: hdmitx_vrr 0 successfully
[  233.171737] hdmitx_register_vrr ret = 0
[  233.172246] HDMI display force init (1)
[  233.172757] update rx hdr info 0
[  233.173210] hdmitx: get current mode: 1080p60hz
[  233.173785] update physical size: 88 74
[  233.174298] hdmitx: recalc before 1080p60hz 60 1, frac 0
[  233.174988] recalc after 1080p60hz 2997 50, frac 1
[  233.175615] setting hdmi mode 1080p60hz rgb,10bit
[  233.176232] cd/cs/cr: 5/0/1
[  233.176613] update rx hdr info 0
[  233.177046] hdmitx: video: already init VIC = 0  Now VIC = 16
[  233.177812] hdmitx: video: rx edid only support RGB format
[  233.178530] hdmitx: configure venc
[  233.178965] hdmitx: config_tv_enc_calc[57] vic = 16
[  233.179610] hdmitx: configure hdmitx video format timing
[  233.180306] hdmitx: hdmitx_set_dispmode[817]
[  233.180860] hdmitx: frac_rate = 1
[  233.181322] hdmitx: hdmitx21_set_clk[765]
[  233.181837] hdmitx: hdmitx sub-clock: 3712500 2 1 2 8 1 1 1 1 1
[  233.182602] hdmitx: config HPLL = 3712500 frac_rate = 1
[  233.183369] hdmitx: HPLL: 0xdb00049a
[  233.183761] hdmitx: config HPLL done
[  233.184242] hdmitx: clocks_set_vid_clk_div_for_hdmi[237] div = 8
[  233.185029] hdmitx: j = 2  vid_clk_div = 1
[  233.185604] hdmitx: hw:  config hdmitx IP vic = 16 cd:5 cs: 0
[  233.186307] hdmitx: configure hdmitx21
[  233.187031] hdmitx: hw: set audio
[  233.187250] hdmitx: clk_div = 18
[  233.187689] hdmitx: audio_param->channel_num = 1
[  233.188291] hdmitx: hw: hdmitx tx_aud_src = 0
[  233.188868] hdmitx: fs = 3, cd = 5, tmds_clk = 148500
[  233.189550] hdmitx: hw: aud_n_para = 6144
[  233.229164] hdmitx: video: Sink is HDMI device
[  233.229199] hdmitx: hw: set audio
[  233.229502] hdmitx: clk_div = 18
[  233.229940] hdmitx: audio_param->channel_num = 1
[  233.230543] hdmitx: hw: hdmitx tx_aud_src = 0
[  233.231120] hdmitx: fs = 3, cd = 5, tmds_clk = 148500
[  233.231777] hdmitx: hw: aud_n_para = 6144
[  233.232336] update rx hdr info 0
[  233.233316] DOLBY: vout_notify_callback: VOUT_EVENT_MODE_CHANGE
[  233.233512] vlock: event MODE_CHANGE
[  233.233989] vdin0,std_dur:59
[  233.234379] vsync_pts_inc 1501 1001/60000
[  233.234958] [drm] meson_vout_update_mode_name: update vout 1 name 1080p60hz.
[  233.235824] drm_hdmitx_get_tx_hdcp_cap tx hdcp [0]
[  233.237019] drm_hdmitx_get_rx_hdcp_cap rx hdcp [1]
[  233.237076] [drm] meson_hdmitx_get_hdcp_request usr_type: 3, hdcp cap: 0,0
[  233.237982] [drm] [meson_hdmitx_get_hdcp_request]: TX no hdcp key
[  233.238773] [drm:meson_hdmitx_update_hdcp [aml_drm]] *ERROR* meet stopped hdcp stat
[  233.239753] [drm:meson_hdmitx_update_hdcp [aml_drm]] *ERROR* No valid hdcp mode exit, maybe hdcp havenot init.
[  233.257040] [drm] am_hdmitx_connector_atomic_set_property
[  233.273838] [drm] am_hdmitx_connector_atomic_set_property
[  233.447623] [drm] am_meson_drm_fb_helper_set_par IN
[  233.447633] [drm] am_meson_drm_fb_helper_set_par OUT
[  234.070529] [drm:meson_hdmitx_get_modes [aml_drm]] *ERROR* Get hdmi para by vic [1] failed.
[  234.073172] [drm:meson_hdmitx_get_modes [aml_drm]] *ERROR* Get hdmi para by vic [1] failed.
[  234.307989] [drm] am_hdmitx_connector_atomic_set_property
[  234.308058] [drm] [meson_hdmitx_encoder_atomic_disable]
[  234.413159] [drm] am_meson_crtc_atomic_disable:in
[  234.413230] vout_viu_mux_clear_t7: index=1, mux_sel=0x2
[  234.413778] vout_viu_mux_clear_t7: viu_mux reg=0x3c
[  234.414452] hdmitx: recalc before invalid 0 1, frac 0
[  234.415079] recalc after invalid 0 1, frac 0
[  234.415661] vrr: [0]: aml_vrr_unregister_device: hdmitx_vrr 0 unregister successfully
[  234.416648] hdmitx_unregister_vrr ret = 0
[  234.417208] [drm] am_meson_crtc_atomic_enable:in
[  234.417787] [drm] am_meson_crtc_atomic_enable: 1080p60hz, 0
[  234.418520] hdmitx: recalc before 1080p60hz 60 1, frac 0
[  234.419206] recalc after 1080p60hz 2997 50, frac 1
[  234.419836] vout_viu_mux_clear_t7: index=1, mux_sel=0x33
[  234.420526] vout_viu_mux_clear_t7: viu_mux reg=0x3c
[  234.421207] [drm] am_meson_crtc_atomic_enable-0:out
[  234.421806] [drm] [meson_hdmitx_encoder_atomic_enable]
[  234.422562] vlock: event MODE_CHANGE_PRE 0
[  234.423025] vrr: [0]: aml_vrr_register_device: hdmitx_vrr 0 successfully
[  234.423885] hdmitx_register_vrr ret = 0
[  234.424393] HDMI display force init (1)
[  234.424905] update rx hdr info 0
[  234.425361] hdmitx: get current mode: 1080p60hz
[  234.425934] update physical size: 88 74
[  234.426446] hdmitx: recalc before 1080p60hz 60 1, frac 0
[  234.427136] recalc after 1080p60hz 2997 50, frac 1
[  234.427763] setting hdmi mode 1080p60hz rgb,10bit

Hello @Jart25

Can you try to enable automatic login to check? Edit file /etc/gdm3/custom.conf with content below:

AutomaticLoginEnable=true
AutomaticLogin=khadas

same result, not work :S

It is the journalog of Ubuntu (it works)

Can read that same lines:
[drm:meson_hdmitx_get_modes [aml_drm]] ERROR Get hdmi para by vic [1] failed.
[drm:meson_hdmitx_update_hdcp [aml_drm]] ERROR No valid hdcp mode exit, maybe hdcp havenot init.

But ubuntu works… arch using libgbm.so of mali blobs dont start

@Frank @numbqq could help me on this point?

Have replaced Xwayland binary and gdm works with libgbm.so Blob Mali, because the Xwayland of Arch, dont know a symbol. Please publish the source code or a patch with the changes on Xwayland and Mutter+libs

gbm_bo_get_fd_for_plane the problematic symbol

Want to build that packages in ArchLinux Repo :slight_smile:

Other problem again, EGL not work, cant create EGL Items.

Think that point is Mutter that needs private changes.

Similar kind of error when trying to install any desktop environment on the default server image of vim4

Not sure which library is missing resulting in no video output…

Just remove the unsupported symbol of the sourece code and rebuild.

HW ACC full working on ARCH


@Electr1 @numbqq @Frank

3 Likes

Awesome, can you share the instructions for making this,
I’d like to modify it to use Fedora workstation :smile:

Cheers!

Alpha Archlinux VIM4 archlinux - Google Drive

1 Like

Hello @Jart25

Cool, So you rebuild the package ?

No, because i can use the native libgbm.so of mesa in last builds that support Mali API, then havent rebuild Xwayland, neither Mutter or any other package.

so just installing mesa package was enough to fix it ?

The problem of API yes. The problem of HW ACC no, also needs mesa with support. But my problem was the UMP and udev + mkinitcpio

yes it was dumb, but I see that the Mali blob driver has less performance than the opensource panfrost in kernel 5.19.0+ on my S922X which has a Mali G52 MP6, VIM4 with A311D2 has Mali G52 MP8 with a DDR4 2000MHZ while the S922X 1600MHz,
Everything says that since the GPU uses the ram freq, and VIM4 has more ram speed and GPU cores, it should have a noticeable advantage.

Chromium for example doesn’t have a full graphics renderer with the mali private blob, at least for the time being since you have to use vulkan as a backend.

@numbqq

Today it is unforgivable that amlogic does not directly release its socs in the mainline of the linux kernel, that in 2022 we have to be like this…

Meson T7 and all new soc should already be supported from its public release, not with all its features, but at least basic ethernet, gpu support

When it has support in the mainline, they will practically have released another more powerful processor, making the previous one obsolete.

How long can Khadas VIM4 take on Mainline? There is no date or approach for the moment even.

2 Likes

Hello @Jart25

I found you created a new topic about the mainline issue, so we can talk there.

1 Like