rpms/libpciaccess/devel libpciaccess-boot-vga.patch, NONE, 1.1 .cvsignore, 1.7, 1.8 libpciaccess.spec, 1.17, 1.18 make-libpciaccess-snapshot.sh, 1.5, 1.6 sources, 1.9, 1.10

Dave Airlie airlied at fedoraproject.org
Mon Jul 27 05:11:39 UTC 2009


Author: airlied

Update of /cvs/pkgs/rpms/libpciaccess/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv25463

Modified Files:
	.cvsignore libpciaccess.spec make-libpciaccess-snapshot.sh 
	sources 
Added Files:
	libpciaccess-boot-vga.patch 
Log Message:
* Mon Jul 27 2009 Dave Airlie <airlied at redhat.com> 0.10.6-1
- rebase to latest release (will do release with VGA bits later)
- libpciaccess-boot-vga.patch: add boot vga patch from upstream


libpciaccess-boot-vga.patch:
 include/pciaccess.h     |    2 ++
 src/common_interface.c  |   14 ++++++++++++++
 src/linux_sysfs.c       |   31 +++++++++++++++++++++++++++++++
 src/pciaccess_private.h |    1 +
 4 files changed, 48 insertions(+)

--- NEW FILE libpciaccess-boot-vga.patch ---
diff -up libpciaccess-0.10.6/include/pciaccess.h.da libpciaccess-0.10.6/include/pciaccess.h
--- libpciaccess-0.10.6/include/pciaccess.h.da	2008-05-22 09:35:04.000000000 +1000
+++ libpciaccess-0.10.6/include/pciaccess.h	2009-07-27 15:10:14.000000000 +1000
@@ -50,6 +50,8 @@ struct pci_slot_match;
 extern "C" {
 #endif
 
+int pci_device_is_boot_vga(struct pci_device *dev);
+
 int pci_device_read_rom(struct pci_device *dev, void *buffer);
 
 int  __deprecated pci_device_map_region(struct pci_device *dev,
diff -up libpciaccess-0.10.6/src/common_interface.c.da libpciaccess-0.10.6/src/common_interface.c
--- libpciaccess-0.10.6/src/common_interface.c.da	2008-11-19 14:11:59.000000000 +1000
+++ libpciaccess-0.10.6/src/common_interface.c	2009-07-27 15:10:14.000000000 +1000
@@ -108,6 +108,20 @@ pci_device_read_rom( struct pci_device *
     return (pci_sys->methods->read_rom)( dev, buffer );
 }
 
+/**
+ * Probe a PCI (VGA) device to determine if its the boot VGA device
+ *
+ * \param dev    Device whose VGA status to query
+ * \return
+ * Zero if not the boot VGA, 1 if the boot VGA.
+ */
+int
+pci_device_is_boot_vga( struct pci_device * dev )
+{
+	if (!pci_sys->methods->boot_vga)
+		return 0;
+	return pci_sys->methods->boot_vga( dev );
+}
 
 /**
  * Probe a PCI device to learn information about the device.
diff -up libpciaccess-0.10.6/src/linux_sysfs.c.da libpciaccess-0.10.6/src/linux_sysfs.c
--- libpciaccess-0.10.6/src/linux_sysfs.c.da	2009-07-27 15:10:00.000000000 +1000
+++ libpciaccess-0.10.6/src/linux_sysfs.c	2009-07-27 15:10:14.000000000 +1000
@@ -77,6 +77,8 @@ static int pci_device_linux_sysfs_write(
     const void * data, pciaddr_t offset, pciaddr_t size,
     pciaddr_t * bytes_written );
 
+static int pci_device_linux_sysfs_boot_vga( struct pci_device * dev );
+
 static const struct pci_system_methods linux_sysfs_methods = {
     .destroy = pci_device_linux_sysfs_destroy,
     .destroy_device = NULL,
@@ -90,6 +92,7 @@ static const struct pci_system_methods l
 
     .fill_capabilities = pci_fill_capabilities_generic,
     .enable = pci_device_linux_sysfs_enable,
+    .boot_vga = pci_device_linux_sysfs_boot_vga,
 };
 
 #define SYS_BUS_PCI "/sys/bus/pci/devices"
@@ -730,3 +733,31 @@ static void pci_device_linux_sysfs_enabl
     write( fd, "1", 1 );
     close(fd);
 }
+
+static int pci_device_linux_sysfs_boot_vga(struct pci_device *dev)
+{
+    char name[256];
+    char reply[3];
+    int fd, bytes_read;
+    int ret = 0;
+
+    snprintf( name, 255, "%s/%04x:%02x:%02x.%1u/boot_vga",
+	      SYS_BUS_PCI,
+	      dev->domain,
+	      dev->bus,
+	      dev->dev,
+	      dev->func );
+    
+    fd = open( name, O_RDONLY );
+    if (fd == -1)
+       return 0;
+
+    bytes_read = read(fd, reply, 1);
+    if (bytes_read != 1)
+	goto out;
+    if (reply[0] == '1')
+	ret = 1;
+out:
+    close(fd);
+    return ret;
+}
diff -up libpciaccess-0.10.6/src/pciaccess_private.h.da libpciaccess-0.10.6/src/pciaccess_private.h
--- libpciaccess-0.10.6/src/pciaccess_private.h.da	2008-10-16 08:35:53.000000000 +1000
+++ libpciaccess-0.10.6/src/pciaccess_private.h	2009-07-27 15:10:14.000000000 +1000
@@ -60,6 +60,7 @@ struct pci_system_methods {
 
     int (*fill_capabilities)( struct pci_device * dev );
     void (*enable)( struct pci_device *dev );
+    int (*boot_vga)( struct pci_device *dev );
 };
 
 struct pci_device_mapping {


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/libpciaccess/devel/.cvsignore,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -p -r1.7 -r1.8
--- .cvsignore	6 Mar 2008 20:40:43 -0000	1.7
+++ .cvsignore	27 Jul 2009 05:11:39 -0000	1.8
@@ -1 +1 @@
-libpciaccess-0.10.tar.bz2
+libpciaccess-0.10.6.tar.bz2


Index: libpciaccess.spec
===================================================================
RCS file: /cvs/pkgs/rpms/libpciaccess/devel/libpciaccess.spec,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -p -r1.17 -r1.18
--- libpciaccess.spec	25 Jul 2009 06:25:02 -0000	1.17
+++ libpciaccess.spec	27 Jul 2009 05:11:39 -0000	1.18
@@ -2,8 +2,8 @@
 %define gitrev e392082abb5696c8837224da86cc0af4f21d7010
 
 Name:           libpciaccess
-Version:        0.10.5
-Release:        2%{?dist}
+Version:        0.10.6
+Release:        1%{?dist}
 Summary:        PCI access library
 
 Group:          System Environment/Libraries
@@ -19,6 +19,7 @@ BuildRoot:      %{_tmppath}/%{name}-%{ve
 
 Patch0:		libpciaccess-fd-cache.patch
 Patch2:		libpciaccess-rom-size.patch
+Patch3:         libpciaccess-boot-vga.patch
 
 BuildRequires:  autoconf automake libtool pkgconfig
 Requires:       hwdata
@@ -40,6 +41,8 @@ Development package for libpciaccess.
 %setup -q -n %{name}-%{version}
 %patch0 -p1 -b .cache
 %patch2 -p1 -b .rom-size
+exit
+%patch3 -p1 -b .bootvga
 
 %build
 #autoreconf -v --install
@@ -70,6 +73,11 @@ rm -rf $RPM_BUILD_ROOT
 %{_libdir}/pkgconfig/pciaccess.pc
 
 %changelog
+* Mon Jul 27 2009 Dave Airlie <airlied at redhat.com> 0.10.6-1
+- rebase to latest release (will do release with VGA bits later)
+- libpciaccess-boot-vga.patch: add boot vga patch from upstream
+
+
 * Fri Jul 24 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.10.5-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
 


Index: make-libpciaccess-snapshot.sh
===================================================================
RCS file: /cvs/pkgs/rpms/libpciaccess/devel/make-libpciaccess-snapshot.sh,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -p -r1.5 -r1.6
--- make-libpciaccess-snapshot.sh	31 Oct 2007 18:08:17 -0000	1.5
+++ make-libpciaccess-snapshot.sh	27 Jul 2009 05:11:39 -0000	1.6
@@ -1,5 +1,5 @@
 #!/bin/sh
-n
+
 DATE=$( date +%Y%m%d )
 DIRNAME=libpciaccess
 REV=${1:-master}
@@ -32,4 +32,4 @@ sed -i -e "s/^%define gitdate.*/%define 
 	-e "/%changelog/ a $msg" \
 	libpciaccess.spec
 
-make new-sources FILES=$DIRNAME-$DATE.tar.bz2
\ No newline at end of file
+make new-sources FILES=$DIRNAME-$DATE.tar.bz2


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/libpciaccess/devel/sources,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -p -r1.9 -r1.10
--- sources	21 Apr 2009 14:40:06 -0000	1.9
+++ sources	27 Jul 2009 05:11:39 -0000	1.10
@@ -1 +1 @@
-617bebf31e5685c83f935009aeae5f38  libpciaccess-0.10.5.tar.bz2
+ba25eb7582f69428648e8c67564d68e5  libpciaccess-0.10.6.tar.bz2




More information about the scm-commits mailing list