Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Jan 2017 00:29:55 +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: r432177 - in head/x11-drivers/xf86-video-mga: . files
Message-ID:  <201701230029.v0N0TtRT010331@repo.freebsd.org>

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

Log:
  Update to 1.6.5 which is compatible with new xorg
  
  PR:		216284
  Submitted by:	matthew@reztek.cz

Added:
  head/x11-drivers/xf86-video-mga/files/
  head/x11-drivers/xf86-video-mga/files/patch-src_mga__dac3026.c   (contents, props changed)
  head/x11-drivers/xf86-video-mga/files/patch-src_mga__dacG.c   (contents, props changed)
  head/x11-drivers/xf86-video-mga/files/patch-src_mga__dri.c   (contents, props changed)
  head/x11-drivers/xf86-video-mga/files/patch-src_mga__driver.c   (contents, props changed)
  head/x11-drivers/xf86-video-mga/files/patch-src_mga__merge.c   (contents, props changed)
Modified:
  head/x11-drivers/xf86-video-mga/Makefile
  head/x11-drivers/xf86-video-mga/distinfo

Modified: head/x11-drivers/xf86-video-mga/Makefile
==============================================================================
--- head/x11-drivers/xf86-video-mga/Makefile	Mon Jan 23 00:24:47 2017	(r432176)
+++ head/x11-drivers/xf86-video-mga/Makefile	Mon Jan 23 00:29:55 2017	(r432177)
@@ -1,8 +1,7 @@
 # $FreeBSD$
 
 PORTNAME=	xf86-video-mga
-PORTVERSION=	1.6.4
-PORTREVISION=	1
+PORTVERSION=	1.6.5
 PORTEPOCH=	3
 CATEGORIES=	x11-drivers
 
@@ -10,8 +9,6 @@ MAINTAINER=	x11@FreeBSD.org
 COMMENT=	X.Org mga display driver
 
 USE_GL=		gl
-
 XORG_CAT=	driver
-USE_XORG=	xf86driproto glproto
 
 .include <bsd.port.mk>

Modified: head/x11-drivers/xf86-video-mga/distinfo
==============================================================================
--- head/x11-drivers/xf86-video-mga/distinfo	Mon Jan 23 00:24:47 2017	(r432176)
+++ head/x11-drivers/xf86-video-mga/distinfo	Mon Jan 23 00:29:55 2017	(r432177)
@@ -1,2 +1,3 @@
-SHA256 (xorg/driver/xf86-video-mga-1.6.4.tar.bz2) = 48c6690b6751c76f53de64f8dbeaa9d6c62dbcfe890c768fd87167951247d44f
-SIZE (xorg/driver/xf86-video-mga-1.6.4.tar.bz2) = 475858
+TIMESTAMP = 1484715465
+SHA256 (xorg/driver/xf86-video-mga-1.6.5.tar.bz2) = b663cd8e6364f7c4e2637b9fcab9861d0e3971518c73b00d213f6545a1289422
+SIZE (xorg/driver/xf86-video-mga-1.6.5.tar.bz2) = 478350

Added: head/x11-drivers/xf86-video-mga/files/patch-src_mga__dac3026.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/x11-drivers/xf86-video-mga/files/patch-src_mga__dac3026.c	Mon Jan 23 00:29:55 2017	(r432177)
@@ -0,0 +1,15 @@
+# Fix a style warning
+#
+--- src/mga_dac3026.c.orig	2017-01-17 22:40:29 UTC
++++ src/mga_dac3026.c
+@@ -886,8 +886,8 @@ MGA3026LoadCursorImage(
+     outTi3026dreg(TVP3026_WADR_PAL, 0x00); 
+ 
+     while(i--) {
+-	while (INREG8(0x1FDA) & 0x01);
+-	while (!(INREG8(0x1FDA) & 0x01));
++	while (INREG8(0x1FDA) & 0x01) {}
++	while (!(INREG8(0x1FDA) & 0x01)) {}
+         outTi3026dreg(TVP3026_CUR_RAM, *(src++));    
+     }
+ }

