summaryrefslogtreecommitdiff
path: root/src/i830_dvo.c
diff options
context:
space:
mode:
authorJesse Barnes <jbarnes@jbarnes-t61.(none)>2008-03-17 14:17:27 -0700
committerJesse Barnes <jbarnes@jbarnes-t61.(none)>2008-03-17 14:18:57 -0700
commit24e6eb2ae683ed6614ac79c0d7811ac9fe94209f (patch)
tree57d4ab471a380f9b5e68e02eb078f710fbafd233 /src/i830_dvo.c
parent69fbc17441d0f894d17b058e65ae22300cd2a54c (diff)
Add support for new ->get_crtc output callbacks
Using the new interface allows the server to avoid some flicker at startup.
Diffstat (limited to 'src/i830_dvo.c')
-rw-r--r--src/i830_dvo.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/i830_dvo.c b/src/i830_dvo.c
index c0f76e30..75618333 100644
--- a/src/i830_dvo.c
+++ b/src/i830_dvo.c
@@ -330,6 +330,18 @@ i830_dvo_destroy (xf86OutputPtr output)
}
}
+static xf86CrtcPtr
+i830_dvo_get_crtc(xf86OutputPtr output)
+{
+ ScrnInfoPtr pScrn = output->scrn;
+ I830Ptr pI830 = I830PTR(pScrn);
+ I830OutputPrivatePtr intel_output = output->driver_private;
+ struct _I830DVODriver *drv = intel_output->i2c_drv;
+ int pipe = !!(INREG(drv->dvo_reg) & SDVO_PIPE_B_SELECT);
+
+ return i830_pipe_to_crtc(pScrn, pipe);
+}
+
static const xf86OutputFuncsRec i830_dvo_output_funcs = {
.dpms = i830_dvo_dpms,
.save = i830_dvo_save,
@@ -341,7 +353,10 @@ static const xf86OutputFuncsRec i830_dvo_output_funcs = {
.commit = i830_output_commit,
.detect = i830_dvo_detect,
.get_modes = i830_dvo_get_modes,
- .destroy = i830_dvo_destroy
+ .destroy = i830_dvo_destroy,
+#ifdef RANDR_GET_CRTC_INTERFACE
+ .get_crtc = i830_dvo_get_crtc,
+#endif
};
/**