[pkg-fso-commits] [SCM] xf86-video-glamo, SMedia Glamo video driver for X.Org branch, master, updated. upstream/0.0.0+20090707.git98c012f7-57-g9918e08

Thomas White taw at bitwiz.org.uk
Fri Jan 8 13:24:39 UTC 2010


The following commit has been merged in the master branch:
commit 51690ae5c51e24b6bc0da95a067a3ac4bcda6350
Author: Thomas White <taw at bitwiz.org.uk>
Date:   Thu Jul 23 16:04:36 2009 +0100

    Just backing up progress

diff --git a/src/Makefile.am b/src/Makefile.am
index 447784f..6c97844 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -37,7 +37,7 @@ glamo_drv_la_SOURCES = \
          glamo-output.c \
          glamo-engine.c \
          glamo-kms-driver.c \
-         crtc.c \
-         output.c \
+         glamo-kms-crtc.c \
+         glamo-kms-output.c \
          glamo-dri2.c \
          glamo-kms-exa.c
diff --git a/src/glamo-dri2.c b/src/glamo-dri2.c
index fccf2ed..f6915fc 100644
--- a/src/glamo-dri2.c
+++ b/src/glamo-dri2.c
@@ -1,4 +1,11 @@
 /*
+ * DRI for the SMedia Glamo3362 X.org Driver
+ *
+ * Modified: 2009 by Thomas White <taw at bitwiz.org.uk>
+ *
+ * Based on dri2.c from xf86-video-modesetting, to which the following
+ * notice applies:
+ *
  * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
  * All Rights Reserved.
  *
@@ -26,6 +33,7 @@
  * Author: Alan Hourihane <alanh at tungstengraphics.com>
  *
  */
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -33,96 +41,87 @@
 #include "xf86.h"
 #include "xf86_OSproc.h"
 
-#include "driver.h"
-
-#include "dri2.h"
+#include "glamo.h"
+#include "glamo-dri2.h"
 
-extern unsigned int
-driGetPixmapHandle(PixmapPtr pPixmap, unsigned int *flags);
+extern unsigned int driGetPixmapHandle(PixmapPtr pPixmap, unsigned int *flags);
 
-void
-driLock(ScreenPtr pScreen)
+void driLock(ScreenPtr pScreen)
 {
-    ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
-    GlamoPtr pGlamo = GlamoPTR(pScrn);
+	ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+	GlamoPtr pGlamo = GlamoPTR(pScrn);
 
-    if (!pGlamo->lock_held)
-	DRM_LOCK(pGlamo->drm_fd, pGlamo->lock, pGlamo->context, 0);
+	if (!pGlamo->lock_held)
+		DRM_LOCK(pGlamo->drm_fd, pGlamo->lock, pGlamo->context, 0);
 
-    pGlamo->lock_held = 1;
+	pGlamo->lock_held = 1;
 }
 
-void
-driUnlock(ScreenPtr pScreen)
+void driUnlock(ScreenPtr pScreen)
 {
-    ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
-    GlamoPtr pGlamo = GlamoPTR(pScrn);
+	ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+	GlamoPtr pGlamo = GlamoPTR(pScrn);
 
-    if (pGlamo->lock_held)
-	DRM_UNLOCK(pGlamo->drm_fd, pGlamo->lock, pGlamo->context);
+	if (pGlamo->lock_held)
+		DRM_UNLOCK(pGlamo->drm_fd, pGlamo->lock, pGlamo->context);
 
-    pGlamo->lock_held = 0;
+	pGlamo->lock_held = 0;
 }
 
-static void
-driBeginClipNotify(ScreenPtr pScreen)
+static void driBeginClipNotify(ScreenPtr pScreen)
 {
-    driLock(pScreen);
+	driLock(pScreen);
 }
 
-static void
-driEndClipNotify(ScreenPtr pScreen)
+static void driEndClipNotify(ScreenPtr pScreen)
 {
-    driUnlock(pScreen);
+	driUnlock(pScreen);
 }
 
 struct __DRILock
 {
-    unsigned int block_header;
-    drm_hw_lock_t lock;
-    unsigned int next_id;
+	unsigned int block_header;
+	drm_hw_lock_t lock;
+	unsigned int next_id;
 };
 
 #define DRI2_SAREA_BLOCK_HEADER(type, size) (((type) << 16) | (size))
 #define DRI2_SAREA_BLOCK_LOCK		0x0001
 
