Module Name:    xsrc
Committed By:   mrg
Date:           Sun Feb 23 06:33:20 UTC 2020

Modified Files:
        xsrc/external/mit/xf86-video-amdgpu/include: config.h
        xsrc/external/mit/xf86-video-ati-kms/dist/src: radeon_kms.c
        xsrc/external/mit/xf86-video-ati-kms/include: config.h
        xsrc/external/mit/xf86-video-geode/dist/src: gx_driver.c
        xsrc/external/mit/xf86-video-s3/dist: compile
        xsrc/external/mit/xf86-video-s3/dist/src: s3.h s3_bios.c s3_driver.c
Removed Files:
        xsrc/external/mit/xf86-video-s3/dist: README

Log Message:
merge xf86-video-ati 19.1.0, xf86-video-amdgpu 19.1.0,
xf86-video-geode 2.11.20, and xf86-video-s3 0.7.0.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 \
    xsrc/external/mit/xf86-video-amdgpu/include/config.h
cvs rdiff -u -r1.8 -r1.9 \
    xsrc/external/mit/xf86-video-ati-kms/dist/src/radeon_kms.c
cvs rdiff -u -r1.10 -r1.11 \
    xsrc/external/mit/xf86-video-ati-kms/include/config.h
cvs rdiff -u -r1.5 -r1.6 \
    xsrc/external/mit/xf86-video-geode/dist/src/gx_driver.c
cvs rdiff -u -r1.1.1.1 -r0 xsrc/external/mit/xf86-video-s3/dist/README
cvs rdiff -u -r1.3 -r1.4 xsrc/external/mit/xf86-video-s3/dist/compile
cvs rdiff -u -r1.7 -r1.8 xsrc/external/mit/xf86-video-s3/dist/src/s3.h
cvs rdiff -u -r1.3 -r1.4 xsrc/external/mit/xf86-video-s3/dist/src/s3_bios.c
cvs rdiff -u -r1.5 -r1.6 xsrc/external/mit/xf86-video-s3/dist/src/s3_driver.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: xsrc/external/mit/xf86-video-amdgpu/include/config.h
diff -u xsrc/external/mit/xf86-video-amdgpu/include/config.h:1.9 xsrc/external/mit/xf86-video-amdgpu/include/config.h:1.10
--- xsrc/external/mit/xf86-video-amdgpu/include/config.h:1.9	Sat Jun  1 06:39:38 2019
+++ xsrc/external/mit/xf86-video-amdgpu/include/config.h	Sun Feb 23 06:33:19 2020
@@ -88,7 +88,7 @@
 #define PACKAGE_NAME "xf86-video-amdgpu"
 
 /* Define to the full name and version of this package. */
-#define PACKAGE_STRING "xf86-video-amdgpu 19.0.1"
+#define PACKAGE_STRING "xf86-video-amdgpu 19.1.0"
 
 /* Define to the one symbol short name of this package. */
 #define PACKAGE_TARNAME "xf86-video-amdgpu"
@@ -97,16 +97,16 @@
 #define PACKAGE_URL ""
 
 /* Define to the version of this package. */
-#define PACKAGE_VERSION "19.0.1"
+#define PACKAGE_VERSION "19.1.0"
 
 /* Major version of this package */
 #define PACKAGE_VERSION_MAJOR 19
 
 /* Minor version of this package */
-#define PACKAGE_VERSION_MINOR 0
+#define PACKAGE_VERSION_MINOR 1
 
 /* Patch version of this package */
-#define PACKAGE_VERSION_PATCHLEVEL 1
+#define PACKAGE_VERSION_PATCHLEVEL 0
 
 /* Define to 1 if you have the ANSI C header files. */
 #define STDC_HEADERS 1
@@ -118,7 +118,7 @@
 #define USE_SYS_ENDIAN_H 1
 
 /* Version number of package */
-#define VERSION "19.0.1"
+#define VERSION "19.1.0"
 
 /* Enable large inode numbers on Mac OS X 10.5.  */
 #ifndef _DARWIN_USE_64_BIT_INODE

