rpms/xorg-x11-drv-psb/F-11 poulsbo-modprobe.conf, NONE, 1.1 psb-config-display, NONE, 1.1 psb-init, NONE, 1.1 xorg-x11-drv-psb-0.31.0-ignoreacpi.patch, NONE, 1.1 xorg-x11-drv-psb-0.31.0-libdrm.patch, NONE, 1.1 xorg-x11-drv-psb-0.31.0-xserver17.patch, NONE, 1.1 xorg-x11-drv-psb.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Adam Williamson adamwill at rpmfusion.org
Sat Sep 26 08:00:29 CEST 2009


Author: adamwill

Update of /cvs/nonfree/rpms/xorg-x11-drv-psb/F-11
In directory se02.es.rpmfusion.net:/tmp/cvs-serv16232/F-11

Modified Files:
	.cvsignore sources 
Added Files:
	poulsbo-modprobe.conf psb-config-display psb-init 
	xorg-x11-drv-psb-0.31.0-ignoreacpi.patch 
	xorg-x11-drv-psb-0.31.0-libdrm.patch 
	xorg-x11-drv-psb-0.31.0-xserver17.patch xorg-x11-drv-psb.spec 
Log Message:
initial commit



--- NEW FILE poulsbo-modprobe.conf ---
alias pci:v00008086d00008108sv*sd*bc*sc*i* psb
alias pci:v00008086d00008109sv*sd*bc*sc*i* psb



--- NEW FILE psb-config-display ---
#!/usr/bin/python -tt
# -*- coding: UTF-8 -*-
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 only
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Library General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# Copyright 2003, 2004 Peter Backlund
# Copyright 2004 Thorsten Leemhuis
# Copyright 2006 Van Assche Alphonse
# Copyright 2006, 2007 Stewart Adam

import string
import os
import sys

from livnaConfigDisplay.const import *
from livnaConfigDisplay.const import _

import livnaConfigDisplay.ConfigDisplay
from livnaConfigDisplay.GlxConfig import *
from livnaConfigDisplay import Utils
from livnaConfigDisplay.ConfigFile import ConfigFile

class psbConfigDisplay(GlxConfig):
    def __init__(self):
        GlxConfig.__init__(self)
        self.majorVendor = 'psb'
        self.ldconf = LD_CONF_FILE % (self.majorVendor)
        try:
            self.doAllBackups()
        except livnaConfigDisplayError, (bkupErrMsg):
            print bkupErrMsg
            sys.exit(1)
        self.xconfig, self.xconfigpath = self.loadXconfig()
        self.config = ConfigFile(STATUS_FILE)
        self.TOP_MOD_DIR = self.getModTopDir()

        # finally, run arg checks.
        self.run()


    def enable(self, isAutoConfigure = True):
        # Backup the file before make any change.
        currentDriver = self.getDriver()
        # Already enabled?
        if currentDriver == self.majorVendor:
            print _('Driver already enabled.')
            return
        # 'remembering' magic's in here.
        self.config.setOldDriver(currentDriver)
        #currentDriver = self.config.getOldDriver()
        self.toggleDriver(currentDriver, self.majorVendor)
        # Improves speed and reliability
        self.addOption(self.majorVendor,"MigrationHeuristic", "greedy")
        Utils.writeXorgConf(self.xconfig, self.xconfigpath)
        # We have to read saved status file to restore the Xorg configuration. 
        self.restoreconf()


    def disable(self, isAutoConfigure = True):
        # Check if it's already disabled
        if self.getDriver() != self.majorVendor:
            print _('Driver already disabled.')
            return
        # Backup the file before make any change.
        prevDriver = self.config.getOldDriver()
        if prevDriver == self.majorVendor:
            print _('Will not allow reverting from driver \'%s\' to \'%s\'.') % (self.majorVendor, self.majorVendor)
            print _('Using the \'vesa\' driver instead.')
            prevDriver = "vesa"
            self.config.setOldDriver("vesa")
        self.removeOption(self.majorVendor,"MigrationHeuristic")
        self.toggleDriver(self.majorVendor, prevDriver)
        Utils.writeXorgConf(self.xconfig, self.xconfigpath)
        # We have to save the status file so it can be restored later
        self.storeconf()
        # And return to the Fedora default.
        self.enableAiglx()

    def printUsage(self):
        print _("Usage: ") + self.majorVendor + _("-config-display [ enable|disable ]")

    def run(self):
        # Check number of arguments
        # arg = action
        if len(sys.argv) == 2:
            arg = sys.argv[1]
        else:
            print _('Wrong number of arguments')
            self.printUsage()
            sys.exit(1)
        # Check value of argument
        if arg.lower() != "enable" and arg.lower() != "disable":
            print _('Invalid command: %s') % arg.lower()
            self.printUsage()
            sys.exit(1)
        try:
            if arg == "enable":
                if self.getActive():
                    self.enable()
                else:
                    print _('livna-config-display\'s `active\' state is False - Exiting')
            elif arg == "disable":
                if self.getActive():
                    self.disable()
        except:
            raise # Uncomment me to show the real error
            print MSG_CONF_APPLY_ERROR
            try:
                self.doAllRestores()
                sys.exit(1)
            except livnaConfigDisplayError, (bkupErrMsg):
                #raise # Uncomment me to show the real error
                print MSG_CONF_RESTORE_ERROR + '\n' + MSG_TRACEBACK % (str(errMsg)) + '\n\n' + str(bkupErrMsg)
                sys.exit(1)