Added: head/x11-drivers/xf86-video-mga/files/patch-src_mga__dacG.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/x11-drivers/xf86-video-mga/files/patch-src_mga__dacG.c	Mon Jan 23 00:29:55 2017	(r432177)
@@ -0,0 +1,31 @@
+# Use fabs for doubles
+# Cast away a couple type warnings as done elsewhere
+#
+--- src/mga_dacG.c.orig	2017-01-17 22:40:29 UTC
++++ src/mga_dacG.c
+@@ -940,8 +940,8 @@ MGAGCalcClock ( ScrnInfoPtr pScrn, long 
+ 			/*
+ 			 * Pick the closest frequency.
+ 			 */
+-			if ( abs(calc_f - f_vco) < m_err ) {
+-				m_err = abs(calc_f - f_vco);
++			if ( fabs(calc_f - f_vco) < m_err ) {
++				m_err = fabs(calc_f - f_vco);
+ 				*best_m = m;
+ 				*best_n = n;
+ 			}
+@@ -2124,12 +2124,12 @@ mgag_create_i2c_bus(const char *name, un
+     I2CBusPtr I2CPtr = xf86CreateI2CBusRec();
+ 
+     if (I2CPtr != NULL) {
+-	I2CPtr->BusName = name;
++	I2CPtr->BusName = (char *)name;
+ 	I2CPtr->scrnIndex = scrn_index;
+ 	I2CPtr->I2CPutBits = MGAG_I2CPutBits;
+ 	I2CPtr->I2CGetBits = MGAG_I2CGetBits;
+ 	I2CPtr->AcknTimeout = 5;
+-	I2CPtr->DriverPrivate.ptr = & i2c_priv[bus_index];
++	I2CPtr->DriverPrivate.ptr = (void *)&i2c_priv[bus_index];
+ 
+ 	if (!xf86I2CBusInit(I2CPtr)) {
+ 	    xf86DestroyI2CBusRec(I2CPtr, TRUE, TRUE);

Added: head/x11-drivers/xf86-video-mga/files/patch-src_mga__dri.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/x11-drivers/xf86-video-mga/files/patch-src_mga__dri.c	Mon Jan 23 00:29:55 2017	(r432177)
@@ -0,0 +1,22 @@
+# Use the correct constants for this type
+#
+--- src/mga_dri.c.orig	2017-01-17 22:40:29 UTC
++++ src/mga_dri.c
+@@ -316,7 +316,7 @@ static void MGAWaitForIdleDMA( ScrnInfoP
+    for (;;) {
+       do {
+          /* first ask for quiescent and flush */
+-         lock.flags = DRM_LOCK_QUIESCENT | DRM_LOCK_FLUSH;
++         lock.flags = _DRM_LOCK_QUIESCENT | _DRM_LOCK_FLUSH;
+          do {
+ 	    ret = drmCommandWrite( pMga->drmFD, DRM_MGA_FLUSH,
+                                    &lock, sizeof( drm_lock_t ) );
+@@ -324,7 +324,7 @@ static void MGAWaitForIdleDMA( ScrnInfoP
+ 
+          /* if it's still busy just try quiescent */
+          if ( ret == -EBUSY ) { 
+-            lock.flags = DRM_LOCK_QUIESCENT;
++            lock.flags = _DRM_LOCK_QUIESCENT;
+             do {
+ 	       ret = drmCommandWrite( pMga->drmFD, DRM_MGA_FLUSH,
+                                       &lock, sizeof( drm_lock_t ) );

Added: head/x11-drivers/xf86-video-mga/files/patch-src_mga__driver.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/x11-drivers/xf86-video-mga/files/patch-src_mga__driver.c	Mon Jan 23 00:29:55 2017	(r432177)
@@ -0,0 +1,23 @@
+# Correct a string that should be const
+# Cast away a warning as done earlier in the same function
+#
+--- src/mga_driver.c.orig	2017-01-17 22:40:29 UTC
++++ src/mga_driver.c
+@@ -1933,7 +1933,7 @@ MGAPreInit(ScrnInfoPtr pScrn, int flags)
+     } else {
+ 	int from = X_DEFAULT;
+ #ifdef USE_EXA
+-	char *s = xf86GetOptValString(pMga->Options, OPTION_ACCELMETHOD);
++	const char *s = xf86GetOptValString(pMga->Options, OPTION_ACCELMETHOD);
+ #endif
+ 	pMga->NoAccel = FALSE;
+ 	pMga->Exa = FALSE;
+@@ -2644,7 +2644,7 @@ MGAMapMem(ScrnInfoPtr pScrn)
+ 	    err = pci_device_map_range(dev,
+ 				       region->base_addr, region->size,
+ 				       PCI_DEV_MAP_FLAG_WRITABLE,
+-				       &pMga->IOBase);
++				       (void **)&pMga->IOBase);
+ 
+ 	    if (err) {
+ 	      xf86DrvMsg(pScrn->scrnIndex, X_ERROR,

Added: head/x11-drivers/xf86-video-mga/files/patch-src_mga__merge.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/x11-drivers/xf86-video-mga/files/patch-src_mga__merge.c	Mon Jan 23 00:29:55 2017	(r432177)
@@ -0,0 +1,58 @@
+# Correct strings that should be const
+#
+--- src/mga_merge.c.orig	2017-01-17 22:40:29 UTC
++++ src/mga_merge.c
+@@ -18,12 +18,12 @@
+ #include "fbdevhw.h"
+ 
+ static int
+-StrToRanges(range* r, char* s) {
++StrToRanges(range* r, const char* s) {
+     float num=0.0;
+     int rangenum=0;
+     Bool gotdash = FALSE;
+     Bool nextdash = FALSE;
+-    char* strnum=NULL;
++    const char* strnum=NULL;
+     do {
+         switch(*s) {
+             case '0': case '1': case '2': case '3': case '4': case '5':
+@@ -117,7 +117,7 @@ CopyModeNLink(ScrnInfoPtr pScrn, Display
+ }
+ 
+ static DisplayModePtr
+-GetModeFromName(char* str, DisplayModePtr i)
++GetModeFromName(const char* str, DisplayModePtr i)
+ {
+     DisplayModePtr c = i;
+     if(!i) return NULL;
+@@ -130,9 +130,9 @@ GetModeFromName(char* str, DisplayModePt
+ 
+ /* takes a config file string of MetaModes and generates a MetaModeList */
+ static DisplayModePtr
+-GenerateModeList(ScrnInfoPtr pScrn, char* str,
++GenerateModeList(ScrnInfoPtr pScrn, const char* str,
+ 		 DisplayModePtr i, DisplayModePtr j, MgaScrn2Rel srel) {
+-    char* strmode = str;
++    const char* strmode = str;
+     char modename[256];
+     Bool gotdash = FALSE;
+     MgaScrn2Rel sr;
+@@ -165,7 +165,7 @@ GenerateModeList(ScrnInfoPtr pScrn, char
+                     } else {
+                         mode1 = GetModeFromName(modename,i);
+                         if(!mode1) {
+-                            char* tmps = str;
++                            const char* tmps = str;
+                             xf86DrvMsg(pScrn->scrnIndex, X_CONFIG,
+                                 "Mode: \"%s\" is not a supported mode for monitor 1\n",modename);
+                             /* find if a monitor2 mode follows */
+@@ -232,7 +232,7 @@ MGAPreInitMergedFB(ScrnInfoPtr pScrn1, i
+     MGAPtr pMga1;
+     MessageType from;
+     int i;
+-    char* s;
++    const char* s;
+     ClockRangePtr clockRanges;
+     MgaScrn2Rel Monitor2Pos;
+ 



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