Index: xsrc/external/mit/xf86-video-ati-kms/dist/src/radeon_kms.c
diff -u xsrc/external/mit/xf86-video-ati-kms/dist/src/radeon_kms.c:1.8 xsrc/external/mit/xf86-video-ati-kms/dist/src/radeon_kms.c:1.9
--- xsrc/external/mit/xf86-video-ati-kms/dist/src/radeon_kms.c:1.8	Sat Jun  1 07:25:41 2019
+++ xsrc/external/mit/xf86-video-ati-kms/dist/src/radeon_kms.c	Sun Feb 23 06:33:19 2020
@@ -1917,19 +1917,15 @@ Bool RADEONPreInit_KMS(ScrnInfoPtr pScrn
 
     if (!pScrn->is_gpu) {
 	if (info->dri2.pKernelDRMVersion->version_minor >= 8) {
-	    Bool sw_cursor = xf86ReturnOptValBool(info->Options,
-						  OPTION_SW_CURSOR, FALSE);
-
 	    info->allowPageFlip = xf86ReturnOptValBool(info->Options,
 						       OPTION_PAGE_FLIP, TRUE);
 
-	    if (sw_cursor || info->shadow_primary) {
+	    if (info->shadow_primary) {
 		xf86DrvMsg(pScrn->scrnIndex,
 			   info->allowPageFlip ? X_WARNING : X_DEFAULT,
 			   "KMS Pageflipping: disabled%s\n",
 			   info->allowPageFlip ?
-			   (sw_cursor ? " because of SWcursor" :
-			    " because of ShadowPrimary") : "");
+			   " because of ShadowPrimary" : "");
 		info->allowPageFlip = FALSE;
 	    } else {
 		xf86DrvMsg(pScrn->scrnIndex, X_INFO,
@@ -2606,16 +2602,25 @@ CARD32 cleanup_black_fb(OsTimerPtr timer
 }
 
 static void
-pixmap_unref_fb(void *value, XID id, void *cdata)
+pixmap_unref_fb(PixmapPtr pixmap)
 {
-    PixmapPtr pixmap = value;
-    RADEONEntPtr pRADEONEnt = cdata;
+    ScrnInfoPtr scrn = xf86ScreenToScrn(pixmap->drawable.pScreen);
     struct drmmode_fb **fb_ptr = radeon_pixmap_get_fb_ptr(pixmap);
+    RADEONEntPtr pRADEONEnt = RADEONEntPriv(scrn);
 
     if (fb_ptr)
 	drmmode_fb_reference(pRADEONEnt->fd, fb_ptr, NULL);
 }
 
+static void
+client_pixmap_unref_fb(void *value, XID id, void *pScreen)
+{
+    PixmapPtr pixmap = value;
+
+    if (pixmap->drawable.pScreen == pScreen)
+	pixmap_unref_fb(pixmap);
+}
+
 void RADEONLeaveVT_KMS(ScrnInfoPtr pScrn)
 {
     RADEONInfoPtr  info  = RADEONPTR(pScrn);
@@ -2633,6 +2638,12 @@ void RADEONLeaveVT_KMS(ScrnInfoPtr pScrn
 	unsigned w = 0, h = 0;
 	int i;
 
+	/* If we're called from CloseScreen, trying to clear the black
+	 * scanout BO will likely crash and burn
+	 */
+	if (!pScreen->GCperDepth[0])
+	    goto hide_cursors;
+
 	/* Compute maximum scanout dimensions of active CRTCs */
 	for (i = 0; i < xf86_config->num_crtc; i++) {
 	    crtc = xf86_config->crtc[i];
@@ -2671,11 +2682,9 @@ void RADEONLeaveVT_KMS(ScrnInfoPtr pScrn
 
 			if (pScrn->is_gpu) {
 			    if (drmmode_crtc->scanout[0].pixmap)
-				pixmap_unref_fb(drmmode_crtc->scanout[0].pixmap,
-						None, pRADEONEnt);
+				pixmap_unref_fb(drmmode_crtc->scanout[0].pixmap);
 			    if (drmmode_crtc->scanout[1].pixmap)
-				pixmap_unref_fb(drmmode_crtc->scanout[1].pixmap,
-						None, pRADEONEnt);
+				pixmap_unref_fb(drmmode_crtc->scanout[1].pixmap);
 			} else {
 			    drmmode_crtc_scanout_free(crtc);
 			}
@@ -2695,18 +2704,20 @@ void RADEONLeaveVT_KMS(ScrnInfoPtr pScrn
 		(!clients[i] || clients[i]->clientState != ClientStateRunning))
 		continue;
 
-	    FindClientResourcesByType(clients[i], RT_PIXMAP, pixmap_unref_fb,
-				      pRADEONEnt);
+	    FindClientResourcesByType(clients[i], RT_PIXMAP,
+				      client_pixmap_unref_fb, pScreen);
 	}
 
-	pixmap_unref_fb(pScreen->GetScreenPixmap(pScreen), None, pRADEONEnt);
+	pixmap_unref_fb(pScreen->GetScreenPixmap(pScreen));
     } else {
 	memset(info->front_buffer->bo.radeon->ptr, 0,
 	       pScrn->displayWidth * info->pixel_bytes * pScrn->virtualY);
     }
 
-    TimerSet(NULL, 0, 1000, cleanup_black_fb, pScreen);
+    if (pScreen->GCperDepth[0])
+	TimerSet(NULL, 0, 1000, cleanup_black_fb, pScreen);
 
+ hide_cursors:
     xf86_hide_cursors (pScrn);
 
     radeon_drop_drm_master(pScrn);

Index: xsrc/external/mit/xf86-video-ati-kms/include/config.h
diff -u xsrc/external/mit/xf86-video-ati-kms/include/config.h:1.10 xsrc/external/mit/xf86-video-ati-kms/include/config.h:1.11
--- xsrc/external/mit/xf86-video-ati-kms/include/config.h:1.10	Sat Jun  1 07:25:41 2019
+++ xsrc/external/mit/xf86-video-ati-kms/include/config.h	Sun Feb 23 06:33:19 2020
@@ -85,7 +85,7 @@
 #define PACKAGE_NAME "xf86-video-ati"
 
 /* Define to the full name and version of this package. */
-#define PACKAGE_STRING "xf86-video-ati 19.0.1"
+#define PACKAGE_STRING "xf86-video-ati 19.1.0"
 
 /* Define to the one symbol short name of this package. */
 #define PACKAGE_TARNAME "xf86-video-ati"
@@ -94,16 +94,16 @@
 #define PACKAGE_URL ""
 
 /* Define to the version of this package. */
-#define PACKAGE_VERSION "19.0.1"
+#define PACKAGE_VERSION "19.1.0"
 
 /* Major version of this package */
 #define PACKAGE_VERSION_MAJOR 19
 
 /* Minor version of this package */
-#define PACKAGE_VERSION_MINOR 0
+#define PACKAGE_VERSION_MINOR 1
 
 /* Patch version of this package */
-#define PACKAGE_VERSION_PATCHLEVEL 1
+#define PACKAGE_VERSION_PATCHLEVEL 0
 
 /* Define to 1 if you have the ANSI C header files. */
 #define STDC_HEADERS 1
@@ -115,7 +115,7 @@
 #define USE_SYS_ENDIAN_H 1
 
 /* Version number of package */
-#define VERSION "19.0.1"
+#define VERSION "19.1.0"
 
 /* Enable large inode numbers on Mac OS X 10.5.  */
 #ifndef _DARWIN_USE_64_BIT_INODE

Index: xsrc/external/mit/xf86-video-geode/dist/src/gx_driver.c
diff -u xsrc/external/mit/xf86-video-geode/dist/src/gx_driver.c:1.5 xsrc/external/mit/xf86-video-geode/dist/src/gx_driver.c:1.6
--- xsrc/external/mit/xf86-video-geode/dist/src/gx_driver.c:1.5	Mon Dec 31 13:02:41 2018
+++ xsrc/external/mit/xf86-video-geode/dist/src/gx_driver.c	Sun Feb 23 06:33:19 2020
@@ -1428,7 +1428,7 @@ GXScreenInit(SCREEN_INIT_ARGS_DECL)
 
     /* Set up RandR */
 
-#if 0
+#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 24
     xf86DisableRandR();         /* We provide our own RandR goodness */
 #endif
 

Index: xsrc/external/mit/xf86-video-s3/dist/compile
diff -u xsrc/external/mit/xf86-video-s3/dist/compile:1.3 xsrc/external/mit/xf86-video-s3/dist/compile:1.4
--- xsrc/external/mit/xf86-video-s3/dist/compile:1.3	Mon Jun  3 08:50:48 2013
+++ xsrc/external/mit/xf86-video-s3/dist/compile	Sun Feb 23 06:33:19 2020
@@ -1,10 +1,9 @@
 #! /bin/sh
 # Wrapper for compilers which do not understand '-c -o'.
 
-scriptversion=2012-01-04.17; # UTC
+scriptversion=2012-10-14.11; # UTC
 
-# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009, 2010, 2012 Free
-# Software Foundation, Inc.
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
 # Written by Tom Tromey <tro...@cygnus.com>.
 #
 # This program is free software; you can redistribute it and/or modify
@@ -79,6 +78,53 @@ func_file_conv ()
   esac
 }
 
+# func_cl_dashL linkdir
+# Make cl look for libraries in LINKDIR
+func_cl_dashL ()
+{
+  func_file_conv "$1"
+  if test -z "$lib_path"; then
+    lib_path=$file
+  else
+    lib_path="$lib_path;$file"
+  fi
+  linker_opts="$linker_opts -LIBPATH:$file"
+}
+
+# func_cl_dashl library
+# Do a library search-path lookup for cl
+func_cl_dashl ()
+{
+  lib=$1
+  found=no
+  save_IFS=$IFS
+  IFS=';'
+  for dir in $lib_path $LIB
+  do
+    IFS=$save_IFS
+    if $shared && test -f "$dir/$lib.dll.lib"; then
+      found=yes
+      lib=$dir/$lib.dll.lib
+      break
+    fi
+    if test -f "$dir/$lib.lib"; then
+      found=yes
+      lib=$dir/$lib.lib
+      break
+    fi
+    if test -f "$dir/lib$lib.a"; then
+      found=yes
+      lib=$dir/lib$lib.a
+      break
+    fi
+  done
+  IFS=$save_IFS
+
+  if test "$found" != yes; then
+    lib=$lib.lib
+  fi
+}
+
 # func_cl_wrapper cl arg...
 # Adjust compile command to suit cl
 func_cl_wrapper ()
@@ -109,43 +155,34 @@ func_cl_wrapper ()
 	      ;;
 	  esac
 	  ;;
+	-I)
+	  eat=1
+	  func_file_conv "$2" mingw
+	  set x "$@" -I"$file"
+	  shift
+	  ;;
 	-I*)
 	  func_file_conv "${1#-I}" mingw
 	  set x "$@" -I"$file"
 	  shift
 	  ;;
+	-l)
+	  eat=1
+	  func_cl_dashl "$2"
+	  set x "$@" "$lib"
+	  shift
+	  ;;
 	-l*)
-	  lib=${1#-l}
-	  found=no
-	  save_IFS=$IFS
-	  IFS=';'
-	  for dir in $lib_path $LIB
-	  do
-	    IFS=$save_IFS
-	    if $shared && test -f "$dir/$lib.dll.lib"; then
-	      found=yes
-	      set x "$@" "$dir/$lib.dll.lib"
-	      break
-	    fi
-	    if test -f "$dir/$lib.lib"; then
-	      found=yes
-	      set x "$@" "$dir/$lib.lib"
-	      break
-	    fi
-	  done
-	  IFS=$save_IFS
-
-	  test "$found" != yes && set x "$@" "$lib.lib"
+	  func_cl_dashl "${1#-l}"
+	  set x "$@" "$lib"
 	  shift
 	  ;;
+	-L)
+	  eat=1
+	  func_cl_dashL "$2"
+	  ;;
 	-L*)
-	  func_file_conv "${1#-L}"
-	  if test -z "$lib_path"; then
-	    lib_path=$file
-	  else
-	    lib_path="$lib_path;$file"
-	  fi
-	  linker_opts="$linker_opts -LIBPATH:$file"
+	  func_cl_dashL "${1#-L}"
 	  ;;
 	-static)
 	  shared=false

