[Spice-devel] [RFC 10/33] add config options (empty for now)
Alon Levy
alevy at redhat.com
Wed Apr 27 08:55:59 PDT 2011
---
src/qxl.h | 10 ++++++++++
src/qxl_driver.c | 6 ++++++
2 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/src/qxl.h b/src/qxl.h
index 9683966..7c889d3 100644
--- a/src/qxl.h
+++ b/src/qxl.h
@@ -82,6 +82,14 @@ typedef struct
typedef struct qxl_surface_t qxl_surface_t;
+/*
+ * Config Options
+ */
+
+enum {
+ OPTION_COUNT,
+};
+
struct _qxl_screen_t
{
/* These are the names QXL uses */
@@ -158,6 +166,8 @@ struct _qxl_screen_t
/* Evacuated surfaces are stored here during VT switches */
void * vt_surfaces;
+
+ OptionInfoRec options[OPTION_COUNT + 1];
};
static inline uint64_t
diff --git a/src/qxl_driver.c b/src/qxl_driver.c
index dced9fb..ff6fe97 100644
--- a/src/qxl_driver.c
+++ b/src/qxl_driver.c
@@ -42,6 +42,10 @@
#endif
#define CHECK_POINT()
+const OptionInfoRec DefaultOptions[] = {
+ { -1, NULL, OPTV_NONE, {0}, FALSE }
+};
+
int
qxl_garbage_collect (qxl_screen_t *qxl)
{
@@ -1212,6 +1216,8 @@ qxl_pre_init(ScrnInfoPtr pScrn, int flags)
/* option parsing and card differentiation */
xf86CollectOptions(pScrn, NULL);
+ memcpy(qxl->options, DefaultOptions, sizeof(DefaultOptions));
+ xf86ProcessOptions(scrnIndex, pScrn->options, qxl->options);
if (!qxl_map_memory(qxl, scrnIndex))
goto out;
--
1.7.4.4
More information about the Spice-devel
mailing list