[Spice-devel] [PATCH][next] drm: Replace zero-length array with flexible-array member

2020-02-26 Thread Gustavo A. R. Silva
The current codebase makes use of the zero-length array language extension to the C90 standard, but the preferred mechanism to declare variable-length types such as these ones is a flexible array member[1][2], introduced in C99: struct foo { int stuff; struct boo array[]; }; By ma

Re: [Spice-devel] [PATCH][next] drm: Replace zero-length array with flexible-array member

2020-02-26 Thread Jani Nikula
On Tue, 25 Feb 2020, "Gustavo A. R. Silva" wrote: > The current codebase makes use of the zero-length array language > extension to the C90 standard, but the preferred mechanism to declare > variable-length types such as these ones is a flexible array member[1][2], > introduced in C99: > > struct

[Spice-devel] [PATCH v3 4/4] drm/qxl: Use simple encoder

2020-02-26 Thread Thomas Zimmermann
The qxl driver uses an empty implementation for its encoder. Replace the code with the generic simple encoder. v2: * rebase onto new simple-encoder interface Signed-off-by: Thomas Zimmermann Acked-by: Sam Ravnborg Acked-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_display.c | 18 +++-

[Spice-devel] [PATCH v3 3/4] drm/mgag200: Use simple encoder

2020-02-26 Thread Thomas Zimmermann
The mgag200 driver uses an empty implementation for its encoder. Replace the code with the generic simple encoder. v3: * init pre-allocated encoder with drm_simple_encoder_init() v2: * rebase onto new simple-encoder interface Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/

[Spice-devel] [PATCH v3 0/4] drm: Provide a simple encoder

2020-02-26 Thread Thomas Zimmermann
Many DRM drivers implement an encoder with an empty implementation. This patchset adds drm_simple_encoder_init(), which can be used by drivers instead. Except for the destroy callback, the simple encoder's implementation is empty. The patchset also converts 4 encoder instances to use the simple-en

Re: [Spice-devel] [PATCH][next] drm: Replace zero-length array with flexible-array member

2020-02-26 Thread Chris Wilson
Quoting Gustavo A. R. Silva (2020-02-25 14:03:47) > The current codebase makes use of the zero-length array language > extension to the C90 standard, but the preferred mechanism to declare > variable-length types such as these ones is a flexible array member[1][2], > introduced in C99: I remember

[Spice-devel] [PATCH v3 2/4] drm/ast: Use simple encoder

2020-02-26 Thread Thomas Zimmermann
The ast driver uses an empty implementation for its encoder. Replace the code with the generic simple encoder. v2: * rebase onto new simple-encoder interface Signed-off-by: Thomas Zimmermann Acked-by: Sam Ravnborg --- drivers/gpu/drm/ast/ast_drv.h | 6 +- drivers/gpu/drm/ast/ast_

[Spice-devel] [PATCH v3 1/4] drm/simple-kms: Add drm_simple_encoder_{init, create}()

2020-02-26 Thread Thomas Zimmermann
This patch makes the internal encoder implementation of the simple KMS helpers available to drivers. These simple-encoder helpers initialize an encoder with an empty implementation. This covers the requirements of most of the existing DRM drivers. A call to drm_simple_encoder_create() allocates an

Re: [Spice-devel] Spice Display Channel Capabilities

2020-02-26 Thread Frediano Ziglio
> Dear developers. > I have been reproducing spice protocol, (Not using spice-gtk actually). So > far I have seen some image types and most of the stream types but I was not > able to use some capabilities. > First, how to enable Glyph string, > Second, I only get one rendering message (draw_copy)

Re: [Spice-devel] [PATCH v3 1/2] virtio-video: Add virtio video device specification

2020-02-26 Thread Keiichi Watanabe
Thanks for the review, Gerd. Please see my replies inline below. FYI, I'm implementing virtio-video device for ChromeOS that works with Dmitry's virtio-video driver https://patchwork.linuxtv.org/patch/61717/. Once it becomes fully functional, I'll post a list of possible improvements of protocol.

Re: [Spice-devel] [PATCH v3 2/2] virtio-video: Define a feature for exported objects from different virtio devices

2020-02-26 Thread Keiichi Watanabe
Hi, On Tue, Feb 25, 2020 at 7:01 PM Gerd Hoffmann wrote: > > Hi, > > > +/* > > + * Followed by either > > + * - struct virtio_video_mem_entry entries[] > > + * for VIRTIO_VIDEO_MEM_TYPE_GUEST_PAGES > > + * - struct virtio_video_object_entry entries[] >