简体   繁体   English

如何在不使用 Yocto 构建的情况下启用 etnaviv 驱动程序?

[英]How to enable etnaviv drivers without using Yocto build?

I have custom board with kernel 4.14 and vivante drivers 6.2.4p4.0 (Official Freescale's ones).我有带有 kernel 4.14 和 vivante 驱动程序 6.2.4p4.0(飞思卡尔官方的)的定制板。 I want to test my Qt application using the mesa drivers instead of the Freescale's.我想使用台面驱动程序而不是飞思卡尔的驱动程序来测试我的 Qt 应用程序。 I've already downloaded and manually compiled and installed the mesa drivers with kmsro and etnaviv drivers options enabled, but these steps doesn't seem to be enough.我已经下载并手动编译和安装了启用kmsroetnaviv驱动程序选项的 mesa 驱动程序,但这些步骤似乎还不够。

What are the steps to do after installing the mesa drivers to enable them?安装台面驱动程序以启用它们后要执行哪些步骤?

I don't have access to a Yocto layer for my board, so rebuilding the image is not an option.我无法访问我的电路板的 Yocto 层,因此重建图像不是一种选择。

thanks!谢谢!

To get the etnaviv kernel module enabled, I did the following:要启用 etnaviv kernel 模块,我执行了以下操作:

Download and compile kernel source v4.14, enabling the following options:下载并编译 kernel 源 v4.14,启用以下选项:

  • Device Drivers-> Graphics Support-> [M]ETNAVIV设备驱动程序-> 图形支持-> [M]ETNAVIV
  • MXC support drivers-> MXC Vivante GPU support-> [*]MXC Vivante GPU support MXC 支持驱动-> MXC Vivante GPU support-> [*]MXC Vivante GPU support

Then install or compile MESA.然后安装或编译 MESA。 If you choose to compile MESA remember to enable the options kmsro and etnaviv on the meson_options.txt file.如果您选择编译 MESA,请记住在 meson_options.txt 文件中启用选项kmsroetnaviv

Lastly, to check if etnaviv was successfully loaded, do:最后,要检查 etnaviv 是否成功加载,请执行以下操作:

# dmesg | grep etnaviv

Should output something like this: output 应该是这样的:

[    6.249793] etnaviv gpu-subsystem: bound 134000.gpu (ops gpu_ops [etnaviv])
[    6.249866] etnaviv gpu-subsystem: bound 130000.gpu (ops gpu_ops [etnaviv])
[    6.249919] etnaviv gpu-subsystem: bound 2204000.gpu (ops gpu_ops [etnaviv])
[    6.249934] etnaviv-gpu 134000.gpu: model: GC320, revision: 5007
[    6.332274] etnaviv-gpu 130000.gpu: model: GC2000, revision: 5108
[    6.402442] etnaviv-gpu 2204000.gpu: model: GC355, revision: 1215
[    6.402474] etnaviv-gpu 2204000.gpu: Ignoring GPU with VG and FE2.0
[    6.416880] [drm] Initialized etnaviv 1.1.0 20151214 for gpu-subsystem on minor 1

Check also your dtb file for proper initialization, mine has the following entries regarding the gpu:还要检查你的 dtb 文件是否正确初始化,我的有以下关于 gpu 的条目:

        gpu@00130000 {
            compatible = "vivante,gc";
            reg = <0x130000 0x4000>;
            interrupts = <0x0 0x9 0x4>;
            clocks = <0x2 0x1b 0x2 0x7a 0x2 0x4a>;
            clock-names = "bus", "core", "shader";
            power-domains = <0x9>;
            linux,phandle = <0x82>;
            phandle = <0x82>;
    };

    gpu@00134000 {
            compatible = "vivante,gc";
            reg = <0x134000 0x4000>;
            interrupts = <0x0 0xa 0x4>;
            clocks = <0x2 0x1a 0x2 0x79>;
            clock-names = "bus", "core";
            power-domains = <0x9>;
            linux,phandle = <0x81>;
            phandle = <0x81>;
    };

    gpu@02204000 {
        compatible = "vivante,gc";
        reg = <0x2204000 0x4000>;
        interrupts = <0x0 0xb 0x4>;
        clocks = <0x2 0x8f 0x2 0x79>;
        clock-names = "bus", "core";
        power-domains = <0x9>;
        linux,phandle = <0x83>;
        phandle = <0x83>;
    };

   gpu-subsystem {
        compatible = "fsl,imx-gpu-subsystem";
        cores = <0x81 0x82 0x83>;
    };

Note: If you get a dmesg error output like " command buffer outside valid memory window ", it might be the case that you need to increase the cma being reserved.注意:如果您收到一个 dmesg 错误 output,例如“有效 memory window 之外的命令缓冲区”,则可能是您需要增加保留的 cma 的情况。 You must do it via kernel parameter, In my case I had to set via uboot the following: cma=256M@2G您必须通过 kernel 参数执行此操作,在我的情况下,我必须通过 uboot 设置以下内容: cma=256M@2G

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM