rpms/psb-kmod/F-11 psb-kernel-source-4.41.1-agp_memory.patch, NONE, 1.1 psb-kernel-source-4.41.1-drmpsb.patch, NONE, 1.1 psb-kernel-source-4.41.1-i2c-intelfb.patch, NONE, 1.1 psb-kmd-4.34-current_euid.patch, NONE, 1.1 psb-kmod-4.41.1_busid.patch, NONE, 1.1 psb-kmod-4.41.1_irqreturn.patch, NONE, 1.1 psb-kmod.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Adam Williamson adamwill at rpmfusion.org
Sat Sep 26 07:46:52 CEST 2009


Author: adamwill

Update of /cvs/nonfree/rpms/psb-kmod/F-11
In directory se02.es.rpmfusion.net:/tmp/cvs-serv14761/F-11

Modified Files:
	.cvsignore sources 
Added Files:
	psb-kernel-source-4.41.1-agp_memory.patch 
	psb-kernel-source-4.41.1-drmpsb.patch 
	psb-kernel-source-4.41.1-i2c-intelfb.patch 
	psb-kmd-4.34-current_euid.patch psb-kmod-4.41.1_busid.patch 
	psb-kmod-4.41.1_irqreturn.patch psb-kmod.spec 
Log Message:
initial commit


psb-kernel-source-4.41.1-agp_memory.patch:

--- NEW FILE psb-kernel-source-4.41.1-agp_memory.patch ---
diff -ru psb-kernel-source-4.41.1/drm_agpsupport.c psb-kernel-source-4.41.2/drm_agpsupport.c
--- psb-kernel-source-4.41.1/drm_agpsupport.c	2009-04-16 05:25:01.000000000 +0200
+++ psb-kernel-source-4.41.2/drm_agpsupport.c	2009-08-11 20:18:30.000000000 +0200
@@ -524,7 +524,7 @@
 	DRM_DEBUG("Current page count is %ld\n", (long) mem->page_count);
 	mem->page_count = 0;
 	for (cur_page = pages; cur_page < last_page; ++cur_page)
-		mem->memory[mem->page_count++] = phys_to_gart(page_to_phys(*cur_page));
+		mem->pages[mem->page_count++] = phys_to_gart(page_to_phys(*cur_page));
 	agp_be->mem = mem;
 	return 0;
 }
diff -ru psb-kernel-source-4.41.1/drm_memory.c psb-kernel-source-4.41.2/drm_memory.c
--- psb-kernel-source-4.41.1/drm_memory.c	2009-04-16 05:25:01.000000000 +0200
+++ psb-kernel-source-4.41.2/drm_memory.c	2009-08-11 20:18:30.000000000 +0200
@@ -264,7 +264,7 @@
 		return NULL;
 
 	phys_addr_map =
-	    agpmem->memory->memory + (offset - agpmem->bound) / PAGE_SIZE;
+	    agpmem->memory->pages + (offset - agpmem->bound) / PAGE_SIZE;
 	for (i = 0; i < num_pages; ++i)
 		page_map[i] = pfn_to_page(phys_addr_map[i] >> PAGE_SHIFT);
 	addr = vmap(page_map, num_pages, VM_IOREMAP, PAGE_AGP);
diff -ru psb-kernel-source-4.41.1/drm_vm.c psb-kernel-source-4.41.2/drm_vm.c
--- psb-kernel-source-4.41.1/drm_vm.c	2009-04-16 05:25:01.000000000 +0200
+++ psb-kernel-source-4.41.2/drm_vm.c	2009-08-11 20:18:30.000000000 +0200
@@ -145,13 +145,13 @@
 		 * Get the page, inc the use count, and return it
 		 */
 		offset = (baddr - agpmem->bound) >> PAGE_SHIFT;
-		page = virt_to_page(__va(agpmem->memory->memory[offset]));
+		page = virt_to_page(__va(agpmem->memory->pages[offset]));
 		get_page(page);
 		vmf->page = page;
 
 		DRM_DEBUG
 		    ("baddr = 0x%lx page = 0x%p, offset = 0x%lx, count=%d\n",
-		     baddr, __va(agpmem->memory->memory[offset]), offset,
+		     baddr, __va(agpmem->memory->pages[offset]), offset,
 		     page_count(page));
 		return 0;
 	}


