Index: include/extensions/XvMC.h
===================================================================
RCS file: /cvs/xorg/xc/include/extensions/XvMC.h,v
retrieving revision 1.2
diff -u -r1.2 XvMC.h
--- include/extensions/XvMC.h	23 Apr 2004 18:43:06 -0000	1.2
+++ include/extensions/XvMC.h	26 Sep 2004 13:56:27 -0000
@@ -10,7 +10,7 @@
 #define XvMCNumEvents 0
 #define XvMCNumErrors 3
 #define XvMCVersion 1
-#define XvMCRevision 0
+#define XvMCRevision 1
 
 #define XvMCBadContext          0
 #define XvMCBadSurface          1
Index: include/extensions/XvMCproto.h
===================================================================
RCS file: /cvs/xorg/xc/include/extensions/XvMCproto.h,v
retrieving revision 1.2
diff -u -r1.2 XvMCproto.h
--- include/extensions/XvMCproto.h	23 Apr 2004 18:43:06 -0000	1.2
+++ include/extensions/XvMCproto.h	26 Sep 2004 13:56:27 -0000
@@ -12,7 +12,8 @@
 #define xvmc_CreateSubpicture		6
 #define xvmc_DestroySubpicture		7
 #define xvmc_ListSubpictureTypes	8
-#define xvmc_LastRequest		xvmc_ListSubpictureTypes 
+#define xvmc_DRIGetClientDriverName     9
+#define xvmc_LastRequest		xvmc_DRIGetClientDriverName
 
 #define xvmcNumRequest			(xvmc_LastRequest + 1)
 
@@ -200,4 +201,26 @@
 } xvmcListSubpictureTypesReply;
 #define sz_xvmcListSubpictureTypesReply 32
 
+typedef struct {
+  CARD8 reqType;
+  CARD8 xvmcReqType;
+  CARD16 length B16;
+  CARD32 port B32;
+} xvmcDRIGetClientDriverNameReq;
+#define sz_xvmcDRIGetClientDriverNameReq 8;
+
+typedef struct {
+  BYTE type;  /* X_Reply */
+  BYTE padb1;
+  CARD16 sequenceNumber B16;
+  CARD32 length B32; 
+  CARD32 padl2 B32; 
+  CARD32 padl3 B32;
+  CARD32 padl4 B32;
+  CARD32 padl5 B32;
+  CARD32 padl6 B32;
+  CARD32 padl7 B32;
+} xvmcDRIGetClientDriverNameReply;
+#define sz_xvmcGetClientDriverNameReply 32
+
 #endif
Index: programs/Xserver/Xext/xvmc.c
===================================================================
RCS file: /cvs/xorg/xc/programs/Xserver/Xext/xvmc.c,v
retrieving revision 1.2
diff -u -r1.2 xvmc.c
--- programs/Xserver/Xext/xvmc.c	23 Apr 2004 18:44:42 -0000	1.2
+++ programs/Xserver/Xext/xvmc.c	26 Sep 2004 13:56:27 -0000
@@ -18,6 +18,8 @@
 #include "XvMCproto.h"
 #include "xvmcext.h"
 
+#define DRI_CLIENT_DRIVER_NAME_SIZE 50
+
 int XvMCScreenIndex = -1;
 
 unsigned long XvMCGeneration = 0;
@@ -34,6 +36,7 @@
    int num_adaptors;
    XvMCAdaptorPtr adaptors;
    CloseScreenProcPtr	CloseScreen;
+  char clientDriverName[DRI_CLIENT_DRIVER_NAME_SIZE];
 } XvMCScreenRec, *XvMCScreenPtr; 
 
 #define XVMC_GET_PRIVATE(pScreen) \
@@ -542,6 +545,49 @@
     return Success;
 }
 
+static int
+ProcXvMCDRIGetClientDriverName(ClientPtr client)
+{
+    xvmcCreateSubpictureReply rep;
+    XvPortPtr pPort;
+    ScreenPtr pScreen;
+    XvMCScreenPtr pScreenPriv;
+    int len;
+    CARD32 pad = 0;
+
+    REQUEST(xvmcDRIGetClientDriverNameReq);
+    REQUEST_SIZE_MATCH(xvmcDRIGetClientDriverNameReq);
+
+
+    if(!(pPort = LOOKUP_PORT(stuff->port, client))) {
+	client->errorValue = stuff->port;
+	return _XvBadPort;
+    }
+
+    pScreen = pPort->pAdaptor->pScreen;
+    pScreenPriv = XVMC_GET_PRIVATE(pScreen);
+    
+    rep.type = X_Reply;
+    rep.sequenceNumber = client->sequence;
+
+    if (pScreenPriv->clientDriverName) {
+      rep.length = 
+	((len = strlen(pScreenPriv->clientDriverName) +1 ) + 3) >> 2;    
+    } else {
+      len = 0;
+      rep.length = 0;
+    }
+
+    WriteToClient(client, sizeof(xvmcDRIGetClientDriverNameReply), 
+		  (char*)&rep);
+    if (rep.length) {      
+      WriteToClient(client, len, pScreenPriv->clientDriverName);
+      if ((len = ((rep.length << 2) - len))) {
+	WriteToClient(client, len, (char *)&pad);
+      }
+    }	
+    return Success;
+}
 
 
 int (*ProcXvMCVector[xvmcNumRequest])(ClientPtr) = {
@@ -553,7 +599,8 @@
   ProcXvMCDestroySurface,
   ProcXvMCCreateSubpicture,
   ProcXvMCDestroySubpicture,
-  ProcXvMCListSubpictureTypes
+  ProcXvMCListSubpictureTypes,
+  ProcXvMCDRIGetClientDriverName
 };
 
 static int
@@ -637,6 +684,7 @@
 
    pScreenPriv->num_adaptors = num;
    pScreenPriv->adaptors = pAdapt;
+   pScreenPriv->clientDriverName[0] = 0;
 
    return Success;
 }
@@ -672,3 +720,15 @@
 
     return pImage;
 }
+
+int
+XvMCRegisterDRIClientDriverName(ScreenPtr pScreen, char *name)
+{
+   XvMCScreenPtr pScreenPriv = XVMC_GET_PRIVATE(pScreen);
+   strncpy(pScreenPriv->clientDriverName, name,
+	   DRI_CLIENT_DRIVER_NAME_SIZE);
+   pScreenPriv->clientDriverName[DRI_CLIENT_DRIVER_NAME_SIZE-1] = 0;
+   
+   return Success;
+}
+
Index: programs/Xserver/Xext/xvmcext.h
===================================================================
RCS file: /cvs/xorg/xc/programs/Xserver/Xext/xvmcext.h,v
retrieving revision 1.2
diff -u -r1.2 xvmcext.h
--- programs/Xserver/Xext/xvmcext.h	23 Apr 2004 18:44:42 -0000	1.2
+++ programs/Xserver/Xext/xvmcext.h	26 Sep 2004 13:56:27 -0000
@@ -108,4 +108,7 @@
 
 XvImagePtr XvMCFindXvImage(XvPortPtr pPort, CARD32 id);
 
+int XvMCRegisterDRIClientDriverName(ScreenPtr pScreen, char *name);
+
+
 #endif /* _XVMC_H */
