All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fabiano Rosas <farosas@suse.de>
To: marcandre.lureau@redhat.com, qemu-devel@nongnu.org
Cc: "Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"Thomas Huth" <thuth@redhat.com>,
	"Daniel P. Berrangé" <berrange@redhat.com>,
	"Gerd Hoffmann" <kraxel@redhat.com>,
	"Laurent Vivier" <lvivier@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>
Subject: Re: [PULL v2 18/18] ui/dbus: restrict opengl to gbm-enabled config
Date: Fri, 24 Mar 2023 12:25:06 -0300	[thread overview]
Message-ID: <87bkkijhnx.fsf@suse.de> (raw)
In-Reply-To: <20230313200134.503083-19-marcandre.lureau@redhat.com>

marcandre.lureau@redhat.com writes:

> From: Marc-André Lureau <marcandre.lureau@redhat.com>
>
> We can enable EGL later for non-GBM hosts.
>
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
>  ui/dbus-listener.c | 10 +++++-----
>  ui/dbus.c          | 12 +++++++++++-
>  2 files changed, 16 insertions(+), 6 deletions(-)
>
> diff --git a/ui/dbus-listener.c b/ui/dbus-listener.c
> index 85692f1b27..911acdc529 100644
> --- a/ui/dbus-listener.c
> +++ b/ui/dbus-listener.c
> @@ -50,7 +50,7 @@ struct _DBusDisplayListener {
>  
>  G_DEFINE_TYPE(DBusDisplayListener, dbus_display_listener, G_TYPE_OBJECT)
>  
> -#ifdef CONFIG_OPENGL
> +#ifdef CONFIG_GBM
>  static void dbus_update_gl_cb(GObject *source_object,
>                             GAsyncResult *res,
>                             gpointer user_data)
> @@ -239,7 +239,7 @@ static void dbus_refresh(DisplayChangeListener *dcl)
>      graphic_hw_update(dcl->con);
>  }
>  
> -#ifdef CONFIG_OPENGL
> +#ifdef CONFIG_GBM
>  static void dbus_gl_gfx_update(DisplayChangeListener *dcl,
>                                 int x, int y, int w, int h)
>  {
> @@ -302,7 +302,7 @@ static void dbus_gfx_update(DisplayChangeListener *dcl,
>          DBUS_DEFAULT_TIMEOUT, NULL, NULL, NULL);
>  }
>  
> -#ifdef CONFIG_OPENGL
> +#ifdef CONFIG_GBM
>  static void dbus_gl_gfx_switch(DisplayChangeListener *dcl,
>                                 struct DisplaySurface *new_surface)
>  {
> @@ -369,7 +369,7 @@ static void dbus_cursor_define(DisplayChangeListener *dcl,
>          NULL);
>  }
>  
> -#ifdef CONFIG_OPENGL
> +#ifdef CONFIG_GBM
>  const DisplayChangeListenerOps dbus_gl_dcl_ops = {
>      .dpy_name                = "dbus-gl",
>      .dpy_gfx_update          = dbus_gl_gfx_update,
> @@ -417,7 +417,7 @@ dbus_display_listener_constructed(GObject *object)
>      DBusDisplayListener *ddl = DBUS_DISPLAY_LISTENER(object);
>  
>      ddl->dcl.ops = &dbus_dcl_ops;
> -#ifdef CONFIG_OPENGL
> +#ifdef CONFIG_GBM
>      if (display_opengl) {
>          ddl->dcl.ops = &dbus_gl_dcl_ops;
>      }
> diff --git a/ui/dbus.c b/ui/dbus.c
> index 904f5a0a6d..0513de9918 100644
> --- a/ui/dbus.c
> +++ b/ui/dbus.c
> @@ -47,8 +47,10 @@ static DBusDisplay *dbus_display;
>  static QEMUGLContext dbus_create_context(DisplayGLCtx *dgc,
>                                           QEMUGLParams *params)
>  {
> +#ifdef CONFIG_GBM
>      eglMakeCurrent(qemu_egl_display, EGL_NO_SURFACE, EGL_NO_SURFACE,
>                     qemu_egl_rn_ctx);
> +#endif
>      return qemu_egl_create_context(dgc, params);
>  }
>  
> @@ -56,7 +58,11 @@ static bool
>  dbus_is_compatible_dcl(DisplayGLCtx *dgc,
>                         DisplayChangeListener *dcl)
>  {
> -    return dcl->ops == &dbus_gl_dcl_ops || dcl->ops == &dbus_console_dcl_ops;
> +    return
> +#ifdef CONFIG_GBM
> +        dcl->ops == &dbus_gl_dcl_ops ||
> +#endif
> +        dcl->ops == &dbus_console_dcl_ops;
>  }
>  
>  static void
> @@ -459,7 +465,11 @@ early_dbus_init(DisplayOptions *opts)
>      DisplayGLMode mode = opts->has_gl ? opts->gl : DISPLAYGL_MODE_OFF;
>  
>      if (mode != DISPLAYGL_MODE_OFF) {
> +#ifdef CONFIG_OPENGL
>          egl_init(opts->u.dbus.rendernode, mode, &error_fatal);
> +#else
> +        error_report("dbus: GL rendering is not supported");
> +#endif
>      }
>  
>      type_register(&dbus_vc_type_info);

With this patch I get:

FAILED: libcommon.fa.p/ui_dbus-listener.c.o
cc -m64 -mcx16 -Ilibcommon.fa.p -Iui -I../ui -I/usr/include/pixman-1 \
               -I/usr/include/libpng16 -I/usr/include/spice-server \
               -I/usr/include/cacard -I/usr/include/nss3 -I/usr/include/nspr4 -I/usrc
../ui/dbus-listener.c: In function ‘dbus_call_update_gl’:
../ui/dbus-listener.c:74:5: error: implicit declaration of function ‘glFlush’; did you mean ‘fflush’? [-Werror=implicit-function-declaration]
     glFlush();
     ^~~~~~~
     fflush

I don't have libepoxy, only virgl installed. Did we miss something in
meson perhaps?


  reply	other threads:[~2023-03-24 15:40 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-13 20:01 [PULL v2 00/18] Display patches marcandre.lureau
2023-03-13 20:01 ` [PULL v2 01/18] ui/dbus: initialize cursor_fb marcandre.lureau
2023-03-13 20:01 ` [PULL v2 02/18] ui/dbus: unregister clipboard on connection close marcandre.lureau
2023-03-13 20:01 ` [PULL v2 03/18] audio/dbus: there are no sender for p2p mode marcandre.lureau
2023-03-13 20:01 ` [PULL v2 04/18] ui/dbus: set mouse is-absolute during console creation marcandre.lureau
2023-03-13 20:01 ` [PULL v2 05/18] meson: ensure dbus-display generated code is built before other units marcandre.lureau
2023-03-13 20:01 ` [PULL v2 06/18] ui: rename cursor_{put->unref} marcandre.lureau
2023-03-13 20:01 ` [PULL v2 07/18] ui: rename cursor_{get->ref}, return it marcandre.lureau
2023-03-13 20:01 ` [PULL v2 08/18] ui: keep current cursor with QemuConsole marcandre.lureau
2023-03-17 17:34   ` Daniel P. Berrangé
2023-03-13 20:01 ` [PULL v2 09/18] ui: set cursor upon listener registration marcandre.lureau
2023-03-13 20:01 ` [PULL v2 10/18] ui: set cursor position " marcandre.lureau
2023-03-13 20:01 ` [PULL v2 11/18] ui/sdl: get the GL context from the window marcandre.lureau
2023-03-13 20:01 ` [PULL v2 12/18] ui/shader: fix #version directive must occur on first line marcandre.lureau
2023-03-13 20:01 ` [PULL v2 13/18] ui/egl: print EGL error, helping debugging marcandre.lureau
2023-03-13 20:01 ` [PULL v2 14/18] ui/sdl: add QEMU_ENABLE_SDL_LOGGING setting/environment marcandre.lureau
2023-03-13 20:01 ` [PULL v2 15/18] ui/sdl: try to instantiate the matching opengl renderer marcandre.lureau
2023-03-13 20:01 ` [PULL v2 16/18] ui: introduce egl_init() marcandre.lureau
2023-03-13 20:01 ` [PULL v2 17/18] ui/dbus: do not require opengl & gbm marcandre.lureau
2023-03-13 20:01 ` [PULL v2 18/18] ui/dbus: restrict opengl to gbm-enabled config marcandre.lureau
2023-03-24 15:25   ` Fabiano Rosas [this message]
2023-03-14 19:21 ` [PULL v2 00/18] Display patches Peter Maydell

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=87bkkijhnx.fsf@suse.de \
    --to=farosas@suse.de \
    --cc=berrange@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=lvivier@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.