[Spice-devel,spice-protocol] support multiple monitors on a single display channel

Submitted by Alon Levy on July 12, 2012, 4:49 p.m.

Details

Message ID 1342111785-25497-1-git-send-email-alevy@redhat.com
State New
Headers show

Not browsing as part of any series.

Commit Message

Alon Levy July 12, 2012, 4:49 p.m.
Adds on device:

RAM
 Header
  monitors_config - pointer

 QXLMonitorsConfig
  count == n
  max_allowed = N >= 0
  QXLHead 1
  ...
  QXLHead n
   id, surface_id, x, y, width, height, flags

IO:
 QXL_IO_MONITORS_CONFIG
  server flushes command ring, then calls server callback for changing monitors config.

New revision to let the driver know about the new io:
 QXL_REVISION_STABLE_V12=0x04,

Adds server/client capability:
 SPICE_DISPLAY_CAP_MONITORS_CONFIG

Server message will be added in spice-server and spice-common.

Version is bumped to 0.12.0 to indicate new IO and structs
---
 configure.ac     |    4 ++--
 spice/enums.h    |    1 +
 spice/protocol.h |    1 +
 spice/qxl_dev.h  |   31 ++++++++++++++++++++++++++++++-
 4 files changed, 34 insertions(+), 3 deletions(-)

Patch hide | download patch | download mbox

diff --git a/configure.ac b/configure.ac
index bf7d949..07e9c75 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,8 +1,8 @@ 
 AC_PREREQ([2.57])
 
 m4_define([SPICE_MAJOR], 0)
-m4_define([SPICE_MINOR], 10)
-m4_define([SPICE_MICRO], 3)
+m4_define([SPICE_MINOR], 12)
+m4_define([SPICE_MICRO], 0)
 
 AC_INIT(spice-protocol, [SPICE_MAJOR.SPICE_MINOR.SPICE_MICRO], [], spice-protocol)
 
diff --git a/spice/enums.h b/spice/enums.h
index d3a2141..c4e38aa 100644
--- a/spice/enums.h
+++ b/spice/enums.h
@@ -430,6 +430,7 @@  enum {
     SPICE_MSG_DISPLAY_SURFACE_CREATE,
     SPICE_MSG_DISPLAY_SURFACE_DESTROY,
     SPICE_MSG_DISPLAY_STREAM_DATA_SIZED,
+    SPICE_MSG_DISPLAY_MONITORS_CONFIG,
 
     SPICE_MSG_END_DISPLAY
 };
