summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKeith Packard <keithp@neko.keithp.com>2007-03-04 19:35:44 -0800
committerKeith Packard <keithp@neko.keithp.com>2007-03-04 19:36:32 -0800
commitbc20b54c34088356a277beaebcc90bb4a7063e19 (patch)
treeb02e0d865795198c7f79f660a4cf5a67fc3034dc /src
parentb27fa2c257ccc49c6f29a20a3e672ebaaf58e7aa (diff)
Support new CRTC/Output prepare/commit hooks.
New hooks replace explicit invocation of DPMS functions to manage mode setting sequencing.
Diffstat (limited to 'src')
-rw-r--r--src/i830_crt.c2
-rw-r--r--src/i830_display.c26
-rw-r--r--src/i830_display.h3
-rw-r--r--src/i830_dvo.c3
-rw-r--r--src/i830_lvds.c2
-rw-r--r--src/i830_sdvo.c2
-rw-r--r--src/i830_tv.c2
7 files changed, 40 insertions, 0 deletions
diff --git a/src/i830_crt.c b/src/i830_crt.c
index 77061653..fbb4adc5 100644
--- a/src/i830_crt.c
+++ b/src/i830_crt.c
@@ -341,7 +341,9 @@ static const xf86OutputFuncsRec i830_crt_output_funcs = {
.restore = i830_crt_restore,
.mode_valid = i830_crt_mode_valid,
.mode_fixup = i830_crt_mode_fixup,
+ .prepare = i830_output_prepare,
.mode_set = i830_crt_mode_set,
+ .commit = i830_output_commit,
.detect = i830_crt_detect,
.get_modes = i830_ddc_get_modes,
.destroy = i830_crt_destroy
diff --git a/src/i830_display.c b/src/i830_display.c
index 67744d59..d0b21a92 100644
--- a/src/i830_display.c
+++ b/src/i830_display.c
@@ -613,6 +613,30 @@ i830_crtc_unlock (xf86CrtcPtr crtc)
#endif
}
+static void
+i830_crtc_prepare (xf86CrtcPtr crtc)
+{
+ crtc->funcs->dpms (crtc, DPMSModeOff);
+}
+
+static void
+i830_crtc_commit (xf86CrtcPtr crtc)
+{
+ crtc->funcs->dpms (crtc, DPMSModeOn);
+}
+
+void
+i830_output_prepare (xf86OutputPtr output)
+{
+ output->funcs->dpms (output, DPMSModeOff);
+}
+
+void
+i830_output_commit (xf86OutputPtr output)
+{
+ output->funcs->dpms (output, DPMSModeOn);
+}
+
static Bool
i830_crtc_mode_fixup(xf86CrtcPtr crtc, DisplayModePtr mode,
DisplayModePtr adjusted_mode)
@@ -1377,7 +1401,9 @@ static const xf86CrtcFuncsRec i830_crtc_funcs = {
.lock = i830_crtc_lock,
.unlock = i830_crtc_unlock,
.mode_fixup = i830_crtc_mode_fixup,
+ .prepare = i830_crtc_prepare,
.mode_set = i830_crtc_mode_set,
+ .commit = i830_crtc_commit,
.gamma_set = i830_crtc_gamma_set,
.shadow_create = i830_crtc_shadow_create,
.shadow_allocate = i830_crtc_shadow_allocate,
diff --git a/src/i830_display.h b/src/i830_display.h
index dbd1ea8e..31ab6155 100644
--- a/src/i830_display.h
+++ b/src/i830_display.h
@@ -40,3 +40,6 @@ void i830ReleaseLoadDetectPipe(xf86OutputPtr output);
void i830_crtc_init(ScrnInfoPtr pScrn, int pipe);
void i830_crtc_load_lut(xf86CrtcPtr crtc);
DisplayModePtr i830_crtc_mode_get(ScrnInfoPtr pScrn, xf86CrtcPtr crtc);
+void i830_output_prepare (xf86OutputPtr output);
+void i830_output_commit (xf86OutputPtr output);
+
diff --git a/src/i830_dvo.c b/src/i830_dvo.c
index d938f466..629e9c7d 100644
--- a/src/i830_dvo.c
+++ b/src/i830_dvo.c
@@ -31,6 +31,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "xf86.h"
#include "i830.h"
+#include "i830_display.h"
#include "i810_reg.h"
#include "sil164/sil164.h"
@@ -226,7 +227,9 @@ static const xf86OutputFuncsRec i830_dvo_output_funcs = {
.restore = i830_dvo_restore,
.mode_valid = i830_dvo_mode_valid,
.mode_fixup = i830_dvo_mode_fixup,
+ .prepare = i830_output_prepare,
.mode_set = i830_dvo_mode_set,
+ .commit = i830_output_commit,
.detect = i830_dvo_detect,
.get_modes = i830_ddc_get_modes,
.destroy = i830_dvo_destroy
diff --git a/src/i830_lvds.c b/src/i830_lvds.c
index 642dd8a3..f554b388 100644
--- a/src/i830_lvds.c
+++ b/src/i830_lvds.c
@@ -392,7 +392,9 @@ static const xf86OutputFuncsRec i830_lvds_output_funcs = {
.restore = i830_lvds_restore,
.mode_valid = i830_lvds_mode_valid,
.mode_fixup = i830_lvds_mode_fixup,
+ .prepare = i830_output_prepare,
.mode_set = i830_lvds_mode_set,
+ .commit = i830_output_commit,
.detect = i830_lvds_detect,
.get_modes = i830_lvds_get_modes,
#ifdef RANDR_12_INTERFACE
diff --git a/src/i830_sdvo.c b/src/i830_sdvo.c
index 46a35f1c..b7cf8436 100644
--- a/src/i830_sdvo.c
+++ b/src/i830_sdvo.c
@@ -1060,7 +1060,9 @@ static const xf86OutputFuncsRec i830_sdvo_output_funcs = {
.restore = i830_sdvo_restore,
.mode_valid = i830_sdvo_mode_valid,
.mode_fixup = i830_sdvo_mode_fixup,
+ .prepare = i830_output_prepare,
.mode_set = i830_sdvo_mode_set,
+ .commit = i830_output_commit,
.detect = i830_sdvo_detect,
.get_modes = i830_sdvo_get_modes,
.destroy = i830_sdvo_destroy
diff --git a/src/i830_tv.c b/src/i830_tv.c
index 95612e41..d7f4f563 100644
--- a/src/i830_tv.c
+++ b/src/i830_tv.c
@@ -1406,7 +1406,9 @@ static const xf86OutputFuncsRec i830_tv_output_funcs = {
.restore = i830_tv_restore,
.mode_valid = i830_tv_mode_valid,
.mode_fixup = i830_tv_mode_fixup,
+ .prepare = i830_output_prepare,
.mode_set = i830_tv_mode_set,
+ .commit = i830_output_commit,
.detect = i830_tv_detect,
.get_modes = i830_tv_get_modes,
.destroy = i830_tv_destroy