app = psbConfigDisplay()


--- NEW FILE psb-init ---
#!/bin/sh
#
# chkconfig:    2345 8 92
# description:  This script will check if a psb kernel module is present for\
#               the running kernel and modify the xorg.conf to  the appropriate\
#               configuration.

# Source function library.
. /etc/rc.d/init.d/functions

name='psb'
exec="/usr/sbin/$name-config-display"
prog="`basename $exec`"
lockfile="/var/lock/subsys/$name"

RETVAL=0
modname="psb.ko"
modpath="/lib/modules/$(uname -r)"
# Default to no module
module="noneWithSomeCrazyNameSoItsNeverFound"
# If one exists, then use it.
if test -e "${modpath}/extra/${modname}";then
    module="${modpath}/extra/${modname}"
elif test -e "${modpath}/extra/psb/${modname}";then
    module="${modpath}/extra/psb/${modname}"
elif test -e "${modpath}/kernel/drivers/video/psb/${modname}";then
    module="${modpath}/kernel/drivers/video/psb/${modname}"
fi


# Try to modify the below the least possible. If you need to change something, try
# using the variables above first, as most of the program control is based on
# the variables above. If something really needs to be changed, try to make
# the change in all the drivers for the sake of consistency.

# We shouldn't use lock files anymore because the lock file
# doesn't mean a driver is disabled or enabled. For example, we start()
# at boot and enable the driver. start() makes a lock file. We stop() on
# shutdown, which removes the lock file. But what if the user ran *config-display
# manually? Or if we don't `*config-display disable` in stop()?

start() {
    if action $"Checking for module $modname:" test -f $module;then
        action $"Enabling the $name driver:" $exec enable
        RETVAL=$?
    else
        echo -en $"$modname for kernel $(uname -r) was not found." && echo_warning;echo -en '\n'
        echo -en $"The $name driver will not be enabled until one is found." && echo_warning;echo -en '\n'
        $exec disable
        RETVAL=1
    fi
    if [ "$RETVAL" -eq "0" ];then
        #touch $lockfile
        # this is a nothing assignment so that bash doesn't complain.
        RETVAL=0
    else
        # Let them read the errors or warnings
        sleep 3
    fi
    return
}

stop() {
    #action $"Disabling the $name driver:" $exec disable
    #RETVAL=$?
    RETVAL=0
    #if [ "$RETVAL" -eq 0 ];then
    #    rm -f $lockfile
    #fi
    return
}

restart() {
    stop
    start
}

reload() {
    restart
}

status() {
    #if [ -e $lockfile ];then
        if [ -f $module ] && lsmod | grep ^${modname%%.ko} &>/dev/null ;then
            echo $"$modname for kernel $(uname -r) was found."
            echo $"The driver is enabled."
        else
            echo $"$modname for kernel $(uname -r) was not found."
            echo $"The $name driver cannot be enabled until one is found."
        fi
    #else
    #    echo $"The $name driver has not been enabled."
    #fi
    RETVAL=0
}

fdrstatus() {
    status $prog
}

case "$1" in
    start|stop|restart|reload)
        $1
    ;;
    status)
        fdrstatus
    ;;
    condrestart)
        restart
    ;;
    *)
        echo $"Usage: $0 {start|stop|status|restart|condrestart|reload}"
        exit 1
    ;;
esac

exit $RETVAL

xorg-x11-drv-psb-0.31.0-ignoreacpi.patch:

