qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* Re: Tips for debugging GPU acceleration.
       [not found] <87o8kttj2e.fsf@linaro.org>
@ 2020-10-23  9:34 ` Alex Bennée
  2020-10-23 10:51 ` Gerd Hoffmann
  1 sibling, 0 replies; 6+ messages in thread
From: Alex Bennée @ 2020-10-23  9:34 UTC (permalink / raw)
  To: Gerd Hoffmann; +Cc: qemu-devel, agl-dev-community


Alex Bennée <alex.bennee@linaro.org> writes:

(fix the qemu-devel address)

> Hi Gerd,
>
> I'm currently trying to get accelerated graphics working on an AArch64
> AGL distribution (both in KVM and TCG builds). As far as I can tell the
> device is being correctly created and I do get a working DRI based
> display. However the Weston based compositor falls back to the softpipe
> rendering:
>
>   Date: 2020-10-22 UTC
>   [19:37:22.296] Using config file '/etc/xdg/weston/weston.ini'.
>   [19:37:22.297] Output repaint window is 7 ms maximum.
>   [19:37:22.298] Loading module '/usr/lib/libweston-8/drm-backend.so'
>   [19:37:22.318] initializing drm backend
>   [19:37:22.323] logind: not running in a systemd session
>   [19:37:22.323] logind: cannot setup systemd-logind helper (-61), using legacy fallback
>   [19:37:22.370] using /dev/dri/card0
>   [19:37:22.370] DRM: supports universal planes
>   [19:37:22.370] DRM: supports atomic modesetting
>   [19:37:22.370] DRM: supports picture aspect ratio
>   [19:37:22.373] Loading module '/usr/lib/libweston-8/gl-renderer.so'
>   [19:37:22.540] EGL client extensions: EGL_EXT_client_extensions
>                  EGL_EXT_device_base EGL_EXT_device_enumeration
>                  EGL_EXT_device_query EGL_EXT_platform_base
>                  EGL_KHR_client_get_all_proc_addresses EGL_KHR_debug
>                  EGL_EXT_platform_wayland EGL_MESA_platform_gbm
>                  EGL_MESA_platform_surfaceless EGL_EXT_platform_device
>   [19:37:22.542] EGL version: 1.4
>   [19:37:22.542] EGL vendor: Mesa Project
>   [19:37:22.542] EGL client APIs: OpenGL OpenGL_ES 
>   [19:37:22.542] EGL extensions: EGL_ANDROID_blob_cache EGL_EXT_buffer_age
>                  EGL_EXT_image_dma_buf_import EGL_KHR_cl_event2
>                  EGL_KHR_config_attribs EGL_KHR_create_context
>                  EGL_KHR_create_context_no_error EGL_KHR_fence_sync
>                  EGL_KHR_get_all_proc_addresses EGL_KHR_gl_colorspace
>                  EGL_KHR_gl_renderbuffer_image EGL_KHR_gl_texture_2D_image
>                  EGL_KHR_gl_texture_3D_image EGL_KHR_gl_texture_cubemap_image
>                  EGL_KHR_image EGL_KHR_image_base EGL_KHR_image_pixmap
>                  EGL_KHR_no_config_context EGL_KHR_reusable_sync
>                  EGL_KHR_surfaceless_context EGL_EXT_pixel_format_float
>                  EGL_KHR_wait_sync EGL_MESA_configless_context
>                  EGL_MESA_image_dma_buf_export EGL_MESA_query_driver
>   [19:37:22.542] warning: Disabling render GPU timeline and explicit synchronization due to missing EGL_ANDROID_native_fence_sync extension
>   [19:37:22.542] EGL_KHR_surfaceless_context available
>   [19:37:22.819] GL version: OpenGL ES 3.1 Mesa 20.0.2
>   [19:37:22.819] GLSL version: OpenGL ES GLSL ES 3.10
>   [19:37:22.819] GL vendor: VMware, Inc.
>   [19:37:22.819] GL renderer: softpipe
>   [19:37:22.819] GL extensions: GL_EXT_blend_minmax GL_EXT_multi_draw_arrays
>
> I know the kernel has the right bits enabled (VIRTIO_DRM_GPU) but the
> kernel seems to think the host needs something else to support it:
>
>   [    2.743035] virtio-pci 0000:00:04.0: enabling device (0000 -> 0003)
>   [    2.746441] virtio-pci 0000:00:05.0: enabling device (0000 -> 0002)
>   [    2.778843] random: fast init done
>   [    2.780024] random: crng init done
>   [    2.781054] bochs-drm 0000:00:02.0: remove_conflicting_pci_framebuffers: bar 0: 0x10000000 -> 0x10ffffff
>   [    2.781597] bochs-drm 0000:00:02.0: remove_conflicting_pci_framebuffers: bar 2: 0x11014000 -> 0x11014fff
>   [    2.786609] bochs-drm 0000:00:02.0: enabling device (0000 -> 0002)
>   [    2.789259] [drm] Found bochs VGA, ID 0xb0c5.
>   [    2.789639] [drm] Framebuffer size 16384 kB @ 0x10000000, mmio @ 0x11014000.
>   [    2.791527] [TTM] Zone  kernel: Available graphics memory: 2015562 KiB
>   [    2.792300] [TTM] Initializing pool allocator
>   [    2.793275] [TTM] Initializing DMA pool allocator
>   [    2.801629] [drm] Found EDID data blob.
>   [    2.809735] [drm] Initialized bochs-drm 1.0.0 20130925 for 0000:00:02.0 on minor 0
>   [    2.903431] Console: switching to colour frame buffer device 128x48
>   [    2.928141] bochs-drm 0000:00:02.0: fb0: bochs-drmdrmfb frame buffer device
>   [    2.929844] [drm] pci: virtio-gpu-pci detected at 0000:00:05.0
>   [    2.930300] [drm] virgl 3d acceleration not supported by host
>   [    2.930484] [drm] EDID support available.
>   [    2.931193] [drm] number of scanouts: 1
>   [    2.931318] [drm] number of cap sets: 0
>   [    2.935329] [drm] Initialized virtio_gpu 0.1.0 0 for virtio4 on minor 1
>   [    3.058526] virtio_gpu virtio4: fb1: virtio_gpudrmfb frame buffer device
>
> I'm invoking QEMU on both systems with:
>
>   -device virtio-gpu-pci,virgl=true
>
> The full TCG command line is:
>
>   ./aarch64-softmmu/qemu-system-aarch64 -cpu cortex-a57 \
>     -machine type=virt,virtualization=on,gic-version=3 \
>     -serial mon:stdio \
>     -netdev user,id=unet,hostfwd=tcp::2222-:22 \
>     -device virtio-net-device,netdev=unet,id=virt-net \
>     -drive id=disk0,file=$HOME/images/agl/agl-demo-platform-crosssdk-qemuarm64.ext4,if=none,format=raw \
>     -device virtio-blk-device,drive=disk0 \
>     -soundhw hda \
>     -device qemu-xhci \
>     -device usb-tablet \
>     -device usb-kbd \
>     -object rng-random,filename=/dev/urandom,id=rng0 \
>     -device virtio-rng-pci,rng=rng0 \
>     -device virtio-serial-device \
>     -chardev null,id=virtcon \
>     -device virtconsole,chardev=virtcon \
>     -m 4096 \
>     -kernel ~/images/agl/Image \
>     -append "console=ttyAMA0 root=/dev/vda" \
>     -display gtk,show-cursor=on \
>     -smp 4 \
>     -device virtio-gpu-pci,virgl=true
>
> Any tips on how to track down where things are going wrong?