Index: xsrc/external/mit/xf86-video-s3/dist/src/s3.h
diff -u xsrc/external/mit/xf86-video-s3/dist/src/s3.h:1.7 xsrc/external/mit/xf86-video-s3/dist/src/s3.h:1.8
--- xsrc/external/mit/xf86-video-s3/dist/src/s3.h:1.7	Mon Jun  3 08:50:48 2013
+++ xsrc/external/mit/xf86-video-s3/dist/src/s3.h	Sun Feb 23 06:33:20 2020
@@ -34,7 +34,6 @@
 
 #include "xf86.h"
 #include "xf86Pci.h"
-#include "xf86PciInfo.h"
 #include "xf86RamDac.h"
 #ifdef HAVE_XAA_H
 #include "xaa.h"
@@ -50,6 +49,24 @@
 
 #include "compat-api.h"
 
+
+#define PCI_VENDOR_S3			0x5333
+
+#define PCI_CHIP_PLATO			0x0551
+#define PCI_CHIP_TRIO			0x8811
+#define PCI_CHIP_AURORA64VP		0x8812
+#define PCI_CHIP_TRIO64UVP		0x8814
+#define PCI_CHIP_868			0x8880
+#define PCI_CHIP_928			0x88B0
+#define PCI_CHIP_864_0			0x88C0
+#define PCI_CHIP_864_1			0x88C1
+#define PCI_CHIP_964_0			0x88D0
+#define PCI_CHIP_964_1			0x88D1
+#define PCI_CHIP_968			0x88F0
+#define PCI_CHIP_TRIO64V2_DXGX	0x8901
+#define PCI_CHIP_PLATO_PX		0x8902
+
+
 typedef struct _S3RegRec {
 	unsigned char	cr31, cr32, cr33, cr34, cr3a, cr3b, cr3c;
 	unsigned char	cr3b2, cr3c2;
@@ -261,9 +278,6 @@ Bool S3GENDACProbe(ScrnInfoPtr pScrn);
 #define	GENDAC_RAMDAC	0x0708
 #define	SDAC_RAMDAC	0x0716
 
-#define BIOS_BSIZE	1024
-#define	BIOS_BASE	0xc0000
-
 /*
  * Chip...Sets...
  */

Index: xsrc/external/mit/xf86-video-s3/dist/src/s3_bios.c
diff -u xsrc/external/mit/xf86-video-s3/dist/src/s3_bios.c:1.3 xsrc/external/mit/xf86-video-s3/dist/src/s3_bios.c:1.4
--- xsrc/external/mit/xf86-video-s3/dist/src/s3_bios.c:1.3	Mon Jun  3 08:50:48 2013
+++ xsrc/external/mit/xf86-video-s3/dist/src/s3_bios.c	Sun Feb 23 06:33:20 2020
@@ -29,75 +29,9 @@
 #include "config.h"
 #endif
 
-#include "xf86.h"
-#include "xf86_OSproc.h"
-#include "compiler.h"
-
 #include "s3.h"
 
-
-static unsigned char *find_bios_string(ScrnInfoPtr pScrn, int BIOSbase,
-				       char *match1, char *match2)
-{
-	static unsigned char *bios;
-	static int init=0;
-	int i, j, l1, l2, ret;
-
-	S3Ptr pS3 = S3PTR(pScrn);
-
-	bios = malloc(BIOS_BSIZE);
-	if (bios = NULL)
-		return NULL;
-
-	if (!init) {
-		init = 1;
-#ifndef XSERVER_LIBPCIACCESS
-		if (xf86ReadDomainMemory(pS3->PciTag, BIOSbase, BIOS_BSIZE, bios) != BIOS_BSIZE)
-			goto error;
-#else
-		ret = pci_device_read_rom(pS3->PciInfo, bios);
-		if (ret) {
-			xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
-				"libpciaccess failed to read video BIOS: %s\n",
-				strerror(-ret));
-		        goto error;
-		}
-#endif
-		if ((bios[0] != 0x55) || (bios[1] != 0xaa))
-			goto error;
-	}
-	if (match1 == NULL)
-		goto error;
-
-	l1 = strlen(match1);
-	if (match2 != NULL)
-		l2 = strlen(match2);
-	else
-		l2 = 0;
-
-	for (i=0; i<BIOS_BSIZE; i++)
-		if (bios[i] == match1[0] && !memcmp(&bios[i], match1, l1)) {
-			if (match2 == NULL)
-				return &bios[i+l1];
-			else
-				for(j=i+l1; (j<BIOS_BSIZE-l2) && bios[j]; j++)
-					if (bios[j] == match2[0] &&
-					    !memcmp(&bios[j], match2, l2))
-						return &bios[j+l2];
-		}
-error:
-	free(bios);
-	return NULL;
-}
-
-
 int S3GetRefClock(ScrnInfoPtr pScrn)
 {
-	int RefClock = 16000;	/* default */
-
-	if (find_bios_string(pScrn, BIOS_BASE, "Number Nine Visual Technology",
-					"Motion 771") != NULL)
-		RefClock = 16000;
-
-	return RefClock;
+	return 16000;
 }

