[Openchrome-devel] xf86-video-openchrome: 3 commits - configure.ac src/via_display.c src/via_outputs.c src/via_ums.c src/via_ums.h
Luc Verhaegen
libv at skynet.be
Sun May 1 17:04:39 UTC 2016
On Sun, May 01, 2016 at 09:21:48AM -0700, Kevin Brace wrote:
> configure.ac | 2 -
> src/via_display.c | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
> src/via_outputs.c | 6 ++--
> src/via_ums.c | 2 -
> src/via_ums.h | 3 +-
> 5 files changed, 74 insertions(+), 6 deletions(-)
>
> New commits:
> commit f77a2fa21101322019b5eb426c19a2b0a3ba0df8
> Author: Kevin Brace <kevinbrace at gmx.com>
> Date: Sun May 1 09:17:37 2016 -0700
>
> Version bumped to 0.4.144
>
> Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
>
> diff --git a/configure.ac b/configure.ac
> index b55a714..b1a6f7f 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -23,7 +23,7 @@
> # Initialize Autoconf
> AC_PREREQ(2.57)
> AC_INIT([xf86-video-openchrome],
> - [0.4.143],
> + [0.4.144],
> [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=Driver/openchrome],
> [xf86-video-openchrome])
>
> commit 70d89a2e02213522ab484c5437178602e4898231
> Author: Kevin Brace <kevinbrace at gmx.com>
> Date: Sun May 1 09:13:57 2016 -0700
>
> Added viaIGAInitCommon function
>
> This function helps initialize the common (shared) registers between
> IGA1 and IGA2. Whenever there is a mode set, IGA1 and IGA2 will both
> call this function.
>
> Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
>
> diff --git a/src/via_display.c b/src/via_display.c
> index c832ccb..ad44a18 100644
> --- a/src/via_display.c
> +++ b/src/via_display.c
> @@ -285,6 +285,71 @@ ViaCRTCInit(ScrnInfoPtr pScrn)
> ViaCRTCSetAttributeRegisters(pScrn);
> }
>
> +/*
> + * Initialize common IGA (Integrated Graphics Accelerator) registers.
> + */
> +void
> +viaIGAInitCommon(ScrnInfoPtr pScrn)
> +{
> + vgaHWPtr hwp = VGAHWPTR(pScrn);
> + CARD8 temp;
> +
> + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
> + "Entered viaIGAInitCommon.\n"));
> +
> + /* Unlock VIA Technologies extended VGA registers. */
> + /* 3C5.10[0] - Unlock Accessing of I/O Space
> + * 0: Disable
> + * 1: Enable */
> + ViaSeqMask(hwp, 0x10, 0x01, 0x01);
Datasheet inside the driver is of little value when you have actual
datasheets.
Btw, you got those from VIA and intel because I and Egbert Eich
convinced AMD to do so for the first time since 3dfx was bought out.
> +
> + ViaCRTCSetGraphicsRegisters(pScrn);
> + ViaCRTCSetAttributeRegisters(pScrn);
> +
> + temp = hwp->readSeq(hwp, 0x15);
> + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
> + "SR15: 0x%02X\n", temp));
Unused variable warning.
> + /* Be careful with 3C5.15[5].
> + * It must be set to 1 for correct operation. */
> + /* 3C5.15[7] - 8/6 Bits LUT
> + * 0: 6-bit
> + * 1: 8-bit
> + * 3C5.15[6] - Text Column Control
> + * 0: 80 column
> + * 1: 132 column
> + * 3C5.15[5] - Wrap Around Disable
> + * 0: Disable (For Mode 0-13)
> + * 1: Enable
> + * 3C5.15[4] - Hi Color Mode Select
> + * 0: 555
> + * 1: 565
> + * 3C5.15[3:2] - Display Color Depth Select
> + * 00: 8bpp
> + * 01: 16bpp
> + * 10: 30bpp
> + * 11: 32bpp
> + * 3C5.15[1] - Extended Display Mode Enable
> + * 0: Disable
> + * 1: Enable
> + * 3C5.15[0] - Reserved */
> + ViaSeqMask(hwp, 0x15, 0x22, 0x62);
> +
> + temp = hwp->readSeq(hwp, 0x1A);
> + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
> + "SR1A: 0x%02X\n", temp));
Unused variable warning.
> + /* 3C5.1A[7]: Read Cache Enable
> + * 0 = Disable
> + * 1 = Enable
> + * 3C5.1A[3]: Extended Mode Memory Access Enable
> + * 0 = Disable
> + * 1 = Enable */
> + ViaSeqMask(hwp, 0x1A, 0x88, 0x88);
> +
> + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
> + "Exiting viaIGAInitCommon.\n"));
> +}
> +
> void
> viaIGA1SetDisplayRegister(ScrnInfoPtr pScrn, DisplayModePtr mode)
> {
> @@ -1268,6 +1333,7 @@ iga1_crtc_mode_set(xf86CrtcPtr crtc, DisplayModePtr mode,
> /* Turn off IGA1 during mode setting. */
> viaIGA1DPMSControl(pScrn, 0x03);
>
> + viaIGAInitCommon(pScrn);
> ViaCRTCInit(pScrn);
> viaIGA1SetMode(pScrn, adjusted_mode);
>
> @@ -1680,6 +1746,7 @@ iga2_crtc_mode_set(xf86CrtcPtr crtc, DisplayModePtr mode,
> /* Turn off IGA2 during mode setting. */
> viaIGA2Screen(pScrn, FALSE);
>
> + viaIGAInitCommon(pScrn);
Do you really want to run this code again when it already was run on
Crtc1, which is the one that usually fully initialized already?
> ViaCRTCInit(pScrn);
> viaIGA2SetMode(pScrn, adjusted_mode);
> viaIGA2DisplayChannel(pScrn, TRUE);
> diff --git a/src/via_ums.h b/src/via_ums.h
> index 928839b..53d28d7 100644
> --- a/src/via_ums.h
> +++ b/src/via_ums.h
> @@ -212,6 +212,7 @@ void ViaDisplayEnableSimultaneous(ScrnInfoPtr pScrn);
> void ViaDisplayDisableSimultaneous(ScrnInfoPtr pScrn);
> void ViaGammaDisable(ScrnInfoPtr pScrn);
> void ViaCRTCInit(ScrnInfoPtr pScrn);
> +void viaIGAInitCommon(ScrnInfoPtr pScrn);
> void viaIGA1SetFBStartingAddress(xf86CrtcPtr crtc, int x, int y);
> void viaIGA1SetDisplayRegister(ScrnInfoPtr pScrn, DisplayModePtr mode);
> void viaIGA1SetMode(ScrnInfoPtr pScrn, DisplayModePtr mode);
> commit bed15c0f7f6760884237ce83cca5fb74d386ad2e
> Author: Kevin Brace <kevinbrace at gmx.com>
> Date: Sun May 1 09:06:07 2016 -0700
>
> Changing ViaOutputsDetect to viaOutputDetect
>
> This function is located inside via_outputs.c.
>
> Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
>
> diff --git a/src/via_outputs.c b/src/via_outputs.c
> index 4d40957..bc79d4e 100644
> --- a/src/via_outputs.c
> +++ b/src/via_outputs.c
> @@ -996,13 +996,13 @@ via_dvi_init(ScrnInfoPtr pScrn)
> }
>
> void
> -ViaOutputsDetect(ScrnInfoPtr pScrn)
> +viaOutputDetect(ScrnInfoPtr pScrn)
> {
> VIAPtr pVia = VIAPTR(pScrn);
> VIABIOSInfoPtr pBIOSInfo = pVia->pBIOSInfo;
>
> DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
> - "Entered ViaOutputsDetect.\n"));
> + "Entered viaOutputDetect.\n"));
>
> pBIOSInfo->analog = NULL;
>
> @@ -1025,7 +1025,7 @@ ViaOutputsDetect(ScrnInfoPtr pScrn)
> */
>
> DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
> - "Exiting ViaOutputsDetect.\n"));
> + "Exiting viaOutputDetect.\n"));
> }
>
> #ifdef HAVE_DEBUG
> diff --git a/src/via_ums.c b/src/via_ums.c
> index 4f12b55..83ade2e 100644
> --- a/src/via_ums.c
> +++ b/src/via_ums.c
> @@ -1041,7 +1041,7 @@ umsCrtcInit(ScrnInfoPtr pScrn)
>
> xf86CrtcSetSizeRange(pScrn, 320, 200, max_pitch, max_height);
>
> - ViaOutputsDetect(pScrn);
> + viaOutputDetect(pScrn);
>
> return TRUE;
> }
> diff --git a/src/via_ums.h b/src/via_ums.h
> index 78f94cf..928839b 100644
> --- a/src/via_ums.h
> +++ b/src/via_ums.h
> @@ -189,7 +189,7 @@ Bool umsPreInit(ScrnInfoPtr pScrn);
> Bool umsCrtcInit(ScrnInfoPtr pScrn);
>
> /* via_output.c */
> -void ViaOutputsDetect(ScrnInfoPtr pScrn);
> +void viaOutputDetect(ScrnInfoPtr pScrn);
> CARD32 ViaGetMemoryBandwidth(ScrnInfoPtr pScrn);
> CARD32 ViaModeDotClockTranslate(ScrnInfoPtr pScrn, DisplayModePtr mode);
> void viaTMDSPower(ScrnInfoPtr pScrn, Bool On);
> _______________________________________________
> Openchrome-devel mailing list
> Openchrome-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/openchrome-devel
Luc Verhaegen.
More information about the Openchrome-devel
mailing list