diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2013-09-26 11:02:55 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2013-09-27 17:38:56 -0400 |
commit | 4fc1fa920584ace2c84d75af82d06962d0c84ec8 (patch) | |
tree | cd5b1881ebdf98760fef9c727241a75a4c62fe79 /src/radeon_video.c | |
parent | 41dfe327ac8740ac2cd84def96b5947224e422e7 (diff) |
radeon: add glamor Xv support (v2)
v2: guard new glamor Xv bits with USE_GLAMOR
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Diffstat (limited to 'src/radeon_video.c')
-rw-r--r-- | src/radeon_video.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/src/radeon_video.c b/src/radeon_video.c index 56cd9abd..b07636c2 100644 --- a/src/radeon_video.c +++ b/src/radeon_video.c @@ -16,6 +16,10 @@ #include "xf86.h" #include "dixstruct.h" +#ifdef USE_GLAMOR +#include <glamor.h> +#endif + /* DPMS */ #ifdef HAVE_XEXTPROTO_71 #include <X11/extensions/dpmsconst.h> @@ -165,9 +169,18 @@ void RADEONInitVideo(ScreenPtr pScreen) memcpy(newAdaptors, adaptors, num_adaptors * sizeof(XF86VideoAdaptorPtr)); adaptors = newAdaptors; - if ((info->ChipFamily < CHIP_FAMILY_RS400) - || (info->directRenderingEnabled) - ) { +#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) { texturedAdaptor = RADEONSetupImageTexturedVideo(pScreen); if (texturedAdaptor != NULL) { adaptors[num_adaptors++] = texturedAdaptor; |