-void
-driScreenInit(ScreenPtr pScreen)
+void driScreenInit(ScreenPtr pScreen)
 {
-    ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
-    GlamoPtr pGlamo = GlamoPTR(pScrn);
-    DRI2InfoRec dri2info;
-    const char *driverName;
-    unsigned int sarea_handle;
-    struct __DRILock *DRILock;
-    void *p;
-
-    dri2info.version = 1;
-    dri2info.fd = pGlamo->drm_fd;
-    dri2info.driverSareaSize = sizeof(struct __DRILock);
-    dri2info.driverName = "i915";      /* FIXME */
-    dri2info.getPixmapHandle = driGetPixmapHandle;
-    dri2info.beginClipNotify = driBeginClipNotify;
-    dri2info.endClipNotify = driEndClipNotify;
-
-    p = DRI2ScreenInit(pScreen, &dri2info);
-    if (!p)
-	return;
-
-    DRILock = p;
-    DRILock->block_header =
+	ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+	GlamoPtr pGlamo = GlamoPTR(pScrn);
+	DRI2InfoRec dri2info;
+	const char *driverName;
+	unsigned int sarea_handle;
+	struct __DRILock *DRILock;
+	void *p;
+
+	dri2info.version = 1;
+	dri2info.fd = pGlamo->drm_fd;
+	dri2info.driverSareaSize = sizeof(struct __DRILock);
+	dri2info.driverName = "i915";      /* FIXME */
+	dri2info.getPixmapHandle = driGetPixmapHandle;
+	dri2info.beginClipNotify = driBeginClipNotify;
+	dri2info.endClipNotify = driEndClipNotify;
+
+	p = DRI2ScreenInit(pScreen, &dri2info);
+	if (!p) return;
+
+	DRILock = p;
+	DRILock->block_header =
 	DRI2_SAREA_BLOCK_HEADER(DRI2_SAREA_BLOCK_LOCK, sizeof *DRILock);
-    pGlamo->lock = &DRILock->lock;
-    pGlamo->context = 1;
-    DRILock->next_id = 2;
-    driLock(pScreen);
+	pGlamo->lock = &DRILock->lock;
+	pGlamo->context = 1;
+	DRILock->next_id = 2;
+	driLock(pScreen);
 
-    DRI2Connect(pScreen, &pGlamo->drm_fd, &driverName, &sarea_handle);
+	DRI2Connect(pScreen, &pGlamo->drm_fd, &driverName, &sarea_handle);
 }
 
-void
-driCloseScreen(ScreenPtr pScreen)
+void driCloseScreen(ScreenPtr pScreen)
 {
-    driUnlock(pScreen);
-    DRI2CloseScreen(pScreen);
+	driUnlock(pScreen);
+	DRI2CloseScreen(pScreen);
 }
diff --git a/src/crtc.c b/src/glamo-kms-crtc.c
similarity index 100%
copy from src/crtc.c
copy to src/glamo-kms-crtc.c
diff --git a/src/glamo-dri2.h b/src/glamo-kms-crtc.h
similarity index 78%
copy from src/glamo-dri2.h
copy to src/glamo-kms-crtc.h
index 8ec99b9..8c16054 100644
--- a/src/glamo-dri2.h
+++ b/src/glamo-kms-crtc.h
@@ -1,5 +1,5 @@
 /*
- * DRI for the SMedia Glamo3362 X.org Driver
+ * KMS CRTC handling for the SMedia Glamo3362 X.org Driver
  *
  * Copyright 2009 Thomas White <taw at bitwiz.org.uk>
  *
@@ -22,7 +22,9 @@
 
 #include "xf86.h"
 
-extern void driScreenInit(ScreenPtr pScreen);
-extern void driCloseScreen(ScreenPtr pScreen);
-extern void driLock(ScreenPtr pScreen);
-extern void driUnlock(ScreenPtr pScreen);
+/* crtc.c */
+extern void crtc_init(ScrnInfoPtr pScrn);
+
+
+/* output.c */
+extern void output_init(ScrnInfoPtr pScrn);
diff --git a/src/glamo-kms-exa.h b/src/glamo-kms-display.h
similarity index 100%
copy from src/glamo-kms-exa.h
copy to src/glamo-kms-display.h
diff --git a/src/output.c b/src/glamo-kms-output.c
similarity index 100%
copy from src/output.c
copy to src/glamo-kms-output.c
diff --git a/src/glamo.h b/src/glamo.h
index aac39d5..8213a3a 100644
--- a/src/glamo.h
+++ b/src/glamo.h
@@ -181,17 +181,8 @@ GlamoCrtcInit(ScrnInfoPtr pScrn);
 void
 GlamoOutputInit(ScrnInfoPtr pScrn);
 
-
 /* glamo-driver.c */
 extern Bool GlamoGetRec(ScrnInfoPtr pScrn);
 extern void GlamoFreeRec(ScrnInfoPtr pScrn);
 
-
-/* crtc.c */
-extern void crtc_init(ScrnInfoPtr pScrn);
-
-
-/* output.c */
-extern void output_init(ScrnInfoPtr pScrn);
-
 #endif /* _GLAMO_H_ */

-- 
xf86-video-glamo, SMedia Glamo video driver for X.Org



More information about the pkg-fso-commits mailing list