-- 
Alex Bennée


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Tips for debugging GPU acceleration.
       [not found] <87o8kttj2e.fsf@linaro.org>
  2020-10-23  9:34 ` Tips for debugging GPU acceleration Alex Bennée
@ 2020-10-23 10:51 ` Gerd Hoffmann
  2020-10-23 11:52   ` Alex Bennée
  1 sibling, 1 reply; 6+ messages in thread
From: Gerd Hoffmann @ 2020-10-23 10:51 UTC (permalink / raw)
  To: Alex Bennée; +Cc: qemu-devel, agl-dev-community

  Hi,

>   [    2.930300] [drm] virgl 3d acceleration not supported by host

Nope, not active.

>     -display gtk,show-cursor=on \

Needs -display gtk,gl=on for opengl support.

>     -device virtio-gpu-pci,virgl=true

virgl is silently turned off in case opengl support is not available.
Ideally virgl should be OnOffAuto not bool, but I fear changing that
now (and start throwing errors on virgl=on if opengl is not available)
will break stuff ...

take care,
  Gerd



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Tips for debugging GPU acceleration.
  2020-10-23 10:51 ` Gerd Hoffmann
@ 2020-10-23 11:52   ` Alex Bennée
  2020-10-23 12:32     ` [agl-dev-community] " Marius Vlad
  0 siblings, 1 reply; 6+ messages in thread
