qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Marc-André Lureau" <marcandre.lureau@redhat.com>
To: Vivek Kasireddy <vivek.kasireddy@intel.com>
Cc: Dongwon Kim <dongwon.kim@intel.com>,
	qemu-devel <qemu-devel@nongnu.org>,
	Gerd Hoffmann <kraxel@redhat.com>
Subject: Re: [PATCH v1] ui/gtk-egl: Check for a valid context before making EGL calls
Date: Mon, 7 Mar 2022 11:50:09 +0400	[thread overview]
Message-ID: <CAMxuvawcUYkjPt-iopJhJ8seO_3tJJGqkECqZfEPb3_7SSWpkg@mail.gmail.com> (raw)
In-Reply-To: <20220307042108.296428-1-vivek.kasireddy@intel.com>

Hi Vivek

On Mon, Mar 7, 2022 at 8:39 AM Vivek Kasireddy
<vivek.kasireddy@intel.com> wrote:
>
> Since not all listeners (i.e VirtualConsoles) of GL events have
> a valid EGL context, make sure that there is a valid context
> before making EGL calls.
>
> This fixes the following crash seen while launching the VM with
> "-device virtio-gpu-pci,max_outputs=1,blob=true -display gtk,gl=on"
>
> No provider of eglCreateImageKHR found.  Requires one of:
> EGL_KHR_image
> EGL_KHR_image_base
>
> Fixes: 7cc712e9862ff ("ui: dispatch GL events to all listeners")

I am not able to reproduce on current master.

Isn't it fixed with commit a9fbce5e9 ("ui/console: fix crash when
using gl context with non-gl listeners") ?

Could you also check after "[PATCH v3 00/12] GL & D-Bus display related fixes" ?

thanks

>
> Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
> Cc: Gerd Hoffmann <kraxel@redhat.com>
> Cc: Dongwon Kim <dongwon.kim@intel.com>
> Signed-off-by: Vivek Kasireddy <vivek.kasireddy@intel.com>
> ---
>  ui/gtk-egl.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/ui/gtk-egl.c b/ui/gtk-egl.c
> index e3bd4bc274..31175827d0 100644
> --- a/ui/gtk-egl.c
> +++ b/ui/gtk-egl.c
> @@ -244,6 +244,10 @@ void gd_egl_scanout_dmabuf(DisplayChangeListener *dcl,
>  #ifdef CONFIG_GBM
>      VirtualConsole *vc = container_of(dcl, VirtualConsole, gfx.dcl);
>
> +    if (!vc->gfx.ectx || !vc->gfx.esurface) {
> +        return;
> +    }
> +
>      eglMakeCurrent(qemu_egl_display, vc->gfx.esurface,
>                     vc->gfx.esurface, vc->gfx.ectx);
>
> @@ -269,6 +273,10 @@ void gd_egl_cursor_dmabuf(DisplayChangeListener *dcl,
>  #ifdef CONFIG_GBM
>      VirtualConsole *vc = container_of(dcl, VirtualConsole, gfx.dcl);
>
> +    if (!vc->gfx.ectx || !vc->gfx.esurface) {
> +        return;
> +    }
> +
>      if (dmabuf) {
>          egl_dmabuf_import_texture(dmabuf);
>          if (!dmabuf->texture) {
> --
> 2.35.1
>



  reply	other threads:[~2022-03-07  8:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-07  4:21 [PATCH v1] ui/gtk-egl: Check for a valid context before making EGL calls Vivek Kasireddy
2022-03-07  7:50 ` Marc-André Lureau [this message]
2022-03-07 18:00   ` Kasireddy, Vivek
2022-03-09 10:37     ` Marc-André Lureau
2022-04-04 23:01       ` Kasireddy, Vivek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAMxuvawcUYkjPt-iopJhJ8seO_3tJJGqkECqZfEPb3_7SSWpkg@mail.gmail.com \
    --to=marcandre.lureau@redhat.com \
    --cc=dongwon.kim@intel.com \
    --cc=kraxel@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=vivek.kasireddy@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).