--- NEW FILE xorg-x11-drv-psb-0.31.0-ignoreacpi.patch ---
--- xserver-xorg-video-psb-0.31.0/src/psb_driver.c	2009-04-17 11:22:26.000000000 -0700
+++ xserver-xorg-video-psb-0.31.0/src/psb_driver.c.new	2009-08-14 15:41:35.047596131 -0700
@@ -909,7 +909,7 @@
     xf86DrvMsg(pScrn->scrnIndex, from, "Use %s cursor.\n",
 	       pPsb->sWCursor ? "software" : "hardware");
 
-    pPsb->ignoreACPI = FALSE;
+    pPsb->ignoreACPI = TRUE;
     from =
 	xf86GetOptValBool(pPsb->options, OPTION_IGNORE_ACPI,
 			  &pPsb->ignoreACPI)

xorg-x11-drv-psb-0.31.0-libdrm.patch:

--- NEW FILE xorg-x11-drv-psb-0.31.0-libdrm.patch ---
--- xserver-xorg-video-psb-0.31.0/configure.ac	2009-04-17 11:22:24.000000000 -0700
+++ xserver-xorg-video-psb-0.31.0/configure.ac.new	2009-08-11 09:26:55.384720283 -0700
@@ -99,7 +99,7 @@
 
 AM_CONDITIONAL(DRI, test x$DRI = xyes)
 if test "$DRI" = yes; then
-        PKG_CHECK_MODULES(DRI, [libdrm >= 2.0 xf86driproto])
+        PKG_CHECK_MODULES(DRI, [libdrm-poulsbo >= 2.0 xf86driproto])
         AC_DEFINE(XF86DRI,1,[Enable DRI driver support])
         AC_DEFINE(XF86DRI_DEVEL,1,[Enable developmental DRI driver support])
 fi

xorg-x11-drv-psb-0.31.0-xserver17.patch:

--- NEW FILE xorg-x11-drv-psb-0.31.0-xserver17.patch ---
--- xserver-xorg-video-psb-0.31.0/src/Xpsb.h	2009-04-17 11:22:26.000000000 -0700
+++ xserver-xorg-video-psb-0.31.0/src/Xpsb.h.new	2009-08-28 09:24:16.333677591 -0700
@@ -38,7 +38,9 @@
 #include "xf86drm.h"
 #include "xf86.h"
 #include "xf86_OSproc.h"
+#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 6
 #include "xf86Resources.h"
+#endif
 #include "compiler.h"
 
 #define XPSB_VOFFSET_X 0
--- xserver-xorg-video-psb-0.31.0/src/psb_driver.h	2009-04-17 11:22:25.000000000 -0700
+++ xserver-xorg-video-psb-0.31.0/src/psb_driver.h.new	2009-08-28 09:24:11.822679667 -0700
@@ -34,7 +34,6 @@
 
 #include "xf86.h"
 #include "xf86_OSproc.h"
-#include "xf86Resources.h"
 #include "compiler.h"
 #include "xf86PciInfo.h"
 #include "vgaHW.h"
@@ -46,8 +45,10 @@
 #include "xf86int10.h"
 #include "mibank.h"
 #include "dgaproc.h"
+#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 6
 #include "xf86Resources.h"
 #include "xf86RAC.h"
+#endif
 #include "fb.h"
 #include "xaa.h"
 #include "xf86xv.h"
--- xserver-xorg-video-psb-0.31.0/src/i830_i2c.c	2009-04-17 11:22:24.000000000 -0700
+++ xserver-xorg-video-psb-0.31.0/src/i830_i2c.c.new	2009-08-28 09:33:06.789804272 -0700
@@ -31,8 +31,10 @@
 
 #include "xf86.h"
 #include "xf86_OSproc.h"
+#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 6
 #include "xf86Resources.h"
 #include "xf86RAC.h"
+#endif
 #include "xf86cmap.h"
 #include "compiler.h"
 #include "mibstore.h"
--- xserver-xorg-video-psb-0.31.0/src/psb_video.c	2009-04-17 11:22:26.000000000 -0700
+++ xserver-xorg-video-psb-0.31.0/src/psb_video.c.new	2009-08-28 09:35:03.874805663 -0700
@@ -36,7 +36,9 @@
 
 #include "xf86.h"
 #include "xf86_OSproc.h"
+#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 6
 #include "xf86Resources.h"
+#endif
 #include "compiler.h"
 
 #include "xf86xv.h"
--- xserver-xorg-video-psb-0.31.0/src/psb_driver.c	2009-04-17 11:22:26.000000000 -0700
+++ xserver-xorg-video-psb-0.31.0/src/psb_driver.c.new	2009-08-28 10:30:32.325553685 -0700
@@ -317,7 +317,7 @@
  * This data is accessed by the loader.  The name must be the module name
  * followed by "ModuleData".
  */
