A33主线Linux跑起OpenGL/ES / 全志 SOC / WhyCan Forum(哇酷开发者社区) 您所在的位置:网站首页 全志a33处理器很垃圾 A33主线Linux跑起OpenGL/ES / 全志 SOC / WhyCan Forum(哇酷开发者社区)

A33主线Linux跑起OpenGL/ES / 全志 SOC / WhyCan Forum(哇酷开发者社区)

2023-07-26 17:37| 来源: 网络整理| 查看: 265

A33的GPU有两个方向,开源的Lima和非开源的全志OpenGL库Lima+Mesa3DLIMA只需要在内核选上LIMA和SUN4I的DRM驱动即可Mesa3D可以在buildroot选上不过最后我运行mesa的demo直接出错也找不到问题就放弃了,不知道是哪里的问题,网上教程太少不会玩。

这时候我切到第二个方案:其实教程就是 https://github.com/mripard/sunxi-mali

但是这里有个坑(我选的fbdev的库),导致一运行malitest就出错(malitest可以自己编一个 https://github.com/linux-sunxi/sunxi-mali/tree/master/test )

查资料得到了信息1. Must enable DRM_FBDEV_LEAK_PHYS_SMEM from kernel2. set drm_leak_fbdev_smem on compile time (for some reason, passing in command line did not help) in drm_fb_helper.c3. use latest r8p1

这回终于跑起来了

malitest和QT的OpenGL例子都运行正常

对了,最好在buildroot里选上sunxi-mali-mainline,这样它会自动给你生成一个启动时加载mali.ko的脚本。当然,自己modprobe也是可以的

[ 2.290176] mali: loading out-of-tree module taints kernel. [ 2.303401] using random self ethernet address [ 2.310432] Allwinner sunXi mali glue initialized [ 2.310892] using random host ethernet address [ 2.319040] Mali: [ 2.319045] Found Mali GPU Mali-400 MP r1p1 [ 2.325812] using random self ethernet address [ 2.344761] using random host ethernet address [ 2.352326] usb0: HOST MAC 3a:7e:4f:95:4b:5d [ 2.359199] usb0: MAC f6:29:20:a6:b8:86 [ 2.365680] g_ffs gadget: g_ffs ready [ 2.386332] Mali: [ 2.386337] 2+0 PP cores initialized [ 2.396969] Mali: [ 2.396971] Mali device driver loaded

运行malitest的结果,可以验证是否正确

EGL Version: "1.4 Linux-r8p1-00rel0" EGL Vendor: "ARM" EGL Extensions: "EGL_KHR_image EGL_KHR_image_base EGL_KHR_image_pixmap EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_gl_renderbuffer_image EGL_KHR_reusable_sync EGL_KHR_fence_sync EGL_KHR_lock_surface EGL_KHR_lock_surface2 EGL_EXT_create_context_robustness EGL_ANDROID_blob_cache EGL_KHR_create_context EGL_KHR_partial_update EGL_KHR_create_context_no_error " Surface size: 1024x600 GL Vendor: "ARM" GL Renderer: "Mali-400 MP" GL Version: "OpenGL ES 2.0 "mali450-r5p1-01rel0-lollipop-233-g52c929d"" GL Extensions: "GL_OES_texture_npot GL_OES_vertex_array_object GL_OES_compressed_ETC1_RGB8_texture GL_EXT_compressed_ETC1_RGB8_sub_texture GL_OES_standard_derivatives GL_OES_EGL_image GL_OES_depth24 GL_ARM_rgba8 GL_ARM_mali_shader_binary GL_OES_depth_texture GL_OES_packed_depth_stencil GL_EXT_texture_format_BGRA8888 GL_OES_vertex_half_float GL_EXT_blend_minmax GL_OES_EGL_image_external GL_OES_EGL_sync GL_OES_rgb8_rgba8 GL_EXT_multisampled_render_to_texture GL_EXT_discard_framebuffer GL_OES_get_program_binary GL_ARM_mali_program_binary GL_EXT_shader_texture_lod GL_EXT_robustness GL_OES_depth_texture_cube_map GL_KHR_debug GL_ARM_shader_framebuffer_fetch GL_ARM_shader_framebuffer_fetch_depth_stencil GL_OES_mapbuffer GL_KHR_no_error"

这里有点比较老的介绍,虽然过时了,但是比较系统https://linux-sunxi.org/Mali_binary_driver

最近编辑记录 达克罗德 (2020-02-08 21:59:12)



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有