psb-kernel-source-4.41.1-drmpsb.patch:

--- NEW FILE psb-kernel-source-4.41.1-drmpsb.patch ---
diff -p -up psb-kernel-source-4.41.1/Makefile.kernel.drmpsb psb-kernel-source-4.41.1/Makefile.kernel
--- psb-kernel-source-4.41.1/Makefile.kernel.drmpsb	2009-04-16 05:25:02.000000000 +0200
+++ psb-kernel-source-4.41.1/Makefile.kernel	2009-09-23 11:56:26.000000000 +0200
@@ -7,7 +7,7 @@
 # $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/Makefile.kernel,v 1.18 2003/08/16 17:59:17 dawes Exp $
 #
 
-drm-objs    := drm_auth.o drm_bufs.o drm_context.o drm_dma.o drm_drawable.o \
+drm-psb-objs    := drm_auth.o drm_bufs.o drm_context.o drm_dma.o drm_drawable.o \
 		drm_drv.o drm_fops.o drm_ioctl.o drm_irq.o \
 		drm_lock.o drm_memory.o drm_proc.o drm_stub.o drm_vm.o \
 		drm_sysfs.o drm_pci.o drm_agpsupport.o drm_scatter.o \
@@ -49,7 +49,7 @@ xgi-objs    := xgi_cmdlist.o xgi_drv.o x
 		xgi_fence.o
 
 ifeq ($(CONFIG_COMPAT),y)
-drm-objs    += drm_ioc32.o
+drm-psb-objs    += drm_ioc32.o
 radeon-objs += radeon_ioc32.o
 mga-objs    += mga_ioc32.o
 r128-objs   += r128_ioc32.o
@@ -58,7 +58,7 @@ nouveau-objs += nouveau_ioc32.o
 xgi-objs    += xgi_ioc32.o
 endif
 
-obj-m			+= drm.o
+obj-m			+= drm-psb.o
 obj-$(CONFIG_DRM_TDFX)	+= tdfx.o
 obj-$(CONFIG_DRM_R128)	+= r128.o
 obj-$(CONFIG_DRM_RADEON)+= radeon.o


psb-kernel-source-4.41.1-i2c-intelfb.patch:

--- NEW FILE psb-kernel-source-4.41.1-i2c-intelfb.patch ---
diff -ru psb-kernel-source-4.41.1/psb_i2c.c psb-kernel-source-4.41.2/psb_i2c.c
--- psb-kernel-source-4.41.1/psb_i2c.c  2009-04-16 05:25:01.000000000 +0200
+++ psb-kernel-source-4.41.2/psb_i2c.c  2009-08-11 20:18:30.000000000 +0200
@@ -36,6 +36,8 @@
 #include "intel_drv.h"
 #include "psb_drv.h"

+#define I2C_HW_B_INTELFB 0x010021; /* intel framebuffer driver */
+
 /*
  * Intel GPIO access functions
  */


psb-kmd-4.34-current_euid.patch:

