[Spice-devel] [PATCH] qxl_dev: introduce defines for rings sizes

Alon Levy alevy at redhat.com
Tue Mar 8 01:26:46 PST 2011


On Mon, Mar 07, 2011 at 11:55:14PM +0200, Uri Lublin wrote:
> On 03/07/2011 08:47 PM, Alon Levy wrote:
> >---
> >  spice/qxl_dev.h |   10 +++++++---
> >  1 files changed, 7 insertions(+), 3 deletions(-)
> >
> >diff --git a/spice/qxl_dev.h b/spice/qxl_dev.h
> >index 7219bfc..e3e0696 100644
> >--- a/spice/qxl_dev.h
> >+++ b/spice/qxl_dev.h
> >@@ -200,10 +200,14 @@ typedef struct SPICE_ATTR_PACKED QXLSurfaceCreate {
> >      QXLPHYSICAL mem;
> >  } QXLSurfaceCreate;
> >
> >-SPICE_RING_DECLARE(QXLCommandRing, QXLCommand, 32);
> >-SPICE_RING_DECLARE(QXLCursorRing, QXLCommand, 32);
> >+#define QXL_COMMAND_RING_SIZE 32
> >+#define QXL_CURSOR_RING_SIZE 32
> >+#define QXL_RELEASE_RING_SIZE 8
> >
> >-SPICE_RING_DECLARE(QXLReleaseRing, uint64_t, 8);
> >+SPICE_RING_DECLARE(QXLCommandRing, QXLCommand, QXL_COMMAND_RING_SIZE);
> >+SPICE_RING_DECLARE(QXLCursorRing, QXLCommand, QXL_CURSOR_RING_SIZE);
> >+
> >+SPICE_RING_DECLARE(QXLReleaseRing, uint64_t, QXL_RELEASE_RING_SIZE);
> >
> >  #define QXL_LOG_BUF_SIZE 4096
> >
> 
> ACK.
> 
> I suggest we add [protocol] to the subject (and generically
> [<git-repo>] for patches to repos other than spice).
> 
> ToDo: Follow with patches that use these defines in source files.

TODO 2: this patch makes it really easy to change the ring size and rebuild
driver and device. The problem is it doesn't give you any way to see if the driver
is compiled with one value but the device with another. So we should add a check for this
during driver/device handshake (there has to be something like that, right?)

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


More information about the Spice-devel mailing list