[Openchrome-devel] xf86-video-openchrome: 5 commits - configure.ac src/via_display.c src/via_fp.c src/via_ums.h
Kevin Brace
kevinbrace at kemper.freedesktop.org
Mon May 29 09:57:22 UTC 2017
configure.ac | 2 -
src/via_display.c | 49 +---------------------------
src/via_fp.c | 94 +++++++++++++++++++++++++++---------------------------
src/via_ums.h | 16 +++++++++
4 files changed, 66 insertions(+), 95 deletions(-)
New commits:
commit 96caaf2e694d8665e939b6c6c2ae8b95b4d4ad72
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Mon May 29 02:56:27 2017 -0700
Version bumped to 0.6.123
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/configure.ac b/configure.ac
index cca7f98..12e3d92 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@
# Initialize Autoconf
AC_PREREQ(2.57)
AC_INIT([xf86-video-openchrome],
- [0.6.122],
+ [0.6.123],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=Driver/openchrome],
[xf86-video-openchrome])
commit 5fb6f52c556030955fa2cd81488a307a691504c5
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Mon May 29 02:33:10 2017 -0700
All names named via_lvds_* were converted to via_fp_*
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/src/via_fp.c b/src/via_fp.c
index 99b6ed7..25419b0 100644
--- a/src/via_fp.c
+++ b/src/via_fp.c
@@ -1160,7 +1160,7 @@ ViaPanelScaleDisable(ScrnInfoPtr pScrn)
}
static void
-via_lvds_create_resources(xf86OutputPtr output)
+via_fp_create_resources(xf86OutputPtr output)
{
}
@@ -1237,17 +1237,17 @@ via_fp_dpms(xf86OutputPtr output, int mode)
}
static void
-via_lvds_save(xf86OutputPtr output)
+via_fp_save(xf86OutputPtr output)
{
}
static void
-via_lvds_restore(xf86OutputPtr output)
+via_fp_restore(xf86OutputPtr output)
{
}
static int
-via_lvds_mode_valid(xf86OutputPtr output, DisplayModePtr pMode)
+via_fp_mode_valid(xf86OutputPtr output, DisplayModePtr pMode)
{
ScrnInfoPtr pScrn = output->scrn;
VIAFPPtr pVIAFP = (VIAFPPtr) output->driver_private;
@@ -1267,7 +1267,7 @@ via_lvds_mode_valid(xf86OutputPtr output, DisplayModePtr pMode)
}
static Bool
-via_lvds_mode_fixup(xf86OutputPtr output, DisplayModePtr mode,
+via_fp_mode_fixup(xf86OutputPtr output, DisplayModePtr mode,
DisplayModePtr adjusted_mode)
{
VIAFPPtr pVIAFP = (VIAFPPtr) output->driver_private;
@@ -1284,7 +1284,7 @@ via_lvds_mode_fixup(xf86OutputPtr output, DisplayModePtr mode,
}
static void
-via_lvds_prepare(xf86OutputPtr output)
+via_fp_prepare(xf86OutputPtr output)
{
ScrnInfoPtr pScrn = output->scrn;
@@ -1293,7 +1293,7 @@ via_lvds_prepare(xf86OutputPtr output)
}
static void
-via_lvds_commit(xf86OutputPtr output)
+via_fp_commit(xf86OutputPtr output)
{
ScrnInfoPtr pScrn = output->scrn;
@@ -1302,7 +1302,7 @@ via_lvds_commit(xf86OutputPtr output)
}
static void
-via_lvds_mode_set(xf86OutputPtr output, DisplayModePtr mode,
+via_fp_mode_set(xf86OutputPtr output, DisplayModePtr mode,
DisplayModePtr adjusted_mode)
{
ScrnInfoPtr pScrn = output->scrn;
@@ -1432,14 +1432,14 @@ exit:
}
static DisplayModePtr
-via_lvds_get_modes(xf86OutputPtr output)
+via_fp_get_modes(xf86OutputPtr output)
{
ScrnInfoPtr pScrn = output->scrn;
DisplayModePtr pDisplay_Mode = NULL;
VIAFPPtr pVIAFP = (VIAFPPtr) output->driver_private;
DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "Entered via_lvds_get_modes.\n"));
+ "Entered via_fp_get_modes.\n"));
if (output->status == XF86OutputStatusConnected) {
if (!output->MonInfo) {
@@ -1488,27 +1488,27 @@ via_lvds_get_modes(xf86OutputPtr output)
}
}
DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "Exiting via_lvds_get_modes.\n"));
+ "Exiting via_fp_get_modes.\n"));
return pDisplay_Mode;
}
#ifdef RANDR_12_INTERFACE
static Bool
-via_lvds_set_property(xf86OutputPtr output, Atom property,
+via_fp_set_property(xf86OutputPtr output, Atom property,
RRPropertyValuePtr value)
{
return FALSE;
}
static Bool
-via_lvds_get_property(xf86OutputPtr output, Atom property)
+via_fp_get_property(xf86OutputPtr output, Atom property)
{
return FALSE;
}
#endif
static void
-via_lvds_destroy(xf86OutputPtr output)
+via_fp_destroy(xf86OutputPtr output)
{
if (output->driver_private)
free(output->driver_private);
@@ -1516,24 +1516,24 @@ via_lvds_destroy(xf86OutputPtr output)
}
static const xf86OutputFuncsRec via_fp_funcs = {
- .create_resources = via_lvds_create_resources,
+ .create_resources = via_fp_create_resources,
.dpms = via_fp_dpms,
- .save = via_lvds_save,
- .restore = via_lvds_restore,
- .mode_valid = via_lvds_mode_valid,
- .mode_fixup = via_lvds_mode_fixup,
- .prepare = via_lvds_prepare,
- .commit = via_lvds_commit,
- .mode_set = via_lvds_mode_set,
+ .save = via_fp_save,
+ .restore = via_fp_restore,
+ .mode_valid = via_fp_mode_valid,
+ .mode_fixup = via_fp_mode_fixup,
+ .prepare = via_fp_prepare,
+ .commit = via_fp_commit,
+ .mode_set = via_fp_mode_set,
.detect = via_fp_detect,
- .get_modes = via_lvds_get_modes,
+ .get_modes = via_fp_get_modes,
#ifdef RANDR_12_INTERFACE
- .set_property = via_lvds_set_property,
+ .set_property = via_fp_set_property,
#endif
#ifdef RANDR_13_INTERFACE
- .get_property = via_lvds_get_property,
+ .get_property = via_fp_get_property,
#endif
- .destroy = via_lvds_destroy
+ .destroy = via_fp_destroy
};
void
commit c25821629443757582c396fed02cc272657a8c66
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Mon May 29 02:26:57 2017 -0700
Converted relevant FP private record pointer names to pVIAFP
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/src/via_fp.c b/src/via_fp.c
index 311916f..99b6ed7 100644
--- a/src/via_fp.c
+++ b/src/via_fp.c
@@ -994,7 +994,7 @@ viaLVDSGetFPInfoFromScratchPad(xf86OutputPtr output)
{
ScrnInfoPtr pScrn = output->scrn;
vgaHWPtr hwp = VGAHWPTR(pScrn);
- VIAFPPtr pVIAFP = output->driver_private;
+ VIAFPPtr pVIAFP = (VIAFPPtr) output->driver_private;
CARD8 index;
DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
@@ -1250,14 +1250,14 @@ static int
via_lvds_mode_valid(xf86OutputPtr output, DisplayModePtr pMode)
{
ScrnInfoPtr pScrn = output->scrn;
- VIAFPPtr Panel = output->driver_private;
+ VIAFPPtr pVIAFP = (VIAFPPtr) output->driver_private;
- if (Panel->NativeWidth < pMode->HDisplay ||
- Panel->NativeHeight < pMode->VDisplay)
+ if (pVIAFP->NativeWidth < pMode->HDisplay ||
+ pVIAFP->NativeHeight < pMode->VDisplay)
return MODE_PANEL;
- if (!Panel->Scale && Panel->NativeHeight != pMode->VDisplay &&
- Panel->NativeWidth != pMode->HDisplay)
+ if (!pVIAFP->Scale && pVIAFP->NativeHeight != pMode->VDisplay &&
+ pVIAFP->NativeWidth != pMode->HDisplay)
return MODE_PANEL;
if (!ViaModeDotClockTranslate(pScrn, pMode))
@@ -1270,14 +1270,14 @@ static Bool
via_lvds_mode_fixup(xf86OutputPtr output, DisplayModePtr mode,
DisplayModePtr adjusted_mode)
{
- VIAFPPtr Panel = output->driver_private;
+ VIAFPPtr pVIAFP = (VIAFPPtr) output->driver_private;
xf86SetModeCrtc(adjusted_mode, 0);
- if (!Panel->Center && (mode->HDisplay < Panel->NativeWidth ||
- mode->VDisplay < Panel->NativeHeight)) {
- Panel->Scale = TRUE;
+ if (!pVIAFP->Center && (mode->HDisplay < pVIAFP->NativeWidth ||
+ mode->VDisplay < pVIAFP->NativeHeight)) {
+ pVIAFP->Scale = TRUE;
} else {
- Panel->Scale = FALSE;
+ pVIAFP->Scale = FALSE;
ViaPanelCenterMode(mode, adjusted_mode);
}
return TRUE;
@@ -1305,16 +1305,16 @@ static void
via_lvds_mode_set(xf86OutputPtr output, DisplayModePtr mode,
DisplayModePtr adjusted_mode)
{
- VIAFPPtr Panel = output->driver_private;
ScrnInfoPtr pScrn = output->scrn;
drmmode_crtc_private_ptr iga = output->crtc->driver_private;
VIAPtr pVia = VIAPTR(pScrn);
+ VIAFPPtr pVIAFP = (VIAFPPtr) output->driver_private;
if (output->crtc) {
- if (Panel->Scale) {
+ if (pVIAFP->Scale) {
ViaPanelScale(pScrn, mode->HDisplay, mode->VDisplay,
- Panel->NativeWidth,
- Panel->NativeHeight);
+ pVIAFP->NativeWidth,
+ pVIAFP->NativeHeight);
} else {
ViaPanelScaleDisable(pScrn);
}
@@ -1336,7 +1336,7 @@ via_lvds_mode_set(xf86OutputPtr output, DisplayModePtr mode,
case VIA_CX700:
case VIA_VX800:
/* Set LVDS2 output color dithering. */
- viaLVDS2SetDithering(pScrn, Panel->useDithering ? TRUE : FALSE);
+ viaLVDS2SetDithering(pScrn, pVIAFP->useDithering ? TRUE : FALSE);
/* Set LVDS2 output format to sequential mode. */
viaLVDS2SetOutputFormat(pScrn, 0x01);
@@ -1347,7 +1347,7 @@ via_lvds_mode_set(xf86OutputPtr output, DisplayModePtr mode,
case VIA_VX855:
case VIA_VX900:
/* Set LVDS1 output color dithering. */
- viaLVDS1SetDithering(pScrn, Panel->useDithering ? TRUE : FALSE);
+ viaLVDS1SetDithering(pScrn, pVIAFP->useDithering ? TRUE : FALSE);
/* Set LVDS1 output format to sequential mode. */
viaLVDS1SetOutputFormat(pScrn, 0x01);
@@ -1434,9 +1434,9 @@ exit:
static DisplayModePtr
via_lvds_get_modes(xf86OutputPtr output)
{
- VIAFPPtr pPanel = output->driver_private;
ScrnInfoPtr pScrn = output->scrn;
DisplayModePtr pDisplay_Mode = NULL;
+ VIAFPPtr pVIAFP = (VIAFPPtr) output->driver_private;
DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"Entered via_lvds_get_modes.\n"));
@@ -1447,13 +1447,13 @@ via_lvds_get_modes(xf86OutputPtr output)
* Generates a display mode for the native panel resolution,
* using CVT.
*/
- if (pPanel->NativeWidth && pPanel->NativeHeight) {
+ if (pVIAFP->NativeWidth && pVIAFP->NativeHeight) {
VIAPtr pVia = VIAPTR(pScrn);
if (pVia->IsOLPCXO15) {
pDisplay_Mode = xf86DuplicateMode(&OLPCMode);
} else {
- pDisplay_Mode = xf86CVTMode(pPanel->NativeWidth, pPanel->NativeHeight,
+ pDisplay_Mode = xf86CVTMode(pVIAFP->NativeWidth, pVIAFP->NativeHeight,
60.0f, FALSE, FALSE);
}
@@ -1481,7 +1481,7 @@ via_lvds_get_modes(xf86OutputPtr output)
xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
"Invalid Flat Panel Screen Resolution: "
"%dx%d\n",
- pPanel->NativeWidth, pPanel->NativeHeight);
+ pVIAFP->NativeWidth, pVIAFP->NativeHeight);
}
} else {
pDisplay_Mode = xf86OutputGetEDIDModes(output);
commit 527a1b1f6ce447c0048c53db139811cca2fe2409
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Wed May 24 11:07:18 2017 -0700
Made modifications to viaIGA1HWReset
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/src/via_display.c b/src/via_display.c
index 9b5e0c1..dd3a6fb 100644
--- a/src/via_display.c
+++ b/src/via_display.c
@@ -109,29 +109,6 @@ viaSetPaletteLUTAccess(ScrnInfoPtr pScrn, CARD8 displaySource)
}
/*
- * Resets IGA1 hardware.
- */
-static void
-viaIGA1HWReset(ScrnInfoPtr pScrn, CARD8 resetState)
-{
- vgaHWPtr hwp = VGAHWPTR(pScrn);
-
- DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "Entered viaIGA1HWReset.\n"));
-
- /* 3X5.17[7] - IGA1 HW Reset
- * 0: Reset
- * 1: Normal Operation */
- ViaCrtcMask(hwp, 0x17, resetState << 7, 0x80);
- xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "IGA1 HW Reset: %s\n",
- (resetState & 0x01) ? "Off" : "On");
-
- DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "Exiting viaIGA1HWReset.\n"));
-}
-
-/*
* Sets IGA1 color depth.
*/
static void
@@ -3758,7 +3735,7 @@ iga1_crtc_mode_set(xf86CrtcPtr crtc, DisplayModePtr mode,
"Entered iga1_crtc_mode_set.\n"));
/* Put IGA1 into a reset state. */
- viaIGA1HWReset(pScrn, 0x00);
+ viaIGA1HWReset(pScrn, TRUE);
if (!vgaHWInit(pScrn, adjusted_mode)) {
DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
@@ -3796,7 +3773,7 @@ iga1_crtc_mode_set(xf86CrtcPtr crtc, DisplayModePtr mode,
exit:
/* Put IGA1 back into a normal operating state. */
- viaIGA1HWReset(pScrn, 0x01);
+ viaIGA1HWReset(pScrn, FALSE);
DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"Exiting iga1_crtc_mode_set.\n"));
diff --git a/src/via_ums.h b/src/via_ums.h
index a59855b..856412c 100644
--- a/src/via_ums.h
+++ b/src/via_ums.h
@@ -264,6 +264,22 @@ union pllparams {
/*
+ * Resets IGA1 hardware.
+ */
+static inline void
+viaIGA1HWReset(ScrnInfoPtr pScrn, Bool resetState)
+{
+ /* 3X5.17[7] - IGA1 HW Reset
+ * 0: Reset
+ * 1: Normal Operation */
+ ViaCrtcMask(VGAHWPTR(pScrn), 0x17, resetState ? 0x00 : BIT(7),
+ BIT(7));
+ DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "IGA1 HW Reset: %s\n",
+ resetState ? "On" : "Off"));
+}
+
+/*
* Sets IGA1 display output state.
*/
static inline void
commit 72833cffdbc093e54939267ec9f6fcd727b9ef1e
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Wed May 24 10:55:36 2017 -0700
Removed viaIGA1DPMSControl
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/src/via_display.c b/src/via_display.c
index 09db8d3..9b5e0c1 100644
--- a/src/via_display.c
+++ b/src/via_display.c
@@ -132,28 +132,6 @@ viaIGA1HWReset(ScrnInfoPtr pScrn, CARD8 resetState)
}
/*
- * Controls IGA1 DPMS State.
- */
-static void
-viaIGA1DPMSControl(ScrnInfoPtr pScrn, CARD8 dpmsControl)
-{
- vgaHWPtr hwp = VGAHWPTR(pScrn);
-
- DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "Entered viaIGA1DPMSControl.\n"));
-
- /* 3X5.36[5:4] - DPMS Control
- * 00: On
- * 01: Stand-by
- * 10: Suspend
- * 11: Off */
- ViaCrtcMask(hwp, 0x36, dpmsControl << 4, 0x30);
-
- DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "Exiting viaIGA1DPMSControl.\n"));
-}
-
-/*
* Sets IGA1 color depth.
*/
static void
More information about the Openchrome-devel
mailing list