Re: [PATCH v5] drm/virtio: Add option to disable KMS support

2023-03-02 Thread Rob Clark
On Wed, Mar 1, 2023 at 11:25 PM Gerd Hoffmann wrote: > > On Thu, Mar 02, 2023 at 12:39:33AM +0300, Dmitry Osipenko wrote: > > On 3/1/23 21:54, Rob Clark wrote: > > > /* virtgpu_display.c */ > > > +#if defined(CONFIG_DRM_VIRTIO_GPU_KMS) > > > int virtio_gpu_modeset_init(struct virtio_gpu_device

Re: [PATCH v5] drm/virtio: Add option to disable KMS support

2023-03-01 Thread Gerd Hoffmann
On Thu, Mar 02, 2023 at 12:39:33AM +0300, Dmitry Osipenko wrote: > On 3/1/23 21:54, Rob Clark wrote: > > /* virtgpu_display.c */ > > +#if defined(CONFIG_DRM_VIRTIO_GPU_KMS) > > int virtio_gpu_modeset_init(struct virtio_gpu_device *vgdev); > > void virtio_gpu_modeset_fini(struct

Re: [PATCH v5] drm/virtio: Add option to disable KMS support

2023-03-01 Thread Gerd Hoffmann
Hi, > + if (vgdev->num_scanouts) { > + ret = virtio_gpu_modeset_init(vgdev); The call to virtio_gpu_modeset_fini() in the unregister code path needs this too. Otherwise the patch looks good to me, so with that fixed: Acked-by: Gerd Hoffmann take care, Gerd

Re: [PATCH v5] drm/virtio: Add option to disable KMS support

2023-03-01 Thread Dmitry Osipenko
On 3/1/23 21:54, Rob Clark wrote: > /* virtgpu_display.c */ > +#if defined(CONFIG_DRM_VIRTIO_GPU_KMS) > int virtio_gpu_modeset_init(struct virtio_gpu_device *vgdev); > void virtio_gpu_modeset_fini(struct virtio_gpu_device *vgdev); > +#else > +static inline int virtio_gpu_modeset_init(struct

[PATCH v5] drm/virtio: Add option to disable KMS support

2023-03-01 Thread Rob Clark
From: Rob Clark Add a build option to disable modesetting support. This is useful in cases where the guest only needs to use the GPU in a headless mode, or (such as in the CrOS usage) window surfaces are proxied to a host compositor. As the modesetting ioctls are a big surface area for