All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] Update for glamor in the 1.16 server.
@ 2014-04-09 22:24 Eric Anholt
  2014-04-09 22:24 ` [PATCH 2/3] Use fbpict.h instead of defining its prototypes ourselves Eric Anholt
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Eric Anholt @ 2014-04-09 22:24 UTC (permalink / raw)
  To: intel-gfx

We should link against the server's copy, insted of using the external
library.
---
 configure.ac           |  6 ++++--
 src/uxa/intel_glamor.c | 14 +++++++++++++-
 2 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index ce4822f..8bbb3b0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -322,8 +322,10 @@ if test "x$GLAMOR" != "xno"; then
 	if test "x$UXA" != "xyes"; then
 		AC_MSG_ERROR([Glamor acceleration requested but UXA is not enabled])
 	fi
-	PKG_CHECK_MODULES(LIBGLAMOR, [glamor >= 0.3.1])
-	PKG_CHECK_MODULES(LIBGLAMOR_EGL, [glamor-egl])
+	if ! pkg-config --exists "xorg-server >= 1.15.99.901"; then
+		PKG_CHECK_MODULES(LIBGLAMOR, [glamor >= 0.3.1])
+		PKG_CHECK_MODULES(LIBGLAMOR_EGL, [glamor-egl])
+	fi
 	AC_DEFINE(USE_GLAMOR, 1, [Enable glamor acceleration])
 fi
 
diff --git a/src/uxa/intel_glamor.c b/src/uxa/intel_glamor.c
index 4d1c767..e0e5b2b 100644
--- a/src/uxa/intel_glamor.c
+++ b/src/uxa/intel_glamor.c
@@ -204,11 +204,23 @@ intel_glamor_init(ScreenPtr screen)
 {
 	ScrnInfoPtr scrn = xf86ScreenToScrn(screen);
 	intel_screen_private *intel = intel_get_screen_private(scrn);
+	Bool ret;
 
 	if ((intel->uxa_flags & UXA_GLAMOR_EGL_INITIALIZED) == 0)
 		goto fail;
 
-	if (!glamor_init(screen, GLAMOR_INVERTED_Y_AXIS | GLAMOR_USE_EGL_SCREEN)) {
+#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,15,99,900,0)
+	/* Not doing DRI3 yet, since Present support hasn't landed. */
+	ret = glamor_init(screen,
+			  GLAMOR_INVERTED_Y_AXIS |
+			  GLAMOR_USE_EGL_SCREEN |
+			  GLAMOR_NO_DRI3);
+#else
+	ret = glamor_init(screen,
+			  GLAMOR_INVERTED_Y_AXIS |
+			  GLAMOR_USE_EGL_SCREEN);
+#endif
+	if (!ret) {
 		xf86DrvMsg(scrn->scrnIndex, X_ERROR,
 			   "Failed to initialize glamor.\n");
 		goto fail;
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/3] Use fbpict.h instead of defining its prototypes ourselves.
  2014-04-09 22:24 [PATCH 1/3] Update for glamor in the 1.16 server Eric Anholt
@ 2014-04-09 22:24 ` Eric Anholt
  2014-04-09 22:24 ` [PATCH 3/3] uxa: Fix load_cursor_argb for the new Xorg ABI Eric Anholt
  2014-04-10 15:21 ` [PATCH 1/3] Update for glamor in the 1.16 server Chris Wilson
  2 siblings, 0 replies; 4+ messages in thread
From: Eric Anholt @ 2014-04-09 22:24 UTC (permalink / raw)
  To: intel-gfx

fbpict.h has been an installed header since 2008, shortly after uxa
landed.  This fixes compiler warnings when other headers happen to
include fbpict.h.
---
 src/uxa/uxa-priv.h | 17 +----------------
 1 file changed, 1 insertion(+), 16 deletions(-)

diff --git a/src/uxa/uxa-priv.h b/src/uxa/uxa-priv.h
index 3f639e7..5bf4814 100644
--- a/src/uxa/uxa-priv.h
+++ b/src/uxa/uxa-priv.h
@@ -53,7 +53,7 @@
 #include "fb.h"
 #include "fboverlay.h"
 #ifdef RENDER
-//#include "fbpict.h"
+#include "fbpict.h"
 #include "glyphstr.h"
 #endif
 #include "damage.h"
@@ -300,21 +300,6 @@ extern const GCOps uxa_ops;
 
 #ifdef RENDER
 