From: Alex Bennée @ 2020-10-23 11:52 UTC (permalink / raw)
  To: Gerd Hoffmann; +Cc: qemu-devel, agl-dev-community


Gerd Hoffmann <kraxel@redhat.com> writes:

>   Hi,
>
>>   [    2.930300] [drm] virgl 3d acceleration not supported by host
>
> Nope, not active.
>
>>     -display gtk,show-cursor=on \
>
> Needs -display gtk,gl=on for opengl support.

Awesome - even on TCG the display is now nice and snappy.

For bonus points:

The AGL panel display is rotated 90 degrees which is putting a bit of a
crink in my neck. Is their anyway to rotate the view port. I tried
inverting xres and yres but that didn't do anything.

>>     -device virtio-gpu-pci,virgl=true
>
> virgl is silently turned off in case opengl support is not available.
> Ideally virgl should be OnOffAuto not bool, but I fear changing that
> now (and start throwing errors on virgl=on if opengl is not available)
> will break stuff ...

At least a warn_report maybe?

>
> take care,
>   Gerd


-- 
Alex Bennée


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [agl-dev-community]  Tips for debugging GPU acceleration.
  2020-10-23 11:52   ` Alex Bennée
@ 2020-10-23 12:32     ` Marius Vlad
  2020-10-23 16:28       ` Alex Bennée
  0 siblings, 1 reply; 6+ messages in thread
From: Marius Vlad @ 2020-10-23 12:32 UTC (permalink / raw)
  To: agl-dev-community; +Cc: Gerd Hoffmann, qemu-devel

[-- Attachment #1: Type: text/plain, Size: 1824 bytes --]

On Fri, Oct 23, 2020 at 12:52:17PM +0100, Alex Bennée wrote:
> 
> Gerd Hoffmann <kraxel@redhat.com> writes:
> 
> >   Hi,
> >
> >>   [    2.930300] [drm] virgl 3d acceleration not supported by host
> >
> > Nope, not active.
> >
> >>     -display gtk,show-cursor=on \
> >
> > Needs -display gtk,gl=on for opengl support.
> 
> Awesome - even on TCG the display is now nice and snappy.
> 
> For bonus points:
> 
> The AGL panel display is rotated 90 degrees which is putting a bit of a
> crink in my neck. Is their anyway to rotate the view port. I tried
> inverting xres and yres but that didn't do anything.
Hi,

The output is rotated, edit /etc/xdg/weston/weston.ini and comment out
transform ini entry from the Virtual-1 output section. Reboot, or
restart weston@display service. Note that the apps are optimized for
landscape. 

Enabling 3D with qemu might be something worth adding in the docs.
> 
> >>     -device virtio-gpu-pci,virgl=true
> >
> > virgl is silently turned off in case opengl support is not available.
> > Ideally virgl should be OnOffAuto not bool, but I fear changing that
> > now (and start throwing errors on virgl=on if opengl is not available)
> > will break stuff ...
> 
> At least a warn_report maybe?
> 
> >
> > take care,
> >   Gerd
> 
> 
> -- 
> Alex Bennée
> 
> 
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#8771): https://lists.automotivelinux.org/g/agl-dev-community/message/8771
> Mute This Topic: https://lists.automotivelinux.org/mt/77748325/4043866
> Group Owner: agl-dev-community+owner@lists.automotivelinux.org
> Unsubscribe: https://lists.automotivelinux.org/g/agl-dev-community/leave/7327001/516878461/xyzzy [marius.vlad@collabora.com]
> -=-=-=-=-=-=-=-=-=-=-=-
> 
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [agl-dev-community] Tips for debugging GPU acceleration.
  2020-10-23 12:32     ` [agl-dev-community] " Marius Vlad
