[Openchrome-devel] xf86-video-openchrome: 4 commits - configure.ac src/via_display.c src/via_ums.c
Kevin Brace
kevinbrace at kemper.freedesktop.org
Fri Jan 13 17:52:57 UTC 2017
configure.ac | 2 +-
src/via_display.c | 42 +++++++-----------------------------------
src/via_ums.c | 12 ++++++++++--
3 files changed, 18 insertions(+), 38 deletions(-)
New commits:
commit 5acbb0a71aa639e381829d15b3a34145752d7ac5
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Fri Jan 13 11:40:31 2017 -0600
Version bumped to 0.5.181
This version restricts the horizontal screen resolution slightly (4 dots
in 32-bit color mode) to avoid display issues on the right side screen
in dual screen mode.
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/configure.ac b/configure.ac
index 3914d6b..7f156c8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@
# Initialize Autoconf
AC_PREREQ(2.57)
AC_INIT([xf86-video-openchrome],
- [0.5.180],
+ [0.5.181],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=Driver/openchrome],
[xf86-video-openchrome])
commit 1496cc2f5f6ea94ceb4679a8a87b3369045b192a
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Fri Jan 13 11:36:27 2017 -0600
Limit horizontal direction screen resolution slightly
Allowing 2048 horizontal screen resolution in 32-bit color mode causes
a problem displaying the correct image on the right side screen, so the
allowed horizontal screen resolution will now be restricted by a few
dots.
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/src/via_ums.c b/src/via_ums.c
index ffd1a66..eba18b6 100644
--- a/src/via_ums.c
+++ b/src/via_ums.c
@@ -1015,6 +1015,14 @@ umsCrtcInit(ScrnInfoPtr pScrn)
iga2_rec->index = 1;
iga2->driver_private = iga2_rec;
+ if (!pScrn->bitsPerPixel) {
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+ "Detected bitsPerPixel to be 0 bit.\n");
+ xf86CrtcDestroy(iga2);
+ xf86CrtcDestroy(iga1);
+ return FALSE;
+ }
+
/*
* CLE266A:
* Max Line Pitch: 4080, (FB corruption when higher, driver problem?)
@@ -1027,8 +1035,8 @@ umsCrtcInit(ScrnInfoPtr pScrn)
* We should be able to limit the memory available for a mode to 32 MB,
* but miScanLineWidth fails to catch this properly (apertureSize).
*/
- max_pitch = 8192 / ((pScrn->bitsPerPixel + 7) >> 3);
- max_height = max_pitch;
+ max_pitch = (8192 / ((pScrn->bitsPerPixel + 7) >> 3)) - (16 / ((pScrn->bitsPerPixel + 7) >> 3));
+ max_height = 8192 / ((pScrn->bitsPerPixel + 7) >> 3);
xf86CrtcSetSizeRange(pScrn, 320, 200, max_pitch, max_height);
commit 0f34b8d53e60e02a844f0f8eb039207f11f24bf2
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Fri Jan 13 11:25:13 2017 -0600
Made corrections to IGA2 display read count and starting address
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/src/via_display.c b/src/via_display.c
index 417aa70..b04bfe9 100644
--- a/src/via_display.c
+++ b/src/via_display.c
@@ -2971,12 +2971,6 @@ viaIGA2SetDisplayRegister(ScrnInfoPtr pScrn, DisplayModePtr mode)
/* Set IGA2 horizontal offset adjustment. */
temp = (pScrn->displayWidth * (pScrn->bitsPerPixel >> 3)) >> 3;
- /* Make sure that this is 32-byte aligned. */
- if (temp & 0x03) {
- temp += 0x03;
- temp &= ~0x03;
- }
-
/* 3X5.66[7:0] - Second Display Horizontal Offset Bits [7:0] */
hwp->writeCrtc(hwp, 0x66, temp & 0xFF);
@@ -2984,22 +2978,16 @@ viaIGA2SetDisplayRegister(ScrnInfoPtr pScrn, DisplayModePtr mode)
ViaCrtcMask(hwp, 0x67, temp >> 8, 0x03);
- /* Set IGA2 alignment. */
- temp = (mode->CrtcHDisplay * (pScrn->bitsPerPixel >> 3)) >> 3;
-
- /* Make sure that this is 32-byte aligned. */
- if (temp & 0x03) {
- temp += 0x03;
- temp &= ~0x03;
- }
+ /* Set IGA2 fetch count. */
+ temp = (mode->CrtcHDisplay * (pScrn->bitsPerPixel >> 3)) >> 4;
/* 3X5.65[7:0] - Second Display Horizontal
- * 2-Quadword Count Data Bits [7:0] */
- hwp->writeCrtc(hwp, 0x65, (temp >> 1) & 0xFF);
+ * 2-Quadword Count Data Bits [7:0] */
+ hwp->writeCrtc(hwp, 0x65, temp & 0xFF);
/* 3X5.67[3:2] - Second Display Horizontal
- * 2-Quadword Count Data Bits [9:8] */
- ViaCrtcMask(hwp, 0x67, temp >> 7, 0x0C);
+ * 2-Quadword Count Data Bits [9:8] */
+ ViaCrtcMask(hwp, 0x67, temp >> 6, 0x0C);
DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"Exiting viaIGA2SetDisplayRegister.\n"));
commit 72933a40be8764d2ed09b168e1895ad5f730e707
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Fri Jan 13 10:44:17 2017 -0600
Made corrections to IGA1 display read count and starting address
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/src/via_display.c b/src/via_display.c
index 4737500..417aa70 100644
--- a/src/via_display.c
+++ b/src/via_display.c
@@ -1690,12 +1690,6 @@ viaIGA1SetDisplayRegister(ScrnInfoPtr pScrn, DisplayModePtr mode)
/* Set IGA1 horizontal offset adjustment. */
temp = (pScrn->displayWidth * (pScrn->bitsPerPixel >> 3)) >> 3;
- /* Make sure that this is 32-byte aligned. */
- if (temp & 0x03) {
- temp += 0x03;
- temp &= ~0x03;
- }
-
/* 3X5.13[7:0] - Primary Display Horizontal Offset Bits [7:0] */
hwp->writeCrtc(hwp, 0x13, temp & 0xFF);
@@ -1704,17 +1698,7 @@ viaIGA1SetDisplayRegister(ScrnInfoPtr pScrn, DisplayModePtr mode)
/* Set IGA1 horizontal display fetch (read) count. */
- temp = (mode->CrtcHDisplay * (pScrn->bitsPerPixel >> 3)) >> 3;
-
- /* Make sure that this is 32-byte aligned. */
- if (temp & 0x03) {
- temp += 0x03;
- temp &= ~0x03;
- }
-
- /* Primary Display Horizontal Display Fetch Count Data needs to be
- * 16-byte aligned. */
- temp = temp >> 1;
+ temp = (mode->CrtcHDisplay * (pScrn->bitsPerPixel >> 3)) >> 4;
/* 3C5.1C[7:0] - Primary Display Horizontal Display
* Fetch Count Data Bits [7:0] */
More information about the Openchrome-devel
mailing list