[PATCH] radeon: add glamor Xv support

Alex Deucher alexdeucher at gmail.com
Thu Sep 26 14:45:11 PDT 2013


Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
---
 src/radeon_kms.c   |  2 +-
 src/radeon_video.c | 14 +++++++++++---
 2 files changed, 12 insertions(+), 4 deletions(-)

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..5bd2190 100644
--- a/src/radeon_video.c
+++ b/src/radeon_video.c
@@ -16,6 +16,8 @@
 #include "xf86.h"
 #include "dixstruct.h"
 
+#include <glamor.h>
+
 /* DPMS */
 #ifdef HAVE_XEXTPROTO_71
 #include <X11/extensions/dpmsconst.h>
@@ -165,9 +167,15 @@ void RADEONInitVideo(ScreenPtr pScreen)
     memcpy(newAdaptors, adaptors, num_adaptors * sizeof(XF86VideoAdaptorPtr));
     adaptors = newAdaptors;
 
-    if ((info->ChipFamily < CHIP_FAMILY_RS400)
-	|| (info->directRenderingEnabled)
-	) {
+    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 if ((info->ChipFamily < CHIP_FAMILY_RS400)
+	       || info->directRenderingEnabled) {
 	texturedAdaptor = RADEONSetupImageTexturedVideo(pScreen);
 	if (texturedAdaptor != NULL) {
 	    adaptors[num_adaptors++] = texturedAdaptor;
-- 
1.8.3.1



More information about the xorg-driver-ati mailing list