• Re: Enable V3D on Raspberry Pi 4!

    From Diederik de Haas@21:1/5 to All on Thu Jan 19 20:00:12 2023
    Copy: sallyahaj@yahoo.com (Sally A.haj)

    On Thursday, 19 January 2023 19:02:58 CET Sally A.haj wrote:
    Since the release of kernel 6.0.X, which has been announced the enabling
    of v3d to support hard acceleration in RPi4, I've tried tested/daily
    image from raspi.debian.net, the latest test, I installed Gnome, and I
    can see from Settings/About, that 'v3d' is the GPU driver. (I've attach
    the screenshot).

    That initial support is out of the box, after I asked in
    #debian-raspberrypi on IRC, they have suggested me to follow the link of https://melissawen.github.io/blog/2022/11/10/v3d-in-the-mainline .

    We were led to believe that it was NOT working, hence the suggestion to try what Melissa Wen suggested would fix it.
    But your screenshot shows that it IS working \o/

    I am not sure if recompiling the kernel is necessary, especially, I am getting some indicate that there is v3d, so I just added the 'device_tree=bcm2711-rpi-4-b.dtb' to config.txt, but nothing has been changed.

    There no need to recompile the kernel and apparently the device_tree line is also not needed.

    There are problems with firefox and chromium when launching them and window/maximizing/... .

    That is userland and AFAIK you need to set special settings to make that work and IIRC also in combination with Wayland. Which those are, I do not know.

    DRM_IOCTL_MODE_CREATE_DUMB failed: Cannot allocate memory
    Failed to create scanout resource

    It *might* be that you need to increase the value for CMA memory.
    But I can be totally wrong on this.

    Here when run "glxgears -info":

    $ glxgears -info

    Running synchronized to the vertical refresh. The framerate should be approximately the same as the monitor refresh rate.
    GL_RENDERER = V3D 4.2
    GL_VERSION = 2.1 Mesa 22.3.3
    GL_VENDOR = Broadcom

    And this is the part which makes be conclude that everything is working.
    When V3D was not working, you'd see LLVMPIPE indicating software rendering.

    Here when run glxinfo:

    $ glxinfo
    name of display: :0
    display: :0 screen: 0
    direct rendering: Yes
    server glx vendor string: SGI
    server glx version string: 1.4
    ....
    Extended renderer info (GLX_MESA_query_renderer):
    Vendor: Broadcom (0x14e4)
    Device: V3D 4.2 (0xffffffff)
    Version: 22.3.3
    Accelerated: yes

    AFAIK this couldn't be more clearer to show V3D is working \o/

    Video memory: 7800MB
    Unified memory: yes
    Preferred profile: compat (0x2)
    Max core profile version: 0.0
    Max compat profile version: 2.1
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.1
    OpenGL vendor string: Broadcom
    OpenGL renderer string: V3D 4.2
    OpenGL version string: 2.1 Mesa 22.3.3
    OpenGL shading language version string: 1.20

    I wish debian to get the fully 3d supported as it's already in the kernel.

    Apart from figuring out how to make userland software like browsers *also* make use of V3D/HW rendering, I don't know what you're missing.
    But making browsers fully utilise GPU rendering is something the user needs to do on their own devices with their own software.

    HTH,
    Diederik
    -----BEGIN PGP SIGNATURE-----

    iHUEABYIAB0WIQT1sUPBYsyGmi4usy/XblvOeH7bbgUCY8mTPAAKCRDXblvOeH7b bpv+AQDlDD/ZBnWuZEoMt6Reixm7z9KKUXKYng0JeoFKI0i6aAD/fOrSVX4LLI4M /Zcv3HUk8np19JUFFNAnKDsXsBbJxA8=
    =5HAT
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Paul Wise@21:1/5 to Diederik de Haas on Fri Jan 20 01:30:01 2023
    On Thu, 2023-01-19 at 20:00 +0100, Diederik de Haas wrote:


    That is userland and AFAIK you need to set special settings to make that work
    and IIRC also in combination with Wayland. Which those are, I do not know.

    To get Firefox to use Wayland, set this environment variable:

    MOZ_ENABLE_WAYLAND=1

    But making browsers fully utilise GPU rendering is something the user needs to
    do on their own devices with their own software.

    Users shouldn't have to tweak software to use their own hardware,
    software vendors should make software automatically do that, when the
    software detects that it is safe to do so. Browser vendors are fairly conservative when it comes to determining that safety level though and
    don't necessarily think about less common situations like V3D.

    These articles might be helpful for determining if it is safe to use
    V3D under browsers. Once you have determined the result, you will be
    able to send feedback to the browser vendors about what happened, so
    they can automatically enable it or fix any bugs you find.

    https://askubuntu.com/questions/1385776/how-should-i-enable-hardware-graphics-acceleration-in-chromium-web-browser-runni
    https://forums.raspberrypi.com/viewtopic.php?t=320844 https://support.mozilla.org/en-US/questions/1054323 https://lemariva.com/blog/2020/08/raspberry-pi-4-video-acceleration-decode-chromium
    https://askubuntu.com/questions/491750/force-enable-hardware-acceleration-in-firefox
    https://www.dedoimedo.com/computers/rpi4-ubuntu-mate-hw-video-acceleration.html

    --
    bye,
    pabs

    https://wiki.debian.org/PaulWise

    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCgAdFiEEYQsotVz8/kXqG1Y7MRa6Xp/6aaMFAmPJ3kMACgkQMRa6Xp/6 aaN8Ug//eHQCGch4bDiJdk7ZHrvzyA6fszrSfsszz1KhQB7IHlOdMIPuK4nYfJ5/ DQSKcnEGTfu93PNsIxHW6JLMLEiP3HrofGi/pb75786LzvV26P5MYuCfc9pMKwtQ 7WrHbVXgw1V+H0v55Be3AgwsErKXlVkbkYxQ/G7xkP5W2JnHTyW39GtzbEd/NWdW 1ntiqmql5kXU6wuWGdNzT9O3WIg3CsfgZlhE7O9oTIzGwMldfWxdXtfOA3XZ1ofE 8hNkjBWEFbPykcn5GUd+zzIgQaBA0hnhd1woki9EeiywZzurf9YxChLQp8PP4xZZ YyJ0t3w5bYuRAiCneKvJrGgo18KrVaziuaO+82iDzt5b4kb3k4e6WNIqxtPqQzyC xtZbf27XTDUmJU8ydLKTehxLcQyURzNgULIi2sDdVVdF3gQD+owGfG1iUwm8Qcm7 FuBeC3NXTqvuKeqh2l9kxViQq62e1uT8CIMQ9TwslOHFRK9f3+eTC8/Psj+uSR9u kglzC+cik970PDORBIKFSnU7AQtDCRtTBrqaFo73aSqBo/Mz6PXwnc+YBZLcjQP0 qfRxACA3RVG5gDXMu2vDrMuQV0+KS3xKvVPDXC8qqsuaqB/v2b06edKA1pcq6gCU okow9Xb4X++LxnoWhajcFlUes5mF+DCdTLbKk5o4b7Nu0y4VFQE=
    =B7u0
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)