[Spice-devel] [RFCv2 08/21] xspice: add spiceqxl_io_port, empty implementation
Alon Levy
alevy at redhat.com
Fri Apr 29 02:49:46 PDT 2011
---
src/Makefile.am | 1 +
src/qxl.h | 8 ++++++++
src/spiceqxl_io_port.c | 12 ++++++++++++
src/spiceqxl_io_port.h | 6 ++++++
4 files changed, 27 insertions(+), 0 deletions(-)
create mode 100644 src/spiceqxl_io_port.c
create mode 100644 src/spiceqxl_io_port.h
diff --git a/src/Makefile.am b/src/Makefile.am
index 67bb639..6f2cb56 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -59,6 +59,7 @@ spiceqxl_drv_la_LIBADD = uxa/libuxa.la
spiceqxl_drv_la_SOURCES = \
qxl.h \
+ spiceqxl_io_port.c \
qxl_driver.c \
qxl_image.c \
qxl_surface.c \
diff --git a/src/qxl.h b/src/qxl.h
index 35afc5c..6a5c63e 100644
--- a/src/qxl.h
+++ b/src/qxl.h
@@ -351,6 +351,14 @@ void * qxl_allocnf (qxl_screen_t *qxl,
unsigned long size);
int qxl_garbage_collect (qxl_screen_t *qxl);
+#ifdef XSPICE
+/* device to spice-server, now xspice to spice-server */
+void ioport_write(qxl_screen_t *qxl, uint32_t io_port, uint32_t val);
+#else
static inline void ioport_write(qxl_screen_t *qxl, int port, int val)
+{
+ outb(qxl->io_base + port, val);
+}
+#endif
#endif // QXL_H
diff --git a/src/spiceqxl_io_port.c b/src/spiceqxl_io_port.c
new file mode 100644
index 0000000..8a2ea03
--- /dev/null
+++ b/src/spiceqxl_io_port.c
@@ -0,0 +1,12 @@
+#include <pthread.h>
+
+#include <spice.h>
+
+#include "qxl.h"
+#include "spiceqxl_io_port.h"
+
+/* called from Xorg thread - not worker thread! */
+void ioport_write(qxl_screen_t *qxl, uint32_t io_port, uint32_t val)
+{
+}
+
diff --git a/src/spiceqxl_io_port.h b/src/spiceqxl_io_port.h
new file mode 100644
index 0000000..366d23c
--- /dev/null
+++ b/src/spiceqxl_io_port.h
@@ -0,0 +1,6 @@
+#ifndef SPICEQXL_IO_PORT_H
+#define SPICEQXL_IO_PORT_H
+
+#include "qxl.h"
+
+#endif // SPICEQXL_IO_PORT_H
--
1.7.4.4
More information about the Spice-devel
mailing list