xf86-video-intel: Branch 'modesetting' - 2 commits - src/i830_modes.c src/sil164/sil164.c src/sil164/sil164_reg.h
Eric Anholt
anholt at kemper.freedesktop.org
Sat Jul 15 00:26:29 EEST 2006
src/i830_modes.c | 6 +++---
src/sil164/sil164.c | 22 +++++++++++++++-------
src/sil164/sil164_reg.h | 2 --
3 files changed, 18 insertions(+), 12 deletions(-)
New commits:
diff-tree 49b827605628d3e1a6d4d41447cf46c5f38cc0c2 (from 6a92a779646ec03a03a3b1f45170b2e705ce8934)
Author: Eric Anholt <anholt at FreeBSD.org>
Date: Fri Jul 14 14:23:04 2006 -0700
Add a register restore implementation so we don't crash on LeaveVT.
We shouldn't ever need to save/restore the hi/lo frequency regs, as they're
read-only.
diff --git a/src/sil164/sil164.c b/src/sil164/sil164.c
index a274262..0a68d69 100644
--- a/src/sil164/sil164.c
+++ b/src/sil164/sil164.c
@@ -197,12 +197,6 @@ sil164SaveRegs(I2CDevPtr d)
{
SIL164Ptr sil = SILPTR(d);
- if (!sil164ReadByte(sil, SIL164_FREQ_LO, &sil->SavedReg.freq_lo))
- return;
-
- if (!sil164ReadByte(sil, SIL164_FREQ_HI, &sil->SavedReg.freq_hi))
- return;
-
if (!sil164ReadByte(sil, SIL164_REG8, &sil->SavedReg.reg8))
return;
@@ -215,6 +209,20 @@ sil164SaveRegs(I2CDevPtr d)
return;
}
+static void
+sil164RestoreRegs(I2CDevPtr d)
+{
+ SIL164Ptr sil = SILPTR(d);
+
+ /* Restore it powered down initially */
+ sil164WriteByte(sil, SIL164_REG8, sil->SavedReg.reg8 & ~0x1);
+
+ sil164WriteByte(sil, SIL164_REG9, sil->SavedReg.reg9);
+ sil164WriteByte(sil, SIL164_REGC, sil->SavedReg.regc);
+ sil164WriteByte(sil, SIL164_REG8, sil->SavedReg.reg8);
+}
+
+
I830I2CVidOutputRec SIL164VidOutput = {
sil164Detect,
sil164Init,
@@ -223,5 +231,5 @@ I830I2CVidOutputRec SIL164VidOutput = {
sil164Power,
sil164PrintRegs,
sil164SaveRegs,
- NULL,
+ sil164RestoreRegs,
};
diff --git a/src/sil164/sil164_reg.h b/src/sil164/sil164_reg.h
index dc2abba..ebfcb8c 100644
--- a/src/sil164/sil164_reg.h
+++ b/src/sil164/sil164_reg.h
@@ -58,8 +58,6 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
#define SIL164_REGC 0x0c
typedef struct _Sil164SaveRec {
- CARD8 freq_lo;
- CARD8 freq_hi;
CARD8 reg8;
CARD8 reg9;
CARD8 regc;
diff-tree 6a92a779646ec03a03a3b1f45170b2e705ce8934 (from de470aaf5c47f4d2b0f477ac678039ef43af773d)
Author: Eric Anholt <anholt at FreeBSD.org>
Date: Fri Jul 14 14:20:41 2006 -0700
Don't try to probe on more pipes than we really have.
diff --git a/src/i830_modes.c b/src/i830_modes.c
index 1965c39..1c5e7eb 100644
--- a/src/i830_modes.c
+++ b/src/i830_modes.c
@@ -895,7 +895,7 @@ I830ValidateXF86ModeList(ScrnInfoPtr pSc
Bool pipes_reconfigured = FALSE;
int originalVirtualX, originalVirtualY;
- for (pipe = 0; pipe < MAX_DISPLAY_PIPES; pipe++) {
+ for (pipe = 0; pipe < pI830->availablePipes; pipe++) {
I830ReprobePipeModeList(pScrn, pipe);
}
@@ -944,7 +944,7 @@ I830ValidateXF86ModeList(ScrnInfoPtr pSc
/* Set up a virtual size that will cover any clone mode we'd want to set
* for either of the two pipes.
*/
- for (pipe = 0; pipe < MAX_DISPLAY_PIPES; pipe++) {
+ for (pipe = 0; pipe < pI830->availablePipes; pipe++) {
MonPtr mon = pI830->pipeMon[pipe];
DisplayModePtr mode;
@@ -969,7 +969,7 @@ I830ValidateXF86ModeList(ScrnInfoPtr pSc
* initially.
*/
if (!first_time) {
- for (pipe = 0; pipe < MAX_DISPLAY_PIPES; pipe++) {
+ for (pipe = 0; pipe < pI830->availablePipes; pipe++) {
MonPtr mon = pI830->pipeMon[pipe];
DisplayModePtr mode;
More information about the xorg-commit
mailing list