From d12b7b6632fb4cf41d2e28c7792eaa503f25404a Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Wed, 27 Feb 2008 07:08:00 +1000 Subject: [PATCH] xf86Crtc: add higher level modesetting entry point. For kernel modesetting work we need a bigger stick to beat the modesetting path --- hw/xfree86/modes/xf86Crtc.c | 3 +++ hw/xfree86/modes/xf86Crtc.h | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c index 4ecf4b3d7..266e08195 100644 --- a/hw/xfree86/modes/xf86Crtc.c +++ b/hw/xfree86/modes/xf86Crtc.c @@ -236,6 +236,9 @@ xf86CrtcSetMode (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation, int saved_x, saved_y; Rotation saved_rotation; + if (crtc->funcs->set_mode_major) + return crtc->funcs->set_mode_major(crtc, mode, rotation, x, y); + crtc->enabled = xf86CrtcInUse (crtc); if (!crtc->enabled) diff --git a/hw/xfree86/modes/xf86Crtc.h b/hw/xfree86/modes/xf86Crtc.h index 62d85bbc9..cc045b229 100644 --- a/hw/xfree86/modes/xf86Crtc.h +++ b/hw/xfree86/modes/xf86Crtc.h @@ -206,6 +206,13 @@ typedef struct _xf86CrtcFuncs { */ void (*destroy) (xf86CrtcPtr crtc); + + /** + * Less fine-grained mode setting entry point for kernel modesetting + */ + Bool + (*set_mode_major)(xf86CrtcPtr crtc, DisplayModePtr mode, + Rotation rotation, int x, int y); } xf86CrtcFuncsRec, *xf86CrtcFuncsPtr; struct _xf86Crtc {