[Openchrome-devel] xf86-video-openchrome: 6 commits - configure.ac src/via_fp.c src/via_ums.h
Kevin Brace
kevinbrace at kemper.freedesktop.org
Sun Jul 16 05:46:35 UTC 2017
configure.ac | 2 -
src/via_fp.c | 60 +++++++++++++++++++++++++++++++++++++++
src/via_ums.h | 88 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 149 insertions(+), 1 deletion(-)
New commits:
commit e99f4c23acc3d96bd252229b01fe91328ff17110
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Sun Jul 16 00:46:14 2017 -0500
Version bumped to 0.6.155
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/configure.ac b/configure.ac
index d5c5c9a..49065f9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@
# Initialize Autoconf
AC_PREREQ(2.57)
AC_INIT([xf86-video-openchrome],
- [0.6.154],
+ [0.6.155],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=Driver/openchrome],
[xf86-video-openchrome])
commit c6e102e908a26bafa71b9a9940ae94477f14e034
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Sun Jul 16 00:24:19 2017 -0500
Added viaDVP1SetSyncPolarity
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/src/via_fp.c b/src/via_fp.c
index f1290f4..ca67e97 100644
--- a/src/via_fp.c
+++ b/src/via_fp.c
@@ -573,6 +573,7 @@ viaFPSyncPolarity(ScrnInfoPtr pScrn, CARD16 diPort, unsigned int flags)
viaDVP0SetSyncPolarity(pScrn, syncPolarity);
break;
case VIA_DI_PORT_DVP1:
+ viaDVP1SetSyncPolarity(pScrn, syncPolarity);
break;
case VIA_DI_PORT_FPDPLOW:
break;
diff --git a/src/via_ums.h b/src/via_ums.h
index dfe8c76..4430649 100644
--- a/src/via_ums.h
+++ b/src/via_ums.h
@@ -546,6 +546,28 @@ viaDVP1SetDataDriveStrength(ScrnInfoPtr pScrn, CARD8 dataDriveStrength)
}
/*
+ * Sets DVP1 (Digital Video Port 1) sync polarity.
+ */
+static inline void
+viaDVP1SetSyncPolarity(ScrnInfoPtr pScrn, CARD8 syncPolarity)
+{
+ /* 3X5.9B[6] - DVP1 VSYNC Polarity
+ * 0: Positive
+ * 1: Negative
+ * 3X5.9B[5] - DVP1 HSYNC Polarity
+ * 0: Positive
+ * 1: Negative */
+ ViaCrtcMask(VGAHWPTR(pScrn), 0x9B,
+ syncPolarity << 5, BIT(6) | BIT(5));
+ DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "DVP1 Horizontal Sync Polarity: %s\n",
+ (syncPolarity & BIT(0)) ? "-" : "+"));
+ DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "DVP1 Vertical Sync Polarity: %s\n",
+ (syncPolarity & BIT(1)) ? "-" : "+"));
+}
+
+/*
* Sets the display source of DVP1 (Digital Video Port 1) interface.
*/
static inline void
commit 7f9a88f8ad389479b51966f024b83c8bfb22bb63
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Sun Jul 16 00:20:32 2017 -0500
Added viaDVP0SetSyncPolarity
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/src/via_fp.c b/src/via_fp.c
index be490f0..f1290f4 100644
--- a/src/via_fp.c
+++ b/src/via_fp.c
@@ -570,6 +570,7 @@ viaFPSyncPolarity(ScrnInfoPtr pScrn, CARD16 diPort, unsigned int flags)
switch(diPort) {
case VIA_DI_PORT_DVP0:
+ viaDVP0SetSyncPolarity(pScrn, syncPolarity);
break;
case VIA_DI_PORT_DVP1:
break;
diff --git a/src/via_ums.h b/src/via_ums.h
index 53d182d..dfe8c76 100644
--- a/src/via_ums.h
+++ b/src/via_ums.h
@@ -455,6 +455,28 @@ viaDVP0SetDataDriveStrength(ScrnInfoPtr pScrn, CARD8 dataDriveStrength)
}
/*
+ * Sets DVP0 (Digital Video Port 0) sync polarity.
+ */
+static inline void
+viaDVP0SetSyncPolarity(ScrnInfoPtr pScrn, CARD8 syncPolarity)
+{
+ /* 3X5.96[6] - DVP0 VSYNC Polarity
+ * 0: Positive
+ * 1: Negative
+ * 3X5.96[5] - DVP0 HSYNC Polarity
+ * 0: Positive
+ * 1: Negative */
+ ViaCrtcMask(VGAHWPTR(pScrn), 0x96,
+ syncPolarity << 5, BIT(6) | BIT(5));
+ DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "DVP0 Horizontal Sync Polarity: %s\n",
+ (syncPolarity & BIT(0)) ? "-" : "+"));
+ DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "DVP0 Vertical Sync Polarity: %s\n",
+ (syncPolarity & BIT(1)) ? "-" : "+"));
+}
+
+/*
* Sets the display source of DVP0 (Digital Video Port 0) interface.
*/
static inline void
commit 78de666bf8bccfce9dbd64c9c3df87a3c2577fa3
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Sat Jul 15 23:57:54 2017 -0500
Added viaLVDS2SetSyncPolarity
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/src/via_fp.c b/src/via_fp.c
index 9f4f2a3..be490f0 100644
--- a/src/via_fp.c
+++ b/src/via_fp.c
@@ -584,10 +584,12 @@ viaFPSyncPolarity(ScrnInfoPtr pScrn, CARD16 diPort, unsigned int flags)
viaLVDS1SetSyncPolarity(pScrn, syncPolarity);
break;
case VIA_DI_PORT_LVDS2:
+ viaLVDS2SetSyncPolarity(pScrn, syncPolarity);
break;
case (VIA_DI_PORT_LVDS1 |
VIA_DI_PORT_LVDS2):
viaLVDS1SetSyncPolarity(pScrn, syncPolarity);
+ viaLVDS2SetSyncPolarity(pScrn, syncPolarity);
break;
default:
break;
diff --git a/src/via_ums.h b/src/via_ums.h
index 4fb1f08..53d182d 100644
--- a/src/via_ums.h
+++ b/src/via_ums.h
@@ -1277,6 +1277,28 @@ viaLVDS2SetDithering(ScrnInfoPtr pScrn, Bool dithering)
}
/*
+ * Sets LVDS2 sync polarity.
+ */
+static inline void
+viaLVDS2SetSyncPolarity(ScrnInfoPtr pScrn, CARD8 syncPolarity)
+{
+ /* 3X5.97[6] - LVDS2 VSYNC Polarity
+ * 0: Positive
+ * 1: Negative
+ * 3X5.97[5] - LVDS2 HSYNC Polarity
+ * 0: Positive
+ * 1: Negative */
+ ViaCrtcMask(VGAHWPTR(pScrn), 0x97,
+ syncPolarity << 5, BIT(6) | BIT(5));
+ DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "LVDS2 Horizontal Sync Polarity: %s\n",
+ (syncPolarity & BIT(0)) ? "-" : "+"));
+ DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "LVDS2 Vertical Sync Polarity: %s\n",
+ (syncPolarity & BIT(1)) ? "-" : "+"));
+}
+
+/*
* Sets LVDS2 display source.
*/
static inline void
commit d49258fa31082c0da178abece48b87e9700a1040
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Sat Jul 15 23:54:20 2017 -0500
Added viaLVDS1SetSyncPolarity
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/src/via_fp.c b/src/via_fp.c
index d23ffe7..9f4f2a3 100644
--- a/src/via_fp.c
+++ b/src/via_fp.c
@@ -581,11 +581,13 @@ viaFPSyncPolarity(ScrnInfoPtr pScrn, CARD16 diPort, unsigned int flags)
VIA_DI_PORT_FPDPHIGH):
break;
case VIA_DI_PORT_LVDS1:
+ viaLVDS1SetSyncPolarity(pScrn, syncPolarity);
break;
case VIA_DI_PORT_LVDS2:
break;
case (VIA_DI_PORT_LVDS1 |
VIA_DI_PORT_LVDS2):
+ viaLVDS1SetSyncPolarity(pScrn, syncPolarity);
break;
default:
break;
diff --git a/src/via_ums.h b/src/via_ums.h
index de2f4d1..4fb1f08 100644
--- a/src/via_ums.h
+++ b/src/via_ums.h
@@ -1153,6 +1153,28 @@ viaLVDS1SetDithering(ScrnInfoPtr pScrn, Bool dithering)
}
/*
+ * Sets LVDS1 sync polarity.
+ */
+static inline void
+viaLVDS1SetSyncPolarity(ScrnInfoPtr pScrn, CARD8 syncPolarity)
+{
+ /* 3X5.99[6] - LVDS1 VSYNC Polarity
+ * 0: Positive
+ * 1: Negative
+ * 3X5.99[5] - LVDS1 HSYNC Polarity
+ * 0: Positive
+ * 1: Negative */
+ ViaCrtcMask(VGAHWPTR(pScrn), 0x99,
+ syncPolarity << 5, BIT(6) | BIT(5));
+ DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "LVDS1 Horizontal Sync Polarity: %s\n",
+ (syncPolarity & BIT(0)) ? "-" : "+"));
+ DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "LVDS1 Vertical Sync Polarity: %s\n",
+ (syncPolarity & BIT(1)) ? "-" : "+"));
+}
+
+/*
* Sets LVDS1 display source.
*/
static inline void
commit b1c35d80276e483d6eddf0a1b5a7979bfbddb911
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Sat Jul 15 23:45:07 2017 -0500
Added viaFPSyncPolarity
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/src/via_fp.c b/src/via_fp.c
index f36e42a..d23ffe7 100644
--- a/src/via_fp.c
+++ b/src/via_fp.c
@@ -549,6 +549,59 @@ viaFPDithering(ScrnInfoPtr pScrn, CARD16 diPort, Bool dithering)
"Exiting viaFPDithering.\n"));
}
+/*
+ * Set FP sync polarity.
+ */
+static void
+viaFPSyncPolarity(ScrnInfoPtr pScrn, CARD16 diPort, unsigned int flags)
+{
+ CARD8 syncPolarity = 0x00;
+
+ DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "Entered viaFPSyncPolarity.\n"));
+
+ if (flags & V_NHSYNC) {
+ syncPolarity |= BIT(0);
+ }
+
+ if (flags & V_NVSYNC) {
+ syncPolarity |= BIT(1);
+ }
+
+ switch(diPort) {
+ case VIA_DI_PORT_DVP0:
+ break;
+ case VIA_DI_PORT_DVP1:
+ break;
+ case VIA_DI_PORT_FPDPLOW:
+ break;
+ case VIA_DI_PORT_FPDPHIGH:
+ break;
+ case (VIA_DI_PORT_FPDPLOW |
+ VIA_DI_PORT_FPDPHIGH):
+ break;
+ case VIA_DI_PORT_LVDS1:
+ break;
+ case VIA_DI_PORT_LVDS2:
+ break;
+ case (VIA_DI_PORT_LVDS1 |
+ VIA_DI_PORT_LVDS2):
+ break;
+ default:
+ break;
+ }
+
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "FP Horizontal Sync Polarity: %s\n",
+ (syncPolarity & BIT(0)) ? "-" : "+");
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "FP Vertical Sync Polarity: %s\n",
+ (syncPolarity & BIT(1)) ? "-" : "+");
+
+ DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "Exiting viaFPSyncPolarity.\n"));
+}
+
static void
viaFPDisplaySource(ScrnInfoPtr pScrn, CARD16 diPort, int index)
{
@@ -981,6 +1034,7 @@ via_fp_mode_set(xf86OutputPtr output, DisplayModePtr mode,
break;
}
+ viaFPSyncPolarity(pScrn, pVIAFP->diPort, adjusted_mode->Flags);
viaFPDisplaySource(pScrn, pVIAFP->diPort, iga->index);
}
}
More information about the Openchrome-devel
mailing list