Index: xsrc/external/mit/xf86-video-s3/dist/src/s3_driver.c
diff -u xsrc/external/mit/xf86-video-s3/dist/src/s3_driver.c:1.5 xsrc/external/mit/xf86-video-s3/dist/src/s3_driver.c:1.6
--- xsrc/external/mit/xf86-video-s3/dist/src/s3_driver.c:1.5	Sat Aug 20 00:46:36 2016
+++ xsrc/external/mit/xf86-video-s3/dist/src/s3_driver.c	Sun Feb 23 06:33:20 2020
@@ -42,7 +42,6 @@
 #include "xf86.h"
 #include "xf86_OSproc.h"
 #include "xf86Pci.h"
-#include "xf86PciInfo.h"
 #include "xf86fbman.h"
 #include "xf86cmap.h"
 #if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 6
@@ -795,7 +794,7 @@ static Bool S3ScreenInit(SCREEN_INIT_ARG
 	ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
 	S3Ptr pS3 = S3PTR(pScrn);
 	BoxRec ScreenArea;
-	int width, height, displayWidth;
+	int width, height;
 	
 	if (pS3->rotate) {
 		height = pScrn->virtualX;
@@ -843,10 +842,8 @@ static Bool S3ScreenInit(SCREEN_INIT_ARG
         if(pS3->shadowFB) {
         	pS3->ShadowPitch = BitmapBytePad(pScrn->bitsPerPixel * width);
         	pS3->ShadowPtr = malloc(pS3->ShadowPitch * height);
-		displayWidth = pS3->ShadowPitch / (pScrn->bitsPerPixel >> 3);
         } else {
         	pS3->ShadowPtr = NULL;
-		displayWidth = pScrn->displayWidth;
         }
         
         if (!fbScreenInit(pScreen, (pS3->shadowFB ? pS3->ShadowPtr : pS3->FBBase), 

Reply via email to