@ 2020-10-23 16:28       ` Alex Bennée
  2020-10-23 17:46         ` Marius Vlad
  0 siblings, 1 reply; 6+ messages in thread
From: Alex Bennée @ 2020-10-23 16:28 UTC (permalink / raw)
  To: agl-dev-community, Gerd Hoffmann, QEMU Developers

Thanks - that seems to do the trick.
I can't find where in the agl repo that is set. The recipe seems to be in:

  meta-agl-cluster-demo/recipie-graphics/wayland/weston-ini-conf/virtual-landscape.cfg

but I can't see where the "transform=270" got added.

Visually it looks a lot nicer now although I could still do with
getting rid of the quite large AGL lower banner which is cropping out
the main display.

On Fri, 23 Oct 2020 at 13:32, Marius Vlad <marius.vlad@collabora.com> wrote:
>
> On Fri, Oct 23, 2020 at 12:52:17PM +0100, Alex Bennée wrote:
> >
> > Gerd Hoffmann <kraxel@redhat.com> writes:
> >
> > >   Hi,
> > >
> > >>   [    2.930300] [drm] virgl 3d acceleration not supported by host
> > >
> > > Nope, not active.
> > >
> > >>     -display gtk,show-cursor=on \
> > >
> > > Needs -display gtk,gl=on for opengl support.
> >
> > Awesome - even on TCG the display is now nice and snappy.
> >
> > For bonus points:
> >
> > The AGL panel display is rotated 90 degrees which is putting a bit of a
> > crink in my neck. Is their anyway to rotate the view port. I tried
> > inverting xres and yres but that didn't do anything.
> Hi,
>
> The output is rotated, edit /etc/xdg/weston/weston.ini and comment out
> transform ini entry from the Virtual-1 output section. Reboot, or
> restart weston@display service. Note that the apps are optimized for
> landscape.
>
> Enabling 3D with qemu might be something worth adding in the docs.
> >
> > >>     -device virtio-gpu-pci,virgl=true
> > >
> > > virgl is silently turned off in case opengl support is not available.
> > > Ideally virgl should be OnOffAuto not bool, but I fear changing that
> > > now (and start throwing errors on virgl=on if opengl is not available)
> > > will break stuff ...
> >
> > At least a warn_report maybe?
> >
> > >
> > > take care,
> > >   Gerd
> >
> >
> > --
> > Alex Bennée
> >
> >
> >
> >
> >
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#8772): https://lists.automotivelinux.org/g/agl-dev-community/message/8772
> Mute This Topic: https://lists.automotivelinux.org/mt/77748325/5085169
> Group Owner: agl-dev-community+owner@lists.automotivelinux.org
> Unsubscribe: https://lists.automotivelinux.org/g/agl-dev-community/leave/9010164/1597297750/xyzzy [alex.bennee@linaro.org]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>


-- 
Alex Bennée
KVM/QEMU Hacker for Linaro


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [agl-dev-community] Tips for debugging GPU acceleration.
  2020-10-23 16:28       ` Alex Bennée
@ 2020-10-23 17:46         ` Marius Vlad
  0 siblings, 0 replies; 6+ messages in thread
