Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Jan 2017 22:43:23 +0000 (UTC)
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r432301 - in head/x11-drivers/xf86-video-apm: . files
Message-ID:  <201701232243.v0NMhNRJ065757@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bapt
Date: Mon Jan 23 22:43:23 2017
New Revision: 432301
URL: https://svnweb.freebsd.org/changeset/ports/432301

Log:
  Import few patches from upstream to allow building with newer xorg
  
  Note that those drivers are barely maintained and might disappear in the futur
  
  PR:		216279
  Submitted by:	matthew@reztek.cz

Added:
  head/x11-drivers/xf86-video-apm/files/patch-src_apm__driver.c   (contents, props changed)
Modified:
  head/x11-drivers/xf86-video-apm/Makefile
  head/x11-drivers/xf86-video-apm/files/patch-src_apm.h

Modified: head/x11-drivers/xf86-video-apm/Makefile
==============================================================================
--- head/x11-drivers/xf86-video-apm/Makefile	Mon Jan 23 22:40:16 2017	(r432300)
+++ head/x11-drivers/xf86-video-apm/Makefile	Mon Jan 23 22:43:23 2017	(r432301)
@@ -2,7 +2,7 @@
 
 PORTNAME=	xf86-video-apm
 PORTVERSION=	1.2.5
-PORTREVISION=	6
+PORTREVISION=	7
 CATEGORIES=	x11-drivers
 
 MAINTAINER=	x11@FreeBSD.org

Modified: head/x11-drivers/xf86-video-apm/files/patch-src_apm.h
==============================================================================
--- head/x11-drivers/xf86-video-apm/files/patch-src_apm.h	Mon Jan 23 22:40:16 2017	(r432300)
+++ head/x11-drivers/xf86-video-apm/files/patch-src_apm.h	Mon Jan 23 22:43:23 2017	(r432301)
@@ -1,4 +1,13 @@
---- src/apm.h.orig	2012-07-17 04:52:01 UTC
+From 9f67408e4f078e907fbf4feb45cfdcfd0cdebcca Mon Sep 17 00:00:00 2001
+From: Adam Jackson <ajax@redhat.com>
+Date: Wed, 9 Jan 2013 22:03:29 -0500
+Subject: Remove #include "mibstore.h"
+
+Signed-off-by: Adam Jackson <ajax@redhat.com>
+
+diff --git a/src/apm.h b/src/apm.h
+index a3c06f8..365e5e2 100644
+--- src/apm.h	2012-07-17 04:52:01 UTC
 +++ src/apm.h
 @@ -33,9 +33,6 @@
  /* All drivers initialising the SW cursor need this */
@@ -10,3 +19,6 @@
  /* I2C support */
  #include "xf86i2c.h"
  
+-- 
+cgit v0.10.2
+

Added: head/x11-drivers/xf86-video-apm/files/patch-src_apm__driver.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/x11-drivers/xf86-video-apm/files/patch-src_apm__driver.c	Mon Jan 23 22:43:23 2017	(r432301)
@@ -0,0 +1,60 @@
+# Remove miInitializeBackingStore; it no longer exists and
+# should have been removed with the mibstore.h include
+#
+# Replace xf86UnMapVidMem with pci_device_unmap_range
+#
+# Correct one string that should be const
+#
+--- src/apm_driver.c.orig	2012-07-17 04:52:01 UTC
++++ src/apm_driver.c
+@@ -355,7 +355,8 @@ ApmPreInit(ScrnInfoPtr pScrn, int flags)
+     EntityInfoPtr	pEnt;
+     vgaHWPtr		hwp;
+     MessageType		from;
+-    char		*mod = NULL, *req = NULL, *s;
++    char		*mod = NULL, *req = NULL;
++    const char		*s;
+     ClockRangePtr	clockRanges;
+     int			i;
+     xf86MonPtr		MonInfo = NULL;
+@@ -751,7 +752,11 @@ ApmPreInit(ScrnInfoPtr pScrn, int flags)
+ 	LinMap[0xFFECDB] = db;
+ 	LinMap[0xFFECD9] = d9;
+ 	/*pciWriteLong(pApm->PciTag, PCI_CMD_STAT_REG, save);*/
++#ifndef XSERVER_LIBPCIACCESS
+ 	xf86UnMapVidMem(pScrn->scrnIndex, (pointer)LinMap, pApm->LinMapSize);
++#else
++	pci_device_unmap_range(pApm->PciInfo, (pointer)LinMap, pApm->LinMapSize);
++#endif
+ 	from = X_PROBED;
+     }
+     else {
+@@ -1134,12 +1139,19 @@ ApmUnmapMem(ScrnInfoPtr pScrn)
+ 	    WRXB(0xDB, pApm->db);
+ 	}
+ 	WRXB(0xC9, pApm->c9);
++#ifndef XSERVER_LIBPCIACCESS
+ 	xf86UnMapVidMem(pScrn->scrnIndex, (pointer)pApm->LinMap, pApm->LinMapSize);
++#else
++	pci_device_unmap_range(pApm->PciInfo, (pointer)pApm->LinMap, pApm->LinMapSize);
++#endif
+ 	pApm->LinMap = NULL;
+     }
+     else if (pApm->FbBase)
++#ifndef XSERVER_LIBPCIACCESS
+ 	xf86UnMapVidMem(pScrn->scrnIndex, (pointer)pApm->LinMap, 0x10000);
+-
++#else
++	pci_device_unmap_range(pApm->PciInfo, (pointer)pApm->LinMap, 0x10000);
++#endif
+     return TRUE;
+ }
+ 
+@@ -1784,7 +1796,6 @@ ApmScreenInit(SCREEN_INIT_ARGS_DECL)
+     }
+ #endif
+ 
+-    miInitializeBackingStore(pScreen);
+     xf86SetBackingStore(pScreen);
+     xf86SetSilkenMouse(pScreen);
+ 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201701232243.v0NMhNRJ065757>