diff --git a/spice/protocol.h b/spice/protocol.h
index ceba2a1..c0d33e6 100644
--- a/spice/protocol.h
+++ b/spice/protocol.h
@@ -124,6 +124,7 @@  enum {
 
 enum {
     SPICE_DISPLAY_CAP_SIZED_STREAM,
+    SPICE_DISPLAY_CAP_MONITORS_CONFIG,
 };
 
 #include <spice/end-packed.h>
diff --git a/spice/qxl_dev.h b/spice/qxl_dev.h
index 741a1f6..8899403 100644
--- a/spice/qxl_dev.h
+++ b/spice/qxl_dev.h
@@ -47,7 +47,8 @@ 
 enum {
     QXL_REVISION_STABLE_V04=0x01,
     QXL_REVISION_STABLE_V06=0x02,
-    QXL_REVISION_STABLE_V10=0x03
+    QXL_REVISION_STABLE_V10=0x03,
+    QXL_REVISION_STABLE_V12=0x04,
 };
 
 #define QXL_DEVICE_ID_DEVEL 0x01ff
@@ -93,6 +94,8 @@  enum {
     QXL_IO_DESTROY_ALL_SURFACES_ASYNC,
     QXL_IO_FLUSH_SURFACES_ASYNC,
     QXL_IO_FLUSH_RELEASE,
+    /* appended for qxl-4 */
+    QXL_IO_MONITORS_CONFIG_ASYNC,
 
     QXL_IO_RANGE_SIZE
 };
@@ -244,6 +247,12 @@  typedef struct SPICE_ATTR_PACKED QXLRam {
     QXLMemSlot mem_slot;
     QXLSurfaceCreate create_surface;
     uint64_t flags;
+
+    /* appended for qxl-4 */
+
+    /* used by QXL_IO_MONITORS_CONFIG_ASYNC */
+    QXLPHYSICAL monitors_config;
+
 } QXLRam;
 
 typedef union QXLReleaseInfo {
@@ -653,6 +662,26 @@  typedef struct SPICE_ATTR_PACKED QXLImage {
     };
 } QXLImage;
 
+/* A QXLHead is a single monitor output backed by a QXLSurface.
+ * x and y offsets are unsigned since they are used in relation to
+ * the given surface, not the same as the x, y coordinates in the guest
+ * screen reference frame. */
+typedef struct SPICE_ATTR_PACKED QXLHead {
+    uint32_t id;
+    uint32_t surface_id;
+    uint32_t width;
+    uint32_t height;
+    uint32_t x;
+    uint32_t y;
+    uint32_t flags;
+} QXLHead;
+
+typedef struct SPICE_ATTR_PACKED QXLMonitorsConfig {
+    uint16_t count;
+    uint16_t max_allowed; /* If it is 0 no fixed limit is given by the driver */
+    QXLHead heads[0];
+} QXLMonitorsConfig;
+
 #include <spice/end-packed.h>
 
 #endif /* _H_QXL_DEV */

Comments

ack

On Thu, Jul 12, 2012 at 6:49 PM, Alon Levy <alevy@redhat.com> wrote:
> Adds on device:
>
> RAM
>  Header
>   monitors_config - pointer
>
>  QXLMonitorsConfig
>   count == n
>   max_allowed = N >= 0
>   QXLHead 1
>   ...
>   QXLHead n
>    id, surface_id, x, y, width, height, flags
>
> IO:
>  QXL_IO_MONITORS_CONFIG
>   server flushes command ring, then calls server callback for changing monitors config.
>
> New revision to let the driver know about the new io:
>  QXL_REVISION_STABLE_V12=0x04,
>
> Adds server/client capability:
>  SPICE_DISPLAY_CAP_MONITORS_CONFIG
>
> Server message will be added in spice-server and spice-common.
>
> Version is bumped to 0.12.0 to indicate new IO and structs
> ---
>  configure.ac     |    4 ++--
>  spice/enums.h    |    1 +
>  spice/protocol.h |    1 +
>  spice/qxl_dev.h  |   31 ++++++++++++++++++++++++++++++-
>  4 files changed, 34 insertions(+), 3 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index bf7d949..07e9c75 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -1,8 +1,8 @@
>  AC_PREREQ([2.57])
>
>  m4_define([SPICE_MAJOR], 0)
> -m4_define([SPICE_MINOR], 10)
> -m4_define([SPICE_MICRO], 3)
> +m4_define([SPICE_MINOR], 12)
> +m4_define([SPICE_MICRO], 0)
>
>  AC_INIT(spice-protocol, [SPICE_MAJOR.SPICE_MINOR.SPICE_MICRO], [], spice-protocol)
>
> diff --git a/spice/enums.h b/spice/enums.h
> index d3a2141..c4e38aa 100644
> --- a/spice/enums.h
> +++ b/spice/enums.h
> @@ -430,6 +430,7 @@ enum {
>      SPICE_MSG_DISPLAY_SURFACE_CREATE,
>      SPICE_MSG_DISPLAY_SURFACE_DESTROY,
>      SPICE_MSG_DISPLAY_STREAM_DATA_SIZED,
> +    SPICE_MSG_DISPLAY_MONITORS_CONFIG,
>
>      SPICE_MSG_END_DISPLAY
>  };
> diff --git a/spice/protocol.h b/spice/protocol.h
> index ceba2a1..c0d33e6 100644
> --- a/spice/protocol.h
> +++ b/spice/protocol.h
> @@ -124,6 +124,7 @@ enum {
>
>  enum {
>      SPICE_DISPLAY_CAP_SIZED_STREAM,
> +    SPICE_DISPLAY_CAP_MONITORS_CONFIG,
>  };
>
>  #include <spice/end-packed.h>
> diff --git a/spice/qxl_dev.h b/spice/qxl_dev.h
> index 741a1f6..8899403 100644
> --- a/spice/qxl_dev.h
> +++ b/spice/qxl_dev.h
> @@ -47,7 +47,8 @@
>  enum {
>      QXL_REVISION_STABLE_V04=0x01,
>      QXL_REVISION_STABLE_V06=0x02,
> -    QXL_REVISION_STABLE_V10=0x03
> +    QXL_REVISION_STABLE_V10=0x03,
> +    QXL_REVISION_STABLE_V12=0x04,
>  };
>
>  #define QXL_DEVICE_ID_DEVEL 0x01ff
> @@ -93,6 +94,8 @@ enum {
>      QXL_IO_DESTROY_ALL_SURFACES_ASYNC,
>      QXL_IO_FLUSH_SURFACES_ASYNC,
>      QXL_IO_FLUSH_RELEASE,
> +    /* appended for qxl-4 */
> +    QXL_IO_MONITORS_CONFIG_ASYNC,
>
>      QXL_IO_RANGE_SIZE
>  };
> @@ -244,6 +247,12 @@ typedef struct SPICE_ATTR_PACKED QXLRam {
>      QXLMemSlot mem_slot;
>      QXLSurfaceCreate create_surface;
>      uint64_t flags;
> +
> +    /* appended for qxl-4 */
> +
> +    /* used by QXL_IO_MONITORS_CONFIG_ASYNC */
> +    QXLPHYSICAL monitors_config;
> +
>  } QXLRam;
>
>  typedef union QXLReleaseInfo {
> @@ -653,6 +662,26 @@ typedef struct SPICE_ATTR_PACKED QXLImage {
>      };
>  } QXLImage;
>
> +/* A QXLHead is a single monitor output backed by a QXLSurface.
> + * x and y offsets are unsigned since they are used in relation to
> + * the given surface, not the same as the x, y coordinates in the guest
> + * screen reference frame. */
> +typedef struct SPICE_ATTR_PACKED QXLHead {
> +    uint32_t id;
> +    uint32_t surface_id;
> +    uint32_t width;
> +    uint32_t height;
> +    uint32_t x;
> +    uint32_t y;
> +    uint32_t flags;
> +} QXLHead;
> +
> +typedef struct SPICE_ATTR_PACKED QXLMonitorsConfig {
> +    uint16_t count;
> +    uint16_t max_allowed; /* If it is 0 no fixed limit is given by the driver */
> +    QXLHead heads[0];
> +} QXLMonitorsConfig;
> +
>  #include <spice/end-packed.h>
>
>  #endif /* _H_QXL_DEV */
> --
> 1.7.10.1
>
> _______________________________________________
> Spice-devel mailing list
> Spice-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
On Thu, Jul 12, 2012 at 07:49:45PM +0300, Alon Levy wrote:
> Adds on device:
> 
> RAM
>  Header
>   monitors_config - pointer
> 
>  QXLMonitorsConfig
>   count == n
>   max_allowed = N >= 0
>   QXLHead 1
>   ...
>   QXLHead n
>    id, surface_id, x, y, width, height, flags

Do we want to have some header size fields in QXLMonitorsConfig and QXLHead
to be able to add data to them in the future while keeping compat? Assuming
there's any point in being compatible there...

Christophe

> 
> IO:
>  QXL_IO_MONITORS_CONFIG
>   server flushes command ring, then calls server callback for changing monitors config.
> 
> New revision to let the driver know about the new io:
>  QXL_REVISION_STABLE_V12=0x04,
> 
> Adds server/client capability:
>  SPICE_DISPLAY_CAP_MONITORS_CONFIG
> 
> Server message will be added in spice-server and spice-common.
> 
> Version is bumped to 0.12.0 to indicate new IO and structs
> ---
>  configure.ac     |    4 ++--
>  spice/enums.h    |    1 +
>  spice/protocol.h |    1 +
>  spice/qxl_dev.h  |   31 ++++++++++++++++++++++++++++++-
>  4 files changed, 34 insertions(+), 3 deletions(-)
> 
> diff --git a/configure.ac b/configure.ac
> index bf7d949..07e9c75 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -1,8 +1,8 @@
>  AC_PREREQ([2.57])
>  
>  m4_define([SPICE_MAJOR], 0)
> -m4_define([SPICE_MINOR], 10)
> -m4_define([SPICE_MICRO], 3)
> +m4_define([SPICE_MINOR], 12)
> +m4_define([SPICE_MICRO], 0)
>  
>  AC_INIT(spice-protocol, [SPICE_MAJOR.SPICE_MINOR.SPICE_MICRO], [], spice-protocol)
>  
> diff --git a/spice/enums.h b/spice/enums.h
> index d3a2141..c4e38aa 100644
> --- a/spice/enums.h
> +++ b/spice/enums.h
> @@ -430,6 +430,7 @@ enum {
>      SPICE_MSG_DISPLAY_SURFACE_CREATE,
>      SPICE_MSG_DISPLAY_SURFACE_DESTROY,
>      SPICE_MSG_DISPLAY_STREAM_DATA_SIZED,
> +    SPICE_MSG_DISPLAY_MONITORS_CONFIG,
>  
>      SPICE_MSG_END_DISPLAY
>  };
> diff --git a/spice/protocol.h b/spice/protocol.h
> index ceba2a1..c0d33e6 100644
> --- a/spice/protocol.h
> +++ b/spice/protocol.h
> @@ -124,6 +124,7 @@ enum {
>  
>  enum {
>      SPICE_DISPLAY_CAP_SIZED_STREAM,
> +    SPICE_DISPLAY_CAP_MONITORS_CONFIG,
>  };
>  
>  #include <spice/end-packed.h>
> diff --git a/spice/qxl_dev.h b/spice/qxl_dev.h
> index 741a1f6..8899403 100644
> --- a/spice/qxl_dev.h
> +++ b/spice/qxl_dev.h
> @@ -47,7 +47,8 @@
>  enum {
>      QXL_REVISION_STABLE_V04=0x01,
>      QXL_REVISION_STABLE_V06=0x02,
> -    QXL_REVISION_STABLE_V10=0x03
> +    QXL_REVISION_STABLE_V10=0x03,
> +    QXL_REVISION_STABLE_V12=0x04,
>  };
>  
>  #define QXL_DEVICE_ID_DEVEL 0x01ff
> @@ -93,6 +94,8 @@ enum {
>      QXL_IO_DESTROY_ALL_SURFACES_ASYNC,
>      QXL_IO_FLUSH_SURFACES_ASYNC,
>      QXL_IO_FLUSH_RELEASE,
> +    /* appended for qxl-4 */
> +    QXL_IO_MONITORS_CONFIG_ASYNC,
>  
>      QXL_IO_RANGE_SIZE
>  };
> @@ -244,6 +247,12 @@ typedef struct SPICE_ATTR_PACKED QXLRam {
>      QXLMemSlot mem_slot;
>      QXLSurfaceCreate create_surface;
>      uint64_t flags;
> +
> +    /* appended for qxl-4 */
> +
> +    /* used by QXL_IO_MONITORS_CONFIG_ASYNC */
> +    QXLPHYSICAL monitors_config;
> +
>  } QXLRam;
>  
>  typedef union QXLReleaseInfo {
> @@ -653,6 +662,26 @@ typedef struct SPICE_ATTR_PACKED QXLImage {
>      };
>  } QXLImage;
>  
> +/* A QXLHead is a single monitor output backed by a QXLSurface.
> + * x and y offsets are unsigned since they are used in relation to
> + * the given surface, not the same as the x, y coordinates in the guest
> + * screen reference frame. */
> +typedef struct SPICE_ATTR_PACKED QXLHead {
> +    uint32_t id;
> +    uint32_t surface_id;
> +    uint32_t width;
> +    uint32_t height;
> +    uint32_t x;
> +    uint32_t y;
> +    uint32_t flags;
> +} QXLHead;
> +
> +typedef struct SPICE_ATTR_PACKED QXLMonitorsConfig {
> +    uint16_t count;
> +    uint16_t max_allowed; /* If it is 0 no fixed limit is given by the driver */
> +    QXLHead heads[0];
> +} QXLMonitorsConfig;
> +
>  #include <spice/end-packed.h>
>  
>  #endif /* _H_QXL_DEV */
> -- 
> 1.7.10.1
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
On Fri, Jul 13, 2012 at 11:39:06AM +0200, Christophe Fergeau wrote:
> On Thu, Jul 12, 2012 at 07:49:45PM +0300, Alon Levy wrote:
> > Adds on device:
> > 
> > RAM
> >  Header
> >   monitors_config - pointer
> > 
> >  QXLMonitorsConfig
> >   count == n
> >   max_allowed = N >= 0
> >   QXLHead 1
> >   ...
> >   QXLHead n
> >    id, surface_id, x, y, width, height, flags
> 
> Do we want to have some header size fields in QXLMonitorsConfig and QXLHead
> to be able to add data to them in the future while keeping compat? Assuming
> there's any point in being compatible there...

We can always bump the version of the device in this case. We'll have to
anyway to let the driver know the device expects it to use any new
fields.

> 
> Christophe
> 
> > 
> > IO:
> >  QXL_IO_MONITORS_CONFIG
> >   server flushes command ring, then calls server callback for changing monitors config.
> > 
> > New revision to let the driver know about the new io:
> >  QXL_REVISION_STABLE_V12=0x04,
> > 
> > Adds server/client capability:
> >  SPICE_DISPLAY_CAP_MONITORS_CONFIG
> > 
> > Server message will be added in spice-server and spice-common.
> > 
> > Version is bumped to 0.12.0 to indicate new IO and structs
> > ---
> >  configure.ac     |    4 ++--
> >  spice/enums.h    |    1 +
> >  spice/protocol.h |    1 +
> >  spice/qxl_dev.h  |   31 ++++++++++++++++++++++++++++++-
> >  4 files changed, 34 insertions(+), 3 deletions(-)
> > 
> > diff --git a/configure.ac b/configure.ac
> > index bf7d949..07e9c75 100644
> > --- a/configure.ac
> > +++ b/configure.ac
> > @@ -1,8 +1,8 @@
> >  AC_PREREQ([2.57])
> >  
> >  m4_define([SPICE_MAJOR], 0)
> > -m4_define([SPICE_MINOR], 10)
> > -m4_define([SPICE_MICRO], 3)
> > +m4_define([SPICE_MINOR], 12)
> > +m4_define([SPICE_MICRO], 0)
> >  
> >  AC_INIT(spice-protocol, [SPICE_MAJOR.SPICE_MINOR.SPICE_MICRO], [], spice-protocol)
> >  
> > diff --git a/spice/enums.h b/spice/enums.h
> > index d3a2141..c4e38aa 100644
> > --- a/spice/enums.h
> > +++ b/spice/enums.h
> > @@ -430,6 +430,7 @@ enum {
> >      SPICE_MSG_DISPLAY_SURFACE_CREATE,
> >      SPICE_MSG_DISPLAY_SURFACE_DESTROY,
> >      SPICE_MSG_DISPLAY_STREAM_DATA_SIZED,
> > +    SPICE_MSG_DISPLAY_MONITORS_CONFIG,
> >  
> >      SPICE_MSG_END_DISPLAY
> >  };
> > diff --git a/spice/protocol.h b/spice/protocol.h
> > index ceba2a1..c0d33e6 100644
> > --- a/spice/protocol.h
> > +++ b/spice/protocol.h
> > @@ -124,6 +124,7 @@ enum {
> >  
> >  enum {
> >      SPICE_DISPLAY_CAP_SIZED_STREAM,
> > +    SPICE_DISPLAY_CAP_MONITORS_CONFIG,
> >  };
> >  
> >  #include <spice/end-packed.h>
> > diff --git a/spice/qxl_dev.h b/spice/qxl_dev.h
> > index 741a1f6..8899403 100644
> > --- a/spice/qxl_dev.h
> > +++ b/spice/qxl_dev.h
> > @@ -47,7 +47,8 @@
> >  enum {
> >      QXL_REVISION_STABLE_V04=0x01,
> >      QXL_REVISION_STABLE_V06=0x02,
> > -    QXL_REVISION_STABLE_V10=0x03
> > +    QXL_REVISION_STABLE_V10=0x03,
> > +    QXL_REVISION_STABLE_V12=0x04,
> >  };
> >  
> >  #define QXL_DEVICE_ID_DEVEL 0x01ff
> > @@ -93,6 +94,8 @@ enum {
> >      QXL_IO_DESTROY_ALL_SURFACES_ASYNC,
> >      QXL_IO_FLUSH_SURFACES_ASYNC,
> >      QXL_IO_FLUSH_RELEASE,
> > +    /* appended for qxl-4 */
> > +    QXL_IO_MONITORS_CONFIG_ASYNC,
> >  
> >      QXL_IO_RANGE_SIZE
> >  };
> > @@ -244,6 +247,12 @@ typedef struct SPICE_ATTR_PACKED QXLRam {
> >      QXLMemSlot mem_slot;
> >      QXLSurfaceCreate create_surface;
> >      uint64_t flags;
> > +
> > +    /* appended for qxl-4 */
> > +
> > +    /* used by QXL_IO_MONITORS_CONFIG_ASYNC */
> > +    QXLPHYSICAL monitors_config;
> > +
> >  } QXLRam;
> >  
> >  typedef union QXLReleaseInfo {
> > @@ -653,6 +662,26 @@ typedef struct SPICE_ATTR_PACKED QXLImage {
> >      };
> >  } QXLImage;
> >  
> > +/* A QXLHead is a single monitor output backed by a QXLSurface.
> > + * x and y offsets are unsigned since they are used in relation to
> > + * the given surface, not the same as the x, y coordinates in the guest
> > + * screen reference frame. */
> > +typedef struct SPICE_ATTR_PACKED QXLHead {
> > +    uint32_t id;
> > +    uint32_t surface_id;
> > +    uint32_t width;
> > +    uint32_t height;
> > +    uint32_t x;
> > +    uint32_t y;
> > +    uint32_t flags;
> > +} QXLHead;
> > +
> > +typedef struct SPICE_ATTR_PACKED QXLMonitorsConfig {
> > +    uint16_t count;
> > +    uint16_t max_allowed; /* If it is 0 no fixed limit is given by the driver */
> > +    QXLHead heads[0];
> > +} QXLMonitorsConfig;
> > +
> >  #include <spice/end-packed.h>
> >  
> >  #endif /* _H_QXL_DEV */
> > -- 
> > 1.7.10.1
> > 
> > _______________________________________________
> > Spice-devel mailing list
> > Spice-devel@lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/spice-devel
On Sat, Jul 14, 2012 at 05:08:24PM +0300, Alon Levy wrote:
> On Fri, Jul 13, 2012 at 11:39:06AM +0200, Christophe Fergeau wrote:
> > On Thu, Jul 12, 2012 at 07:49:45PM +0300, Alon Levy wrote:
> > > Adds on device:
> > > 
> > > RAM
> > >  Header
> > >   monitors_config - pointer
> > > 
> > >  QXLMonitorsConfig
> > >   count == n
> > >   max_allowed = N >= 0
> > >   QXLHead 1
> > >   ...
> > >   QXLHead n
> > >    id, surface_id, x, y, width, height, flags
> > 
> > Do we want to have some header size fields in QXLMonitorsConfig and QXLHead
> > to be able to add data to them in the future while keeping compat? Assuming
> > there's any point in being compatible there...
> 
> We can always bump the version of the device in this case. We'll have to
> anyway to let the driver know the device expects it to use any new
> fields.

Yes, but old drivers would still work with the new layout, no idea if this
is something that we are interested in.

Christophe
On Mon, Jul 16, 2012 at 09:27:59AM +0200, Christophe Fergeau wrote:
> On Sat, Jul 14, 2012 at 05:08:24PM +0300, Alon Levy wrote:
> > On Fri, Jul 13, 2012 at 11:39:06AM +0200, Christophe Fergeau wrote:
> > > On Thu, Jul 12, 2012 at 07:49:45PM +0300, Alon Levy wrote:
> > > > Adds on device:
> > > > 
> > > > RAM
> > > >  Header
> > > >   monitors_config - pointer
> > > > 
> > > >  QXLMonitorsConfig
> > > >   count == n
> > > >   max_allowed = N >= 0
> > > >   QXLHead 1
> > > >   ...
> > > >   QXLHead n
> > > >    id, surface_id, x, y, width, height, flags
> > > 
> > > Do we want to have some header size fields in QXLMonitorsConfig and QXLHead
> > > to be able to add data to them in the future while keeping compat? Assuming
> > > there's any point in being compatible there...
> > 
> > We can always bump the version of the device in this case. We'll have to
> > anyway to let the driver know the device expects it to use any new
> > fields.
> 
> Yes, but old drivers would still work with the new layout, no idea if this
> is something that we are interested in.

Old drivers check for revision >= something, so they work regardless. If
we ever want to have a non backward compatible device, we will need to
change it's product id.

> 
> Christophe



> _______________________________________________
> Spice-devel mailing list
> Spice-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
On Mon, Jul 16, 2012 at 09:27:59AM +0200, Christophe Fergeau wrote:
> On Sat, Jul 14, 2012 at 05:08:24PM +0300, Alon Levy wrote:
> > On Fri, Jul 13, 2012 at 11:39:06AM +0200, Christophe Fergeau wrote:
> > > On Thu, Jul 12, 2012 at 07:49:45PM +0300, Alon Levy wrote:
> > > > Adds on device:
> > > > 
> > > > RAM
> > > >  Header
> > > >   monitors_config - pointer
> > > > 
> > > >  QXLMonitorsConfig
> > > >   count == n
> > > >   max_allowed = N >= 0
> > > >   QXLHead 1
> > > >   ...
> > > >   QXLHead n
> > > >    id, surface_id, x, y, width, height, flags
> > > 
> > > Do we want to have some header size fields in QXLMonitorsConfig and QXLHead
> > > to be able to add data to them in the future while keeping compat? Assuming
> > > there's any point in being compatible there...
> > 
> > We can always bump the version of the device in this case. We'll have to
> > anyway to let the driver know the device expects it to use any new
> > fields.
> 
> Yes, but old drivers would still work with the new layout, no idea if this
> is something that we are interested in.

... and after sending, I actually understood what you were talking
about. Yes, we would have to support both the old monitors_config and a
new one in that case. I'm not sure if it is worth it to change or not.

> 
> Christophe



> _______________________________________________
> Spice-devel mailing list
> Spice-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel