From: Dave Airlie <[email protected]> Add the simple passthrough interface for drivers to use, so they can set scanout pixmaps.
Signed-off-by: Dave Airlie <[email protected]> --- hw/xfree86/modes/xf86Crtc.h | 5 +++++ hw/xfree86/modes/xf86RandR12.c | 11 +++++++++++ 2 files changed, 16 insertions(+) diff --git a/hw/xfree86/modes/xf86Crtc.h b/hw/xfree86/modes/xf86Crtc.h index 55466b6..ae4b5e0 100644 --- a/hw/xfree86/modes/xf86Crtc.h +++ b/hw/xfree86/modes/xf86Crtc.h @@ -219,6 +219,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 5a85ed1..0a58b58 100644 --- a/hw/xfree86/modes/xf86RandR12.c +++ b/hw/xfree86/modes/xf86RandR12.c @@ -1827,6 +1827,15 @@ xf86RandR15ProviderGetProperty(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); @@ -1852,6 +1861,8 @@ xf86RandR12Init12(ScreenPtr pScreen) rp->rrProviderSetRole = xf86RandR15ProviderSetRole; rp->rrProviderSetProperty = xf86RandR15ProviderSetProperty; rp->rrProviderGetProperty = xf86RandR15ProviderGetProperty; + rp->rrCrtcSetScanoutPixmap = xf86CrtcSetScanoutPixmap; + pScrn->PointerMoved = xf86RandR12PointerMoved; pScrn->ChangeGamma = xf86RandR12ChangeGamma; -- 1.7.10.2 _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
