summaryrefslogtreecommitdiff
path: root/src/smi_video.c
diff options
context:
space:
mode:
authorPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2008-09-02 16:32:31 -0300
committerPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2008-09-02 16:32:31 -0300
commit2d5ba5f7310fa8e11f7349d116aa871a239ac35f (patch)
tree3428e2a4d850ba32792fdee5e34912c2739aea50 /src/smi_video.c
parente111c85d6cca3f2206b6bce119b284edccf0cd4f (diff)
Correct xv video problems on MSOC.
Set VIDEO_CLIP_TO_VIEWPORT as it is used in MSI sources, and also add proper code to detect panel size, as this information is used to manage offscreen memory (but shouldn't it be using pScrn->virtualY, etc?)
Diffstat (limited to 'src/smi_video.c')
-rw-r--r--src/smi_video.c25
1 files changed, 17 insertions, 8 deletions
diff --git a/src/smi_video.c b/src/smi_video.c
index f842747..c669d6f 100644
--- a/src/smi_video.c
+++ b/src/smi_video.c
@@ -659,6 +659,12 @@ SMI_InitVideo(ScreenPtr pScreen)
XF86VideoAdaptorPtr newAdaptor = NULL;
int numAdaptors;
+ /* FIXME silently return?
+ * If secondary or dualhead setup */
+ if (IS_MSOC(psmi) &&
+ (psmi->IsSecondary || xf86IsEntityShared(psmi->pEnt->index)))
+ return;
+
ENTER_PROC("SMI_InitVideo");
numAdaptors = xf86XVListGenericAdaptors(pScrn, &ptrAdaptors);
@@ -885,11 +891,13 @@ SMI_SetupVideo(ScreenPtr pScreen)
| XvWindowMask
;
- ptrAdaptor->flags = VIDEO_OVERLAID_IMAGES
-/* | VIDEO_CLIP_TO_VIEWPORT */
- ;
-
- ptrAdaptor->name = "Silicon Motion Lynx Series Video Engine";
+ ptrAdaptor->flags = VIDEO_OVERLAID_IMAGES;
+ if (IS_MSOC(pSmi)) {
+ ptrAdaptor->flags |= VIDEO_CLIP_TO_VIEWPORT;
+ ptrAdaptor->name = "Silicon Motion MSOC Series Video Engine";
+ }
+ else
+ ptrAdaptor->name = "Silicon Motion Lynx Series Video Engine";
ptrAdaptor->nPorts = 1;
ptrAdaptor->pPortPrivates = (DevUnion*) &ptrAdaptor[1];
@@ -1386,7 +1394,7 @@ SMI_StopVideo(
WRITE_VPR(pSmi, 0x00, READ_VPR(pSmi, 0x00) & ~0x01000008);
}
#if SMI_USE_CAPTURE
- if (pSmi->Chipset != SMI_COUGAR3DR) {
+ if (!IS_MSOC(pSmi) && pSmi->Chipset != SMI_COUGAR3DR) {
WRITE_CPR(pSmi, 0x00, READ_CPR(pSmi, 0x00) & ~0x00000001);
WRITE_VPR(pSmi, 0x54, READ_VPR(pSmi, 0x54) & ~0x00F00000);
}
@@ -2264,8 +2272,9 @@ SMI_InitOffscreenImages(
}
offscreenImages->image = SMI_VideoImages;
- offscreenImages->flags = VIDEO_OVERLAID_IMAGES
- /*| VIDEO_CLIP_TO_VIEWPORT*/;
+ offscreenImages->flags = VIDEO_OVERLAID_IMAGES;
+ if (IS_MSOC(pSmi))
+ offscreenImages->flags |= VIDEO_CLIP_TO_VIEWPORT;
offscreenImages->alloc_surface = SMI_AllocSurface;
offscreenImages->free_surface = SMI_FreeSurface;
offscreenImages->display = SMI_DisplaySurface;