-/* XXX these are in fbpict.h, which is not installed */
-void
-fbComposite(CARD8 op,
-	    PicturePtr pSrc,
-	    PicturePtr pMask,
-	    PicturePtr pDst,
-	    INT16 xSrc,
-	    INT16 ySrc,
-	    INT16 xMask,
-	    INT16 yMask, INT16 xDst, INT16 yDst, CARD16 width, CARD16 height);
-
-void
-fbAddTraps(PicturePtr pPicture,
-	   INT16 xOff, INT16 yOff, int ntrap, xTrap * traps);
-
 void
 uxa_check_composite(CARD8 op,
 		    PicturePtr pSrc,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 3/3] uxa: Fix load_cursor_argb for the new Xorg ABI.
  2014-04-09 22:24 [PATCH 1/3] Update for glamor in the 1.16 server Eric Anholt
  2014-04-09 22:24 ` [PATCH 2/3] Use fbpict.h instead of defining its prototypes ourselves Eric Anholt
@ 2014-04-09 22:24 ` Eric Anholt
  2014-04-10 15:21 ` [PATCH 1/3] Update for glamor in the 1.16 server Chris Wilson
  2 siblings, 0 replies; 4+ messages in thread
From: Eric Anholt @ 2014-04-09 22:24 UTC (permalink / raw)
  To: intel-gfx

Returning an undefined value meant we might get sw cursors.
---
 src/uxa/intel_display.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/src/uxa/intel_display.c b/src/uxa/intel_display.c
index 39d8507..23eb2c7 100644
--- a/src/uxa/intel_display.c
+++ b/src/uxa/intel_display.c
@@ -606,6 +606,21 @@ intel_crtc_set_cursor_position (xf86CrtcPtr crtc, int x, int y)
 	drmModeMoveCursor(mode->fd, crtc_id(intel_crtc), x, y);
 }
 
+#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,15,99,902,0)
+static Bool
+intel_crtc_load_cursor_argb(xf86CrtcPtr crtc, CARD32 *image)
+{
+	struct intel_crtc *intel_crtc = crtc->driver_private;
+	int ret;
+
+	ret = dri_bo_subdata(intel_crtc->cursor, 0, 64*64*4, image);
+	if (ret)
+		xf86DrvMsg(crtc->scrn->scrnIndex, X_ERROR,
+			   "failed to set cursor: %s\n", strerror(-ret));
+
+	return !ret;
+}
+#else
 static void
 intel_crtc_load_cursor_argb(xf86CrtcPtr crtc, CARD32 *image)
 {
@@ -617,6 +632,7 @@ intel_crtc_load_cursor_argb(xf86CrtcPtr crtc, CARD32 *image)
 		xf86DrvMsg(crtc->scrn->scrnIndex, X_ERROR,
 			   "failed to set cursor: %s\n", strerror(-ret));
 }
+#endif
 
 static void
 intel_crtc_hide_cursor(xf86CrtcPtr crtc)
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/3] Update for glamor in the 1.16 server.
  2014-04-09 22:24 [PATCH 1/3] Update for glamor in the 1.16 server Eric Anholt
  2014-04-09 22:24 ` [PATCH 2/3] Use fbpict.h instead of defining its prototypes ourselves Eric Anholt
  2014-04-09 22:24 ` [PATCH 3/3] uxa: Fix load_cursor_argb for the new Xorg ABI Eric Anholt
@ 2014-04-10 15:21 ` Chris Wilson
  2 siblings, 0 replies; 4+ messages in thread
From: Chris Wilson @ 2014-04-10 15:21 UTC (permalink / raw)
  To: Eric Anholt; +Cc: intel-gfx

On Wed, Apr 09, 2014 at 03:24:21PM -0700, Eric Anholt wrote:
> We should link against the server's copy, insted of using the external
> library.

Thank you, series pushed.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-04-10 15:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-09 22:24 [PATCH 1/3] Update for glamor in the 1.16 server Eric Anholt
2014-04-09 22:24 ` [PATCH 2/3] Use fbpict.h instead of defining its prototypes ourselves Eric Anholt
2014-04-09 22:24 ` [PATCH 3/3] uxa: Fix load_cursor_argb for the new Xorg ABI Eric Anholt
2014-04-10 15:21 ` [PATCH 1/3] Update for glamor in the 1.16 server Chris Wilson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.