summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2012-03-12 11:21:53 +0000
committerDave Airlie <airlied@redhat.com>2012-03-12 11:21:53 +0000
commit1c55ea423b931cada91f6e045b127a97adfb04cb (patch)
tree1b65c4fcb0776959f557f32c597f4439b24625b0
parenta93d015b19b4909ba2c6969cafb09c8ce54a63ef (diff)
modes: fixup drv modes
-rw-r--r--hw/xfree86/modes/xf86Crtc.h3
-rw-r--r--hw/xfree86/modes/xf86Cursors.c6
-rw-r--r--hw/xfree86/modes/xf86DiDGA.c4
-rw-r--r--hw/xfree86/modes/xf86RandR12.c19
4 files changed, 29 insertions, 3 deletions
diff --git a/hw/xfree86/modes/xf86Crtc.h b/hw/xfree86/modes/xf86Crtc.h
index d0c61dc6d..b6926b1c7 100644
--- a/hw/xfree86/modes/xf86Crtc.h
+++ b/hw/xfree86/modes/xf86Crtc.h
@@ -222,6 +222,9 @@ typedef struct _xf86CrtcFuncs {
void
(*set_origin)(xf86CrtcPtr crtc, int x, int y);
+ Bool
+ (*set_slave_pixmap)(xf86CrtcPtr crtc, PixmapPtr pixmap);
+
} xf86CrtcFuncsRec, *xf86CrtcFuncsPtr;
#define XF86_CRTC_VERSION 4
diff --git a/hw/xfree86/modes/xf86Cursors.c b/hw/xfree86/modes/xf86Cursors.c
index 669da0d5b..139d552e5 100644
--- a/hw/xfree86/modes/xf86Cursors.c
+++ b/hw/xfree86/modes/xf86Cursors.c
@@ -625,8 +625,12 @@ xf86_cursors_init (ScreenPtr screen, int max_width, int max_height, int flags)
xf86_config->cursor = NULL;
xf86_hide_cursors (scrn);
-
+
+#ifndef DRV_CODE
return xf86InitCursor (screen, cursor_info);
+#else
+ return TRUE;
+#endif
}
/**
diff --git a/hw/xfree86/modes/xf86DiDGA.c b/hw/xfree86/modes/xf86DiDGA.c
index e72b2ad01..47f3b0d9a 100644
--- a/hw/xfree86/modes/xf86DiDGA.c
+++ b/hw/xfree86/modes/xf86DiDGA.c
@@ -220,5 +220,9 @@ _xf86_di_dga_init_internal (ScreenPtr pScreen)
if (!xf86_dga_get_modes (pScreen))
return FALSE;
+#ifndef DRV_CODE
return DGAInit(pScreen, &xf86_dga_funcs, xf86_config->dga_modes, xf86_config->dga_nmode);
+#else
+ return TRUE;
+#endif
}
diff --git a/hw/xfree86/modes/xf86RandR12.c b/hw/xfree86/modes/xf86RandR12.c
index 38167f73f..a923103c9 100644
--- a/hw/xfree86/modes/xf86RandR12.c
+++ b/hw/xfree86/modes/xf86RandR12.c
@@ -1816,6 +1816,16 @@ xf86RandR12EnterVT (int screen_index, int flags)
#endif
}
+#ifdef DRV_CODE
+static Bool
+xf86CrtcSetSlavePixmap(RRCrtcPtr randr_crtc, PixmapPtr pixmap)
+{
+ xf86DrvCrtcPtr crtc = randr_crtc->devPrivate;
+
+ return crtc->funcs->set_slave_pixmap(crtc, pixmap);
+}
+#endif
+
static Bool
xf86RandR12Init12 (ScreenPtr pScreen)
{
@@ -1825,23 +1835,28 @@ xf86RandR12Init12 (ScreenPtr pScreen)
int i;
rp->rrGetInfo = xf86RandR12GetInfo12;
- rp->rrScreenSetSize = xf86RandR12ScreenSetSize;
rp->rrCrtcSet = xf86RandR12CrtcSet;
rp->rrCrtcSetGamma = xf86RandR12CrtcSetGamma;
rp->rrCrtcGetGamma = xf86RandR12CrtcGetGamma;
rp->rrOutputSetProperty = xf86RandR12OutputSetProperty;
rp->rrOutputValidateMode = xf86RandR12OutputValidateMode;
+#ifndef DRV_CODE
+ rp->rrScreenSetSize = xf86RandR12ScreenSetSize;
+
#if RANDR_13_INTERFACE
rp->rrOutputGetProperty = xf86RandR13OutputGetProperty;
rp->rrGetPanning = xf86RandR13GetPanning;
rp->rrSetPanning = xf86RandR13SetPanning;
#endif
- rp->rrModeDestroy = xf86RandR12ModeDestroy;
rp->rrSetConfig = NULL;
+#endif
+ rp->rrModeDestroy = xf86RandR12ModeDestroy;
#ifndef DRV_CODE
pScrn->PointerMoved = xf86RandR12PointerMoved;
pScrn->ChangeGamma = xf86RandR12ChangeGamma;
+#else
+ rp->rrCrtcSlavePixmap = xf86DrvCrtcSetSlavePixmap;
#endif
randrp->orig_EnterVT = pScrn->EnterVT;