]> www.infradead.org Git - users/dwmw2/qemu.git/commitdiff
ui: remove console_has_gl_dmabuf()
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Thu, 4 Feb 2021 10:52:21 +0000 (14:52 +0400)
committerGerd Hoffmann <kraxel@redhat.com>
Thu, 4 Feb 2021 14:58:54 +0000 (15:58 +0100)
This check is currently limited. It only is used by vhost-user-gpu (not
by vfio-display), and will print an error repeatedly during run-time.

We are going to dissociate the GL context from the
DisplayChangeListener, and listeners may come and go. The following
patches will address this differently.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20210204105232.834642-10-marcandre.lureau@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
hw/display/vhost-user-gpu.c
include/ui/console.h
ui/console.c

index 55b0ed15f2507aae781ae5112093d20d9ac38227..dd587436ff343479c29991b70f9ed2c25e3e5ca4 100644 (file)
@@ -224,11 +224,6 @@ vhost_user_gpu_handle_display(VhostUserGPU *g, VhostUserGpuMsg *msg)
             close(dmabuf->fd);
             dmabuf->fd = -1;
         }
-        if (!console_has_gl_dmabuf(con)) {
-            /* it would be nice to report that error earlier */
-            error_report("console doesn't support dmabuf!");
-            break;
-        }
         dpy_gl_release_dmabuf(con, dmabuf);
         if (fd == -1) {
             dpy_gl_scanout_disable(con);
index bea2b6329a92112969550a55fb2174457bdef2fa..ac989fdf70161eb52c3653c1bfffad9399d13028 100644 (file)
@@ -323,7 +323,6 @@ void dpy_gl_ctx_destroy(QemuConsole *con, QEMUGLContext ctx);
 int dpy_gl_ctx_make_current(QemuConsole *con, QEMUGLContext ctx);
 
 bool console_has_gl(QemuConsole *con);
-bool console_has_gl_dmabuf(QemuConsole *con);
 
 static inline int surface_stride(DisplaySurface *s)
 {
index ab9224429e29673ba26702507e7e2772ac3558dc..b5bc3f7699a117eea74358ed49237a362d5da5ca 100644 (file)
@@ -1463,11 +1463,6 @@ bool console_has_gl(QemuConsole *con)
     return con->gl != NULL;
 }
 
-bool console_has_gl_dmabuf(QemuConsole *con)
-{
-    return con->gl != NULL && con->gl->ops->dpy_gl_scanout_dmabuf != NULL;
-}
-
 void register_displaychangelistener(DisplayChangeListener *dcl)
 {
     static const char nodev[] =