Hi everyone.
It looks like 5.7.0-rc7 kernel already has the panfrost drm support.
dmesg:
[ 4.562129] panfrost ffe40000.gpu: clock rate = 799999987
[ 4.562155] panfrost ffe40000.gpu: supply mali not found, using dummy regulator
[ 4.562273] panfrost ffe40000.gpu: mali-g52 id 0x7212 major 0x0 minor 0x0 status 0x0
[ 4.562276] panfrost ffe40000.gpu: features: 00000000,13de77ff, issues: 00000000,00000400
[ 4.562279] panfrost ffe40000.gpu: Features: L2:0x07110206 Shader:0x00000000 Tiler:0x00000809 Mem:0x1 MMU:0x00002830 AS:0xff JS:0x7
[ 4.562281] panfrost ffe40000.gpu: shader_present=0x3 l2_present=0x1
[ 4.564976] [drm] Initialized panfrost 1.1.0 20180908 for ffe40000.gpu on minor 1
git mesa already has G-52 support too (it’s still likely initial and the perfomance isn’t optimal)
I’ve tested kmscube - it works great.
root@vim3:/mnt/sd/home/khadas/src/kmscube/build# ./kmscube
Using display 0xaaaac2c22ee0 with EGL version 1.4
===================================
EGL information:
version: "1.4"
vendor: "Mesa Project"
client extensions: "EGL_EXT_client_extensions EGL_EXT_device_base EGL_EXT_device_enumeration EGL_EXT_device_query EGL_EXT_platform_base EGL_KHR_client_get_all_proc_addresses EGL_KHR_debug EGL_EXT_platform_device EGL_EXT_platform_wayland EGL_KHR_platform_wayland EGL_EXT_platform_x11 EGL_KHR_platform_x11 EGL_MESA_platform_gbm EGL_KHR_platform_gbm EGL_MESA_platform_surfaceless"
display extensions: "EGL_ANDROID_blob_cache EGL_EXT_buffer_age EGL_EXT_image_dma_buf_import EGL_EXT_image_dma_buf_import_modifiers EGL_KHR_cl_event2 EGL_KHR_config_attribs EGL_KHR_create_context EGL_KHR_create_context_no_error EGL_KHR_fence_sync EGL_KHR_get_all_proc_addresses EGL_KHR_gl_colorspace EGL_KHR_gl_renderbuffer_image EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_image EGL_KHR_image_base EGL_KHR_image_pixmap EGL_KHR_no_config_context EGL_KHR_partial_update EGL_KHR_reusable_sync EGL_KHR_surfaceless_context EGL_EXT_pixel_format_float EGL_KHR_wait_sync EGL_MESA_configless_context EGL_MESA_drm_image EGL_MESA_image_dma_buf_export EGL_MESA_query_driver EGL_WL_bind_wayland_display "
===================================
OpenGL ES 2.x information:
version: "OpenGL ES 2.0 Mesa 20.3.0-devel (git-fb56fb02a1)"
shading language version: "OpenGL ES GLSL ES 1.0.16"
vendor: "Panfrost"
renderer: "Mali G52 (Panfrost)"
extensions: "GL_EXT_blend_minmax GL_EXT_multi_draw_arrays GL_EXT_texture_compression_s3tc GL_EXT_texture_compression_dxt1 GL_EXT_texture_format_BGRA8888 GL_OES_compressed_ETC1_RGB8_texture GL_OES_depth24 GL_OES_element_index_uint GL_OES_fbo_render_mipmap GL_OES_mapbuffer GL_OES_rgb8_rgba8 GL_OES_stencil8 GL_OES_texture_3D GL_OES_texture_float GL_OES_texture_float_linear GL_OES_texture_half_float GL_OES_texture_half_float_linear GL_OES_texture_npot GL_OES_vertex_half_float GL_OES_EGL_image GL_OES_depth_texture GL_OES_packed_depth_stencil GL_EXT_texture_type_2_10_10_10_REV GL_OES_get_program_binary GL_APPLE_texture_max_level GL_EXT_discard_framebuffer GL_EXT_read_format_bgra GL_EXT_frag_depth GL_NV_fbo_color_attachments GL_OES_EGL_image_external GL_OES_EGL_sync GL_OES_vertex_array_object GL_ANGLE_texture_compression_dxt3 GL_ANGLE_texture_compression_dxt5 GL_EXT_occlusion_query_boolean GL_EXT_texture_rg GL_EXT_unpack_subimage GL_NV_draw_buffers GL_NV_read_buffer GL_NV_read_depth GL_NV_read_depth_stencil GL_NV_read_stencil GL_EXT_draw_buffers GL_EXT_map_buffer_range GL_KHR_debug GL_KHR_texture_compression_astc_ldr GL_NV_pixel_buffer_object GL_OES_required_internalformat GL_OES_surfaceless_context GL_EXT_separate_shader_objects GL_EXT_shader_framebuffer_fetch GL_EXT_compressed_ETC1_RGB8_sub_texture GL_EXT_draw_elements_base_vertex GL_EXT_texture_border_clamp GL_KHR_blend_equation_advanced GL_KHR_blend_equation_advanced_coherent GL_KHR_context_flush_control GL_OES_draw_elements_base_vertex GL_OES_texture_border_clamp GL_EXT_blend_func_extended GL_KHR_no_error GL_KHR_texture_compression_astc_sliced_3d GL_EXT_texture_compression_s3tc_srgb GL_EXT_color_buffer_half_float GL_KHR_parallel_shader_compile GL_EXT_shader_framebuffer_fetch_non_coherent GL_EXT_depth_clamp "
===================================
Rendered 107 frames in 2.015914 sec (53.077650 fps)
Rendered 228 frames in 4.031862 sec (56.549555 fps)
Rendered 349 frames in 6.047810 sec (57.706843 fps)
Rendered 470 frames in 8.063774 sec (58.285363 fps)
Rendered 591 frames in 10.079721 sec (58.632573 fps)
But i still have a problem starting. xorg:
1209496.020] (II) glamor: OpenGL accelerated X.org driver based.
[1209496.067] (II) glamor: EGL version 1.4:
[1209496.067] EGL_MESA_drm_image required.
[1209496.068] (EE) modeset(0): glamor initialization failed
[1209496.068] (II) modeset(0): ShadowFB: preferred NO, enabled NO
[1209496.122] (II) modeset(0): Output HDMI-1 has no monitor section
[1209496.176] (II) modeset(0): EDID for output HDMI-1
unfortunately it’s not possible to upload full log.
After that i’ve tested wayland, and it works great!
root@vim3:~# glmark2-wayland
=======================================================
glmark2 2014.03+git20150611.fa71af2d
=======================================================
OpenGL Information
GL_VENDOR: Panfrost
GL_RENDERER: Mali G52 (Panfrost)
GL_VERSION: 2.1 Mesa 20.3.0-devel (git-fb56fb02a1)
=======================================================
[build] use-vbo=false: FPS: 467 FrameTime: 2.141 ms
[build] use-vbo=true: FPS: 502 FrameTime: 1.992 ms
[texture] texture-filter=nearest: FPS: 871 FrameTime: 1.148 ms
[texture] texture-filter=linear: FPS: 871 FrameTime: 1.148 ms
[texture] texture-filter=mipmap: FPS: 921 FrameTime: 1.086 ms
[shading] shading=gouraud: FPS: 341 FrameTime: 2.933 ms
[shading] shading=blinn-phong-inf: FPS: 352 FrameTime: 2.841 ms
[shading] shading=phong: FPS: 318 FrameTime: 3.145 ms
[shading] shading=cel: FPS: 317 FrameTime: 3.155 ms
[bump] bump-render=high-poly: FPS: 138 FrameTime: 7.246 ms
[bump] bump-render=normals: FPS: 895 FrameTime: 1.117 ms
[bump] bump-render=height: FPS: 815 FrameTime: 1.227 ms
[effect2d] kernel=0,1,0;1,-4,1;0,1,0;: FPS: 666 FrameTime: 1.502 ms
[effect2d] kernel=1,1,1,1,1;1,1,1,1,1;1,1,1,1,1;: FPS: 278 FrameTime: 3.597 ms
[pulsar] light=false:quads=5:texture=false: FPS: 914 FrameTime: 1.094 ms
[desktop] blur-radius=5:effect=blur:passes=1:separable=true:windows=4: FPS: 155 FrameTime: 6.452 ms
[desktop] effect=shadow:windows=4: FPS: 766 FrameTime: 1.305 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 121 FrameTime: 8.264 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=subdata: FPS: 120 FrameTime: 8.333 ms
[buffer] columns=200:interleave=true:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 131 FrameTime: 7.634 ms
[ideas] speed=duration: FPS: 218 FrameTime: 4.587 ms
[jellyfish] <default>: FPS: 411 FrameTime: 2.433 ms
[terrain] <default>: FPS: 21 FrameTime: 47.619 ms
[shadow] <default>: FPS: 163 FrameTime: 6.135 ms
[refract] <default>: FPS: 34 FrameTime: 29.412 ms
[conditionals] fragment-steps=0:vertex-steps=0: FPS: 946 FrameTime: 1.057 ms
[conditionals] fragment-steps=5:vertex-steps=0: FPS: 755 FrameTime: 1.325 ms
[conditionals] fragment-steps=0:vertex-steps=5: FPS: 863 FrameTime: 1.159 ms
[function] fragment-complexity=low:fragment-steps=5: FPS: 919 FrameTime: 1.088 ms
[function] fragment-complexity=medium:fragment-steps=5: FPS: 750 FrameTime: 1.333 ms
[loop] fragment-loop=false:fragment-steps=5:vertex-steps=5: FPS: 1003 FrameTime: 0.997 ms
[loop] fragment-steps=5:fragment-uniform=false:vertex-steps=5: FPS: 1002 FrameTime: 0.998 ms
[loop] fragment-steps=5:fragment-uniform=true:vertex-steps=5: FPS: 679 FrameTime: 1.473 ms
=======================================================
glmark2 Score: 537
=======================================================
The main issue is wrong colors
glxinfo and glxgears under wayland with --xwayland support also works great:
root@vim3:~# glxinfo | grep OpenGL
OpenGL vendor string: Panfrost
OpenGL renderer string: Mali G52 (Panfrost)
OpenGL version string: 2.1 Mesa 20.3.0-devel (git-fb56fb02a1)
OpenGL shading language version string: 1.20
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 2.0 Mesa 20.3.0-devel (git-fb56fb02a1)
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 1.0.16
OpenGL ES profile extensions:
glmark2(x11 version) also works with xwayland, but slower.
root@vim3:~# cat glmark
=======================================================
glmark2 2014.03+git20150611.fa71af2d
=======================================================
OpenGL Information
GL_VENDOR: Panfrost
GL_RENDERER: Mali G52 (Panfrost)
GL_VERSION: 2.1 Mesa 20.3.0-devel (git-fb56fb02a1)
=======================================================
[build] use-vbo=false: FPS: 226 FrameTime: 4.425 ms
...
=======================================================
glmark2 Score: 221
=======================================================
It’s also possible to play supertuxkart under wayland with nice perfomance ( colors are wrong too)
So imho the problem is in xorg server (or it’s config), but ubuntu is not my system, i’m not sure if any lib may be missing, so i’m helpless until i can run my favorite distro (WIP).
If anyone knows how to verbose Xorg log to see more details - feel free to share