diff options
author | jakllsch <jakllsch@pkgsrc.org> | 2010-10-27 16:48:26 +0000 |
---|---|---|
committer | jakllsch <jakllsch@pkgsrc.org> | 2010-10-27 16:48:26 +0000 |
commit | eba8bfe1c48485873ffa46a71e1c472ffc5ad4cb (patch) | |
tree | c0408992342e5734a915d28bc3d7aa4ed35f7e0d /x11/xf86-video-ati | |
parent | 812790869b9552363de91c423e657122b9a72103 (diff) | |
download | pkgsrc-eba8bfe1c48485873ffa46a71e1c472ffc5ad4cb.tar.gz |
Backport upstream bugfix for PR#40149.
"Save and restore the palettes on VT switch."
upstream commits:
5efdf514ab0e5439114e8dd7a49105812155eb69
fc7aa6e3bbb86eaa2f34b827629f7e82cde65ac7
Diffstat (limited to 'x11/xf86-video-ati')
-rw-r--r-- | x11/xf86-video-ati/Makefile | 4 | ||||
-rw-r--r-- | x11/xf86-video-ati/distinfo | 5 | ||||
-rw-r--r-- | x11/xf86-video-ati/patches/patch-aa | 96 |
3 files changed, 101 insertions, 4 deletions
diff --git a/x11/xf86-video-ati/Makefile b/x11/xf86-video-ati/Makefile index 1b67e18cee2..db4e6e84724 100644 --- a/x11/xf86-video-ati/Makefile +++ b/x11/xf86-video-ati/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.17 2010/09/14 11:03:12 wiz Exp $ +# $NetBSD: Makefile,v 1.18 2010/10/27 16:48:26 jakllsch Exp $ DISTNAME= xf86-video-ati-6.12.4 -PKGREVISION= 3 +PKGREVISION= 4 CATEGORIES= x11 MASTER_SITES= ${MASTER_SITE_XORG:=driver/} EXTRACT_SUFX= .tar.bz2 diff --git a/x11/xf86-video-ati/distinfo b/x11/xf86-video-ati/distinfo index d368ff19fff..6eac5d3b865 100644 --- a/x11/xf86-video-ati/distinfo +++ b/x11/xf86-video-ati/distinfo @@ -1,6 +1,7 @@ -$NetBSD: distinfo,v 1.11 2009/09/11 07:29:42 hasso Exp $ +$NetBSD: distinfo,v 1.12 2010/10/27 16:48:26 jakllsch Exp $ SHA1 (xf86-video-ati-6.12.4.tar.bz2) = efd9b9392787251756bbce6afc9715c417dae68f RMD160 (xf86-video-ati-6.12.4.tar.bz2) = c1d6700bfe52977c863eb05cc63dfad52d405c00 Size (xf86-video-ati-6.12.4.tar.bz2) = 915124 bytes -SHA1 (patch-ac) = e8b4eb3f92ccb4f4741d9a1abf444eea01b74ca0 +SHA1 (patch-aa) = 6168528ab4e305063cc282b7e6c4b5bca0c22725 +SHA1 (patch-ac) = 0275e7a5fd95d41c05eb779ed3141465a98300d2 diff --git a/x11/xf86-video-ati/patches/patch-aa b/x11/xf86-video-ati/patches/patch-aa new file mode 100644 index 00000000000..a9fd7807c72 --- /dev/null +++ b/x11/xf86-video-ati/patches/patch-aa @@ -0,0 +1,96 @@ +$NetBSD: patch-aa,v 1.7 2010/10/27 16:48:26 jakllsch Exp $ + +--- src/radeon_driver.c.orig 2009-09-10 23:18:42.000000000 +0000 ++++ src/radeon_driver.c +@@ -4246,8 +4246,6 @@ static void RADEONSaveMemMapRegisters(Sc + } + } + +- +-#if 0 + /* Read palette data */ + static void RADEONSavePalette(ScrnInfoPtr pScrn, RADEONSavePtr save) + { +@@ -4255,19 +4253,37 @@ static void RADEONSavePalette(ScrnInfoPt + unsigned char *RADEONMMIO = info->MMIO; + int i; + +-#ifdef ENABLE_FLAT_PANEL +- /* Select palette 0 (main CRTC) if using FP-enabled chip */ +- /* if (info->Port1 == MT_DFP) PAL_SELECT(1); */ +-#endif + PAL_SELECT(1); + INPAL_START(0); +- for (i = 0; i < 256; i++) save->palette2[i] = INPAL_NEXT(); ++ for (i = 0; i < 256; i++) { ++ save->palette2[i] = INREG(RADEON_PALETTE_30_DATA); ++ } ++ + PAL_SELECT(0); + INPAL_START(0); +- for (i = 0; i < 256; i++) save->palette[i] = INPAL_NEXT(); +- save->palette_valid = TRUE; ++ for (i = 0; i < 256; i++) { ++ save->palette[i] = INREG(RADEON_PALETTE_30_DATA); ++ } ++} ++ ++static void RADEONRestorePalette(ScrnInfoPtr pScrn, RADEONSavePtr restore) ++{ ++ RADEONInfoPtr info = RADEONPTR(pScrn); ++ unsigned char *RADEONMMIO = info->MMIO; ++ int i; ++ ++ PAL_SELECT(1); ++ OUTPAL_START(0); ++ for (i = 0; i < 256; i++) { ++ OUTREG(RADEON_PALETTE_30_DATA, restore->palette2[i]); ++ } ++ ++ PAL_SELECT(0); ++ OUTPAL_START(0); ++ for (i = 0; i < 256; i++) { ++ OUTREG(RADEON_PALETTE_30_DATA, restore->palette[i]); ++ } + } +-#endif + + static void + avivo_save(ScrnInfoPtr pScrn, RADEONSavePtr save) +@@ -5134,6 +5150,8 @@ static void RADEONSave(ScrnInfoPtr pScrn + RADEONSaveCrtcRegisters(pScrn, save); + RADEONSaveFPRegisters(pScrn, save); + RADEONSaveDACRegisters(pScrn, save); ++ RADEONSavePalette(pScrn, save); ++ + if (pRADEONEnt->HasCRTC2) { + RADEONSaveCrtc2Registers(pScrn, save); + RADEONSavePLL2Registers(pScrn, save); +@@ -5252,24 +5270,15 @@ static void RADEONRestore(ScrnInfoPtr pS + if (IS_AVIVO_VARIANT) + avivo_restore_vga_regs(pScrn, restore); + +- if (!IS_AVIVO_VARIANT) ++ if (!IS_AVIVO_VARIANT) { ++ RADEONRestorePalette(pScrn, restore); + RADEONRestoreDACRegisters(pScrn, restore); +- ++ } + #if 0 + RADEONWaitForVerticalSync(pScrn); + #endif + } + +-#if 0 +-/* Define initial palette for requested video mode. This doesn't do +- * anything for XFree86 4.0. +- */ +-static void RADEONInitPalette(RADEONSavePtr save) +-{ +- save->palette_valid = FALSE; +-} +-#endif +- + static Bool RADEONSaveScreen(ScreenPtr pScreen, int mode) + { + ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; |