[PATCH 21/36] xf86: add initial scanout pixmap support
Dave Airlie
airlied at gmail.com
Thu Jul 5 08:21:22 PDT 2012
From: Dave Airlie <airlied at redhat.com>
Add the simple passthrough interface for drivers to use,
so they can set scanout pixmaps.
Reviewed-by: Keith Packard <keithp at keithp.com>
Signed-off-by: Dave Airlie <airlied at redhat.com>
---
hw/xfree86/modes/xf86Crtc.h | 5 +++++
hw/xfree86/modes/xf86RandR12.c | 10 ++++++++++
2 files changed, 15 insertions(+)
diff --git a/hw/xfree86/modes/xf86Crtc.h b/hw/xfree86/modes/xf86Crtc.h
index 58d8cec..25fb34d 100644
--- a/hw/xfree86/modes/xf86Crtc.h
+++ b/hw/xfree86/modes/xf86Crtc.h
@@ -218,6 +218,11 @@ typedef struct _xf86CrtcFuncs {
void
(*set_origin) (xf86CrtcPtr crtc, int x, int y);
+ /**
+ */
+ Bool
+ (*set_scanout_pixmap)(xf86CrtcPtr crtc, PixmapPtr pixmap);
+
} xf86CrtcFuncsRec, *xf86CrtcFuncsPtr;
#define XF86_CRTC_VERSION 4
diff --git a/hw/xfree86/modes/xf86RandR12.c b/hw/xfree86/modes/xf86RandR12.c
index 1eaef9d..ca3388a 100644
--- a/hw/xfree86/modes/xf86RandR12.c
+++ b/hw/xfree86/modes/xf86RandR12.c
@@ -1789,6 +1789,15 @@ xf86RandR14ProviderGetProperty(ScreenPtr pScreen,
}
static Bool
+xf86CrtcSetScanoutPixmap(RRCrtcPtr randr_crtc, PixmapPtr pixmap)
+{
+ xf86CrtcPtr crtc = randr_crtc->devPrivate;
+ if (!crtc->funcs->set_scanout_pixmap)
+ return FALSE;
+ return crtc->funcs->set_scanout_pixmap(crtc, pixmap);
+}
+
+static Bool
xf86RandR12Init12(ScreenPtr pScreen)
{
ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
@@ -1813,6 +1822,7 @@ xf86RandR12Init12(ScreenPtr pScreen)
rp->rrProviderSetProperty = xf86RandR14ProviderSetProperty;
rp->rrProviderGetProperty = xf86RandR14ProviderGetProperty;
+ rp->rrCrtcSetScanoutPixmap = xf86CrtcSetScanoutPixmap;
pScrn->PointerMoved = xf86RandR12PointerMoved;
pScrn->ChangeGamma = xf86RandR12ChangeGamma;
--
1.7.10.2
More information about the xorg-devel
mailing list