summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/radeon_textured_video.c6
-rw-r--r--src/radeon_video.c28
2 files changed, 18 insertions, 16 deletions
diff --git a/src/radeon_textured_video.c b/src/radeon_textured_video.c
index d210a2d5..4005df95 100644
--- a/src/radeon_textured_video.c
+++ b/src/radeon_textured_video.c
@@ -213,9 +213,9 @@ RADEONPutImageTextured(ScrnInfoPtr pScrn,
if (!IS_R500_3D)
pPriv->bicubic_enabled = FALSE;
if (pPriv->bicubic_memory == NULL && pPriv->bicubic_enabled) {
- pPriv->bicubic_offset = RADEONAllocateMemory(pScrn,
- &pPriv->bicubic_memory,
- sizeof(bicubic_tex_512));
+ pPriv->bicubic_offset = radeon_allocate_memory(pScrn,
+ &pPriv->bicubic_memory,
+ sizeof(bicubic_tex_512), 64);
pPriv->bicubic_src_offset = pPriv->bicubic_offset + info->fbLocation + pScrn->fbOffset;
if (pPriv->bicubic_offset == 0)
pPriv->bicubic_enabled = FALSE;
diff --git a/src/radeon_video.c b/src/radeon_video.c
index e86a7d4c..598bf2b6 100644
--- a/src/radeon_video.c
+++ b/src/radeon_video.c
@@ -1614,13 +1614,12 @@ RADEONSetupImageVideo(ScreenPtr pScreen)
pPriv->textured = FALSE;
- if(pPriv->theatre != NULL)
- {
+ if(pPriv->theatre != NULL) {
/* video decoder is present, extend capabilities */
adapt->nEncodings = 13;
adapt->pEncodings = InputVideoEncodings;
adapt->type |= XvVideoMask;
- adapt->nAttributes = NUM_DEC_ATTRIBUTES;
+ adapt->nAttributes = NUM_DEC_ATTRIBUTES;
adapt->PutVideo = RADEONPutVideo;
}
@@ -1636,8 +1635,19 @@ RADEONStopVideo(ScrnInfoPtr pScrn, pointer data, Bool cleanup)
unsigned char *RADEONMMIO = info->MMIO;
RADEONPortPrivPtr pPriv = (RADEONPortPrivPtr)data;
- if (pPriv->textured)
- return;
+ if (pPriv->textured) {
+ if (cleanup) {
+ if (pPriv->bicubic_memory != NULL) {
+ radeon_free_memory(pScrn, pPriv->bicubic_memory);
+ pPriv->bicubic_memory = NULL;
+ }
+ if (pPriv->video_memory != NULL) {
+ radeon_free_memory(pScrn, pPriv->video_memory);
+ pPriv->video_memory = NULL;
+ }
+ }
+ return;
+ }
REGION_EMPTY(pScrn->pScreen, &pPriv->clip);
@@ -1660,10 +1670,6 @@ RADEONStopVideo(ScrnInfoPtr pScrn, pointer data, Bool cleanup)
radeon_free_memory(pScrn, pPriv->video_memory);
pPriv->video_memory = NULL;
}
- if (pPriv->bicubic_memory != NULL) {
- RADEONFreeMemory(pScrn, pPriv->bicubic_memory);
- pPriv->bicubic_memory = NULL;
- }
pPriv->videoStatus = 0;
} else {
if(pPriv->videoStatus & CLIENT_VIDEO_ON) {
@@ -3129,10 +3135,6 @@ RADEONVideoTimerCallback(ScrnInfoPtr pScrn, Time now)
radeon_free_memory(pScrn, pPriv->video_memory);
pPriv->video_memory = NULL;
}
- if (pPriv->bicubic_memory != NULL) {
- RADEONFreeMemory(pScrn, pPriv->bicubic_memory);
- pPriv->bicubic_memory = NULL;
- }
pPriv->videoStatus = 0;
info->VideoTimerCallback = NULL;
}