>  /* ---------------------------------------------------------------------- */
> +void vfio_display_reset(VFIOPCIDevice *vdev)
> +{
> +    if (!vdev || !vdev->dpy || !vdev->dpy->con) {
> +        return;
> +    }
> +
> +    dpy_gl_scanout_disable(vdev->dpy->con);
> +    vfio_display_dmabuf_exit(vdev->dpy);
> +    dpy_gfx_update_full(vdev->dpy->con);
> +}

> +    /* vfio_display_reset is needed by dma-buf based vfio display */
> +    if (vdev->display != ON_OFF_AUTO_OFF && dpy &&
> +        dpy->dmabuf.primary) {

Well, the check should be inside the vfio_display_reset() function, so
the display specific code is contained to display.c.

cheers,
  Gerd


Reply via email to