-XF86ModuleData psbModuleData = { &psbVersionRec, psbSetup, NULL };
+_X_EXPORT XF86ModuleData psbModuleData = { &psbVersionRec, psbSetup, NULL };
 
 static pointer
 psbSetup(pointer Module, pointer Options, int *ErrorMajor, int *ErrorMinor)
@@ -1023,11 +1023,13 @@
 
     PSB_DEBUG(scrnIndex, 3, "Initializing device\n");
 
+#ifndef XSERVER_LIBPCIACCESS
     if (xf86RegisterResources(pDevice->pEnt->index, NULL, ResExclusive)) {
 	xf86DrvMsg(scrnIndex, X_ERROR,
 		   "Could not registrer device. Resource conflict.\n");
 	return FALSE;
     }
+#endif
 
     if (!xf86LoadSubModule(pDevice->pScrns[0], "vgahw"))
 	return FALSE;


--- NEW FILE xorg-x11-drv-psb.spec ---
%global tarball		xserver-xorg-video-psb
%global moduledir	%(pkg-config xorg-server --variable=moduledir )
%global driverdir	%{moduledir}/drivers

Summary:	Intel GMA500 (Poulsbo) video driver
Name:		xorg-x11-drv-psb
Version:	0.31.0
Release:	14%{?dist}
URL:		http://ppa.launchpad.net/ubuntu-mobile/ubuntu/pool/main/x/xserver-xorg-video-psb/
Source0:	http://ppa.launchpad.net/ubuntu-mobile/ubuntu/pool/main/x/xserver-xorg-video-psb/%{tarball}_%{version}.orig.tar.gz
# Causes psb module to be loaded when a GMA500 adapter PCI ID is found
# because the freaking module's too broken to include its own modalias
Source1:	poulsbo-modprobe.conf
# Automates X.org configuration (stolen from the NVIDIA package)
Source2:	psb-config-display
Source3:	psb-init
# Look for the variant libdrm in the right place
Patch0:		xorg-x11-drv-psb-0.31.0-libdrm.patch
# Don't do ACPI detection by default
Patch1:		xorg-x11-drv-psb-0.31.0-ignoreacpi.patch
# Patch for X server 1.7
Patch2:		xorg-x11-drv-psb-0.31.0-xserver17.patch
License:	MIT
Group:		User Interface/X Hardware Support
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%if 0%{?fedora} > 11
ExclusiveArch:  i686
%else %if 0%{?fedora} > 10
ExclusiveArch:  i586
%else
ExclusiveArch:  i386
%endif

BuildRequires:	pkgconfig
BuildRequires:	autoconf
BuildRequires:	automake
BuildRequires:	libtool
BuildRequires:	xorg-x11-server-sdk
BuildRequires:	xorg-x11-proto-devel
BuildRequires:	libdrm-poulsbo-devel
BuildRequires:	mesa-libGL-devel
BuildRequires:	freeglut-devel

Requires:	xorg-x11-server-Xorg >= 1.1.0
Requires:	kmod-psb
Requires:	psb-firmware
Requires:	xpsb-glx
Requires:	libdrm-poulsbo
Provides:	psb-kmod-common
Requires:	livna-config-display

Requires(post):		livna-config-display
Requires(preun):	livna-config-display
Requires(post):		chkconfig
Requires(preun):	chkconfig

%description 
Video driver for the Intel GMA500 video chipset, also known as Poulsbo.
Note this driver depends on several proprietary pieces (and an
obsolete version of libdrm) to work, and is hence inappropriate for
submission to the main Fedora repositories.

%prep
%setup -q -n %{tarball}-%{version}
%patch0 -p1 -b .libdrm
%patch1 -p1 -b .ignoreacpi
%patch2 -p1 -b .xserver17

iconv -f iso-8859-15 -t utf-8 -o man/psb.man.utf8 man/psb.man && mv man/psb.man.utf8 man/psb.man

%build
autoreconf -i
%configure --disable-static
make

%install
rm -rf %{buildroot}
%makeinstall mandir=%{_mandir} DESTDIR=%{buildroot}

# FIXME: Remove all libtool archives (*.la) from modules directory.  This
# should be fixed in upstream Makefile.am or whatever.
find %{buildroot} -regex ".*\.la$" | xargs rm -f --

mkdir -p %{buildroot}%{_sysconfdir}/modprobe.d
install -m 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/modprobe.d/poulsbo.conf

