configure.ac | 2 +- src/via_lvds.c | 32 +++++++++++++++++++++++--------- src/via_outputs.c | 7 +++---- src/via_ums.h | 3 +++ 4 files changed, 30 insertions(+), 14 deletions(-)
New commits: commit da9844c6ba255cb4db98bf40e1c2bbca8cf4d9ce Author: Kevin Brace <kevinbr...@gmx.com> Date: Fri Aug 12 22:25:34 2016 -0700 Version bumped to 0.5.128 Signed-off-by: Kevin Brace <kevinbr...@gmx.com> diff --git a/configure.ac b/configure.ac index 916ad6d..6c5af1b 100644 --- a/configure.ac +++ b/configure.ac @@ -23,7 +23,7 @@ # Initialize Autoconf AC_PREREQ(2.57) AC_INIT([xf86-video-openchrome], - [0.5.127], + [0.5.128], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=Driver/openchrome], [xf86-video-openchrome]) commit c2c915e351d2345b36eefae8d89c4e3ec8e925cf Author: Kevin Brace <kevinbr...@gmx.com> Date: Fri Aug 12 22:24:28 2016 -0700 Make LVDS2 dithering programmable Now, LVDS2 output color dithering is set based on the information provided by flat panel screen resolution table. Signed-off-by: Kevin Brace <kevinbr...@gmx.com> diff --git a/src/via_lvds.c b/src/via_lvds.c index cf6852f..a91f30b 100644 --- a/src/via_lvds.c +++ b/src/via_lvds.c @@ -1039,10 +1039,8 @@ via_lvds_mode_set(xf86OutputPtr output, DisplayModePtr mode, case VIA_VX900: viaLVDS2SetDisplaySource(pScrn, iga->index ? 0x01 : 0x00); - /* This part will have to be programmable between 18-bit - * mode and 24-bit mode in the future. */ - /* Turn on 18-bit (dithering) mode for LVDS Channel 2. */ - viaLVDS2SetDithering(pScrn, TRUE); + /* Set LVDS2 output color dithering. */ + viaLVDS2SetDithering(pScrn, Panel->useDithering ? TRUE : FALSE); break; default: break; commit 80056d18ef4985a87b70a880004d9e847a657728 Author: Kevin Brace <kevinbr...@gmx.com> Date: Fri Aug 12 22:16:59 2016 -0700 Changing LVDS FP scratch pad indexing function name ViaPanelGetNativeModeFromScratchPad function's name was changed to viaLVDSGetFPInfoFromScratchPad. Signed-off-by: Kevin Brace <kevinbr...@gmx.com> diff --git a/src/via_lvds.c b/src/via_lvds.c index 9fdcbdb..cf6852f 100644 --- a/src/via_lvds.c +++ b/src/via_lvds.c @@ -736,7 +736,7 @@ ViaGetResolutionIndex(ScrnInfoPtr pScrn, ViaPanelInfoPtr Panel, * Gets the native panel resolution from scratch pad registers. */ static void -ViaPanelGetNativeModeFromScratchPad(xf86OutputPtr output) +viaLVDSGetFPInfoFromScratchPad(xf86OutputPtr output) { ScrnInfoPtr pScrn = output->scrn; vgaHWPtr hwp = VGAHWPTR(pScrn); @@ -744,7 +744,7 @@ ViaPanelGetNativeModeFromScratchPad(xf86OutputPtr output) CARD8 index; DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Entered ViaPanelGetNativeModeFromScratchPad.\n")); + "Entered viaLVDSGetFPInfoFromScratchPad.\n")); index = hwp->readCrtc(hwp, 0x3F) & 0x0F; @@ -769,7 +769,7 @@ ViaPanelGetNativeModeFromScratchPad(xf86OutputPtr output) panel->useDithering ? "On (18-bit)" : "Off (24-bit)"); DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Exiting ViaPanelGetNativeModeFromScratchPad.\n")); + "Exiting viaLVDSGetFPInfoFromScratchPad.\n")); } static int @@ -1132,7 +1132,7 @@ via_lvds_detect(xf86OutputPtr output) cr3b = hwp->readCrtc(hwp, 0x3B) & cr3b_mask; if (cr3b) { - ViaPanelGetNativeModeFromScratchPad(output); + viaLVDSGetFPInfoFromScratchPad(output); if (panel->NativeWidth && panel->NativeHeight) { status = XF86OutputStatusConnected; commit 75f7a2826ab11e7190ddc0f103e377802205e463 Author: Kevin Brace <kevinbr...@gmx.com> Date: Fri Aug 12 22:09:15 2016 -0700 Rewriting ViaPanelGetNativeModeFromScratchPad function Signed-off-by: Kevin Brace <kevinbr...@gmx.com> diff --git a/src/via_lvds.c b/src/via_lvds.c index e7369e3..9fdcbdb 100644 --- a/src/via_lvds.c +++ b/src/via_lvds.c @@ -738,13 +738,13 @@ ViaGetResolutionIndex(ScrnInfoPtr pScrn, ViaPanelInfoPtr Panel, static void ViaPanelGetNativeModeFromScratchPad(xf86OutputPtr output) { - ViaPanelInfoPtr panel = output->driver_private; ScrnInfoPtr pScrn = output->scrn; vgaHWPtr hwp = VGAHWPTR(pScrn); + ViaPanelInfoPtr panel = output->driver_private; CARD8 index; DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "ViaPanelGetNativeModeFromScratchPad\n")); + "Entered ViaPanelGetNativeModeFromScratchPad.\n")); index = hwp->readCrtc(hwp, 0x3F) & 0x0F; @@ -755,7 +755,11 @@ ViaPanelGetNativeModeFromScratchPad(xf86OutputPtr output) panel->useDithering = ViaPanelNativeModes[index].useDithering; xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Native Panel Resolution is %dx%d\n", + "VIA Technologies VGA BIOS Scratch Pad Register " + "Flat Panel Index: %d\n", + panel->NativeModeIndex); + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Flat Panel Native Resolution: %dx%d\n", panel->NativeWidth, panel->NativeHeight); xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Flat Panel Dual Edge Transfer: %s\n", @@ -764,6 +768,8 @@ ViaPanelGetNativeModeFromScratchPad(xf86OutputPtr output) "Flat Panel Output Color Dithering: %s\n", panel->useDithering ? "On (18-bit)" : "Off (24-bit)"); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting ViaPanelGetNativeModeFromScratchPad.\n")); } static int commit ba5a3fca07867b23808c040ba7b300e8566ba440 Author: Kevin Brace <kevinbr...@gmx.com> Date: Fri Aug 12 21:48:34 2016 -0700 Removing several compilation warnings from via_outputs.c Signed-off-by: Kevin Brace <kevinbr...@gmx.com> diff --git a/src/via_outputs.c b/src/via_outputs.c index 1465a38..0ebd8aa 100644 --- a/src/via_outputs.c +++ b/src/via_outputs.c @@ -93,7 +93,7 @@ viaDVP0SetDisplaySource(ScrnInfoPtr pScrn, CARD8 displaySource) DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Entered viaDVP0SetDisplaySource.\n")); - /* Set DVP0 display output source. + /* Set DVP0 display output source. */ /* 3X5.96[4] - DVP0 Data Source Selection * 0: Primary Display * 1: Secondary Display */ @@ -119,7 +119,7 @@ viaDVP1SetDisplaySource(ScrnInfoPtr pScrn, CARD8 displaySource) DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Entered viaDVP1SetDisplaySource.\n")); - /* Set DVP1 display output source. + /* Set DVP1 display output source. */ /* 3X5.9B[4] - DVP1 Data Source Selection * 0: Primary Display * 1: Secondary Display */ @@ -590,12 +590,11 @@ ViaComputeDotClock(unsigned clock) static CARD32 ViaComputeProDotClock(unsigned clock) { - double fvco, fout, fref, err, minErr; + double fvco, fout, err, minErr; CARD32 dr = 0, dn, dm, maxdm, maxdn; CARD32 factual; union pllparams bestClock; - fref = 14.318e6; fout = (double)clock * 1.e3; factual = ~0; commit b4ccfaa80a482e84b62751ef8bf4eca347c9fbaa Author: Kevin Brace <kevinbr...@gmx.com> Date: Fri Aug 12 21:43:22 2016 -0700 Add useDualEdge and useDithering variables to ViaPanelInfo record These were added so that LVDS FP registers related to them can be programmed during screen mode setting. Signed-off-by: Kevin Brace <kevinbr...@gmx.com> diff --git a/src/via_lvds.c b/src/via_lvds.c index 727744d..e7369e3 100644 --- a/src/via_lvds.c +++ b/src/via_lvds.c @@ -751,9 +751,19 @@ ViaPanelGetNativeModeFromScratchPad(xf86OutputPtr output) panel->NativeModeIndex = index; panel->NativeWidth = ViaPanelNativeModes[index].Width; panel->NativeHeight = ViaPanelNativeModes[index].Height; + panel->useDualEdge = ViaPanelNativeModes[index].useDualEdge; + panel->useDithering = ViaPanelNativeModes[index].useDithering; + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Native Panel Resolution is %dx%d\n", panel->NativeWidth, panel->NativeHeight); + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Flat Panel Dual Edge Transfer: %s\n", + panel->useDualEdge ? "On" : "Off"); + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Flat Panel Output Color Dithering: %s\n", + panel->useDithering ? "On (18-bit)" : "Off (24-bit)"); + } static int diff --git a/src/via_ums.h b/src/via_ums.h index 42a3dae..be459cc 100644 --- a/src/via_ums.h +++ b/src/via_ums.h @@ -138,6 +138,9 @@ typedef struct ViaPanelInfo { /* Native physical resolution */ int NativeHeight; int NativeWidth; + Bool useDualEdge; + Bool useDithering; + /* Native resolution index, see via_panel.c */ CARD8 NativeModeIndex; /* Determine if we must use the hardware scaler _______________________________________________ Openchrome-devel mailing list Openchrome-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/openchrome-devel