summaryrefslogtreecommitdiff
path: root/src/via_xvmc.h
diff options
context:
space:
mode:
authorThomas Hellstrom <unichrome@shipmail.org>2004-04-12 18:51:28 +0000
committerThomas Hellstrom <unichrome@shipmail.org>2004-04-12 18:51:28 +0000
commit198ed1e24e9d2a8f6b6acb13ac270b42dc71b566 (patch)
treeb2f5ec0928c1a2d8bb791033262b850ec9e0e648 /src/via_xvmc.h
parentfe45860716172384070b9b2ff48a98d2087ee88b (diff)
XvMC updates: Added workaround for possible XvMC client crashes while doing
hardware blitting thus corrupting the via 2d engine. Added support for future multiple XvMC ports if number of overlays increases. Added support for XvMC Attributes. XvMC support is now complete, but probably not bugfree ;-)
Diffstat (limited to 'src/via_xvmc.h')
-rw-r--r--src/via_xvmc.h99
1 files changed, 68 insertions, 31 deletions
diff --git a/src/via_xvmc.h b/src/via_xvmc.h
index a5dedce..e652fff 100644
--- a/src/via_xvmc.h
+++ b/src/via_xvmc.h
@@ -1,49 +1,85 @@
-/***************************************************************************
-Copyright 2004 Thomas Hellström. All Rights Reserved.
-
-Permission is hereby granted, free of charge, to any person obtaining a
-copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sub license, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice (including the
-next paragraph) shall be included in all copies or substantial portions
-of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
-IN NO EVENT SHALL THE AUTHORS / COPYRIGHT HOLDERS AND / OR THEIR SUPPLIERS
-BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
-
-**************************************************************************/
+/*****************************************************************************
+ * VIA Unichrome XvMC extension X server driver.
+ *
+ * Copyright (c) 2004 Thomas Hellström. All rights reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHOR(S) OR COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
#ifndef _VIA_XVMC_H
#define _VIA_XVMC_H 1
#include "via_dri.h"
/*
- * This file contains the common definitions between the XvMC lib and the X server
- * side. It is referenced also by the XvMC lib through softlinks. Make sure any
- * structure change is reflected also in a change in version number!!
+ * This file contains the common definitions between the XvMC lib and the
+ * X server side. It is referenced also by the XvMC lib. Make sure any
+ * structure change is reflected also in a change in minor version number!!
*/
#define DRM_VIA_DEC_FUTEX 5
#define VIAXVMC_MAJOR 0
-#define VIAXVMC_MINOR 2
+#define VIAXVMC_MINOR 4
#define VIAXVMC_PL 0
+#define VIA_NUM_XVMC_ATTRIBUTES 1
+#define VIA_XVMC_VALID 0x80000000
+
+/*
+ * Commands that client submits through XvPutImage:
+ */
+
+#define VIA_XVMC_COMMAND_FDISPLAY 0
+#define VIA_XVMC_COMMAND_DISPLAY 1
+#define VIA_XVMC_COMMAND_UNDISPLAY 2
typedef drm_via_sarea_t ViaXvMCSAreaPriv;
+typedef struct{
+ Atom attribute;
+ INT32 value;
+}ViaAttrPair;
+
typedef struct {
+ unsigned numAttr;
+ ViaAttrPair attributes[VIA_NUM_XVMC_ATTRIBUTES];
+}ViaXvMCAttrHolder;
+
+/*
+ * Passed from client to X server during overlay updates.
+ */
+
+typedef struct{
+ unsigned command;
unsigned ctxNo;
+ unsigned srfNo;
+ unsigned subPicNo;
+ ViaXvMCAttrHolder attrib;
+ unsigned pad;
+}ViaXvMCCommandBuffer;
+
+/*
+ * Passed from X server to client at context creation.
+ */
+
+typedef struct {
+ unsigned ctxNo;
+ unsigned xvmc_port;
drmContext drmcontext;
CARD8 *fbBase;
unsigned int fbOffset;
@@ -54,8 +90,9 @@ typedef struct {
unsigned int sAreaSize;
unsigned int sAreaPrivOffset;
char busIdString[10];
- unsigned major,minor,pl;
- unsigned pad;
+ unsigned int major,minor,pl;
+ ViaXvMCAttrHolder initAttrs;
+ unsigned pad;
} ViaXvMCCreateContextRec;
#endif