--- NEW FILE psb-kmd-4.34-current_euid.patch ---
diff -p -up build/drm_fops.c.current_euid build/drm_fops.c
--- build/drm_fops.c.current_euid	2009-05-31 03:22:18.000000000 -0400
+++ build/drm_fops.c	2009-05-31 03:32:00.000000000 -0400
@@ -252,7 +252,7 @@ static int drm_open_helper(struct inode 
 	memset(priv, 0, sizeof(*priv));
 	filp->private_data = priv;
 	priv->filp = filp;
-	priv->uid = current->euid;
+	priv->uid = current_euid();
 	priv->pid = current->pid;
 	priv->minor = minor;
 	priv->head = drm_heads[minor];


psb-kmod-4.41.1_busid.patch:

--- NEW FILE psb-kmod-4.41.1_busid.patch ---
--- psb-kernel-source-4.41.1/drm_sysfs.c	2009-04-15 20:25:01.000000000 -0700
+++ psb-kernel-source-4.41.1/drm_sysfs.c.new	2009-08-17 22:40:44.635097318 -0700
@@ -168,7 +168,7 @@
 	 * yet...
 	 */
 	/* dev->dev.devt = head->device; */
-	snprintf(dev->dev.bus_id, BUS_ID_SIZE, "card%d", head->minor);
+	dev_set_name(&dev->dev, "card%d", head->minor);
 
 	err = device_register(&dev->dev);
 	if (err) {

psb-kmod-4.41.1_irqreturn.patch:

--- NEW FILE psb-kmod-4.41.1_irqreturn.patch ---
--- psb-kernel-source-4.41.1/drm_os_linux.h	2009-04-15 20:25:01.000000000 -0700
+++ psb-kernel-source-4.41.1/drm_os_linux.h.new	2009-08-24 17:08:44.896703277 -0700
@@ -49,12 +49,6 @@
 
 /** IRQ handler arguments and return type and values */
 #define DRM_IRQ_ARGS		int irq, void *arg
-/** backwards compatibility with old irq return values */
-#ifndef IRQ_HANDLED
-typedef void irqreturn_t;
-#define IRQ_HANDLED		/* nothing */
-#define IRQ_NONE		/* nothing */
-#endif
 
 /** AGP types */
 #if __OS_HAS_AGP


--- NEW FILE psb-kmod.spec ---
# buildforkernels macro hint: when you build a new version or a new release
# that contains bugfixes or other improvements then you must disable the
# "buildforkernels newest" macro for just that build; immediately after
# queuing that build enable the macro again for subsequent builds; that way
# a new akmod package will only get build when a new one is actually needed
%define buildforkernels current

Name:		psb-kmod
Version:	4.41.1
Release:	10%{?dist}
Summary:	Kernel module for Poulsbo graphics chipsets

Group:		System Environment/Kernel
License:	GPLv2+
URL:		http://ppa.launchpad.net/ubuntu-mobile/ubuntu/pool/main/p/psb-kernel-source/
Source0:	http://ppa.launchpad.net/ubuntu-mobile/ubuntu/pool/main/p/psb-kernel-source/psb-kernel-source_%{version}.orig.tar.gz

# upstream status for all patches: upstream? heh. good joke.

# kernel 2.6.29 build patch, from mandriva
Patch0:		psb-kmd-4.34-current_euid.patch
# kernel 2.6.30 build patch, by me
Patch1:		psb-kmod-4.41.1_irqreturn.patch
# kernel 2.6.30 build patch, by me (mandriva has the same patch
# independently arrived at, they call it dev_set_name.patch)
Patch2:		psb-kmod-4.41.1_busid.patch
# kernel 2.6.30 build patch, from ubuntu via mandriva
Patch3:		psb-kernel-source-4.41.1-agp_memory.patch
# rename drm.ko to drm-psb.ko so we don't get dependency ickiness due
# to competition with the 'real' drm.ko (from mandriva)
Patch4:		psb-kernel-source-4.41.1-drmpsb.patch
# define intel framebuffer driver (fixes a build problem)
# (from mandriva)
Patch5:		psb-kernel-source-4.41.1-i2c-intelfb.patch
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
ExclusiveArch:	i586 i686

# get the needed BuildRequires (in parts depending on what we build for)
%{!?kernels:BuildRequires: buildsys-build-rpmfusion-kerneldevpkgs-%{?buildforkernels:%{buildforkernels}}%{!?buildforkernels:current}-%{_target_cpu} }
# kmodtool does its magic here
%{expand:%(kmodtool --target %{_target_cpu} --repo rpmfusion --kmodname %{name} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null) }

%description
%{summary}.


%prep
%{?kmodtool_check}
kmodtool  --target %{_target_cpu} --repo rpmfusion --kmodname %{name} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null


%setup -q -c

for kernel_version  in %{?kernel_versions} ; do
    cp -a psb-kernel-source-%{version} _kmod_build_${kernel_version%%___*}
 pushd _kmod_build_${kernel_version%%___*}
  if [[ $kernel_version > "2.6.28.99" ]]; then
%patch0 -p1 -b .build
%patch5 -p1 -b .intelfb
  fi
  if [[ $kernel_version > "2.6.29.99" ]]; then
%patch1 -p1 -b .irqreturn
%patch2 -p1 -b .busid
  fi
  if [[ $kernel_version > "2.6.30.99" ]]; then
%patch3 -p1 -b .agp
  fi
%patch4 -p1 -b .drmpsb
 popd
done


%build
for kv in %{?kernel_versions} ; do
    d=$PWD/_kmod_build_${kv%%___*}
    pushd $d
    make LINUXDIR="${kv##*___}" DRM_MODULES=psb
    popd
done


%install
rm -rf $RPM_BUILD_ROOT
for kv in %{?kernel_versions} ; do
    d=$RPM_BUILD_ROOT%{kmodinstdir_prefix}/${kv%%___*}/%{kmodinstdir_postfix}
    install -dm 755 $d
    install -pm 755 _kmod_build_${kv%%___*}/psb.ko $d
    install -pm 755 _kmod_build_${kv%%___*}/drm-psb.ko $d
done

%{?akmod_install}


%clean
rm -rf $RPM_BUILD_ROOT


%changelog
* Thu Sep 24 2009 Adam Williamson <adamwill AT shaw.ca> - 4.41.1-10
- add several patches from mandriva:
	+ replace build.patch with mdv's current_euid.patch (cleaner)
	+ replace agpmem.patch with mdv's agp_memory.patch (cleaner)
	+ add drmpsb.patch (builds drm module as drm-psb.ko)
	+ add intelfb.patch (cleaner fix for a build issue which
	  used to be fixed in my old build.patch)

* Fri Aug 28 2009 Adam Williamson <adamwill AT shaw.ca> - 4.41.1-9
- initial cut at a 2.6.31 patch (taken from corresponding changes in
  upstream files)

* Mon Aug 24 2009 Adam Williamson <adamwill AT shaw.ca> - 4.41.1-8
- try just 'i586 i686' for exclusivearch

* Mon Aug 24 2009 Adam Williamson <adamwill AT shaw.ca> - 4.41.1-7
- drop exclusivearch for now, it is being annoying
- improve irqreturn.patch, should prevent spurious interrupt problem
  (thanks to Konstantin Kletschke)

* Thu Aug 20 2009 Adam Williamson <adamwill AT shaw.ca> - 4.41.1-6
- exclusivearch ix86 (there's no 64-bit poulsbo hardware)
- and drop libdrm-poulsbo BR (doesn't seem necessary)

* Wed Aug 19 2009 Adam Williamson <adamwill AT shaw.ca> - 4.41.1-5
- bump revision to make sure correct patches included

* Mon Aug 17 2009 Adam Williamson <adamwill AT shaw.ca> - 4.41.1-4
- try and fix for 2.6.30

* Tue Aug 11 2009 Adam Williamson <adamwill AT shaw.ca> - 4.41.1-3
- rebuild with changed libdrm-poulsbo just to make sure it works

* Mon Aug 10 2009 Adam Williamson <adamwill AT shaw.ca> - 4.41.1-2
- use AkmodsBuildRequires (so the akmod requires work right)

* Mon Aug 10 2009 Adam Williamson <adamwill AT shaw.ca> - 4.41.1-1
- New version

* Wed May 13 2009 Adam Williamson <adamwill AT shaw.ca> - 4.40-1
- Initial package



Index: .cvsignore
===================================================================
RCS file: /cvs/nonfree/rpms/psb-kmod/F-11/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore	24 Sep 2009 15:23:26 -0000	1.1
+++ .cvsignore	26 Sep 2009 05:46:52 -0000	1.2
@@ -0,0 +1 @@
+psb-kernel-source_4.41.1.orig.tar.gz


Index: sources
===================================================================
RCS file: /cvs/nonfree/rpms/psb-kmod/F-11/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	24 Sep 2009 15:23:26 -0000	1.1
+++ sources	26 Sep 2009 05:46:52 -0000	1.2
@@ -0,0 +1 @@
+5ca47555507dec0318a6ed4128f73146  psb-kernel-source_4.41.1.orig.tar.gz



More information about the rpmfusion-commits mailing list