Skip to contentSkip to conversation

remove glamor support

PATCH New Ilia Mirkin 1 participant 2 messages Jul 11, 2015 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 remove glamor support

If you want glamor, just use modesetting instead.

---
 configure.ac          |  11 ---
 man/nouveau.man       |   3 +-
 src/Makefile.am       |   2 -
 src/drmmode_display.c |   7 --
 src/nouveau_glamor.c  | 253 --------------------------------------------------
 src/nouveau_glamor.h  |  33 -------
 src/nouveau_present.c |  29 +-----
 src/nouveau_wfb.c     |   8 +-
 src/nouveau_xv.c      |   4 -
 src/nv_driver.c       |  16 ----
 src/nv_type.h         |   1 -
 11 files changed, 3 insertions(+), 364 deletions(-)
 delete mode 100644 src/nouveau_glamor.c
 delete mode 100644 src/nouveau_glamor.h
configure.ac +0 -11
index 03563c1..9c77f94 100644
@@ -140,17 +140,6 @@ if test "x$have_list_h" = xyes; then
                    #include "list.h"])
 fi
 
-AC_CHECK_HEADERS([glamor.h],[found_glamor_header=yes],[found_glamor_header=no],
-		 [#include "xorg-server.h"])
-AC_MSG_CHECKING([whether to include GLAMOR support])
-if test "x$found_glamor_header" = xyes && pkg-config --exists "xorg-server >= 1.15.99.901"
-then
-	AC_DEFINE(HAVE_GLAMOR, 1, [Build support for glamor acceleration])
-	AC_MSG_RESULT([yes])
-else
-	AC_MSG_RESULT([no])
-fi
-
 AC_CONFIG_FILES([
 	Makefile
 	src/Makefile
man/nouveau.man +1 -2
index 129bb7f..c39c113 100644
@@ -81,8 +81,7 @@ are supported:
 Enable or disable the HW cursor.  Default: on.
 .TP
 .BI "Option \*qAccelMethod\*q \*q" string \*q
-Specify the acceleration method. One of \*qnone\*q, \*qexa\*q, or
-\*qglamor\*q. Default: exa, except for GMxxx which default to glamor.
+Specify the acceleration method. One of \*qnone\*q, or \*qexa\*q. Default: exa.
 .TP
 .BI "Option \*qNoAccel\*q \*q" boolean \*q
 Disable or enable acceleration.  Default: acceleration is enabled.
src/Makefile.am +0 -2
index 9d39a00..1e04ddf 100644
@@ -35,7 +35,6 @@ nouveau_drv_la_SOURCES = \
 			 nouveau_copy90b5.c \
 			 nouveau_copya0b5.c \
 			 nouveau_exa.c nouveau_xv.c nouveau_dri2.c \
-			 nouveau_glamor.c \
 			 nouveau_present.c \
 			 nouveau_sync.c \
 			 nouveau_wfb.c \
@@ -123,7 +122,6 @@ EXTRA_DIST = hwdefs/nv_3ddefs.xml.h \
 	     shader/Makefile \
 	     nouveau_local.h \
 	     nouveau_copy.h \
-	     nouveau_glamor.h \
 	     nouveau_present.h \
 	     nouveau_sync.h \
 	     nv_const.h \
src/drmmode_display.c +0 -7
index cd13820..6495961 100644
@@ -42,8 +42,6 @@
 #include "libudev.h"
 #endif
 
-#include "nouveau_glamor.h"
-
 static Bool drmmode_xf86crtc_resize(ScrnInfoPtr scrn, int width, int height);
 typedef struct {
     int fd;
@@ -107,8 +105,6 @@ static inline struct nouveau_pixmap *
 drmmode_pixmap(PixmapPtr ppix)
 {
 	NVPtr pNv = NVPTR(xf86ScreenToScrn(ppix->drawable.pScreen));
-	if (pNv->AccelMethod == GLAMOR)
-		return nouveau_glamor_pixmap_get(ppix);
 	return nouveau_pixmap(ppix);
 }
 
@@ -1393,9 +1389,6 @@ drmmode_xf86crtc_resize(ScrnInfoPtr scrn, int width, int height)
 				       crtc->rotation, crtc->x, crtc->y);
 	}
 
-	if (pNv->AccelMethod == GLAMOR)
-		nouveau_glamor_create_screen_resources(scrn->pScreen);
-
 	if (old_fb_id)
 		drmModeRmFB(drmmode->fd, old_fb_id);
 	nouveau_bo_ref(NULL, &old_bo);
src/nouveau_glamor.c deleted +0 -253

253 lines not on this page · raw message

src/nouveau_glamor.h deleted +0 -33
deleted file mode 100644
index fb6565d..0000000
@@ -1,33 +0,0 @@
-#ifndef __NOUVEAU_GLAMOR_H__
-#define __NOUVEAU_GLAMOR_H__
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-#include "xf86xv.h"
-
-#ifdef HAVE_GLAMOR
-#include "nv_include.h"
-#define GLAMOR_FOR_XORG 1
-#include "glamor.h"
-
-Bool nouveau_glamor_pre_init(ScrnInfoPtr scrn);
-Bool nouveau_glamor_init(ScreenPtr screen);
-Bool nouveau_glamor_create_screen_resources(ScreenPtr screen);
-XF86VideoAdaptorPtr nouveau_glamor_xv_init(ScreenPtr pScreen, int num_adapt);
-void nouveau_glamor_pixmap_set(PixmapPtr pixmap, struct nouveau_pixmap *priv);
-struct nouveau_pixmap *nouveau_glamor_pixmap_get(PixmapPtr pixmap);
-#else
-static inline Bool nouveau_glamor_pre_init(ScrnInfoPtr scrn) { return FALSE; }
-static inline Bool nouveau_glamor_init(ScreenPtr screen) { return FALSE; }
-static inline Bool
-nouveau_glamor_create_screen_resources(ScreenPtr screen) { return FALSE; }
-static inline void
-nouveau_glamor_pixmap_set(PixmapPtr pixmap, void *priv) { }
-static inline struct nouveau_pixmap *
-nouveau_glamor_pixmap_get(PixmapPtr pixmap) { return NULL; }
-static inline XF86VideoAdaptorPtr
-nouveau_glamor_xv_init(ScreenPtr pScreen, int num_adapt) { return NULL; }
-#endif
-
-#endif
src/nouveau_present.c +1 -28
index 4de1e6e..b14db7d 100644
@@ -25,7 +25,6 @@
 #include "nouveau_present.h"
 #if defined(DRI3)
 #include "nv_include.h"
-#include "nouveau_glamor.h"
 #include "xf86drmMode.h"
 
 struct nouveau_present {
@@ -177,38 +176,12 @@ static Bool
 nouveau_present_flip_exec(ScrnInfoPtr scrn, uint64_t event_id, int sync,
 			  uint64_t target_msc, PixmapPtr pixmap, Bool vsync)
 {
-	ScreenPtr screen = scrn->pScreen;
-	struct nouveau_pixmap *priv = NULL;
+	struct nouveau_pixmap *priv = nouveau_pixmap(pixmap);
 	NVPtr pNv = NVPTR(scrn);
 	uint32_t next_fb;
-	CARD16 stride;
-	CARD32 size;
 	void *token;
 	int ret;
 
-#ifdef HAVE_GLAMOR
-	if (pNv->AccelMethod == GLAMOR &&
-	    !(priv = nouveau_glamor_pixmap_get(pixmap))) {
-		int fd = glamor_fd_from_pixmap(screen, pixmap, &stride, &size);
-		if (fd < 0)
-			return FALSE;
-
-		priv = calloc(1, sizeof(*priv));
-		if (!priv)
-			return FALSE;
-
-		ret = nouveau_bo_prime_handle_ref(pNv->dev, fd, &priv->bo);
-		if (ret) {
-			free(priv);
-			return FALSE;
-		}
-
-		nouveau_glamor_pixmap_set(pixmap, priv);
-	} else
-#endif
-	if (!priv)
-		priv = nouveau_pixmap(pixmap);
-
 	ret = drmModeAddFB(pNv->dev->fd, pixmap->drawable.width,
 			   pixmap->drawable.height, pixmap->drawable.depth,
 			   pixmap->drawable.bitsPerPixel, pixmap->devKind,
src/nouveau_wfb.c +1 -7
index 10f0f27..a52f2fd 100644
@@ -26,7 +26,6 @@
  */
 
 #include "nv_include.h"
-#include "nouveau_glamor.h"
 
 struct wfb_pixmap {
 	PixmapPtr ppix;
@@ -136,12 +135,7 @@ nouveau_wfb_setup_wrap(ReadMemoryProcPtr *pRead, WriteMemoryProcPtr *pWrite,
 
 	ppix = NVGetDrawablePixmap(pDraw);
 	if (ppix) {
-		NVPtr pNv = NVPTR(xf86ScreenToScrn(pDraw->pScreen));
-		struct nouveau_pixmap *priv;
-		if (pNv->AccelMethod == GLAMOR)
-			priv = nouveau_glamor_pixmap_get(ppix);
-		else
-			priv = nouveau_pixmap(ppix);
+		struct nouveau_pixmap *priv = nouveau_pixmap(ppix);
 		bo = priv ? priv->bo : NULL;
 	}
 
src/nouveau_xv.c +0 -4
index a479d38..a82ef2c 100644
@@ -38,7 +38,6 @@
 
 #include "nv_include.h"
 #include "nv_dma.h"
-#include "nouveau_glamor.h"
 
 #include "vl_hwmc.h"
 
@@ -2182,9 +2181,6 @@ NVInitVideo(ScreenPtr pScreen)
 		}
 
 		NVSetupTexturedVideo(pScreen, textureAdaptor);
-	} else
-	if (pNv->AccelMethod == GLAMOR) {
-		blitAdaptor = nouveau_glamor_xv_init(pScreen, 16);
 	}
 
 	num_adaptors = xf86XVListGenericAdaptors(pScrn, &adaptors);
src/nv_driver.c +0 -16
index 4218e4f..a5ffbce 100644
@@ -34,7 +34,6 @@
 #endif
 
 #include "nouveau_copy.h"
-#include "nouveau_glamor.h"
 #include "nouveau_present.h"
 #include "nouveau_sync.h"
 
@@ -625,9 +624,6 @@ NVCreateScreenResources(ScreenPtr pScreen)
 	if (pNv->AccelMethod == EXA) {
 		PixmapPtr ppix = pScreen->GetScreenPixmap(pScreen);
 		nouveau_bo_ref(pNv->scanout, &nouveau_pixmap(ppix)->bo);
-	} else
-	if (pNv->AccelMethod == GLAMOR) {
-		nouveau_glamor_create_screen_resources(pScreen);
 	}
 
 	return TRUE;
@@ -1049,9 +1045,6 @@ NVPreInit(ScrnInfoPtr pScrn, int flags)
 	if (string) {
 		if      (!strcmp(string,   "none")) pNv->AccelMethod = NONE;
 		else if (!strcmp(string,    "exa")) pNv->AccelMethod = EXA;
-#ifdef HAVE_GLAMOR
-		else if (!strcmp(string, "glamor")) pNv->AccelMethod = GLAMOR;
-#endif
 		else {
 			xf86DrvMsg(pScrn->scrnIndex, X_CONFIG,
 				   "Invalid AccelMethod specified\n");
@@ -1087,11 +1080,6 @@ NVPreInit(ScrnInfoPtr pScrn, int flags)
 		pNv->tiled_scanout = TRUE;
 	}
 
-	if (pNv->AccelMethod == GLAMOR) {
-		if (!nouveau_glamor_pre_init(pScrn))
-			pNv->AccelMethod = EXA;
-	}
-
 	pNv->ce_enabled =
 		xf86ReturnOptValBool(pNv->Options, OPTION_ASYNC_COPY, FALSE);
 
@@ -1477,10 +1465,6 @@ NVScreenInit(SCREEN_INIT_ARGS_DECL)
 	nouveau_present_init(pScreen);
 	nouveau_sync_init(pScreen);
 	nouveau_dri2_init(pScreen);
-	if (pNv->AccelMethod == GLAMOR) {
-		if (!nouveau_glamor_init(pScreen))
-			return FALSE;
-	} else
 	if (pNv->AccelMethod == EXA) {
 		if (!nouveau_dri3_screen_init(pScreen))
 			return FALSE;
src/nv_type.h +0 -1
index e6ab192..e8b1dce 100644
@@ -53,7 +53,6 @@ typedef struct _NVRec {
 	    UNKNOWN = 0,
 	    NONE,
 	    EXA,
-	    GLAMOR,
     } AccelMethod;
     void (*Flush)(ScrnInfoPtr);
 
Signature · 6 lines
2.3.6

_______________________________________________
Nouveau mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau

A message that is not in the archive (sent off-list or not yet received): 1436649710-28872-1-git-send-email-imirkin-FrUbXkNCsVf2fBVCVOL8/[email protected]

#2 lore raw

PATCH 2/2 remove maxwell support for now

There is no EXA acceleration, user better off with modesetting.

---
 src/nv_driver.c | 1 -
 1 file changed, 1 deletion(-)
src/nv_driver.c +0 -1
index a5ffbce..16a9029 100644
@@ -389,7 +389,6 @@ NVHasKMS(struct pci_device *pci_dev, struct xf86_platform_device *platform_dev)
 	case 0xe0:
 	case 0xf0:
 	case 0x100:
-	case 0x110:
 		break;
 	default:
 		xf86DrvMsg(-1, X_ERROR, "Unknown chipset: NV%02x\n", chipset);
Signature · 6 lines
2.3.6

_______________________________________________
Nouveau mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau