mripard / sunxi-mali

GNU General Public License v2.0
100 stars 54 forks source link

Crash when running malitest #83

Closed nanfang2000 closed 4 years ago

nanfang2000 commented 4 years ago

HW: A33 Driver:r6p2

[    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

I have set the virtual buffer to be 200 in kernel

mali: gpu@1c40000 {
            compatible = "allwinner,sun8i-a23-mali",
                     "allwinner,sun7i-a20-mali", "arm,mali-400";
            reg = <0x01c40000 0x10000>;
            interrupts = <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>,
                     <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>,
                     <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>,
                     <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>,
                     <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>,
                     <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>,
                     <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>;
            interrupt-names = "gp",
                      "gpmmu",
                      "pp0",
                      "ppmmu0",
                      "pp1",
                      "ppmmu1",
                      "pmu";
            clocks = <&ccu CLK_BUS_GPU>, <&ccu CLK_GPU>;
            clock-names = "bus", "core";
            resets = <&ccu RST_BUS_GPU>;
            #cooling-cells = <2>;

            assigned-clocks = <&ccu CLK_GPU>;
            assigned-clock-rates = <384000000>;
        };

run malitest:

EGL Version: "1.4 Linux-r6p2-01rel0"
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_r

Then the whole system hangs.

Any wrong?

nanfang2000 commented 4 years ago

BTW, I can see some pattern on screen after running the malitest

nanfang2000 commented 4 years ago

Thanks for the information I got from other thread, it now fixed and works well: What I did:

  1. Enable DRM_FBDEV_LEAK_PHYS_SMEM from kernel
  2. set drm_leak_fbdev_smem on compile time in drivers/gpu/drm/drm_fb_helper.c
  3. use latest r8p1(I assume r6p2 should also work but I did not test)
mripard commented 4 years ago

You don't need to change the code, you can set the drm_kms_helper.drm_leak_fbdev_smem=1 on the kernel command line