diff options
Diffstat (limited to 'src/nv04_xv_ovl.c')
-rw-r--r-- | src/nv04_xv_ovl.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/nv04_xv_ovl.c b/src/nv04_xv_ovl.c index b24379a..a729193 100644 --- a/src/nv04_xv_ovl.c +++ b/src/nv04_xv_ovl.c | |||
@@ -43,9 +43,10 @@ NV04PutOverlayImage(ScrnInfoPtr pScrn, struct nouveau_bo *src, int offset, | |||
43 | short src_w, short src_h, short drw_w, short drw_h, | 43 | short src_w, short src_h, short drw_w, short drw_h, |
44 | RegionPtr clipBoxes) | 44 | RegionPtr clipBoxes) |
45 | { | 45 | { |
46 | xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn); | ||
47 | NVPtr pNv = NVPTR(pScrn); | 46 | NVPtr pNv = NVPTR(pScrn); |
48 | NVPortPrivPtr pPriv = GET_OVERLAY_PRIVATE(pNv); | 47 | NVPortPrivPtr pPriv = GET_OVERLAY_PRIVATE(pNv); |
48 | #if NVOVL_SUPPORT | ||
49 | xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn); | ||
49 | xf86CrtcPtr crtc = xf86_config->crtc[pPriv->overlayCRTC]; | 50 | xf86CrtcPtr crtc = xf86_config->crtc[pPriv->overlayCRTC]; |
50 | 51 | ||
51 | /*This may not work with NV04 overlay according to rivatv source*/ | 52 | /*This may not work with NV04 overlay according to rivatv source*/ |
@@ -103,6 +104,7 @@ NV04PutOverlayImage(ScrnInfoPtr pScrn, struct nouveau_bo *src, int offset, | |||
103 | nvWriteVIDEO(pNv, NV_PVIDEO_OVERLAY, 0x111); | 104 | nvWriteVIDEO(pNv, NV_PVIDEO_OVERLAY, 0x111); |
104 | 105 | ||
105 | nvWriteVIDEO(pNv, NV_PVIDEO_SU_STATE, (nvReadVIDEO(pNv, NV_PVIDEO_SU_STATE) ^ (1 << 16))); | 106 | nvWriteVIDEO(pNv, NV_PVIDEO_SU_STATE, (nvReadVIDEO(pNv, NV_PVIDEO_SU_STATE) ^ (1 << 16))); |
107 | #endif | ||
106 | 108 | ||
107 | pPriv->videoStatus = CLIENT_VIDEO_ON; | 109 | pPriv->videoStatus = CLIENT_VIDEO_ON; |
108 | } | 110 | } |
@@ -183,11 +185,13 @@ NV04GetOverlayPortAttribute(ScrnInfoPtr pScrn, Atom attribute, | |||
183 | void | 185 | void |
184 | NV04StopOverlay (ScrnInfoPtr pScrn) | 186 | NV04StopOverlay (ScrnInfoPtr pScrn) |
185 | { | 187 | { |
188 | #ifdef NVOVL_SUPPORT | ||
186 | NVPtr pNv = NVPTR(pScrn); | 189 | NVPtr pNv = NVPTR(pScrn); |
187 | 190 | ||
188 | nvWriteVIDEO(pNv, NV_PVIDEO_OVERLAY, nvReadVIDEO(pNv, NV_PVIDEO_OVERLAY) &~ 0x1); | 191 | nvWriteVIDEO(pNv, NV_PVIDEO_OVERLAY, nvReadVIDEO(pNv, NV_PVIDEO_OVERLAY) &~ 0x1); |
189 | nvWriteVIDEO(pNv, NV_PVIDEO_OE_STATE, 0); | 192 | nvWriteVIDEO(pNv, NV_PVIDEO_OE_STATE, 0); |
190 | nvWriteVIDEO(pNv, NV_PVIDEO_SU_STATE, 0); | 193 | nvWriteVIDEO(pNv, NV_PVIDEO_SU_STATE, 0); |
191 | nvWriteVIDEO(pNv, NV_PVIDEO_RM_STATE, 0); | 194 | nvWriteVIDEO(pNv, NV_PVIDEO_RM_STATE, 0); |
195 | #endif | ||
192 | } | 196 | } |
193 | 197 | ||