summaryrefslogtreecommitdiff
path: root/src/i830_crt.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_crt.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_crt.c')
-rw-r--r--src/i830_crt.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/i830_crt.c b/src/i830_crt.c
index 3705233b..d1ed3a81 100644
--- a/src/i830_crt.c
+++ b/src/i830_crt.c
@@ -391,6 +391,16 @@ i830_crt_destroy (xf86OutputPtr output)
xfree (output->driver_private);
}
+static xf86CrtcPtr
+i830_crt_get_crtc(xf86OutputPtr output)
+{
+ ScrnInfoPtr pScrn = output->scrn;
+ I830Ptr pI830 = I830PTR(pScrn);
+ int pipe = !!(INREG(ADPA) & ADPA_PIPE_SELECT_MASK);
+
+ return i830_pipe_to_crtc(pScrn, pipe);
+}
+
static const xf86OutputFuncsRec i830_crt_output_funcs = {
.dpms = i830_crt_dpms,
.save = i830_crt_save,
@@ -402,7 +412,10 @@ static const xf86OutputFuncsRec i830_crt_output_funcs = {
.commit = i830_output_commit,
.detect = i830_crt_detect,
.get_modes = i830_ddc_get_modes,
- .destroy = i830_crt_destroy
+ .destroy = i830_crt_destroy,
+#ifdef RANDR_GET_CRTC_INTERFACE
+ .get_crtc = i830_crt_get_crtc,
+#endif
};
void