IMX6 accelerated desktop UI?
Tim Harvey
tharvey at gateworks.com
Tue Oct 29 17:41:05 UTC 2019
On Thu, Oct 24, 2019 at 12:49 PM Tim Harvey <tharvey at gateworks.com> wrote:
>
> Greetings,
>
> Can anyone walk me through a packaged installation that works for an
> IMX6 using hw accelerated video? I try this every time Ubuntu drops a
> new release and every time it doesn't work out of the box.
>
> My latest test using Ubuntu 19.10 with the 5.3 kernel installing
> 'gnome-session' shows no hardware acceleration (desktop UI runs but
> clearly not accelerated). I found that the 5.3 kernel suffers from a
> cma regression that breaks etnaviv and which is fixed by
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f3057ad767542be7bbac44e548cb44017178a163.
> If I apply that to a 5.3 kernel (or try 5.4-rc4 which has that fix)
> the gdm login screen has smooth mouse control (where it did not before
> this fix) but as soon as I login now the screen/mouse freezes.
>
> It seems its been years now that etnaniv/libdrm/mesa have supported
> IMX6 acceleration so I can't understand why its so difficult to get a
> packaged install of a desktop UI going? I'm not at all tied to gnome
> or even Ubuntu... my goal is really just to get a web browser with hw
> accelated 2D/3D and video decode/display.
>
It looks like the issue causing the hang during xwayland startup was
due to defining 'coherent_pool=32M' on the kernel cmdline (which my
bootscripts do for wireless cards that use coherent_pool). I'm not
clear why this causes an issue over the default coherent_pool of 256K.
I didn't see any memory allocation errors displayed.
Removing coherent_pool from my kernel cmdline does let me login to a
xwayland session that shows 2D hw acceleration but the next issue I
run into is running glxgears. While 'vblank_mode=0 glxgears' reports a
framerate of around 440fps it fails to update the video window (the
gears never change). I see the same issue with both vblank_mode=0 and
without. If I run fullscreen the framerate is around 76fps but the
gears stutter around horribly.
user at eoan-armhf:~# glxgears -info
/tmp/foo
Running synchronized to the vertical refresh. The framerate should be
approximately the same as the monitor refresh rate.
GL_RENDERER = Vivante GC2000 rev 5108
GL_VERSION = 2.1 Mesa 19.2.1
GL_VENDOR = etnaviv
GL_EXTENSIONS = GL_ARB_multisample GL_EXT_abgr GL_EXT_bgra
GL_EXT_blend_color GL_EXT_blend_minmax GL_EXT_blend_subtract
GL_EXT_copy_texture GL_EXT_subtexture GL_EXT_texture_object
GL_EXT_vertex_array GL_EXT_compiled_vertex_array GL_EXT_texture
GL_EXT_texture3D GL_IBM_rasterpos_clip GL_ARB_point_parameters
GL_EXT_draw_range_elements GL_EXT_packed_pixels
GL_EXT_point_parameters GL_EXT_rescale_normal
GL_EXT_separate_specular_color GL_EXT_texture_edge_clamp
GL_SGIS_generate_mipmap GL_SGIS_texture_border_clamp
GL_SGIS_texture_edge_clamp GL_SGIS_texture_lod GL_ARB_framebuffer_sRGB
GL_ARB_multitexture GL_EXT_framebuffer_sRGB
GL_IBM_multimode_draw_arrays GL_IBM_texture_mirrored_repeat
GL_ARB_texture_cube_map GL_ARB_texture_env_add GL_ARB_transpose_matrix
GL_EXT_blend_func_separate GL_EXT_fog_coord GL_EXT_multi_draw_arrays
GL_EXT_secondary_color GL_EXT_texture_env_add
GL_EXT_texture_filter_anisotropic GL_EXT_texture_lod_bias
GL_INGR_blend_func_separate GL_NV_blend_square
GL_NV_light_max_exponent GL_NV_texgen_reflection
GL_NV_texture_env_combine4 GL_S3_s3tc GL_SUN_multi_draw_arrays
GL_ARB_texture_border_clamp GL_ARB_texture_compression
GL_EXT_framebuffer_object GL_EXT_texture_compression_s3tc
GL_EXT_texture_env_combine GL_EXT_texture_env_dot3 GL_MESA_window_pos
GL_NV_packed_depth_stencil GL_NV_texture_rectangle
GL_ARB_depth_texture GL_ARB_occlusion_query GL_ARB_shadow
GL_ARB_texture_env_combine GL_ARB_texture_env_crossbar
GL_ARB_texture_env_dot3 GL_ARB_texture_mirrored_repeat
GL_ARB_window_pos GL_ATI_fragment_shader GL_EXT_stencil_two_side
GL_EXT_texture_cube_map GL_NV_fog_distance GL_APPLE_packed_pixels
GL_ARB_draw_buffers GL_ARB_fragment_program GL_ARB_fragment_shader
GL_ARB_shader_objects GL_ARB_vertex_program GL_ARB_vertex_shader
GL_ATI_draw_buffers GL_ATI_texture_env_combine3 GL_EXT_shadow_funcs
GL_EXT_stencil_wrap GL_MESA_pack_invert GL_MESA_ycbcr_texture
GL_NV_primitive_restart GL_ARB_fragment_program_shadow
GL_ARB_half_float_pixel GL_ARB_occlusion_query2 GL_ARB_point_sprite
GL_ARB_shading_language_100 GL_ARB_sync
GL_ARB_texture_non_power_of_two GL_ARB_vertex_buffer_object
GL_ATI_blend_equation_separate GL_EXT_blend_equation_separate
GL_OES_read_format GL_ARB_color_buffer_float
GL_ARB_pixel_buffer_object GL_ARB_texture_rectangle
GL_EXT_pixel_buffer_object GL_EXT_texture_compression_dxt1
GL_EXT_texture_rectangle GL_EXT_texture_sRGB GL_EXT_framebuffer_blit
GL_EXT_framebuffer_multisample GL_EXT_packed_depth_stencil
GL_ARB_vertex_array_object GL_ATI_separate_stencil
GL_EXT_gpu_program_parameters GL_EXT_texture_array
GL_EXT_texture_sRGB_decode GL_EXT_timer_query GL_OES_EGL_image
GL_AMD_performance_monitor GL_ARB_copy_buffer GL_ARB_half_float_vertex
GL_ARB_map_buffer_range GL_ARB_texture_swizzle GL_EXT_texture_swizzle
GL_ARB_ES2_compatibility GL_ARB_debug_output
GL_ARB_draw_elements_base_vertex GL_ARB_explicit_attrib_location
GL_ARB_fragment_coord_conventions GL_ARB_provoking_vertex
GL_ARB_sampler_objects GL_ARB_shader_texture_lod
GL_EXT_provoking_vertex GL_NV_texture_barrier
GL_ARB_get_program_binary GL_ARB_robustness
GL_ARB_separate_shader_objects GL_ARB_timer_query
GL_ANGLE_texture_compression_dxt3 GL_ANGLE_texture_compression_dxt5
GL_ARB_compressed_texture_pixel_storage GL_ARB_internalformat_query
GL_ARB_map_buffer_alignment GL_ARB_texture_storage
GL_EXT_framebuffer_multisample_blit_scaled
GL_AMD_shader_trinary_minmax GL_ARB_clear_buffer_object
GL_ARB_explicit_uniform_location GL_ARB_invalidate_subdata
GL_ARB_program_interface_query GL_ARB_vertex_attrib_binding
GL_KHR_debug GL_ARB_internalformat_query2 GL_ARB_multi_bind
GL_ARB_get_texture_sub_image GL_ARB_texture_barrier
GL_KHR_context_flush_control GL_ARB_parallel_shader_compile
GL_KHR_no_error GL_ARB_texture_filter_anisotropic
GL_KHR_parallel_shader_compile
VisualID 459, 0x1cb
279 frames in 5.0 seconds = 55.637 FPS
I see the same thing with gstreamer and xvimagesink. A 'gst-launch-1.0
videotestsrc ! xvimagesink' only shows the first frame where
'gst-launch ! waylandsink' works perfectly (but is not windowed of
course).
Any ideas what's wrong here?
This is using Ubuntu Eoan 19.10 with standard Ubuntu packages with the
exception of the hand built kernel:
- 5.4-rc4 kernel (built with imx_v6_v7_defconfig)
- xwayland 2.1.20.5+git20191008-0ubuntu1
- libdrm 2.4.99-1ubuntu1
- lib*-mea 19.2.1-1ubuntu1
- mesa-utils 8.4.0-1build1
Best Regards,
Tim
More information about the etnaviv
mailing list