Re: [PATCH 11/20] ui: add an optional get_flags callback to GraphicHwOps

2021-02-04 Thread Gerd Hoffmann
On Thu, Feb 04, 2021 at 02:21:02AM +0400, Marc-André Lureau wrote: > On Wed, Feb 3, 2021 at 7:48 PM Gerd Hoffmann wrote: > > > > +static int > > > +virtio_gpu_get_flags(void *opaque) > > > +{ > > > +VirtIOGPUBase *g = opaque; > > > +int flags = GRAPHIC_FLAGS_NONE; > > > + > > > +if (v

Re: [PATCH 11/20] ui: add an optional get_flags callback to GraphicHwOps

2021-02-03 Thread Marc-André Lureau
On Wed, Feb 3, 2021 at 7:48 PM Gerd Hoffmann wrote: > > +static int > > +virtio_gpu_get_flags(void *opaque) > > +{ > > +VirtIOGPUBase *g = opaque; > > +int flags = GRAPHIC_FLAGS_NONE; > > + > > +if (virtio_gpu_virgl_enabled(g->conf)) > > +flags |= GRAPHIC_FLAGS_GL; > > + > > +

Re: [PATCH 11/20] ui: add an optional get_flags callback to GraphicHwOps

2021-02-03 Thread Gerd Hoffmann
> +static int > +virtio_gpu_get_flags(void *opaque) > +{ > +VirtIOGPUBase *g = opaque; > +int flags = GRAPHIC_FLAGS_NONE; > + > +if (virtio_gpu_virgl_enabled(g->conf)) > +flags |= GRAPHIC_FLAGS_GL; > + > +if (virtio_gpu_dmabuf_enabled(g->conf)) > +flags |= GRAPHIC_FL

[PATCH 11/20] ui: add an optional get_flags callback to GraphicHwOps

2021-02-02 Thread marcandre . lureau
From: Marc-André Lureau Those flags can be used to express different requirements for the display or other needs. Signed-off-by: Marc-André Lureau --- include/ui/console.h | 9 + hw/display/virtio-gpu-base.c | 16 hw/display/virtio-vga.c | 9 + h