xf86-video-ati: Branch 'master' - 2 commits

Alex Deucher agd5f at kemper.freedesktop.org
Mon Sep 30 05:59:45 PDT 2013


 src/radeon_glamor.c |    5 +++++
 src/radeon_glamor.h |    4 ++++
 src/radeon_video.c  |   18 ++++++------------
 3 files changed, 15 insertions(+), 12 deletions(-)

New commits:
commit 2d791370dfc5570eb74d7a1fb3baf4d4c8ecf243
Author: Dave Airlie <airlied at redhat.com>
Date:   Mon Sep 23 07:57:15 2013 +0100

    radeon: use glamor Xv support if present.
    
    This creates adaptors using glamor if possible.
    
    Signed-off-by: Dave Airlie <airlied at redhat.com>
    Signed-off-by: Alex Deucher <alexander.deucher at amd.com>

diff --git a/src/radeon_glamor.c b/src/radeon_glamor.c
index 7f00d5b..bd731a8 100644
--- a/src/radeon_glamor.c
+++ b/src/radeon_glamor.c
@@ -355,3 +355,8 @@ radeon_glamor_flush(ScrnInfoPtr pScrn)
 	if (info->use_glamor)
 		glamor_block_handler(pScrn->pScreen);
 }
+
+XF86VideoAdaptorPtr radeon_glamor_xv_init(ScreenPtr pScreen, int num_adapt)
+{
+	return glamor_xv_init(pScreen, num_adapt);
+}
diff --git a/src/radeon_glamor.h b/src/radeon_glamor.h
index cb76ff4..6758400 100644
--- a/src/radeon_glamor.h
+++ b/src/radeon_glamor.h
@@ -27,6 +27,7 @@
 #ifndef RADEON_GLAMOR_H
 #define RADEON_GLAMOR_H
 
+#include "xf86xv.h"
 #ifdef USE_GLAMOR
 
 #include "radeon_surface.h"
@@ -43,6 +44,8 @@ void radeon_glamor_exchange_buffers(PixmapPtr src, PixmapPtr dst);
 
 Bool radeon_glamor_pixmap_is_offscreen(PixmapPtr pixmap);
 
+XF86VideoAdaptorPtr radeon_glamor_xv_init(ScreenPtr pScreen, int num_adapt);
+
 struct radeon_pixmap {
 	struct radeon_surface surface;
 	struct radeon_bo *bo;
@@ -88,6 +91,7 @@ static inline Bool radeon_glamor_pixmap_is_offscreen(PixmapPtr pixmap) { return
 
 static inline struct radeon_pixmap *radeon_get_pixmap_private(PixmapPtr pixmap) { return NULL; }
 
+static inline XF86VideoAdaptorPtr radeon_glamor_xv_init(ScreenPtr pScreen) { return NULL }
 #endif
 
 #endif /* RADEON_GLAMOR_H */
diff --git a/src/radeon_kms.c b/src/radeon_kms.c
index 9708dc7..255906b 100644
--- a/src/radeon_kms.c
+++ b/src/radeon_kms.c
@@ -1321,7 +1321,7 @@ Bool RADEONScreenInit_KMS(SCREEN_INIT_ARGS_DECL)
      */
     /* xf86DiDGAInit(pScreen, info->LinearAddr + pScrn->fbOffset); */
 #endif
-    if (!info->use_glamor && info->r600_shadow_fb == FALSE) {
+    if (info->r600_shadow_fb == FALSE) {
         /* Init Xv */
         xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, RADEON_LOGLEVEL_DEBUG,
                        "Initializing Xv\n");
diff --git a/src/radeon_video.c b/src/radeon_video.c
index 56cd9ab..5349d11 100644
--- a/src/radeon_video.c
+++ b/src/radeon_video.c
@@ -165,7 +165,14 @@ void RADEONInitVideo(ScreenPtr pScreen)
     memcpy(newAdaptors, adaptors, num_adaptors * sizeof(XF86VideoAdaptorPtr));
     adaptors = newAdaptors;
 
-    if ((info->ChipFamily < CHIP_FAMILY_RS400)
+    if (info->use_glamor) {
+        texturedAdaptor = radeon_glamor_xv_init(pScreen, 16);
+	if (texturedAdaptor != NULL) {
+	    adaptors[num_adaptors++] = texturedAdaptor;
+	    xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Set up textured video (glamor)\n");
+	} else
+	    xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Failed to set up textured video (glamor)\n");
+    } else if ((info->ChipFamily < CHIP_FAMILY_RS400)
 	|| (info->directRenderingEnabled)
 	) {
 	texturedAdaptor = RADEONSetupImageTexturedVideo(pScreen);
commit cbb99f659ee7b18ded0008a606e41ded38c1a194
Author: Alex Deucher <alexander.deucher at amd.com>
Date:   Mon Sep 30 08:55:16 2013 -0400

    Revert "radeon: add glamor Xv support (v2)"
    
    This causes problems if glamor doesn't have Xv support
    enabled.  I just noticed that Dave has a better version,
    so use that instead.
    
    This reverts commit 4fc1fa920584ace2c84d75af82d06962d0c84ec8.

diff --git a/src/radeon_kms.c b/src/radeon_kms.c
index 255906b..9708dc7 100644
--- a/src/radeon_kms.c
+++ b/src/radeon_kms.c
@@ -1321,7 +1321,7 @@ Bool RADEONScreenInit_KMS(SCREEN_INIT_ARGS_DECL)
      */
     /* xf86DiDGAInit(pScreen, info->LinearAddr + pScrn->fbOffset); */
 #endif
-    if (info->r600_shadow_fb == FALSE) {
+    if (!info->use_glamor && info->r600_shadow_fb == FALSE) {
         /* Init Xv */
         xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, RADEON_LOGLEVEL_DEBUG,
                        "Initializing Xv\n");
diff --git a/src/radeon_video.c b/src/radeon_video.c
index b07636c..56cd9ab 100644
--- a/src/radeon_video.c
+++ b/src/radeon_video.c
@@ -16,10 +16,6 @@
 #include "xf86.h"
 #include "dixstruct.h"
 
-#ifdef USE_GLAMOR
-#include <glamor.h>
-#endif
-
 /* DPMS */
 #ifdef HAVE_XEXTPROTO_71
 #include <X11/extensions/dpmsconst.h>
@@ -169,18 +165,9 @@ void RADEONInitVideo(ScreenPtr pScreen)
     memcpy(newAdaptors, adaptors, num_adaptors * sizeof(XF86VideoAdaptorPtr));
     adaptors = newAdaptors;
 
-#ifdef USE_GLAMOR
-    if (info->use_glamor) {
-	texturedAdaptor = glamor_xv_init(pScreen, 16);
-	if (texturedAdaptor != NULL) {
-	    adaptors[num_adaptors++] = texturedAdaptor;
-	    xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Set up glamor textured video\n");
-	} else
-	    xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Failed to set up glamor textured video\n");
-    } else
-#endif
-	if ((info->ChipFamily < CHIP_FAMILY_RS400)
-	       || info->directRenderingEnabled) {
+    if ((info->ChipFamily < CHIP_FAMILY_RS400)
+	|| (info->directRenderingEnabled)
+	) {
 	texturedAdaptor = RADEONSetupImageTexturedVideo(pScreen);
 	if (texturedAdaptor != NULL) {
 	    adaptors[num_adaptors++] = texturedAdaptor;


More information about the xorg-commit mailing list