From: Marius Vlad @ 2020-10-23 17:46 UTC (permalink / raw)
  To: agl-dev-community; +Cc: Gerd Hoffmann, QEMU Developers

[-- Attachment #1: Type: text/plain, Size: 3011 bytes --]

On Fri, Oct 23, 2020 at 05:28:22PM +0100, Alex Bennée wrote:
> Thanks - that seems to do the trick.
> I can't find where in the agl repo that is set. The recipe seems to be in:
> 
>   meta-agl-cluster-demo/recipie-graphics/wayland/weston-ini-conf/virtual-landscape.cfg
> 
> but I can't see where the "transform=270" got added.
I assume from
meta-agl/meta-agl-bsp/meta-aglprofilegraphical/recipes-graphics/wayland/weston-ini-conf/virtual.cfg
> 
> Visually it looks a lot nicer now although I could still do with
> getting rid of the quite large AGL lower banner which is cropping out
> the main display.
Yes, like I've said, but apparently I've substituted landscape w/
portrait, applications are designed to accommodate portrait orientation.
The panels, are added dynamically by homescreen.
> 
> On Fri, 23 Oct 2020 at 13:32, Marius Vlad <marius.vlad@collabora.com> wrote:
> >
> > On Fri, Oct 23, 2020 at 12:52:17PM +0100, Alex Bennée wrote:
> > >
> > > Gerd Hoffmann <kraxel@redhat.com> writes:
> > >
> > > >   Hi,
> > > >
> > > >>   [    2.930300] [drm] virgl 3d acceleration not supported by host
> > > >
> > > > Nope, not active.
> > > >
> > > >>     -display gtk,show-cursor=on \
> > > >
> > > > Needs -display gtk,gl=on for opengl support.
> > >
> > > Awesome - even on TCG the display is now nice and snappy.
> > >
> > > For bonus points:
> > >
> > > The AGL panel display is rotated 90 degrees which is putting a bit of a
> > > crink in my neck. Is their anyway to rotate the view port. I tried
> > > inverting xres and yres but that didn't do anything.
> > Hi,
> >
> > The output is rotated, edit /etc/xdg/weston/weston.ini and comment out
> > transform ini entry from the Virtual-1 output section. Reboot, or
> > restart weston@display service. Note that the apps are optimized for
> > landscape.
> >
> > Enabling 3D with qemu might be something worth adding in the docs.
> > >
> > > >>     -device virtio-gpu-pci,virgl=true
> > > >
> > > > virgl is silently turned off in case opengl support is not available.
> > > > Ideally virgl should be OnOffAuto not bool, but I fear changing that
> > > > now (and start throwing errors on virgl=on if opengl is not available)
> > > > will break stuff ...
> > >
> > > At least a warn_report maybe?
> > >
> > > >
> > > > take care,
> > > >   Gerd
> > >
> > >
> > > --
> > > Alex Bennée
> > >
> > >
> > >
> > >
> > >
> >
> >
> > 
> >
> >
> 
> 
> -- 
> Alex Bennée
> KVM/QEMU Hacker for Linaro
> 
> 
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#8773): https://lists.automotivelinux.org/g/agl-dev-community/message/8773
> Mute This Topic: https://lists.automotivelinux.org/mt/77748325/4043866
> Group Owner: agl-dev-community+owner@lists.automotivelinux.org
> Unsubscribe: https://lists.automotivelinux.org/g/agl-dev-community/leave/7327001/516878461/xyzzy [marius.vlad@collabora.com]
> -=-=-=-=-=-=-=-=-=-=-=-
> 
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-10-23 17:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <87o8kttj2e.fsf@linaro.org>
2020-10-23  9:34 ` Tips for debugging GPU acceleration Alex Bennée
2020-10-23 10:51 ` Gerd Hoffmann
2020-10-23 11:52   ` Alex Bennée
2020-10-23 12:32     ` [agl-dev-community] " Marius Vlad
2020-10-23 16:28       ` Alex Bennée
2020-10-23 17:46         ` Marius Vlad

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).