install -D -p -m 0755 %{SOURCE2} %{buildroot}%{_sbindir}/psb-config-display
install -D -p -m 0755 %{SOURCE3} %{buildroot}%{_initrddir}/psb

%clean
rm -rf %{buildroot}

%post
if [ "$1" -eq "1" ]; then
  # Enable driver when installing
  %{_sbindir}/psb-config-display enable &>/dev/null ||:
  # Add init script and start it
  /sbin/chkconfig --add psb ||:
  %{_initrddir}/psb start &>/dev/null ||:
fi

%preun
if [ "$1" -eq "0" ]; then
    # Disable driver on final removal
    test -f %{_sbindir}/psb-config-display && %{_sbindir}/nvidia-config-display disable &>/dev/null ||:
    %{_initrddir}/psb stop &> /dev/null ||:
    /sbin/chkconfig --del psb ||:
fi ||:

%files
%defattr(-,root,root,-)
%{driverdir}/psb_drv.so
%{driverdir}/libmm.so
%{_sbindir}/psb-config-display
%{_initrddir}/psb
%config %{_sysconfdir}/modprobe.d/poulsbo.conf
%{_mandir}/man4/*.4*

%changelog
* Fri Sep 25 2009 Adam Williamson <awilliam at redhat.com> - 0.31.0-14
- switch to requiring kmod-psb not akmod-psb now we're in rpmfusion

* Fri Aug 28 2009 Adam Williamson <awilliam at redhat.com> - 0.31.0-13
- update X server 1.7 patch with a further fix (thanks ajax)

* Fri Aug 28 2009 Adam Williamson <awilliam at redhat.com> - 0.31.0-12
- try and patch for X server 1.7 (F12)

* Mon Aug 24 2009 Adam Williamson <awilliam at redhat.com> - 0.31.0-11
- correct exclusivearch for rpmfusion buildsystem

* Thu Aug 20 2009 Adam Williamson <awilliam at redhat.com> - 0.31.0-10
- exclusivearch ix86 (there's no 64-bit poulsbo hardware)
- mark config file as config
- fix nvidia reference in comments of init script

* Wed Aug 19 2009 Adam Williamson <awilliam at redhat.com> - 0.31.0-9
- add another PCI ID to the modprobe config file

* Wed Aug 19 2009 Adam Williamson <awilliam at redhat.com> - 0.31.0-8
- fix up manpage character set

* Wed Aug 19 2009 Adam Williamson <awilliam at redhat.com> - 0.31.0-7
- drop greedy.patch as it doesn't seem to work (can't work out why)
- add xorg.conf handling initscript and script based on the ones used
  in NVIDIA and ATI packages, including setting migration heuristic
  in xorg.conf since the patch didn't work

* Fri Aug 14 2009 Adam Williamson <awilliam at redhat.com> - 0.31.0-6
- add greedy.patch: default to greedy migration heuristic (gives
  better performance for multiple testers)
- add ignoreacpi.patch: default to ignoreACPI (required to avoid X
  crashing for multiple testers)

* Tue Aug 11 2009 Adam Williamson <awilliam at redhat.com> - 0.31.0-5
- patch build to find newly relocated libdrm-poulsbo

* Mon Aug 10 2009 Adam Williamson <awilliam at redhat.com> - 0.31.0-4
- add a modprobe config file to make the kernel module auto-load (in
  this package as it's doing the job of psb-kmod-common)

* Mon Aug 10 2009 Adam Williamson <awilliam at redhat.com> - 0.31.0-3
- Require akmod-psb not kmod-psb so I don't have to keep rebuilding

* Mon Aug 10 2009 Adam Williamson <awilliam at redhat.com> - 0.31.0-2
- Begin changelog tracking



Index: .cvsignore
===================================================================
RCS file: /cvs/nonfree/rpms/xorg-x11-drv-psb/F-11/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore	24 Sep 2009 15:21:18 -0000	1.1
+++ .cvsignore	26 Sep 2009 06:00:28 -0000	1.2
@@ -0,0 +1 @@
+xserver-xorg-video-psb_0.31.0.orig.tar.gz


Index: sources
===================================================================
RCS file: /cvs/nonfree/rpms/xorg-x11-drv-psb/F-11/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	24 Sep 2009 15:21:18 -0000	1.1
+++ sources	26 Sep 2009 06:00:28 -0000	1.2
@@ -0,0 +1 @@
+d8bf0770169ba86ecbf1cf0c0ac93d38  xserver-xorg-video-psb_0.31.0.orig.tar.gz



More information about the rpmfusion-commits mailing list