rpms/OpenEXR_Viewers-nonfree/devel openexr_viewers-1.0.2-gccCg.patch, NONE, 1.1 OpenEXR_Viewers-nonfree.spec, 1.8, 1.9
by Nicolas Chauvet
Author: kwizart
Update of /cvs/nonfree/rpms/OpenEXR_Viewers-nonfree/devel
In directory se02.es.rpmfusion.net:/tmp/cvs-serv28728
Modified Files:
OpenEXR_Viewers-nonfree.spec
Added Files:
openexr_viewers-1.0.2-gccCg.patch
Log Message:
Fix gcc44 in Cg case
openexr_viewers-1.0.2-gccCg.patch:
ctlToLut.cpp | 1 +
1 file changed, 1 insertion(+)
--- NEW FILE openexr_viewers-1.0.2-gccCg.patch ---
diff -up openexr_viewers-1.0.2/playexr/ctlToLut.cpp.gccCg openexr_viewers-1.0.2/playexr/ctlToLut.cpp
--- openexr_viewers-1.0.2/playexr/ctlToLut.cpp.gccCg 2007-07-26 04:34:32.000000000 +0200
+++ openexr_viewers-1.0.2/playexr/ctlToLut.cpp 2010-09-17 17:53:19.000000000 +0200
@@ -38,6 +38,7 @@
//
//-----------------------------------------------------------------------------
+#include <stdio.h>
#include <ctlToLut.h>
#if HAVE_CTL_INTERPRETER
Index: OpenEXR_Viewers-nonfree.spec
===================================================================
RCS file: /cvs/nonfree/rpms/OpenEXR_Viewers-nonfree/devel/OpenEXR_Viewers-nonfree.spec,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- OpenEXR_Viewers-nonfree.spec 16 Sep 2010 12:49:43 -0000 1.8
+++ OpenEXR_Viewers-nonfree.spec 18 Sep 2010 08:28:39 -0000 1.9
@@ -12,7 +12,7 @@
Name: %{real_name}
Version: 1.0.2
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: Viewers programs for OpenEXR
Group: Applications/Multimedia
@@ -21,6 +21,7 @@
Source0: http://download.savannah.nongnu.org/releases/openexr/openexr_viewers-%{ve...
Patch0: openexr_viewers-1.0.1-gcc43.patch
Patch1: openexr_viewers-1.0.1-gcc44.patch
+Patch2: openexr_viewers-1.0.2-gccCg.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: libtool
@@ -70,6 +71,7 @@
%setup -q -n openexr_viewers-%{version}
%patch0 -p1 -b .gcc43
%patch1 -p1 -b .gcc44
+%patch2 -p1 -b .gccCg
%if %{_lib} == lib64
sed -i -e 's|ACTUAL_PREFIX/lib/CTL|ACTUAL_PREFIX/lib64/CTL|' configure.ac
@@ -134,6 +136,9 @@
%endif
%changelog
+* Sat Sep 18 2010 Nicolas Chauvet <kwizart(a)gmail.com> - 1.0.2-3
+- Fix gcc44 in Cg case
+
* Sun Sep 05 2010 Nicolas Chauvet <kwizart(a)gmail.com> - 1.0.2-2
- Fix CTL Module search path on lib64
- Fix OpenEXR_CTL detection at build time.
14 years, 2 months
rpms/xorg-x11-drv-psb/F-13 xorg-x11-drv-psb-0.32.0-hdmi.patch, NONE, 1.1 xorg-x11-drv-psb.spec, 1.2, 1.3
by Adam Williamson
Author: adamwill
Update of /cvs/nonfree/rpms/xorg-x11-drv-psb/F-13
In directory se02.es.rpmfusion.net:/tmp/cvs-serv3831
Modified Files:
xorg-x11-drv-psb.spec
Added Files:
xorg-x11-drv-psb-0.32.0-hdmi.patch
Log Message:
* Fri Sep 18 2010 Adam Williamson <adamwill AT shaw DOT ca> - 0.32.0-5
- add hdmi.patch, from Joakim Plate: fix HDMI output
xorg-x11-drv-psb-0.32.0-hdmi.patch:
psb_outputs.c | 24 +++++++++++++++++++++++-
1 file changed, 23 insertions(+), 1 deletion(-)
--- NEW FILE xorg-x11-drv-psb-0.32.0-hdmi.patch ---
--- xserver-xorg-video-psb-0.32.1/src/psb_outputs.c.orig 2010-09-16 10:01:25.836640004 +0200
+++ xserver-xorg-video-psb-0.32.1/src/psb_outputs.c 2010-09-16 10:02:20.092640004 +0200
@@ -64,6 +64,28 @@ psbOutputCommit(xf86OutputPtr output)
output->funcs->dpms(output, DPMSModeOn);
}
+static int
+DDC_checksum_psb(unsigned char *block, int len)
+{
+ int i, result = 0;
+ int not_null = 0;
+
+ for (i=0;i<len;i++) {
+ not_null |= block[i];
+ result += block[i];
+ }
+
+#ifdef DEBUG
+ if (result & 0xFF) ErrorF("DDC checksum not correct\n");
+ if (!not_null) ErrorF("DDC read all Null\n");
+#endif
+
+ /* catch the trivial case where all bytes are 0 */
+ if (!not_null) return 1;
+
+ return (result&0xFF);
+}
+
/*Add this function to get the EDID data from DDC bus, got the code from Xserver Jamesx*/
unsigned char *
psbDDCRead_DDC2(int scrnIndex, I2CBusPtr pBus, int start, int len)
@@ -107,7 +129,7 @@ psbDDCRead_DDC2(int scrnIndex, I2CBusPtr
* (len));
for (i = 0; i < 4 /*RETRIES*/; i++) {
if (xf86I2CWriteRead(dev, W_Buffer, w_bytes, R_Buffer, len)) {
- if (!DDC_checksum(R_Buffer, len))
+ if (!DDC_checksum_psb(R_Buffer, len))
return R_Buffer;
}
}
Index: xorg-x11-drv-psb.spec
===================================================================
RCS file: /cvs/nonfree/rpms/xorg-x11-drv-psb/F-13/xorg-x11-drv-psb.spec,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- xorg-x11-drv-psb.spec 22 Jul 2010 21:32:56 -0000 1.2
+++ xorg-x11-drv-psb.spec 17 Sep 2010 22:56:47 -0000 1.3
@@ -38,6 +38,8 @@
Patch10: xorg-x11-drv-psb-0.32.0-xv.patch
# From Yves - fix blank screen when rotating 90 degrees
Patch11: xorg-x11-drv-psb-0.32.0-rotate.patch
+# From Joakim Plate - fixes HDMI output
+Patch12: xorg-x11-drv-psb-0.32.0-hdmi.patch
License: MIT
Group: User Interface/X Hardware Support
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -92,7 +94,7 @@
%patch9 -p1 -b .mixed
%patch10 -p1 -b .xv
%patch11 -p1 -b .rotate
-
+%patch12 -p1 -b .hdmi
iconv -f iso-8859-15 -t utf-8 -o man/psb.man.utf8 man/psb.man && mv man/psb.man.utf8 man/psb.man
@@ -146,6 +148,9 @@
%{_mandir}/man4/*.4*
%changelog
+* Fri Sep 18 2010 Adam Williamson <adamwill AT shaw DOT ca> - 0.32.0-5
+- add hdmi.patch, from Joakim Plate: fix HDMI output
+
* Thu Jul 22 2010 Adam Williamson <adamwill AT shaw DOT ca> - 0.32.0-4
- add rotate.patch, from Yves: fixes 90 degree rotation
14 years, 2 months
rpms/Cg/devel .cvsignore,1.7,1.8 sources,1.7,1.8 Cg.spec,1.9,1.10
by Nicolas Chauvet
Author: kwizart
Update of /cvs/nonfree/rpms/Cg/devel
In directory se02.es.rpmfusion.net:/tmp/cvs-serv18083
Modified Files:
.cvsignore sources Cg.spec
Log Message:
Update to 3.0.0007 July2010 release
Index: .cvsignore
===================================================================
RCS file: /cvs/nonfree/rpms/Cg/devel/.cvsignore,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- .cvsignore 28 Feb 2010 21:50:36 -0000 1.7
+++ .cvsignore 17 Sep 2010 13:16:20 -0000 1.8
@@ -1,2 +1,2 @@
-Cg-2.2_February2010_x86_64.tgz
-Cg-2.2_February2010_x86.tgz
+Cg-3.0_July2010_x86_64.tgz
+Cg-3.0_July2010_x86.tgz
Index: sources
===================================================================
RCS file: /cvs/nonfree/rpms/Cg/devel/sources,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- sources 28 Feb 2010 21:50:36 -0000 1.7
+++ sources 17 Sep 2010 13:16:20 -0000 1.8
@@ -1,2 +1,2 @@
-475f7247d8cda5ddc27fd86ec9f8adcd Cg-2.2_February2010_x86_64.tgz
-d386561f4dcf4734d5b8b29c8b2b7f09 Cg-2.2_February2010_x86.tgz
+9eb20a61b66d3a8b1112bc057012e9cf Cg-3.0_July2010_x86_64.tgz
+f1053d00855974fb444a8fcb04faf73a Cg-3.0_July2010_x86.tgz
Index: Cg.spec
===================================================================
RCS file: /cvs/nonfree/rpms/Cg/devel/Cg.spec,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- Cg.spec 28 Feb 2010 21:50:36 -0000 1.9
+++ Cg.spec 17 Sep 2010 13:16:20 -0000 1.10
@@ -1,6 +1,6 @@
-%define maj_version 2.2
-%define min_version 0017
-%define date February2010
+%define maj_version 3.0
+%define min_version 0007
+%define date July2010
# No debuginfo
%define debug_package %{nil}
@@ -143,7 +143,7 @@
%files docs
%defattr(644,root,root,755)
-%doc usr/local/Cg/docs usr/local/Cg/examples usr/local/Cg/include
+%doc usr/local/Cg/docs usr/local/Cg/examples
%files -n libCg
%defattr(755,root,root,755)
@@ -151,6 +151,9 @@
%changelog
+* Fri Sep 17 2010 Nicolas Chauvet <kwizart(a)gmail.com> - 3.0.0007-1
+- Update to 3.0.007 (July2010)
+
* Sun Feb 28 2010 Nicolas Chauvet <kwizart(a)fedoraproject.org> - 2.2.0017-1
- Update to 2.2.0017 (February2010)
14 years, 2 months
rpms/psb-kmod/devel psb-kmod-4.41.1-overflow.patch, NONE, 1.1 psb-kmod.spec, 1.1, 1.2
by Adam Williamson
Author: adamwill
Update of /cvs/nonfree/rpms/psb-kmod/devel
In directory se02.es.rpmfusion.net:/tmp/cvs-serv14370
Modified Files:
psb-kmod.spec
Added Files:
psb-kmod-4.41.1-overflow.patch
Log Message:
* Fri Sep 17 2010 Adam Williamson <adamwill AT shaw DOT ca> - 4.41.1-14
- add a patch from Lubomir Rintel to fix for kernel 2.6.35
psb-kmod-4.41.1-overflow.patch:
drm_drv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- NEW FILE psb-kmod-4.41.1-overflow.patch ---
--- a/drm_drv.c
+++ b/drm_drv.c
@@ -649,7 +649,7 @@ long drm_unlocked_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
if (cmd & IOC_IN) {
if (copy_from_user(kdata, (void __user *)arg,
- _IOC_SIZE(cmd)) != 0) {
+ _IOC_SIZE(cmd) & 0x1ff) != 0) {
retcode = -EACCES;
goto err_i1;
}
Index: psb-kmod.spec
===================================================================
RCS file: /cvs/nonfree/rpms/psb-kmod/devel/psb-kmod.spec,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- psb-kmod.spec 17 Sep 2010 10:39:24 -0000 1.1
+++ psb-kmod.spec 17 Sep 2010 12:23:36 -0000 1.2
@@ -7,7 +7,7 @@
Name: psb-kmod
Version: 4.41.1
-Release: 13%{?dist}.6
+Release: 14%{?dist}
Summary: Kernel module for Poulsbo graphics chipsets
Group: System Environment/Kernel
@@ -42,6 +42,8 @@
Patch9: 0002-psb-If-not-asking-for-debug-is-an-error-I-want-to-be.patch
# From Matthew Garrett: fix framebuffer
Patch10: 0003-psb-Fix-framebuffer.patch
+# From Lubomir Rintel: fix build for 2.6.35
+Patch11: psb-kmod-4.41.1-overflow.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
ExclusiveArch: i586 i686
@@ -83,6 +85,7 @@
%patch8 -p1 -b .firmware
%patch9 -p1 -b .debug
%patch10 -p1 -b .framebuffer
+%patch11 -p1 -b .overflow
popd
done
@@ -113,6 +116,9 @@
%changelog
+* Fri Sep 17 2010 Adam Williamson <adamwill AT shaw DOT ca> - 4.41.1-14
+- add a patch from Lubomir Rintel to fix for kernel 2.6.35
+
* Sat Sep 11 2010 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info> - 4.41.1-13.6
- rebuild for new kernel
14 years, 2 months
rpms/xpsb-glx/devel xpsb-glx.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
by Adam Williamson
Author: adamwill
Update of /cvs/nonfree/rpms/xpsb-glx/devel
In directory se02.es.rpmfusion.net:/tmp/cvs-serv14180/devel
Modified Files:
.cvsignore sources
Added Files:
xpsb-glx.spec
Log Message:
- import F-13 branch into devel
--- NEW FILE xpsb-glx.spec ---
Summary: X11 drivers for Poulsbo (psb) 3D acceleration
Name: xpsb-glx
Version: 0.18
Release: 5%{?dist}
License: Redistributable, no modification permitted
Group: System Environment/Kernel
URL: http://ppa.launchpad.net/ubuntu-mobile/ubuntu/pool/main/x/xpsb-glx/
Source0: http://ppa.launchpad.net/ubuntu-mobile/ubuntu/pool/main/x/xpsb-glx/%{name...
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
ExclusiveArch: i686
%description
This package contains the 3D X11 drivers for the Poulsbo (psb) graphics
subsystem.
%prep
%setup -q -n %{name}
%install
rm -rf %{buildroot}
mkdir -p %{buildroot}%{_libdir}/dri
mkdir -p %{buildroot}%{_libdir}/va/drivers
mkdir -p %{buildroot}%{_libdir}/xorg/modules/drivers
install -m 0644 drivers/* %{buildroot}%{_libdir}/xorg/modules/drivers
install -m 0644 dri/psb_dri.so %{buildroot}%{_libdir}/dri
install -m 0644 dri/psb_drv_video.so %{buildroot}%{_libdir}/va/drivers
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
%doc COPYING
%{_libdir}/xorg/modules/drivers/*
%{_libdir}/va/drivers/*
%{_libdir}/dri/*
%changelog
* Wed Sep 30 2009 Adam Williamson <adamwill AT shaw DOT ca> - 0.18-5
- change my email address in changelog to correct one for Fusion
* Mon Aug 24 2009 Adam Williamson <adamwill AT shaw DOT ca> - 0.18-4
- exclusivearch i686 (most accurate we can get)
* Wed Aug 19 2009 Adam Williamson <adamwill AT shaw DOT ca> - 0.18-3
- correct license for RPMFusion conventions
* Wed Aug 12 2009 Adam Williamson <adamwill AT shaw DOT ca> - 0.18-2
- Put the video playback acceleration driver where libva will find it
* Mon Aug 10 2009 Adam Williamson <adamwill AT shaw DOT ca> - 0.18-1
- Begin changelog tracking
Index: sources
===================================================================
RCS file: /cvs/nonfree/rpms/xpsb-glx/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources 24 Sep 2009 15:25:28 -0000 1.1
+++ sources 17 Sep 2010 12:21:42 -0000 1.2
@@ -0,0 +1 @@
+9d14c7e16a72db1923c1a7801cf347c7 xpsb-glx_0.18.orig.tar.gz
14 years, 2 months
rpms/libdrm-poulsbo/devel filter-provides.sh, NONE, 1.1 libdrm-poulsbo-relocate_headers.patch, NONE, 1.1 libdrm-poulsbo.spec, NONE, 1.1 libdrm-poulsbo_configure_debian.patch, NONE, 1.1 libdrm-poulsbo_headers_debian.patch, NONE, 1.1 psb_drm.h, NONE, 1.1 psb_drv.h, NONE, 1.1 psb_reg.h, NONE, 1.1 psb_schedule.h, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
by Adam Williamson
Author: adamwill
Update of /cvs/nonfree/rpms/libdrm-poulsbo/devel
In directory se02.es.rpmfusion.net:/tmp/cvs-serv7611/devel
Modified Files:
.cvsignore sources
Added Files:
filter-provides.sh libdrm-poulsbo-relocate_headers.patch
libdrm-poulsbo.spec libdrm-poulsbo_configure_debian.patch
libdrm-poulsbo_headers_debian.patch psb_drm.h psb_drv.h
psb_reg.h psb_schedule.h
Log Message:
- import f13 build to devel
--- NEW FILE filter-provides.sh ---
#!/bin/sh
if [ -x /usr/lib/rpm/redhat/find-provides ]; then
FINDPROV=/usr/lib/rpm/redhat/find-provides
else
FINDPROV=/usr/lib/rpm/find-provides
fi
$FINDPROV $* | sed -e '/libdrm.so.2/d'
libdrm-poulsbo-relocate_headers.patch:
libdrm.pc.in | 2 +-
libdrm/Makefile.am | 2 +-
shared-core/Makefile.am | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
--- NEW FILE libdrm-poulsbo-relocate_headers.patch ---
--- libdrm-2.3.0/libdrm.pc.in 2008-10-31 06:38:56.000000000 -0700
+++ libdrm-2.3.0/libdrm.pc.in.new 2009-05-13 15:51:25.092858114 -0700
@@ -7,4 +7,4 @@
Description: Userspace interface to kernel DRM services
Version: @PACKAGE_VERSION@
Libs: -L${libdir} -ldrm
-Cflags: -I${includedir} -I${includedir}/drm
+Cflags: -I${includedir}/psb -I${includedir}/psb/drm
--- libdrm-2.3.0/shared-core/Makefile.am 2009-05-13 13:45:38.563871125 -0700
+++ libdrm-2.3.0/shared-core/Makefile.am.new 2009-05-13 15:50:57.903870870 -0700
@@ -22,7 +22,7 @@
# however, r300 and via need their reg headers installed in order to build.
# better solutions are welcome.
-klibdrmincludedir = ${includedir}/drm
+klibdrmincludedir = ${includedir}/psb/drm
klibdrminclude_HEADERS = \
drm.h \
drm_sarea.h \
--- libdrm-2.3.0/libdrm/Makefile.am 2008-11-18 01:01:45.000000000 -0800
+++ libdrm-2.3.0/libdrm/Makefile.am.new 2009-05-13 15:51:02.500871356 -0700
@@ -25,7 +25,7 @@
AM_CFLAGS = -I$(top_srcdir)/shared-core
libdrm_la_SOURCES = xf86drm.c xf86drmHash.c xf86drmRandom.c xf86drmSL.c xf86drmMode.c
-libdrmincludedir = ${includedir}
+libdrmincludedir = ${includedir}/psb
libdrminclude_HEADERS = xf86drm.h xf86mm.h xf86drmMode.h
EXTRA_DIST = ChangeLog TODO
--- NEW FILE libdrm-poulsbo.spec ---
%global oname libdrm
Summary: Direct Rendering Manager runtime library (for Poulsbo)
Name: libdrm-poulsbo
Version: 2.3.0
Release: 11%{?dist}
License: MIT
Group: System Environment/Libraries
URL: http://ppa.launchpad.net/ubuntu-mobile/ubuntu/pool/main/libd/libdrm-poulsbo/
Source0: http://ppa.launchpad.net/ubuntu-mobile/ubuntu/pool/main/libd/libdrm-pouls...
# Extra sources are extracted from Ubuntu diff
Source1: psb_drm.h
Source2: psb_drv.h
Source3: psb_reg.h
Source4: psb_schedule.h
# Don't provide libdrm.so.2 (#1186)
Source5: filter-provides.sh
%global _use_internal_dependency_generator 0
%global __find_provides %{SOURCE5}
Patch0: libdrm-poulsbo_configure_debian.patch
Patch1: libdrm-poulsbo_headers_debian.patch
Patch2: libdrm-poulsbo-relocate_headers.patch
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
Requires: udev
Requires: kernel
BuildRequires: pkgconfig
BuildRequires: libtool
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: kernel-headers
BuildRequires: libxcb-devel
BuildRequires: libudev-devel
# For the file we can't carry in both
Requires: libdrm
%description
Direct Rendering Manager runtime library. This build is specifically
for the xorg-x11-drv-psb driver, for Intel Poulsbo graphics chipsets.
As it is versioned lower than the normal build of libdrm, it is set to
obsolete that version, so it can be installed smoothly. If you wish to
revert to the regular version of libdrm for any reason, you will need
to force the removal of this version with 'rpm -e --nodeps' before you
are able to.
%package devel
Summary: Direct Rendering Manager development package
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: kernel-headers
Requires: pkgconfig
%description devel
Direct Rendering Manager development package. This build is
specifically for the xorg-x11-drv-psb driver, for Intel Poulsbo
graphics chipsets.
%prep
%setup -q -n %{oname}-%{version}
install -m 0644 %{SOURCE1} shared-core/
install -m 0644 %{SOURCE2} shared-core/
install -m 0644 %{SOURCE3} shared-core/
install -m 0644 %{SOURCE4} shared-core/
%patch0 -p1
%patch1 -p1 -b .headers
%patch2 -p1 -b .relocate
%build
autoreconf -i
%configure --libdir=%{_libdir}/psb
make %{?_smp_mflags}
%install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot}
# SUBDIRS=libdrm
mkdir -p %{buildroot}%{_sysconfdir}/udev/rules.d/
# NOTE: We intentionally don't ship *.la files
find %{buildroot} -type f -name '*.la' | xargs rm -f -- || :
for i in i915 mach64 mga nouveau r128 radeon savage sis via; do rm -f %{buildroot}%{_includedir}/psb/drm/$i"_drm.h"; done
for i in drm_sarea.h r300_reg.h via_3d_reg.h
do
rm -f %{buildroot}%{_includedir}/psb/drm/$i
done
# clean up for relocation
mkdir -p %{buildroot}%{_libdir}/pkgconfig
mv %{buildroot}%{_libdir}/psb/pkgconfig/libdrm.pc %{buildroot}%{_libdir}/pkgconfig/libdrm-poulsbo.pc
mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d
cat > %{buildroot}%{_sysconfdir}/ld.so.conf.d/psb.conf << EOF
%{_libdir}/psb
EOF
%clean
rm -rf %{buildroot}
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root,-)
%doc MIT_License.txt README
%{_libdir}/psb/libdrm.so.2
%{_libdir}/psb/libdrm.so.2.3.0
%config %{_sysconfdir}/ld.so.conf.d/psb.conf
%files devel
%defattr(-,root,root,-)
%doc MIT_License.txt
%dir %{_includedir}/psb
%dir %{_includedir}/psb/drm
# NOTE: Headers are listed explicitly, so we can monitor additions/removals.
%{_includedir}/psb/drm/drm.h
%{_includedir}/psb/drm/psb_drv.h
%{_includedir}/psb/drm/psb_drm.h
%{_includedir}/psb/drm/psb_reg.h
%{_includedir}/psb/drm/psb_schedule.h
# FIXME should be in drm/ too
%{_includedir}/psb/xf86drm.h
%{_includedir}/psb/xf86drmMode.h
%{_includedir}/psb/xf86mm.h
%{_libdir}/psb/libdrm.so
%{_libdir}/pkgconfig/libdrm-poulsbo.pc
%changelog
* Thu Jul 15 2010 Adam Williamson <adamwill AT shaw DOT ca> 2.3.0-11
- don't provide libdrm.so.2 (#1186)
* Wed Sep 30 2009 Adam Williamson <adamwill AT shaw DOT ca> 2.3.0-10
- change my email address in changelog to correct one for Fusion
* Mon Aug 24 2009 Adam Williamson <adamwill AT shaw DOT ca> 2.3.0-9
- correct exclusivearch for rpmfusion buildsystem
- don't install 91-drm-modeset.rules only to delete it later
* Thu Aug 20 2009 Adam Williamson <adamwill AT shaw DOT ca> 2.3.0-8
- exclusivearch ix86 (there's no 64-bit poulsbo hardware)
- mark config file as config
* Wed Aug 19 2009 Adam Williamson <adamwill AT shaw DOT ca> 2.3.0-7
- put the license in as documentation
* Tue Aug 11 2009 Adam Williamson <adamwill AT shaw DOT ca> 2.3.0-6
- The Let's Stop Smoking Crack release: move the library to libdir/psb
and use an ld.so.conf.d file, thus avoiding all the obsoletes /
provides tomfoolery and co-existing peacefully with main libdrm
thanks lkundrak for the suggestion
* Mon Aug 10 2009 Adam Williamson <adamwill AT shaw DOT ca> 2.3.0-5
- more outrageous lies in the -devel package
* Mon Aug 10 2009 Adam Williamson <adamwill AT shaw DOT ca> 2.3.0-4
- use ldconfig -X in %post and %postun to (hopefully) work around the
nasty #513224 in normal use of these packages (this should be the
only library installed in the initial transaction people use)
* Mon Aug 10 2009 Adam Williamson <adamwill AT shaw DOT ca> 2.3.0-3
- lie outrageously about what we provide to satisfy some dependencies
* Mon Aug 10 2009 Adam Williamson <adamwill AT shaw DOT ca> 2.3.0-2
- obsolete / provide regular libdrm
* Wed May 13 2009 Adam Williamson <adamwill AT shaw DOT ca> 2.3.0-1
- initial poulsbo libdrm package (from ubuntu-mobile repos)
libdrm-poulsbo_configure_debian.patch:
configure | 7625 ++++++++++++++++++++++++++++----------------------------------
1 file changed, 3526 insertions(+), 4099 deletions(-)
--- NEW FILE libdrm-poulsbo_configure_debian.patch ---
--- libdrm-poulsbo-2.3.0.orig/configure
+++ libdrm-poulsbo-2.3.0/configure
@@ -1,56 +1,27 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61 for libdrm 2.3.1.
+# Generated by GNU Autoconf 2.59 for libdrm 2.3.0.
#
# Report bugs to <dri-devel(a)lists.sourceforge.net>.
#
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2003 Free Software Foundation, Inc.
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
## --------------------- ##
## M4sh Initialization. ##
## --------------------- ##
-# Be more Bourne compatible
-DUALCASE=1; export DUALCASE # for MKS sh
+# Be Bourne compatible
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
emulate sh
NULLCMD=:
# Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
# is contrary to our usage. Disable this feature.
alias -g '${1+"$@"}'='"$@"'
- setopt NO_GLOB_SUBST
-else
- case `(set -o) 2>/dev/null` in
- *posix*) set -o posix ;;
-esac
-
-fi
-
-
-
-
-# PATH needs CR
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
- else
- PATH_SEPARATOR=:
- fi
- rm -f conf$$.sh
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+ set -o posix
fi
+DUALCASE=1; export DUALCASE # for MKS sh
# Support unset when possible.
if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
@@ -60,43 +31,8 @@
fi
-# IFS
-# We need space, tab and new line, in precisely that order. Quoting is
-# there to prevent editors from complaining about space-tab.
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
-# splitting by setting IFS to empty value.)
-as_nl='
-'
-IFS=" "" $as_nl"
-
-# Find who we are. Look in the path if we contain no directory separator.
-case $0 in
- *[\\/]* ) as_myself=$0 ;;
- *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
-IFS=$as_save_IFS
-
- ;;
-esac
-# We did not find ourselves, most probably we were run as `sh COMMAND'
-# in which case we are not to be found in the path.
-if test "x$as_myself" = x; then
- as_myself=$0
-fi
-if test ! -f "$as_myself"; then
- echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
- { (exit 1); exit 1; }
-fi
-
# Work around bugs in pre-3.0 UWIN ksh.
-for as_var in ENV MAIL MAILPATH
-do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
-done
+$as_unset ENV MAIL MAILPATH
PS1='$ '
PS2='> '
PS4='+ '
@@ -110,19 +46,18 @@
if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
eval $as_var=C; export $as_var
else
- ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+ $as_unset $as_var
fi
done
# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1 &&
- test "X`expr 00001 : '.*\(...\)'`" = X001; then
+if expr a : '\(a\)' >/dev/null 2>&1; then
as_expr=expr
else
as_expr=false
fi
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
as_basename=basename
else
as_basename=false
@@ -130,388 +65,157 @@
# Name of the executable.
-as_me=`$as_basename -- "$0" ||
+as_me=`$as_basename "$0" ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+ X"$0" : 'X\(/\)$' \| \
+ . : '\(.\)' 2>/dev/null ||
echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{
- s//\1/
- q
- }
- /^X\/\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\/\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
-
-# CDPATH.
-$as_unset CDPATH
-
+ sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+ /^X\/\(\/\/\)$/{ s//\1/; q; }
+ /^X\/\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
-if test "x$CONFIG_SHELL" = x; then
- if (eval ":") 2>/dev/null; then
- as_have_required=yes
-else
- as_have_required=no
-fi
-
- if test $as_have_required = yes && (eval ":
-(as_func_return () {
- (exit \$1)
-}
-as_func_success () {
- as_func_return 0
-}
-as_func_failure () {
- as_func_return 1
-}
-as_func_ret_success () {
- return 0
-}
-as_func_ret_failure () {
- return 1
-}
-exitcode=0
-if as_func_success; then
- :
-else
- exitcode=1
- echo as_func_success failed.
-fi
-
[...11527 lines suppressed...]
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+ case "$ac_dir" in
+ .) ac_abs_builddir=`pwd`;;
+ [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+ *) ac_abs_builddir=`pwd`/"$ac_dir";;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+ case ${ac_top_builddir}. in
+ .) ac_abs_top_builddir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+ *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+ case $ac_srcdir in
+ .) ac_abs_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+ *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+ case $ac_top_srcdir in
+ .) ac_abs_top_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+ *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+ esac;;
+esac
- case $ac_file$ac_mode in
- "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
+ { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
+echo "$as_me: executing $ac_dest commands" >&6;}
+ case $ac_dest in
+ depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
# Strip MF so we end up with the name of the file.
mf=`echo "$mf" | sed -e 's/:.*$//'`
# Check whether this is an Automake generated Makefile or not.
@@ -21796,29 +21260,18 @@
# each Makefile.in and add a new line on top of each file to say so.
# So let's grep whole file.
if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
- dirpart=`$as_dirname -- "$mf" ||
+ dirpart=`(dirname "$mf") 2>/dev/null ||
$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$mf" : 'X\(//\)[^/]' \| \
X"$mf" : 'X\(//\)$' \| \
- X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
+ X"$mf" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
echo X"$mf" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
else
continue
fi
@@ -21840,79 +21293,53 @@
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
# Make sure the directory exists.
test -f "$dirpart/$file" && continue
- fdir=`$as_dirname -- "$file" ||
+ fdir=`(dirname "$file") 2>/dev/null ||
$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$file" : 'X\(//\)[^/]' \| \
X"$file" : 'X\(//\)$' \| \
- X"$file" : 'X\(/\)' \| . 2>/dev/null ||
+ X"$file" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
echo X"$file" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
- { as_dir=$dirpart/$fdir
- case $as_dir in #(
- -*) as_dir=./$as_dir;;
- esac
- test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ { if $as_mkdir_p; then
+ mkdir -p $dirpart/$fdir
+ else
+ as_dir=$dirpart/$fdir
as_dirs=
- while :; do
- case $as_dir in #(
- *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
- *) as_qdir=$as_dir;;
- esac
- as_dirs="'$as_qdir' $as_dirs"
- as_dir=`$as_dirname -- "$as_dir" ||
+ while test ! -d "$as_dir"; do
+ as_dirs="$as_dir $as_dirs"
+ as_dir=`(dirname "$as_dir") 2>/dev/null ||
$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$as_dir" : 'X\(//\)[^/]' \| \
X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+ X"$as_dir" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
echo X"$as_dir" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
- test -d "$as_dir" && break
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
done
- test -z "$as_dirs" || eval "mkdir $as_dirs"
- } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
-echo "$as_me: error: cannot create directory $as_dir" >&2;}
+ test ! -n "$as_dirs" || mkdir $as_dirs
+ fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5
+echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;}
{ (exit 1); exit 1; }; }; }
+
# echo "creating $dirpart/$file"
echo '# dummy' > "$dirpart/$file"
done
done
;;
-
esac
-done # for ac_tag
+done
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
{ (exit 0); exit 0; }
_ACEOF
libdrm-poulsbo_headers_debian.patch:
Makefile.am | 6 +++++-
Makefile.in | 22 ++++++++++++++++------
2 files changed, 21 insertions(+), 7 deletions(-)
--- NEW FILE libdrm-poulsbo_headers_debian.patch ---
Index: libdrm-2.3.0/shared-core/Makefile.am
===================================================================
--- libdrm-2.3.0.orig/shared-core/Makefile.am 2009-03-20 16:38:18.000000000 +1100
+++ libdrm-2.3.0/shared-core/Makefile.am 2009-03-20 16:38:50.000000000 +1100
@@ -36,5 +36,9 @@
sis_drm.h \
via_drm.h \
r300_reg.h \
- via_3d_reg.h
+ via_3d_reg.h \
+ psb_drv.h \
+ psb_drm.h \
+ psb_reg.h \
+ psb_schedule.h
Index: libdrm-2.3.0/shared-core/Makefile.in
===================================================================
--- libdrm-2.3.0.orig/shared-core/Makefile.in 2009-03-20 16:38:18.000000000 +1100
+++ libdrm-2.3.0/shared-core/Makefile.in 2009-03-20 16:38:59.000000000 +1100
@@ -113,6 +113,7 @@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
+GREP = @GREP@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -137,12 +138,9 @@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
-ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
@@ -159,24 +157,31 @@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
+htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
+localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
pkgconfigdir = @pkgconfigdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
+psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
@@ -188,13 +193,18 @@
i915_drm.h \
mach64_drm.h \
mga_drm.h \
+ nouveau_drm.h \
r128_drm.h \
radeon_drm.h \
savage_drm.h \
sis_drm.h \
via_drm.h \
r300_reg.h \
- via_3d_reg.h
+ via_3d_reg.h \
+ psb_drv.h \
+ psb_drm.h \
+ psb_reg.h \
+ psb_schedule.h
all: all-am
@@ -208,9 +218,9 @@
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign shared-core/Makefile'; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu shared-core/Makefile'; \
cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign shared-core/Makefile
+ $(AUTOMAKE) --gnu shared-core/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
--- NEW FILE psb_drm.h ---
/**************************************************************************
* Copyright (c) 2007, Intel Corporation.
* All Rights Reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU 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.,
* 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
*
* Intel funded Tungsten Graphics (http://www.tungstengraphics.com) to
* develop this driver.
*
**************************************************************************/
/*
*/
#ifndef _PSB_DRM_H_
#define _PSB_DRM_H_
#if defined(__linux__) && !defined(__KERNEL__)
#include<stdint.h>
#endif
/*
* Intel Poulsbo driver package version.
*
*/
/* #define PSB_PACKAGE_VERSION "ED"__DATE__*/
#define PSB_PACKAGE_VERSION "2.2.0.32L.0027"
#define DRM_PSB_SAREA_MAJOR 0
#define DRM_PSB_SAREA_MINOR 1
#define PSB_FIXED_SHIFT 16
/*
* Public memory types.
*/
#define DRM_PSB_MEM_MMU DRM_BO_MEM_PRIV1
#define DRM_PSB_FLAG_MEM_MMU DRM_BO_FLAG_MEM_PRIV1
#define DRM_PSB_MEM_PDS DRM_BO_MEM_PRIV2
#define DRM_PSB_FLAG_MEM_PDS DRM_BO_FLAG_MEM_PRIV2
#define DRM_PSB_MEM_APER DRM_BO_MEM_PRIV3
#define DRM_PSB_FLAG_MEM_APER DRM_BO_FLAG_MEM_PRIV3
#define DRM_PSB_MEM_RASTGEOM DRM_BO_MEM_PRIV4
#define DRM_PSB_FLAG_MEM_RASTGEOM DRM_BO_FLAG_MEM_PRIV4
#define PSB_MEM_RASTGEOM_START 0x30000000
typedef int32_t psb_fixed;
typedef uint32_t psb_ufixed;
static inline psb_fixed psb_int_to_fixed(int a)
{
return a * (1 << PSB_FIXED_SHIFT);
}
static inline psb_ufixed psb_unsigned_to_ufixed(unsigned int a)
{
return a << PSB_FIXED_SHIFT;
}
/*Status of the command sent to the gfx device.*/
typedef enum {
DRM_CMD_SUCCESS,
DRM_CMD_FAILED,
DRM_CMD_HANG
} drm_cmd_status_t;
struct drm_psb_scanout {
uint32_t buffer_id; /* DRM buffer object ID */
uint32_t rotation; /* Rotation as in RR_rotation definitions */
uint32_t stride; /* Buffer stride in bytes */
uint32_t depth; /* Buffer depth in bits (NOT) bpp */
uint32_t width; /* Buffer width in pixels */
uint32_t height; /* Buffer height in lines */
psb_fixed transform[3][3]; /* Buffer composite transform */
/* (scaling, rot, reflect) */
};
#define DRM_PSB_SAREA_OWNERS 16
#define DRM_PSB_SAREA_OWNER_2D 0
#define DRM_PSB_SAREA_OWNER_3D 1
#define DRM_PSB_SAREA_SCANOUTS 3
struct drm_psb_sarea {
/* Track changes of this data structure */
uint32_t major;
uint32_t minor;
/* Last context to touch part of hw */
uint32_t ctx_owners[DRM_PSB_SAREA_OWNERS];
/* Definition of front- and rotated buffers */
uint32_t num_scanouts;
struct drm_psb_scanout scanouts[DRM_PSB_SAREA_SCANOUTS];
int planeA_x;
int planeA_y;
int planeA_w;
int planeA_h;
int planeB_x;
int planeB_y;
int planeB_w;
int planeB_h;
uint32_t msvdx_state;
uint32_t msvdx_context;
};
#define PSB_RELOC_MAGIC 0x67676767
#define PSB_RELOC_SHIFT_MASK 0x0000FFFF
#define PSB_RELOC_SHIFT_SHIFT 0
#define PSB_RELOC_ALSHIFT_MASK 0xFFFF0000
#define PSB_RELOC_ALSHIFT_SHIFT 16
#define PSB_RELOC_OP_OFFSET 0 /* Offset of the indicated
* buffer
*/
#define PSB_RELOC_OP_2D_OFFSET 1 /* Offset of the indicated
* buffer, relative to 2D
* base address
*/
#define PSB_RELOC_OP_PDS_OFFSET 2 /* Offset of the indicated buffer,
* relative to PDS base address
*/
#define PSB_RELOC_OP_STRIDE 3 /* Stride of the indicated
* buffer (for tiling)
*/
#define PSB_RELOC_OP_USE_OFFSET 4 /* Offset of USE buffer
* relative to base reg
*/
#define PSB_RELOC_OP_USE_REG 5 /* Base reg of USE buffer */
struct drm_psb_reloc {
uint32_t reloc_op;
uint32_t where; /* offset in destination buffer */
uint32_t buffer; /* Buffer reloc applies to */
uint32_t mask; /* Destination format: */
uint32_t shift; /* Destination format: */
uint32_t pre_add; /* Destination format: */
uint32_t background; /* Destination add */
uint32_t dst_buffer; /* Destination buffer. Index into buffer_list */
uint32_t arg0; /* Reloc-op dependant */
uint32_t arg1;
};
#define PSB_BO_FLAG_TA (1ULL << 48)
#define PSB_BO_FLAG_SCENE (1ULL << 49)
#define PSB_BO_FLAG_FEEDBACK (1ULL << 50)
#define PSB_BO_FLAG_USSE (1ULL << 51)
#define PSB_ENGINE_2D 0
#define PSB_ENGINE_VIDEO 1
#define PSB_ENGINE_RASTERIZER 2
#define PSB_ENGINE_TA 3
#define PSB_ENGINE_HPRAST 4
/*
* For this fence class we have a couple of
* fence types.
*/
#define _PSB_FENCE_EXE_SHIFT 0
#define _PSB_FENCE_TA_DONE_SHIFT 1
#define _PSB_FENCE_RASTER_DONE_SHIFT 2
#define _PSB_FENCE_SCENE_DONE_SHIFT 3
#define _PSB_FENCE_FEEDBACK_SHIFT 4
#define _PSB_ENGINE_TA_FENCE_TYPES 5
#define _PSB_FENCE_TYPE_TA_DONE (1 << _PSB_FENCE_TA_DONE_SHIFT)
#define _PSB_FENCE_TYPE_RASTER_DONE (1 << _PSB_FENCE_RASTER_DONE_SHIFT)
#define _PSB_FENCE_TYPE_SCENE_DONE (1 << _PSB_FENCE_SCENE_DONE_SHIFT)
#define _PSB_FENCE_TYPE_FEEDBACK (1 << _PSB_FENCE_FEEDBACK_SHIFT)
#define PSB_ENGINE_HPRAST 4
#define PSB_NUM_ENGINES 5
#define PSB_TA_FLAG_FIRSTPASS (1 << 0)
#define PSB_TA_FLAG_LASTPASS (1 << 1)
#define PSB_FEEDBACK_OP_VISTEST (1 << 0)
struct drm_psb_scene {
int handle_valid;
uint32_t handle;
uint32_t w;
uint32_t h;
uint32_t num_buffers;
};
struct drm_psb_hw_info
{
uint32_t rev_id;
uint32_t caps;
};
typedef struct drm_psb_cmdbuf_arg {
uint64_t buffer_list; /* List of buffers to validate */
uint64_t clip_rects; /* See i915 counterpart */
uint64_t scene_arg;
uint64_t fence_arg;
uint32_t ta_flags;
uint32_t ta_handle; /* TA reg-value pairs */
uint32_t ta_offset;
uint32_t ta_size;
uint32_t oom_handle;
uint32_t oom_offset;
uint32_t oom_size;
uint32_t cmdbuf_handle; /* 2D Command buffer object or, */
uint32_t cmdbuf_offset; /* rasterizer reg-value pairs */
uint32_t cmdbuf_size;
uint32_t reloc_handle; /* Reloc buffer object */
uint32_t reloc_offset;
uint32_t num_relocs;
int32_t damage; /* Damage front buffer with cliprects */
/* Not implemented yet */
uint32_t fence_flags;
uint32_t engine;
/*
* Feedback;
*/
uint32_t feedback_ops;
uint32_t feedback_handle;
uint32_t feedback_offset;
uint32_t feedback_breakpoints;
uint32_t feedback_size;
} drm_psb_cmdbuf_arg_t;
struct drm_psb_xhw_init_arg {
uint32_t operation;
uint32_t buffer_handle;
};
/*
* Feedback components:
*/
/*
* Vistest component. The number of these in the feedback buffer
* equals the number of vistest breakpoints + 1.
* This is currently the only feedback component.
*/
struct drm_psb_vistest {
uint32_t vt[8];
};
#define PSB_HW_COOKIE_SIZE 16
#define PSB_HW_FEEDBACK_SIZE 8
#define PSB_HW_OOM_CMD_SIZE 6
struct drm_psb_xhw_arg {
uint32_t op;
int ret;
uint32_t irq_op;
uint32_t issue_irq;
uint32_t cookie[PSB_HW_COOKIE_SIZE];
union {
struct {
uint32_t w;
uint32_t h;
uint32_t size;
uint32_t clear_p_start;
uint32_t clear_num_pages;
} si;
struct {
uint32_t fire_flags;
uint32_t hw_context;
uint32_t offset;
uint32_t engine;
uint32_t flags;
uint32_t rca;
uint32_t num_oom_cmds;
uint32_t oom_cmds[PSB_HW_OOM_CMD_SIZE];
} sb;
struct {
uint32_t pages;
uint32_t size;
} bi;
struct {
uint32_t bca;
uint32_t rca;
uint32_t flags;
} oom;
struct {
uint32_t pt_offset;
uint32_t param_offset;
uint32_t flags;
} bl;
struct {
uint32_t value;
} cl;
uint32_t feedback[PSB_HW_FEEDBACK_SIZE];
} arg;
};
#define DRM_PSB_CMDBUF 0x00
#define DRM_PSB_XHW_INIT 0x01
#define DRM_PSB_XHW 0x02
#define DRM_PSB_SCENE_UNREF 0x03
/* Controlling the kernel modesetting buffers */
#define DRM_PSB_KMS_OFF 0x04
#define DRM_PSB_KMS_ON 0x05
#define DRM_PSB_HW_INFO 0x06
#define PSB_XHW_INIT 0x00
#define PSB_XHW_TAKEDOWN 0x01
#define PSB_XHW_FIRE_RASTER 0x00
#define PSB_XHW_SCENE_INFO 0x01
#define PSB_XHW_SCENE_BIND_FIRE 0x02
#define PSB_XHW_TA_MEM_INFO 0x03
#define PSB_XHW_RESET_DPM 0x04
#define PSB_XHW_OOM 0x05
#define PSB_XHW_TERMINATE 0x06
#define PSB_XHW_VISTEST 0x07
#define PSB_XHW_RESUME 0x08
#define PSB_XHW_TA_MEM_LOAD 0x09
#define PSB_XHW_CHECK_LOCKUP 0x0a
#define PSB_SCENE_FLAG_DIRTY (1 << 0)
#define PSB_SCENE_FLAG_COMPLETE (1 << 1)
#define PSB_SCENE_FLAG_SETUP (1 << 2)
#define PSB_SCENE_FLAG_SETUP_ONLY (1 << 3)
#define PSB_SCENE_FLAG_CLEARED (1 << 4)
#define PSB_TA_MEM_FLAG_TA (1 << 0)
#define PSB_TA_MEM_FLAG_RASTER (1 << 1)
#define PSB_TA_MEM_FLAG_HOSTA (1 << 2)
#define PSB_TA_MEM_FLAG_HOSTD (1 << 3)
#define PSB_TA_MEM_FLAG_INIT (1 << 4)
#define PSB_TA_MEM_FLAG_NEW_PT_OFFSET (1 << 5)
/*Raster fire will deallocate memory */
#define PSB_FIRE_FLAG_RASTER_DEALLOC (1 << 0)
/*Isp reset needed due to change in ZLS format */
#define PSB_FIRE_FLAG_NEEDS_ISP_RESET (1 << 1)
/*These are set by Xpsb. */
#define PSB_FIRE_FLAG_XHW_MASK 0xff000000
/*The task has had at least one OOM and Xpsb will
send back messages on each fire. */
#define PSB_FIRE_FLAG_XHW_OOM (1 << 24)
#define PSB_SCENE_ENGINE_TA 0
#define PSB_SCENE_ENGINE_RASTER 1
#define PSB_SCENE_NUM_ENGINES 2
struct drm_psb_dev_info_arg {
uint32_t num_use_attribute_registers;
};
#define DRM_PSB_DEVINFO 0x01
#endif
--- NEW FILE psb_drv.h ---
/**************************************************************************
* Copyright (c) 2007, Intel Corporation.
* All Rights Reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU 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.,
* 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
*
* Intel funded Tungsten Graphics (http://www.tungstengraphics.com) to
* develop this driver.
*
**************************************************************************/
/*
*/
#ifndef _PSB_DRV_H_
#define _PSB_DRV_H_
#include "drmP.h"
#include "psb_drm.h"
#include "psb_reg.h"
#include "psb_schedule.h"
#include "intel_drv.h"
enum {
CHIP_PSB_8108 = 0,
CHIP_PSB_8109 = 1
};
/*
* Hardware bugfixes
*/
#define FIX_TG_16
#define FIX_TG_2D_CLOCKGATE
#define DRIVER_NAME "psb"
#define DRIVER_DESC "drm driver for the Intel GMA500"
#define DRIVER_AUTHOR "Tungsten Graphics Inc."
#define PSB_DRM_DRIVER_DATE "20081118"
#define PSB_DRM_DRIVER_MAJOR 4
#define PSB_DRM_DRIVER_MINOR 21
#define PSB_DRM_DRIVER_PATCHLEVEL 0
#define PSB_VDC_OFFSET 0x00000000
#define PSB_VDC_SIZE 0x000080000
#define PSB_SGX_SIZE 0x8000
#define PSB_SGX_OFFSET 0x00040000
#define PSB_MMIO_RESOURCE 0
#define PSB_GATT_RESOURCE 2
#define PSB_GTT_RESOURCE 3
#define PSB_GMCH_CTRL 0x52
#define PSB_BSM 0x5C
#define _PSB_GMCH_ENABLED 0x4
#define PSB_PGETBL_CTL 0x2020
#define _PSB_PGETBL_ENABLED 0x00000001
#define PSB_SGX_2D_SLAVE_PORT 0x4000
#define PSB_TT_PRIV0_LIMIT (256*1024*1024)
#define PSB_TT_PRIV0_PLIMIT (PSB_TT_PRIV0_LIMIT >> PAGE_SHIFT)
#define PSB_NUM_VALIDATE_BUFFERS 1024
#define PSB_MEM_KERNEL_START 0x10000000
#define PSB_MEM_PDS_START 0x20000000
#define PSB_MEM_MMU_START 0x40000000
#define DRM_PSB_MEM_KERNEL DRM_BO_MEM_PRIV0
#define DRM_PSB_FLAG_MEM_KERNEL DRM_BO_FLAG_MEM_PRIV0
/*
* Flags for external memory type field.
*/
#define PSB_MSVDX_OFFSET 0x50000 /*MSVDX Base offset */
#define PSB_MSVDX_SIZE 0x8000 /*MSVDX MMIO region is 0x50000 - 0x57fff ==> 32KB */
#define PSB_MMU_CACHED_MEMORY 0x0001 /* Bind to MMU only */
#define PSB_MMU_RO_MEMORY 0x0002 /* MMU RO memory */
#define PSB_MMU_WO_MEMORY 0x0004 /* MMU WO memory */
/*
* PTE's and PDE's
*/
#define PSB_PDE_MASK 0x003FFFFF
#define PSB_PDE_SHIFT 22
#define PSB_PTE_SHIFT 12
#define PSB_PTE_VALID 0x0001 /* PTE / PDE valid */
#define PSB_PTE_WO 0x0002 /* Write only */
#define PSB_PTE_RO 0x0004 /* Read only */
#define PSB_PTE_CACHED 0x0008 /* CPU cache coherent */
/*
* VDC registers and bits
*/
#define PSB_HWSTAM 0x2098
#define PSB_INSTPM 0x20C0
#define PSB_INT_IDENTITY_R 0x20A4
#define _PSB_VSYNC_PIPEB_FLAG (1<<5)
#define _PSB_VSYNC_PIPEA_FLAG (1<<7)
#define _PSB_IRQ_SGX_FLAG (1<<18)
#define _PSB_IRQ_MSVDX_FLAG (1<<19)
#define PSB_INT_MASK_R 0x20A8
#define PSB_INT_ENABLE_R 0x20A0
#define PSB_PIPEASTAT 0x70024
#define _PSB_VBLANK_INTERRUPT_ENABLE (1 << 17)
#define _PSB_VBLANK_CLEAR (1 << 1)
#define PSB_PIPEBSTAT 0x71024
#define _PSB_MMU_ER_MASK 0x0001FF00
#define _PSB_MMU_ER_HOST (1 << 16)
#define GPIOA 0x5010
#define GPIOB 0x5014
#define GPIOC 0x5018
#define GPIOD 0x501c
#define GPIOE 0x5020
#define GPIOF 0x5024
#define GPIOG 0x5028
#define GPIOH 0x502c
#define GPIO_CLOCK_DIR_MASK (1 << 0)
#define GPIO_CLOCK_DIR_IN (0 << 1)
#define GPIO_CLOCK_DIR_OUT (1 << 1)
#define GPIO_CLOCK_VAL_MASK (1 << 2)
#define GPIO_CLOCK_VAL_OUT (1 << 3)
#define GPIO_CLOCK_VAL_IN (1 << 4)
#define GPIO_CLOCK_PULLUP_DISABLE (1 << 5)
#define GPIO_DATA_DIR_MASK (1 << 8)
#define GPIO_DATA_DIR_IN (0 << 9)
#define GPIO_DATA_DIR_OUT (1 << 9)
#define GPIO_DATA_VAL_MASK (1 << 10)
#define GPIO_DATA_VAL_OUT (1 << 11)
#define GPIO_DATA_VAL_IN (1 << 12)
#define GPIO_DATA_PULLUP_DISABLE (1 << 13)
#define VCLK_DIVISOR_VGA0 0x6000
#define VCLK_DIVISOR_VGA1 0x6004
#define VCLK_POST_DIV 0x6010
#define DRM_DRIVER_PRIVATE_T struct drm_psb_private
#define I915_WRITE(_offs, _val) \
iowrite32(_val, dev_priv->vdc_reg + (_offs))
#define I915_READ(_offs) \
ioread32(dev_priv->vdc_reg + (_offs))
#define PSB_COMM_2D (PSB_ENGINE_2D << 4)
#define PSB_COMM_3D (PSB_ENGINE_3D << 4)
#define PSB_COMM_TA (PSB_ENGINE_TA << 4)
#define PSB_COMM_HP (PSB_ENGINE_HP << 4)
#define PSB_COMM_USER_IRQ (1024 >> 2)
#define PSB_COMM_USER_IRQ_LOST (PSB_COMM_USER_IRQ + 1)
#define PSB_COMM_FW (2048 >> 2)
#define PSB_UIRQ_VISTEST 1
#define PSB_UIRQ_OOM_REPLY 2
#define PSB_UIRQ_FIRE_TA_REPLY 3
#define PSB_UIRQ_FIRE_RASTER_REPLY 4
#define PSB_2D_SIZE (256*1024*1024)
#define PSB_MAX_RELOC_PAGES 1024
#define PSB_LOW_REG_OFFS 0x0204
#define PSB_HIGH_REG_OFFS 0x0600
#define PSB_NUM_VBLANKS 2
#define PSB_COMM_2D (PSB_ENGINE_2D << 4)
#define PSB_COMM_3D (PSB_ENGINE_3D << 4)
#define PSB_COMM_TA (PSB_ENGINE_TA << 4)
#define PSB_COMM_HP (PSB_ENGINE_HP << 4)
#define PSB_COMM_FW (2048 >> 2)
#define PSB_2D_SIZE (256*1024*1024)
#define PSB_MAX_RELOC_PAGES 1024
#define PSB_LOW_REG_OFFS 0x0204
#define PSB_HIGH_REG_OFFS 0x0600
#define PSB_NUM_VBLANKS 2
#define PSB_WATCHDOG_DELAY (DRM_HZ / 10)
/*
* User options.
*/
struct drm_psb_uopt {
int clock_gating;
};
struct psb_gtt {
struct drm_device *dev;
int initialized;
uint32_t gatt_start;
uint32_t gtt_start;
uint32_t gtt_phys_start;
unsigned gtt_pages;
unsigned gatt_pages;
uint32_t stolen_base;
uint32_t pge_ctl;
u16 gmch_ctrl;
unsigned long stolen_size;
uint32_t *gtt_map;
struct rw_semaphore sem;
};
struct psb_use_base {
struct list_head head;
struct drm_fence_object *fence;
unsigned int reg;
unsigned long offset;
unsigned int dm;
};
struct psb_buflist_item;
struct psb_msvdx_cmd_queue {
struct list_head head;
void *cmd;
unsigned long cmd_size;
uint32_t sequence;
};
struct drm_psb_private {
unsigned long chipset;
uint8_t psb_rev_id;
struct psb_xhw_buf resume_buf;
struct drm_psb_dev_info_arg dev_info;
struct drm_psb_uopt uopt;
struct psb_gtt *pg;
struct page *scratch_page;
struct page *comm_page;
volatile uint32_t *comm;
uint32_t comm_mmu_offset;
uint32_t mmu_2d_offset;
uint32_t sequence[PSB_NUM_ENGINES];
uint32_t last_sequence[PSB_NUM_ENGINES];
int idle[PSB_NUM_ENGINES];
uint32_t last_submitted_seq[PSB_NUM_ENGINES];
int engine_lockup_2d;
struct psb_mmu_driver *mmu;
struct psb_mmu_pd *pf_pd;
uint8_t *sgx_reg;
uint8_t *vdc_reg;
uint8_t *msvdx_reg;
/*
* MSVDX
*/
int msvdx_needs_reset;
int has_msvdx;
uint32_t gatt_free_offset;
atomic_t msvdx_mmu_invaldc;
/*
* Fencing / irq.
*/
uint32_t sgx_irq_mask;
uint32_t sgx2_irq_mask;
uint32_t vdc_irq_mask;
spinlock_t irqmask_lock;
spinlock_t sequence_lock;
int fence0_irq_on;
int irq_enabled;
unsigned int irqen_count_2d;
wait_queue_head_t event_2d_queue;
#ifdef FIX_TG_16
wait_queue_head_t queue_2d;
atomic_t lock_2d;
atomic_t ta_wait_2d;
atomic_t ta_wait_2d_irq;
atomic_t waiters_2d;
#else
struct mutex mutex_2d;
#endif
uint32_t msvdx_current_sequence;
uint32_t msvdx_last_sequence;
#define MSVDX_MAX_IDELTIME HZ*30
uint32_t msvdx_finished_sequence;
uint32_t msvdx_start_idle;
unsigned long msvdx_idle_start_jiffies;
int fence2_irq_on;
/*
* MSVDX Rendec Memory
*/
struct drm_buffer_object *ccb0;
uint32_t base_addr0;
struct drm_buffer_object *ccb1;
uint32_t base_addr1;
/*
* Memory managers
*/
int have_vram;
int have_tt;
int have_mem_mmu;
int have_mem_aper;
int have_mem_kernel;
int have_mem_pds;
int have_mem_rastgeom;
struct mutex temp_mem;
/*
* Relocation buffer mapping.
*/
spinlock_t reloc_lock;
unsigned int rel_mapped_pages;
wait_queue_head_t rel_mapped_queue;
/*
* SAREA
*/
struct drm_psb_sarea *sarea_priv;
/*
* LVDS info
*/
int backlight_duty_cycle; /* restore backlight to this value */
bool panel_wants_dither;
struct drm_display_mode *panel_fixed_mode;
/*
* Register state
*/
uint32_t saveDSPACNTR;
uint32_t saveDSPBCNTR;
uint32_t savePIPEACONF;
uint32_t savePIPEBCONF;
uint32_t savePIPEASRC;
uint32_t savePIPEBSRC;
uint32_t saveFPA0;
uint32_t saveFPA1;
uint32_t saveDPLL_A;
uint32_t saveDPLL_A_MD;
uint32_t saveHTOTAL_A;
uint32_t saveHBLANK_A;
uint32_t saveHSYNC_A;
uint32_t saveVTOTAL_A;
uint32_t saveVBLANK_A;
uint32_t saveVSYNC_A;
uint32_t saveDSPASTRIDE;
uint32_t saveDSPASIZE;
uint32_t saveDSPAPOS;
uint32_t saveDSPABASE;
uint32_t saveDSPASURF;
uint32_t saveFPB0;
uint32_t saveFPB1;
uint32_t saveDPLL_B;
uint32_t saveDPLL_B_MD;
uint32_t saveHTOTAL_B;
uint32_t saveHBLANK_B;
uint32_t saveHSYNC_B;
uint32_t saveVTOTAL_B;
uint32_t saveVBLANK_B;
uint32_t saveVSYNC_B;
uint32_t saveDSPBSTRIDE;
uint32_t saveDSPBSIZE;
uint32_t saveDSPBPOS;
uint32_t saveDSPBBASE;
uint32_t saveDSPBSURF;
uint32_t saveVCLK_DIVISOR_VGA0;
uint32_t saveVCLK_DIVISOR_VGA1;
uint32_t saveVCLK_POST_DIV;
uint32_t saveVGACNTRL;
uint32_t saveADPA;
uint32_t saveLVDS;
uint32_t saveDVOA;
uint32_t saveDVOB;
uint32_t saveDVOC;
uint32_t savePP_ON;
uint32_t savePP_OFF;
uint32_t savePP_CONTROL;
uint32_t savePP_CYCLE;
uint32_t savePFIT_CONTROL;
uint32_t savePaletteA[256];
uint32_t savePaletteB[256];
uint32_t saveBLC_PWM_CTL;
uint32_t saveCLOCKGATING;
/*
* USE code base register management.
*/
struct drm_reg_manager use_manager;
/*
* Xhw
*/
uint32_t *xhw;
struct drm_buffer_object *xhw_bo;
struct drm_bo_kmap_obj xhw_kmap;
struct list_head xhw_in;
spinlock_t xhw_lock;
atomic_t xhw_client;
struct drm_file *xhw_file;
wait_queue_head_t xhw_queue;
wait_queue_head_t xhw_caller_queue;
struct mutex xhw_mutex;
struct psb_xhw_buf *xhw_cur_buf;
int xhw_submit_ok;
int xhw_on;
/*
* Scheduling.
*/
struct mutex reset_mutex;
struct mutex cmdbuf_mutex;
struct psb_scheduler scheduler;
struct psb_buflist_item *buffers;
uint32_t ta_mem_pages;
struct psb_ta_mem *ta_mem;
int force_ta_mem_load;
/*
* Watchdog
*/
spinlock_t watchdog_lock;
struct timer_list watchdog_timer;
struct work_struct watchdog_wq;
struct work_struct msvdx_watchdog_wq;
int timer_available;
/*
* msvdx command queue
*/
spinlock_t msvdx_lock;
struct mutex msvdx_mutex;
struct list_head msvdx_queue;
int msvdx_busy;
};
struct psb_mmu_driver;
extern struct psb_mmu_driver *psb_mmu_driver_init(uint8_t __iomem * registers,
int trap_pagefaults,
int invalid_type,
atomic_t *msvdx_mmu_invaldc);
extern void psb_mmu_driver_takedown(struct psb_mmu_driver *driver);
extern struct psb_mmu_pd *psb_mmu_get_default_pd(struct psb_mmu_driver *driver);
extern void psb_mmu_mirror_gtt(struct psb_mmu_pd *pd, uint32_t mmu_offset,
uint32_t gtt_start, uint32_t gtt_pages);
extern void psb_mmu_test(struct psb_mmu_driver *driver, uint32_t offset);
extern struct psb_mmu_pd *psb_mmu_alloc_pd(struct psb_mmu_driver *driver,
int trap_pagefaults,
int invalid_type);
extern void psb_mmu_free_pagedir(struct psb_mmu_pd *pd);
extern void psb_mmu_flush(struct psb_mmu_driver *driver);
extern void psb_mmu_remove_pfn_sequence(struct psb_mmu_pd *pd,
unsigned long address,
uint32_t num_pages);
extern int psb_mmu_insert_pfn_sequence(struct psb_mmu_pd *pd,
uint32_t start_pfn,
unsigned long address,
uint32_t num_pages, int type);
extern int psb_mmu_virtual_to_pfn(struct psb_mmu_pd *pd, uint32_t virtual,
unsigned long *pfn);
/*
* Enable / disable MMU for different requestors.
*/
extern void psb_mmu_enable_requestor(struct psb_mmu_driver *driver,
uint32_t mask);
extern void psb_mmu_disable_requestor(struct psb_mmu_driver *driver,
uint32_t mask);
extern void psb_mmu_set_pd_context(struct psb_mmu_pd *pd, int hw_context);
extern int psb_mmu_insert_pages(struct psb_mmu_pd *pd, struct page **pages,
unsigned long address, uint32_t num_pages,
uint32_t desired_tile_stride,
uint32_t hw_tile_stride, int type);
extern void psb_mmu_remove_pages(struct psb_mmu_pd *pd, unsigned long address,
uint32_t num_pages,
uint32_t desired_tile_stride,
uint32_t hw_tile_stride);
/*
* psb_sgx.c
*/
extern int psb_blit_sequence(struct drm_psb_private *dev_priv,
uint32_t sequence);
extern void psb_init_2d(struct drm_psb_private *dev_priv);
extern int psb_idle_2d(struct drm_device *dev);
extern int psb_idle_3d(struct drm_device *dev);
extern int psb_emit_2d_copy_blit(struct drm_device *dev,
uint32_t src_offset,
uint32_t dst_offset, uint32_t pages,
int direction);
extern int psb_cmdbuf_ioctl(struct drm_device *dev, void *data,
struct drm_file *file_priv);
extern int psb_reg_submit(struct drm_psb_private *dev_priv, uint32_t * regs,
unsigned int cmds);
extern int psb_submit_copy_cmdbuf(struct drm_device *dev,
struct drm_buffer_object *cmd_buffer,
unsigned long cmd_offset,
unsigned long cmd_size, int engine,
uint32_t * copy_buffer);
extern void psb_fence_or_sync(struct drm_file *priv,
int engine,
struct drm_psb_cmdbuf_arg *arg,
struct drm_fence_arg *fence_arg,
struct drm_fence_object **fence_p);
extern void psb_init_disallowed(void);
/*
* psb_irq.c
*/
extern irqreturn_t psb_irq_handler(DRM_IRQ_ARGS);
extern void psb_irq_preinstall(struct drm_device *dev);
extern void psb_irq_postinstall(struct drm_device *dev);
extern void psb_irq_uninstall(struct drm_device *dev);
extern int psb_vblank_wait2(struct drm_device *dev, unsigned int *sequence);
extern int psb_vblank_wait(struct drm_device *dev, unsigned int *sequence);
/*
* psb_fence.c
*/
extern void psb_fence_handler(struct drm_device *dev, uint32_t class);
extern void psb_2D_irq_off(struct drm_psb_private *dev_priv);
extern void psb_2D_irq_on(struct drm_psb_private *dev_priv);
extern uint32_t psb_fence_advance_sequence(struct drm_device *dev,
uint32_t class);
extern int psb_fence_emit_sequence(struct drm_device *dev, uint32_t fence_class,
uint32_t flags, uint32_t * sequence,
uint32_t * native_type);
extern void psb_fence_error(struct drm_device *dev,
uint32_t class,
uint32_t sequence, uint32_t type, int error);
/*MSVDX stuff*/
extern void psb_msvdx_irq_off(struct drm_psb_private *dev_priv);
extern void psb_msvdx_irq_on(struct drm_psb_private *dev_priv);
extern int psb_hw_info_ioctl(struct drm_device *dev, void *data,
struct drm_file *file_priv);
/*
* psb_buffer.c
*/
extern struct drm_ttm_backend *drm_psb_tbe_init(struct drm_device *dev);
extern int psb_fence_types(struct drm_buffer_object *bo, uint32_t * class,
uint32_t * type);
extern uint32_t psb_evict_mask(struct drm_buffer_object *bo);
extern int psb_invalidate_caches(struct drm_device *dev, uint64_t flags);
extern int psb_init_mem_type(struct drm_device *dev, uint32_t type,
struct drm_mem_type_manager *man);
extern int psb_move(struct drm_buffer_object *bo,
int evict, int no_wait, struct drm_bo_mem_reg *new_mem);
extern int psb_tbe_size(struct drm_device *dev, unsigned long num_pages);
/*
* psb_gtt.c
*/
extern int psb_gtt_init(struct psb_gtt *pg, int resume);
extern int psb_gtt_insert_pages(struct psb_gtt *pg, struct page **pages,
unsigned offset_pages, unsigned num_pages,
unsigned desired_tile_stride,
unsigned hw_tile_stride, int type);
extern int psb_gtt_remove_pages(struct psb_gtt *pg, unsigned offset_pages,
unsigned num_pages,
unsigned desired_tile_stride,
unsigned hw_tile_stride);
extern struct psb_gtt *psb_gtt_alloc(struct drm_device *dev);
extern void psb_gtt_takedown(struct psb_gtt *pg, int free);
/*
* psb_fb.c
*/
extern int psbfb_probe(struct drm_device *dev, struct drm_crtc *crtc);
extern int psbfb_remove(struct drm_device *dev, struct drm_crtc *crtc);
extern int psbfb_kms_off_ioctl(struct drm_device *dev, void *data,
struct drm_file *file_priv);
extern int psbfb_kms_on_ioctl(struct drm_device *dev, void *data,
struct drm_file *file_priv);
extern void psbfb_suspend(struct drm_device *dev);
extern void psbfb_resume(struct drm_device *dev);
/*
* psb_reset.c
*/
extern void psb_reset(struct drm_psb_private *dev_priv, int reset_2d);
extern void psb_schedule_watchdog(struct drm_psb_private *dev_priv);
extern void psb_watchdog_init(struct drm_psb_private *dev_priv);
extern void psb_watchdog_takedown(struct drm_psb_private *dev_priv);
extern void psb_print_pagefault(struct drm_psb_private *dev_priv);
/*
* psb_regman.c
*/
extern void psb_takedown_use_base(struct drm_psb_private *dev_priv);
extern int psb_grab_use_base(struct drm_psb_private *dev_priv,
unsigned long dev_virtual,
unsigned long size,
unsigned int data_master,
uint32_t fence_class,
uint32_t fence_type,
int no_wait,
int ignore_signals,
int *r_reg, uint32_t * r_offset);
extern int psb_init_use_base(struct drm_psb_private *dev_priv,
unsigned int reg_start, unsigned int reg_num);
/*
* psb_xhw.c
*/
extern int psb_xhw_ioctl(struct drm_device *dev, void *data,
struct drm_file *file_priv);
extern int psb_xhw_init_ioctl(struct drm_device *dev, void *data,
struct drm_file *file_priv);
extern int psb_xhw_init(struct drm_device *dev);
extern void psb_xhw_takedown(struct drm_psb_private *dev_priv);
extern void psb_xhw_init_takedown(struct drm_psb_private *dev_priv,
struct drm_file *file_priv, int closing);
extern int psb_xhw_scene_bind_fire(struct drm_psb_private *dev_priv,
struct psb_xhw_buf *buf,
uint32_t fire_flags,
uint32_t hw_context,
uint32_t * cookie,
uint32_t * oom_cmds,
uint32_t num_oom_cmds,
uint32_t offset,
uint32_t engine, uint32_t flags);
extern int psb_xhw_fire_raster(struct drm_psb_private *dev_priv,
struct psb_xhw_buf *buf, uint32_t fire_flags);
extern int psb_xhw_scene_info(struct drm_psb_private *dev_priv,
struct psb_xhw_buf *buf,
uint32_t w,
uint32_t h,
uint32_t * hw_cookie,
uint32_t * bo_size,
uint32_t * clear_p_start,
uint32_t * clear_num_pages);
extern int psb_xhw_reset_dpm(struct drm_psb_private *dev_priv,
struct psb_xhw_buf *buf);
extern int psb_xhw_check_lockup(struct drm_psb_private *dev_priv,
struct psb_xhw_buf *buf, uint32_t * value);
extern int psb_xhw_ta_mem_info(struct drm_psb_private *dev_priv,
struct psb_xhw_buf *buf,
uint32_t pages,
uint32_t * hw_cookie, uint32_t * size);
extern int psb_xhw_ta_oom(struct drm_psb_private *dev_priv,
struct psb_xhw_buf *buf, uint32_t * cookie);
extern void psb_xhw_ta_oom_reply(struct drm_psb_private *dev_priv,
struct psb_xhw_buf *buf,
uint32_t * cookie,
uint32_t * bca,
uint32_t * rca, uint32_t * flags);
extern int psb_xhw_vistest(struct drm_psb_private *dev_priv,
struct psb_xhw_buf *buf);
extern int psb_xhw_handler(struct drm_psb_private *dev_priv);
extern int psb_xhw_resume(struct drm_psb_private *dev_priv,
struct psb_xhw_buf *buf);
extern void psb_xhw_fire_reply(struct drm_psb_private *dev_priv,
struct psb_xhw_buf *buf, uint32_t * cookie);
extern int psb_xhw_ta_mem_load(struct drm_psb_private *dev_priv,
struct psb_xhw_buf *buf,
uint32_t flags,
uint32_t param_offset,
uint32_t pt_offset, uint32_t * hw_cookie);
extern void psb_xhw_clean_buf(struct drm_psb_private *dev_priv,
struct psb_xhw_buf *buf);
/*
* psb_schedule.c: HW bug fixing.
*/
#ifdef FIX_TG_16
extern void psb_2d_unlock(struct drm_psb_private *dev_priv);
extern void psb_2d_lock(struct drm_psb_private *dev_priv);
extern void psb_resume_ta_2d_idle(struct drm_psb_private *dev_priv);
#else
#define psb_2d_lock(_dev_priv) mutex_lock(&(_dev_priv)->mutex_2d)
#define psb_2d_unlock(_dev_priv) mutex_unlock(&(_dev_priv)->mutex_2d)
#endif
/*
* Utilities
*/
#define PSB_ALIGN_TO(_val, _align) \
(((_val) + ((_align) - 1)) & ~((_align) - 1))
#define PSB_WVDC32(_val, _offs) \
iowrite32(_val, dev_priv->vdc_reg + (_offs))
#define PSB_RVDC32(_offs) \
ioread32(dev_priv->vdc_reg + (_offs))
#define PSB_WSGX32(_val, _offs) \
iowrite32(_val, dev_priv->sgx_reg + (_offs))
#define PSB_RSGX32(_offs) \
ioread32(dev_priv->sgx_reg + (_offs))
#define PSB_WMSVDX32(_val, _offs) \
iowrite32(_val, dev_priv->msvdx_reg + (_offs))
#define PSB_RMSVDX32(_offs) \
ioread32(dev_priv->msvdx_reg + (_offs))
#define PSB_ALPL(_val, _base) \
(((_val) >> (_base ## _ALIGNSHIFT)) << (_base ## _SHIFT))
#define PSB_ALPLM(_val, _base) \
((((_val) >> (_base ## _ALIGNSHIFT)) << (_base ## _SHIFT)) & (_base ## _MASK))
#define PSB_D_RENDER (1 << 16)
#define PSB_D_GENERAL (1 << 0)
#define PSB_D_INIT (1 << 1)
#define PSB_D_IRQ (1 << 2)
#define PSB_D_FW (1 << 3)
#define PSB_D_PERF (1 << 4)
#define PSB_D_TMP (1 << 5)
#define PSB_D_RELOC (1 << 6)
extern int drm_psb_debug;
extern int drm_psb_no_fb;
extern int drm_psb_disable_vsync;
#define PSB_DEBUG_FW(_fmt, _arg...) \
PSB_DEBUG(PSB_D_FW, _fmt, ##_arg)
#define PSB_DEBUG_GENERAL(_fmt, _arg...) \
PSB_DEBUG(PSB_D_GENERAL, _fmt, ##_arg)
#define PSB_DEBUG_INIT(_fmt, _arg...) \
PSB_DEBUG(PSB_D_INIT, _fmt, ##_arg)
#define PSB_DEBUG_IRQ(_fmt, _arg...) \
PSB_DEBUG(PSB_D_IRQ, _fmt, ##_arg)
#define PSB_DEBUG_RENDER(_fmt, _arg...) \
PSB_DEBUG(PSB_D_RENDER, _fmt, ##_arg)
#define PSB_DEBUG_PERF(_fmt, _arg...) \
PSB_DEBUG(PSB_D_PERF, _fmt, ##_arg)
#define PSB_DEBUG_TMP(_fmt, _arg...) \
PSB_DEBUG(PSB_D_TMP, _fmt, ##_arg)
#define PSB_DEBUG_RELOC(_fmt, _arg...) \
PSB_DEBUG(PSB_D_RELOC, _fmt, ##_arg)
#if DRM_DEBUG_CODE
#define PSB_DEBUG(_flag, _fmt, _arg...) \
do { \
if (unlikely((_flag) & drm_psb_debug)) \
printk(KERN_DEBUG \
"[psb:0x%02x:%s] " _fmt , _flag, \
__FUNCTION__ , ##_arg); \
} while (0)
#else
#define PSB_DEBUG(_fmt, _arg...) do { } while (0)
#endif
#endif
--- NEW FILE psb_reg.h ---
/**************************************************************************
*
* Copyright (c) (2005-2007) Imagination Technologies Limited.
* Copyright (c) 2007, Intel Corporation.
* All Rights Reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU 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.,
* 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
*
* Intel funded Tungsten Graphics (http://www.tungstengraphics.com) to
* develop this driver.
*
**************************************************************************/
/*
*/
#ifndef _PSB_REG_H_
#define _PSB_REG_H_
#define PSB_CR_CLKGATECTL 0x0000
#define _PSB_C_CLKGATECTL_AUTO_MAN_REG (1 << 24)
#define _PSB_C_CLKGATECTL_USE_CLKG_SHIFT (20)
#define _PSB_C_CLKGATECTL_USE_CLKG_MASK (0x3 << 20)
#define _PSB_C_CLKGATECTL_DPM_CLKG_SHIFT (16)
#define _PSB_C_CLKGATECTL_DPM_CLKG_MASK (0x3 << 16)
#define _PSB_C_CLKGATECTL_TA_CLKG_SHIFT (12)
#define _PSB_C_CLKGATECTL_TA_CLKG_MASK (0x3 << 12)
#define _PSB_C_CLKGATECTL_TSP_CLKG_SHIFT (8)
#define _PSB_C_CLKGATECTL_TSP_CLKG_MASK (0x3 << 8)
#define _PSB_C_CLKGATECTL_ISP_CLKG_SHIFT (4)
#define _PSB_C_CLKGATECTL_ISP_CLKG_MASK (0x3 << 4)
#define _PSB_C_CLKGATECTL_2D_CLKG_SHIFT (0)
#define _PSB_C_CLKGATECTL_2D_CLKG_MASK (0x3 << 0)
#define _PSB_C_CLKGATECTL_CLKG_ENABLED (0)
#define _PSB_C_CLKGATECTL_CLKG_DISABLED (1)
#define _PSB_C_CLKGATECTL_CLKG_AUTO (2)
#define PSB_CR_CORE_ID 0x0010
#define _PSB_CC_ID_ID_SHIFT (16)
#define _PSB_CC_ID_ID_MASK (0xFFFF << 16)
#define _PSB_CC_ID_CONFIG_SHIFT (0)
#define _PSB_CC_ID_CONFIG_MASK (0xFFFF << 0)
#define PSB_CR_CORE_REVISION 0x0014
#define _PSB_CC_REVISION_DESIGNER_SHIFT (24)
#define _PSB_CC_REVISION_DESIGNER_MASK (0xFF << 24)
#define _PSB_CC_REVISION_MAJOR_SHIFT (16)
#define _PSB_CC_REVISION_MAJOR_MASK (0xFF << 16)
#define _PSB_CC_REVISION_MINOR_SHIFT (8)
#define _PSB_CC_REVISION_MINOR_MASK (0xFF << 8)
#define _PSB_CC_REVISION_MAINTENANCE_SHIFT (0)
#define _PSB_CC_REVISION_MAINTENANCE_MASK (0xFF << 0)
#define PSB_CR_DESIGNER_REV_FIELD1 0x0018
#define PSB_CR_SOFT_RESET 0x0080
#define _PSB_CS_RESET_TSP_RESET (1 << 6)
#define _PSB_CS_RESET_ISP_RESET (1 << 5)
#define _PSB_CS_RESET_USE_RESET (1 << 4)
#define _PSB_CS_RESET_TA_RESET (1 << 3)
#define _PSB_CS_RESET_DPM_RESET (1 << 2)
#define _PSB_CS_RESET_TWOD_RESET (1 << 1)
#define _PSB_CS_RESET_BIF_RESET (1 << 0)
#define PSB_CR_DESIGNER_REV_FIELD2 0x001C
#define PSB_CR_EVENT_HOST_ENABLE2 0x0110
#define PSB_CR_EVENT_STATUS2 0x0118
#define PSB_CR_EVENT_HOST_CLEAR2 0x0114
#define _PSB_CE2_BIF_REQUESTER_FAULT (1 << 4)
#define PSB_CR_EVENT_STATUS 0x012C
#define PSB_CR_EVENT_HOST_ENABLE 0x0130
#define PSB_CR_EVENT_HOST_CLEAR 0x0134
#define _PSB_CE_MASTER_INTERRUPT (1 << 31)
#define _PSB_CE_TA_DPM_FAULT (1 << 28)
#define _PSB_CE_TWOD_COMPLETE (1 << 27)
#define _PSB_CE_DPM_OUT_OF_MEMORY_ZLS (1 << 25)
#define _PSB_CE_DPM_TA_MEM_FREE (1 << 24)
#define _PSB_CE_PIXELBE_END_RENDER (1 << 18)
#define _PSB_CE_SW_EVENT (1 << 14)
#define _PSB_CE_TA_FINISHED (1 << 13)
#define _PSB_CE_TA_TERMINATE (1 << 12)
#define _PSB_CE_DPM_REACHED_MEM_THRESH (1 << 3)
#define _PSB_CE_DPM_OUT_OF_MEMORY_GBL (1 << 2)
#define _PSB_CE_DPM_OUT_OF_MEMORY_MT (1 << 1)
#define _PSB_CE_DPM_3D_MEM_FREE (1 << 0)
#define PSB_USE_OFFSET_MASK 0x0007FFFF
#define PSB_USE_OFFSET_SIZE (PSB_USE_OFFSET_MASK + 1)
#define PSB_CR_USE_CODE_BASE0 0x0A0C
#define PSB_CR_USE_CODE_BASE1 0x0A10
#define PSB_CR_USE_CODE_BASE2 0x0A14
#define PSB_CR_USE_CODE_BASE3 0x0A18
#define PSB_CR_USE_CODE_BASE4 0x0A1C
#define PSB_CR_USE_CODE_BASE5 0x0A20
#define PSB_CR_USE_CODE_BASE6 0x0A24
#define PSB_CR_USE_CODE_BASE7 0x0A28
#define PSB_CR_USE_CODE_BASE8 0x0A2C
#define PSB_CR_USE_CODE_BASE9 0x0A30
#define PSB_CR_USE_CODE_BASE10 0x0A34
#define PSB_CR_USE_CODE_BASE11 0x0A38
#define PSB_CR_USE_CODE_BASE12 0x0A3C
#define PSB_CR_USE_CODE_BASE13 0x0A40
#define PSB_CR_USE_CODE_BASE14 0x0A44
#define PSB_CR_USE_CODE_BASE15 0x0A48
#define PSB_CR_USE_CODE_BASE(_i) (0x0A0C + ((_i) << 2))
#define _PSB_CUC_BASE_DM_SHIFT (25)
#define _PSB_CUC_BASE_DM_MASK (0x3 << 25)
#define _PSB_CUC_BASE_ADDR_SHIFT (0) // 1024-bit aligned address?
#define _PSB_CUC_BASE_ADDR_ALIGNSHIFT (7)
#define _PSB_CUC_BASE_ADDR_MASK (0x1FFFFFF << 0)
#define _PSB_CUC_DM_VERTEX (0)
#define _PSB_CUC_DM_PIXEL (1)
#define _PSB_CUC_DM_RESERVED (2)
#define _PSB_CUC_DM_EDM (3)
#define PSB_CR_PDS_EXEC_BASE 0x0AB8
#define _PSB_CR_PDS_EXEC_BASE_ADDR_SHIFT (20) // 1MB aligned address
#define _PSB_CR_PDS_EXEC_BASE_ADDR_ALIGNSHIFT (20)
#define PSB_CR_EVENT_KICKER 0x0AC4
#define _PSB_CE_KICKER_ADDRESS_SHIFT (4) // 128-bit aligned address
#define PSB_CR_EVENT_KICK 0x0AC8
#define _PSB_CE_KICK_NOW (1 << 0)
#define PSB_CR_BIF_DIR_LIST_BASE1 0x0C38
#define PSB_CR_BIF_CTRL 0x0C00
#define _PSB_CB_CTRL_CLEAR_FAULT (1 << 4)
#define _PSB_CB_CTRL_INVALDC (1 << 3)
#define _PSB_CB_CTRL_FLUSH (1 << 2)
#define PSB_CR_BIF_INT_STAT 0x0C04
#define PSB_CR_BIF_FAULT 0x0C08
#define _PSB_CBI_STAT_PF_N_RW (1 << 14)
#define _PSB_CBI_STAT_FAULT_SHIFT (0)
#define _PSB_CBI_STAT_FAULT_MASK (0x3FFF << 0)
#define _PSB_CBI_STAT_FAULT_CACHE (1 << 1)
#define _PSB_CBI_STAT_FAULT_TA (1 << 2)
#define _PSB_CBI_STAT_FAULT_VDM (1 << 3)
#define _PSB_CBI_STAT_FAULT_2D (1 << 4)
#define _PSB_CBI_STAT_FAULT_PBE (1 << 5)
#define _PSB_CBI_STAT_FAULT_TSP (1 << 6)
#define _PSB_CBI_STAT_FAULT_ISP (1 << 7)
#define _PSB_CBI_STAT_FAULT_USSEPDS (1 << 8)
#define _PSB_CBI_STAT_FAULT_HOST (1 << 9)
#define PSB_CR_BIF_BANK0 0x0C78
#define PSB_CR_BIF_BANK1 0x0C7C
#define PSB_CR_BIF_DIR_LIST_BASE0 0x0C84
#define PSB_CR_BIF_TWOD_REQ_BASE 0x0C88
#define PSB_CR_BIF_3D_REQ_BASE 0x0CAC
#define PSB_CR_2D_SOCIF 0x0E18
#define _PSB_C2_SOCIF_FREESPACE_SHIFT (0)
#define _PSB_C2_SOCIF_FREESPACE_MASK (0xFF << 0)
#define _PSB_C2_SOCIF_EMPTY (0x80 << 0)
#define PSB_CR_2D_BLIT_STATUS 0x0E04
#define _PSB_C2B_STATUS_BUSY (1 << 24)
#define _PSB_C2B_STATUS_COMPLETE_SHIFT (0)
#define _PSB_C2B_STATUS_COMPLETE_MASK (0xFFFFFF << 0)
/*
* 2D defs.
*/
/*
* 2D Slave Port Data : Block Header's Object Type
*/
#define PSB_2D_CLIP_BH (0x00000000)
#define PSB_2D_PAT_BH (0x10000000)
#define PSB_2D_CTRL_BH (0x20000000)
#define PSB_2D_SRC_OFF_BH (0x30000000)
#define PSB_2D_MASK_OFF_BH (0x40000000)
#define PSB_2D_RESERVED1_BH (0x50000000)
#define PSB_2D_RESERVED2_BH (0x60000000)
#define PSB_2D_FENCE_BH (0x70000000)
#define PSB_2D_BLIT_BH (0x80000000)
#define PSB_2D_SRC_SURF_BH (0x90000000)
#define PSB_2D_DST_SURF_BH (0xA0000000)
#define PSB_2D_PAT_SURF_BH (0xB0000000)
#define PSB_2D_SRC_PAL_BH (0xC0000000)
#define PSB_2D_PAT_PAL_BH (0xD0000000)
#define PSB_2D_MASK_SURF_BH (0xE0000000)
#define PSB_2D_FLUSH_BH (0xF0000000)
/*
* Clip Definition block (PSB_2D_CLIP_BH)
*/
#define PSB_2D_CLIPCOUNT_MAX (1)
#define PSB_2D_CLIPCOUNT_MASK (0x00000000)
#define PSB_2D_CLIPCOUNT_CLRMASK (0xFFFFFFFF)
#define PSB_2D_CLIPCOUNT_SHIFT (0)
// clip rectangle min & max
#define PSB_2D_CLIP_XMAX_MASK (0x00FFF000)
#define PSB_2D_CLIP_XMAX_CLRMASK (0xFF000FFF)
#define PSB_2D_CLIP_XMAX_SHIFT (12)
#define PSB_2D_CLIP_XMIN_MASK (0x00000FFF)
#define PSB_2D_CLIP_XMIN_CLRMASK (0x00FFF000)
#define PSB_2D_CLIP_XMIN_SHIFT (0)
// clip rectangle offset
#define PSB_2D_CLIP_YMAX_MASK (0x00FFF000)
#define PSB_2D_CLIP_YMAX_CLRMASK (0xFF000FFF)
#define PSB_2D_CLIP_YMAX_SHIFT (12)
#define PSB_2D_CLIP_YMIN_MASK (0x00000FFF)
#define PSB_2D_CLIP_YMIN_CLRMASK (0x00FFF000)
#define PSB_2D_CLIP_YMIN_SHIFT (0)
/*
* Pattern Control (PSB_2D_PAT_BH)
*/
#define PSB_2D_PAT_HEIGHT_MASK (0x0000001F)
#define PSB_2D_PAT_HEIGHT_SHIFT (0)
#define PSB_2D_PAT_WIDTH_MASK (0x000003E0)
#define PSB_2D_PAT_WIDTH_SHIFT (5)
#define PSB_2D_PAT_YSTART_MASK (0x00007C00)
#define PSB_2D_PAT_YSTART_SHIFT (10)
#define PSB_2D_PAT_XSTART_MASK (0x000F8000)
#define PSB_2D_PAT_XSTART_SHIFT (15)
/*
* 2D Control block (PSB_2D_CTRL_BH)
*/
// Present Flags
#define PSB_2D_SRCCK_CTRL (0x00000001)
#define PSB_2D_DSTCK_CTRL (0x00000002)
#define PSB_2D_ALPHA_CTRL (0x00000004)
// Colour Key Colour (SRC/DST)
#define PSB_2D_CK_COL_MASK (0xFFFFFFFF)
#define PSB_2D_CK_COL_CLRMASK (0x00000000)
#define PSB_2D_CK_COL_SHIFT (0)
// Colour Key Mask (SRC/DST)
#define PSB_2D_CK_MASK_MASK (0xFFFFFFFF)
#define PSB_2D_CK_MASK_CLRMASK (0x00000000)
#define PSB_2D_CK_MASK_SHIFT (0)
// Alpha Control (Alpha/RGB)
#define PSB_2D_GBLALPHA_MASK (0x000FF000)
#define PSB_2D_GBLALPHA_CLRMASK (0xFFF00FFF)
#define PSB_2D_GBLALPHA_SHIFT (12)
#define PSB_2D_SRCALPHA_OP_MASK (0x00700000)
#define PSB_2D_SRCALPHA_OP_CLRMASK (0xFF8FFFFF)
#define PSB_2D_SRCALPHA_OP_SHIFT (20)
#define PSB_2D_SRCALPHA_OP_ONE (0x00000000)
#define PSB_2D_SRCALPHA_OP_SRC (0x00100000)
#define PSB_2D_SRCALPHA_OP_DST (0x00200000)
#define PSB_2D_SRCALPHA_OP_SG (0x00300000)
#define PSB_2D_SRCALPHA_OP_DG (0x00400000)
#define PSB_2D_SRCALPHA_OP_GBL (0x00500000)
#define PSB_2D_SRCALPHA_OP_ZERO (0x00600000)
#define PSB_2D_SRCALPHA_INVERT (0x00800000)
#define PSB_2D_SRCALPHA_INVERT_CLR (0xFF7FFFFF)
#define PSB_2D_DSTALPHA_OP_MASK (0x07000000)
#define PSB_2D_DSTALPHA_OP_CLRMASK (0xF8FFFFFF)
#define PSB_2D_DSTALPHA_OP_SHIFT (24)
#define PSB_2D_DSTALPHA_OP_ONE (0x00000000)
#define PSB_2D_DSTALPHA_OP_SRC (0x01000000)
#define PSB_2D_DSTALPHA_OP_DST (0x02000000)
#define PSB_2D_DSTALPHA_OP_SG (0x03000000)
#define PSB_2D_DSTALPHA_OP_DG (0x04000000)
#define PSB_2D_DSTALPHA_OP_GBL (0x05000000)
#define PSB_2D_DSTALPHA_OP_ZERO (0x06000000)
#define PSB_2D_DSTALPHA_INVERT (0x08000000)
#define PSB_2D_DSTALPHA_INVERT_CLR (0xF7FFFFFF)
#define PSB_2D_PRE_MULTIPLICATION_ENABLE (0x10000000)
#define PSB_2D_PRE_MULTIPLICATION_CLRMASK (0xEFFFFFFF)
#define PSB_2D_ZERO_SOURCE_ALPHA_ENABLE (0x20000000)
#define PSB_2D_ZERO_SOURCE_ALPHA_CLRMASK (0xDFFFFFFF)
/*
*Source Offset (PSB_2D_SRC_OFF_BH)
*/
#define PSB_2D_SRCOFF_XSTART_MASK ((0x00000FFF) << 12)
#define PSB_2D_SRCOFF_XSTART_SHIFT (12)
#define PSB_2D_SRCOFF_YSTART_MASK (0x00000FFF)
#define PSB_2D_SRCOFF_YSTART_SHIFT (0)
/*
* Mask Offset (PSB_2D_MASK_OFF_BH)
*/
#define PSB_2D_MASKOFF_XSTART_MASK ((0x00000FFF) << 12)
#define PSB_2D_MASKOFF_XSTART_SHIFT (12)
#define PSB_2D_MASKOFF_YSTART_MASK (0x00000FFF)
#define PSB_2D_MASKOFF_YSTART_SHIFT (0)
/*
* 2D Fence (see PSB_2D_FENCE_BH): bits 0:27 are ignored
*/
/*
*Blit Rectangle (PSB_2D_BLIT_BH)
*/
#define PSB_2D_ROT_MASK (3<<25)
#define PSB_2D_ROT_CLRMASK (~PSB_2D_ROT_MASK)
#define PSB_2D_ROT_NONE (0<<25)
#define PSB_2D_ROT_90DEGS (1<<25)
#define PSB_2D_ROT_180DEGS (2<<25)
#define PSB_2D_ROT_270DEGS (3<<25)
#define PSB_2D_COPYORDER_MASK (3<<23)
#define PSB_2D_COPYORDER_CLRMASK (~PSB_2D_COPYORDER_MASK)
#define PSB_2D_COPYORDER_TL2BR (0<<23)
#define PSB_2D_COPYORDER_BR2TL (1<<23)
#define PSB_2D_COPYORDER_TR2BL (2<<23)
#define PSB_2D_COPYORDER_BL2TR (3<<23)
#define PSB_2D_DSTCK_CLRMASK (0xFF9FFFFF)
#define PSB_2D_DSTCK_DISABLE (0x00000000)
#define PSB_2D_DSTCK_PASS (0x00200000)
#define PSB_2D_DSTCK_REJECT (0x00400000)
#define PSB_2D_SRCCK_CLRMASK (0xFFE7FFFF)
#define PSB_2D_SRCCK_DISABLE (0x00000000)
#define PSB_2D_SRCCK_PASS (0x00080000)
#define PSB_2D_SRCCK_REJECT (0x00100000)
#define PSB_2D_CLIP_ENABLE (0x00040000)
#define PSB_2D_ALPHA_ENABLE (0x00020000)
#define PSB_2D_PAT_CLRMASK (0xFFFEFFFF)
#define PSB_2D_PAT_MASK (0x00010000)
#define PSB_2D_USE_PAT (0x00010000)
#define PSB_2D_USE_FILL (0x00000000)
/*
* Tungsten Graphics note on rop codes: If rop A and rop B are
* identical, the mask surface will not be read and need not be
* set up.
*/
#define PSB_2D_ROP3B_MASK (0x0000FF00)
#define PSB_2D_ROP3B_CLRMASK (0xFFFF00FF)
#define PSB_2D_ROP3B_SHIFT (8)
// rop code A
#define PSB_2D_ROP3A_MASK (0x000000FF)
#define PSB_2D_ROP3A_CLRMASK (0xFFFFFF00)
#define PSB_2D_ROP3A_SHIFT (0)
#define PSB_2D_ROP4_MASK (0x0000FFFF)
/*
* DWORD0: (Only pass if Pattern control == Use Fill Colour)
* Fill Colour RGBA8888
*/
#define PSB_2D_FILLCOLOUR_MASK (0xFFFFFFFF)
#define PSB_2D_FILLCOLOUR_SHIFT (0)
/*
* DWORD1: (Always Present)
* X Start (Dest)
* Y Start (Dest)
*/
#define PSB_2D_DST_XSTART_MASK (0x00FFF000)
#define PSB_2D_DST_XSTART_CLRMASK (0xFF000FFF)
#define PSB_2D_DST_XSTART_SHIFT (12)
#define PSB_2D_DST_YSTART_MASK (0x00000FFF)
#define PSB_2D_DST_YSTART_CLRMASK (0xFFFFF000)
#define PSB_2D_DST_YSTART_SHIFT (0)
/*
* DWORD2: (Always Present)
* X Size (Dest)
* Y Size (Dest)
*/
#define PSB_2D_DST_XSIZE_MASK (0x00FFF000)
#define PSB_2D_DST_XSIZE_CLRMASK (0xFF000FFF)
#define PSB_2D_DST_XSIZE_SHIFT (12)
#define PSB_2D_DST_YSIZE_MASK (0x00000FFF)
#define PSB_2D_DST_YSIZE_CLRMASK (0xFFFFF000)
#define PSB_2D_DST_YSIZE_SHIFT (0)
/*
* Source Surface (PSB_2D_SRC_SURF_BH)
*/
/*
* WORD 0
*/
#define PSB_2D_SRC_FORMAT_MASK (0x00078000)
#define PSB_2D_SRC_1_PAL (0x00000000)
#define PSB_2D_SRC_2_PAL (0x00008000)
#define PSB_2D_SRC_4_PAL (0x00010000)
#define PSB_2D_SRC_8_PAL (0x00018000)
#define PSB_2D_SRC_8_ALPHA (0x00020000)
#define PSB_2D_SRC_4_ALPHA (0x00028000)
#define PSB_2D_SRC_332RGB (0x00030000)
#define PSB_2D_SRC_4444ARGB (0x00038000)
#define PSB_2D_SRC_555RGB (0x00040000)
#define PSB_2D_SRC_1555ARGB (0x00048000)
#define PSB_2D_SRC_565RGB (0x00050000)
#define PSB_2D_SRC_0888ARGB (0x00058000)
#define PSB_2D_SRC_8888ARGB (0x00060000)
#define PSB_2D_SRC_8888UYVY (0x00068000)
#define PSB_2D_SRC_RESERVED (0x00070000)
#define PSB_2D_SRC_1555ARGB_LOOKUP (0x00078000)
#define PSB_2D_SRC_STRIDE_MASK (0x00007FFF)
#define PSB_2D_SRC_STRIDE_CLRMASK (0xFFFF8000)
#define PSB_2D_SRC_STRIDE_SHIFT (0)
/*
* WORD 1 - Base Address
*/
#define PSB_2D_SRC_ADDR_MASK (0x0FFFFFFC)
#define PSB_2D_SRC_ADDR_CLRMASK (0x00000003)
#define PSB_2D_SRC_ADDR_SHIFT (2)
#define PSB_2D_SRC_ADDR_ALIGNSHIFT (2)
/*
* Pattern Surface (PSB_2D_PAT_SURF_BH)
*/
/*
* WORD 0
*/
#define PSB_2D_PAT_FORMAT_MASK (0x00078000)
#define PSB_2D_PAT_1_PAL (0x00000000)
#define PSB_2D_PAT_2_PAL (0x00008000)
#define PSB_2D_PAT_4_PAL (0x00010000)
#define PSB_2D_PAT_8_PAL (0x00018000)
#define PSB_2D_PAT_8_ALPHA (0x00020000)
#define PSB_2D_PAT_4_ALPHA (0x00028000)
#define PSB_2D_PAT_332RGB (0x00030000)
#define PSB_2D_PAT_4444ARGB (0x00038000)
#define PSB_2D_PAT_555RGB (0x00040000)
#define PSB_2D_PAT_1555ARGB (0x00048000)
#define PSB_2D_PAT_565RGB (0x00050000)
#define PSB_2D_PAT_0888ARGB (0x00058000)
#define PSB_2D_PAT_8888ARGB (0x00060000)
#define PSB_2D_PAT_STRIDE_MASK (0x00007FFF)
#define PSB_2D_PAT_STRIDE_CLRMASK (0xFFFF8000)
#define PSB_2D_PAT_STRIDE_SHIFT (0)
/*
* WORD 1 - Base Address
*/
#define PSB_2D_PAT_ADDR_MASK (0x0FFFFFFC)
#define PSB_2D_PAT_ADDR_CLRMASK (0x00000003)
#define PSB_2D_PAT_ADDR_SHIFT (2)
#define PSB_2D_PAT_ADDR_ALIGNSHIFT (2)
/*
* Destination Surface (PSB_2D_DST_SURF_BH)
*/
/*
* WORD 0
*/
#define PSB_2D_DST_FORMAT_MASK (0x00078000)
#define PSB_2D_DST_332RGB (0x00030000)
#define PSB_2D_DST_4444ARGB (0x00038000)
#define PSB_2D_DST_555RGB (0x00040000)
#define PSB_2D_DST_1555ARGB (0x00048000)
#define PSB_2D_DST_565RGB (0x00050000)
#define PSB_2D_DST_0888ARGB (0x00058000)
#define PSB_2D_DST_8888ARGB (0x00060000)
#define PSB_2D_DST_8888AYUV (0x00070000)
#define PSB_2D_DST_STRIDE_MASK (0x00007FFF)
#define PSB_2D_DST_STRIDE_CLRMASK (0xFFFF8000)
#define PSB_2D_DST_STRIDE_SHIFT (0)
/*
* WORD 1 - Base Address
*/
#define PSB_2D_DST_ADDR_MASK (0x0FFFFFFC)
#define PSB_2D_DST_ADDR_CLRMASK (0x00000003)
#define PSB_2D_DST_ADDR_SHIFT (2)
#define PSB_2D_DST_ADDR_ALIGNSHIFT (2)
/*
* Mask Surface (PSB_2D_MASK_SURF_BH)
*/
/*
* WORD 0
*/
#define PSB_2D_MASK_STRIDE_MASK (0x00007FFF)
#define PSB_2D_MASK_STRIDE_CLRMASK (0xFFFF8000)
#define PSB_2D_MASK_STRIDE_SHIFT (0)
/*
* WORD 1 - Base Address
*/
#define PSB_2D_MASK_ADDR_MASK (0x0FFFFFFC)
#define PSB_2D_MASK_ADDR_CLRMASK (0x00000003)
#define PSB_2D_MASK_ADDR_SHIFT (2)
#define PSB_2D_MASK_ADDR_ALIGNSHIFT (2)
/*
* Source Palette (PSB_2D_SRC_PAL_BH)
*/
#define PSB_2D_SRCPAL_ADDR_SHIFT (0)
#define PSB_2D_SRCPAL_ADDR_CLRMASK (0xF0000007)
#define PSB_2D_SRCPAL_ADDR_MASK (0x0FFFFFF8)
#define PSB_2D_SRCPAL_BYTEALIGN (1024)
/*
* Pattern Palette (PSB_2D_PAT_PAL_BH)
*/
#define PSB_2D_PATPAL_ADDR_SHIFT (0)
#define PSB_2D_PATPAL_ADDR_CLRMASK (0xF0000007)
#define PSB_2D_PATPAL_ADDR_MASK (0x0FFFFFF8)
#define PSB_2D_PATPAL_BYTEALIGN (1024)
/*
* Rop3 Codes (2 LS bytes)
*/
#define PSB_2D_ROP3_SRCCOPY (0xCCCC)
#define PSB_2D_ROP3_PATCOPY (0xF0F0)
#define PSB_2D_ROP3_WHITENESS (0xFFFF)
#define PSB_2D_ROP3_BLACKNESS (0x0000)
#define PSB_2D_ROP3_SRC (0xCC)
#define PSB_2D_ROP3_PAT (0xF0)
#define PSB_2D_ROP3_DST (0xAA)
/*
* Sizes.
*/
#define PSB_SCENE_HW_COOKIE_SIZE 16
#define PSB_TA_MEM_HW_COOKIE_SIZE 16
/*
* Scene stuff.
*/
#define PSB_NUM_HW_SCENES 2
/*
* Scheduler completion actions.
*/
#define PSB_RASTER_BLOCK 0
#define PSB_RASTER 1
#define PSB_RETURN 2
#define PSB_TA 3
#endif
--- NEW FILE psb_schedule.h ---
/**************************************************************************
* Copyright (c) 2007, Intel Corporation.
* All Rights Reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU 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.,
* 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
*
* Intel funded Tungsten Graphics (http://www.tungstengraphics.com) to
* develop this driver.
*
**************************************************************************/
/*
* Authors: Thomas Hellstrom <thomas-at-tungstengraphics.com>
*/
#ifndef _PSB_SCHEDULE_H_
#define _PSB_SCHEDULE_H_
#include "drmP.h"
enum psb_task_type {
psb_ta_midscene_task,
psb_ta_task,
psb_raster_task,
psb_freescene_task
};
#define PSB_MAX_TA_CMDS 60
#define PSB_MAX_RASTER_CMDS 60
#define PSB_MAX_OOM_CMDS 6
struct psb_xhw_buf {
struct list_head head;
int copy_back;
atomic_t done;
struct drm_psb_xhw_arg arg;
};
struct psb_feedback_info {
struct drm_buffer_object *bo;
struct page *page;
uint32_t offset;
};
struct psb_task {
struct list_head head;
struct psb_scene *scene;
struct psb_feedback_info feedback;
enum psb_task_type task_type;
uint32_t engine;
uint32_t sequence;
uint32_t ta_cmds[PSB_MAX_TA_CMDS];
uint32_t raster_cmds[PSB_MAX_RASTER_CMDS];
uint32_t oom_cmds[PSB_MAX_OOM_CMDS];
uint32_t ta_cmd_size;
uint32_t raster_cmd_size;
uint32_t oom_cmd_size;
uint32_t feedback_offset;
uint32_t ta_complete_action;
uint32_t raster_complete_action;
uint32_t hw_cookie;
uint32_t flags;
uint32_t reply_flags;
uint32_t aborting;
struct psb_xhw_buf buf;
};
struct psb_hw_scene {
struct list_head head;
uint32_t context_number;
/*
* This pointer does not refcount the last_scene_buffer,
* so we must make sure it is set to NULL before destroying
* the corresponding task.
*/
struct psb_scene *last_scene;
};
struct psb_scene;
struct drm_psb_private;
struct psb_scheduler_seq {
uint32_t sequence;
int reported;
};
struct psb_scheduler {
struct drm_device *dev;
struct psb_scheduler_seq seq[_PSB_ENGINE_TA_FENCE_TYPES];
struct psb_hw_scene hs[PSB_NUM_HW_SCENES];
struct mutex task_wq_mutex;
spinlock_t lock;
struct list_head hw_scenes;
struct list_head ta_queue;
struct list_head raster_queue;
struct list_head hp_raster_queue;
struct list_head task_done_queue;
struct psb_task *current_task[PSB_SCENE_NUM_ENGINES];
struct psb_task *feedback_task;
int ta_state;
struct psb_hw_scene *pending_hw_scene;
uint32_t pending_hw_scene_seq;
struct delayed_work wq;
struct psb_scene_pool *pool;
uint32_t idle_count;
int idle;
wait_queue_head_t idle_queue;
unsigned long ta_end_jiffies;
unsigned long raster_end_jiffies;
unsigned long total_raster_jiffies;
};
#define PSB_RF_FIRE_TA (1 << 0)
#define PSB_RF_OOM (1 << 1)
#define PSB_RF_OOM_REPLY (1 << 2)
#define PSB_RF_TERMINATE (1 << 3)
#define PSB_RF_TA_DONE (1 << 4)
#define PSB_RF_FIRE_RASTER (1 << 5)
#define PSB_RF_RASTER_DONE (1 << 6)
#define PSB_RF_DEALLOC (1 << 7)
extern struct psb_scene_pool *psb_alloc_scene_pool(struct drm_file *priv,
int shareable, uint32_t w,
uint32_t h);
extern uint32_t psb_scene_handle(struct psb_scene *scene);
extern int psb_scheduler_init(struct drm_device *dev,
struct psb_scheduler *scheduler);
extern void psb_scheduler_takedown(struct psb_scheduler *scheduler);
extern int psb_cmdbuf_ta(struct drm_file *priv,
struct drm_psb_cmdbuf_arg *arg,
struct drm_buffer_object *cmd_buffer,
struct drm_buffer_object *ta_buffer,
struct drm_buffer_object *oom_buffer,
struct psb_scene *scene,
struct psb_feedback_info *feedback,
struct drm_fence_arg *fence_arg);
extern int psb_cmdbuf_raster(struct drm_file *priv,
struct drm_psb_cmdbuf_arg *arg,
struct drm_buffer_object *cmd_buffer,
struct drm_fence_arg *fence_arg);
extern void psb_scheduler_handler(struct drm_psb_private *dev_priv,
uint32_t status);
extern void psb_scheduler_pause(struct drm_psb_private *dev_priv);
extern void psb_scheduler_restart(struct drm_psb_private *dev_priv);
extern int psb_scheduler_idle(struct drm_psb_private *dev_priv);
extern int psb_scheduler_finished(struct drm_psb_private *dev_priv);
extern void psb_scheduler_lockup(struct drm_psb_private *dev_priv,
int *lockup, int *idle);
extern void psb_scheduler_reset(struct drm_psb_private *dev_priv,
int error_condition);
extern int psb_forced_user_interrupt(struct drm_psb_private *dev_priv);
extern void psb_scheduler_remove_scene_refs(struct psb_scene *scene);
extern void psb_scheduler_ta_mem_check(struct drm_psb_private *dev_priv);
extern int psb_extend_raster_timeout(struct drm_psb_private *dev_priv);
#endif
Index: .cvsignore
===================================================================
RCS file: /cvs/nonfree/rpms/libdrm-poulsbo/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore 24 Sep 2009 15:21:49 -0000 1.1
+++ .cvsignore 17 Sep 2010 10:46:01 -0000 1.2
@@ -0,0 +1 @@
+libdrm-poulsbo_2.3.0.orig.tar.gz
Index: sources
===================================================================
RCS file: /cvs/nonfree/rpms/libdrm-poulsbo/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources 24 Sep 2009 15:21:49 -0000 1.1
+++ sources 17 Sep 2010 10:46:01 -0000 1.2
@@ -0,0 +1 @@
+624efee914f069a48a5e995d837a202c libdrm-poulsbo_2.3.0.orig.tar.gz
14 years, 2 months
rpms/psb-kmod/devel 0001-psb-Declare-firmware.patch, NONE, 1.1 0002-psb-If-not-asking-for-debug-is-an-error-I-want-to-be.patch, NONE, 1.1 0003-psb-Fix-framebuffer.patch, NONE, 1.1 psb-kernel-source-4.41.1-2.6.32.patch, NONE, 1.1 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-2.6.34.patch, NONE, 1.1 psb-kmod-4.41.1_busid.patch, NONE, 1.1 psb-
by Adam Williamson
Author: adamwill
Update of /cvs/nonfree/rpms/psb-kmod/devel
In directory se02.es.rpmfusion.net:/tmp/cvs-serv6514/devel
Modified Files:
.cvsignore sources
Added Files:
0001-psb-Declare-firmware.patch
0002-psb-If-not-asking-for-debug-is-an-error-I-want-to-be.patch
0003-psb-Fix-framebuffer.patch
psb-kernel-source-4.41.1-2.6.32.patch
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-2.6.34.patch
psb-kmod-4.41.1_busid.patch psb-kmod-4.41.1_irqreturn.patch
psb-kmod.spec
Log Message:
- import F-13 build to devel
0001-psb-Declare-firmware.patch:
psb_drv.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- NEW FILE 0001-psb-Declare-firmware.patch ---
>From 0149839482b34dc7fe399c0cc7ee4747279b5eab Mon Sep 17 00:00:00 2001
From: Matthew Garrett <mjg(a)redhat.com>
Date: Mon, 2 Aug 2010 11:16:29 -0400
Subject: [PATCH 1/3] psb: Declare firmware
---
psb_drv.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/psb_drv.c b/psb_drv.c
index 2a2e8d4..618dfcd 100644
--- a/psb_drv.c
+++ b/psb_drv.c
@@ -55,6 +55,8 @@ int psb_init_yres;
extern int SII_1392;
#endif
+MODULE_FIRMWARE("msvdx_fw.bin");
+
MODULE_PARM_DESC(debug, "Enable debug output");
MODULE_PARM_DESC(clock_gating, "clock gating");
MODULE_PARM_DESC(no_fb, "Disable FBdev");
--
1.7.2
0002-psb-If-not-asking-for-debug-is-an-error-I-want-to-be.patch:
psb_drv.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- NEW FILE 0002-psb-If-not-asking-for-debug-is-an-error-I-want-to-be.patch ---
>From 7051c003142ed6340b14783d7e4dc6386ccfebe8 Mon Sep 17 00:00:00 2001
From: Matthew Garrett <mjg(a)redhat.com>
Date: Mon, 2 Aug 2010 11:41:54 -0400
Subject: [PATCH 2/3] psb: If not asking for debug is an error, I want to be right
---
psb_drv.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/psb_drv.c b/psb_drv.c
index 618dfcd..76b4a01 100644
--- a/psb_drv.c
+++ b/psb_drv.c
@@ -265,7 +265,8 @@ static int psb_do_init(struct drm_device *dev)
int ret = -ENOMEM;
- DRM_ERROR("Debug is 0x%08x\n", drm_psb_debug);
+ if (drm_psb_debug)
+ DRM_ERROR("Debug is 0x%08x\n", drm_psb_debug);
dev_priv->ta_mem_pages =
PSB_ALIGN_TO(drm_psb_ta_mem_size * 1024, PAGE_SIZE) >> PAGE_SHIFT;
--
1.7.2
0003-psb-Fix-framebuffer.patch:
psb_fb.c | 31 ++++++++++++++++++++++++-------
1 file changed, 24 insertions(+), 7 deletions(-)
--- NEW FILE 0003-psb-Fix-framebuffer.patch ---
>From 302d40a1664d1d1dbf8a3b0408736f091c397030 Mon Sep 17 00:00:00 2001
From: Matthew Garrett <mjg(a)redhat.com>
Date: Mon, 2 Aug 2010 13:03:21 -0400
Subject: [PATCH 3/3] psb: Fix framebuffer
---
psb_fb.c | 30 ++++++++++++++++++++++++------
1 files changed, 24 insertions(+), 6 deletions(-)
diff --git a/psb_fb.c b/psb_fb.c
index 72d1d14..2f10b90 100644
--- a/psb_fb.c
+++ b/psb_fb.c
@@ -420,8 +420,22 @@ static int psbfb_set_par(struct fb_info *info)
fb->depth = depth;
info->fix.line_length = fb->pitch;
- info->fix.visual =
- (fb->depth == 8) ? FB_VISUAL_PSEUDOCOLOR : FB_VISUAL_DIRECTCOLOR;
+
+ switch (fb->depth) {
+ case 8:
+ info->fix.visual = FB_VISUAL_PSEUDOCOLOR;
+ break;
+ case 15:
+ case 16:
+ info->fix.visual = FB_VISUAL_DIRECTCOLOR;
+ break;
+ case 24:
+ case 32:
+ info->fix.visual = FB_VISUAL_TRUECOLOR;
+ break;
+ default:
+ BUG();
+ }
/* some fbdev's apps don't want these to change */
info->fix.smem_start = dev->mode_config.fb_base + fb->offset;
@@ -990,8 +1004,13 @@ void psbfb_resume(struct drm_device *dev)
* Also, these should be the default vm ops for buffer object type fbs.
*/
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27))
+extern int drm_bo_vm_nopfn(struct vm_area_struct *vma,
+ struct vm_fault *vmf );
+#else
extern unsigned long drm_bo_vm_nopfn(struct vm_area_struct *vma,
unsigned long address);
+#endif
/*
* This wrapper is a bit ugly and is here because we need access to a mutex
@@ -1001,6 +1020,7 @@ extern unsigned long drm_bo_vm_nopfn(struct vm_area_struct *vma,
* recursive locking.
*/
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27))
static unsigned long psbfb_nopfn(struct vm_area_struct *vma,
unsigned long address)
{
@@ -1015,7 +1035,7 @@ static unsigned long psbfb_nopfn(struct vm_area_struct *vma,
mutex_unlock(&vi->vm_mutex);
return ret;
}
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27))
+#else
static int psbfb_fault(struct vm_area_struct *vma,
struct vm_fault *vmf)
{
@@ -1023,12 +1043,10 @@ static int psbfb_fault(struct vm_area_struct *vma,
struct vm_area_struct tmp_vma;
unsigned long ret;
- unsigned long address = (unsigned long)vmf->virtual_address;
-
mutex_lock(&vi->vm_mutex);
tmp_vma = *vma;
tmp_vma.vm_private_data = vi->bo;
- ret = drm_bo_vm_nopfn(&tmp_vma, address);
+ ret = drm_bo_vm_nopfn(&tmp_vma, vmf);
mutex_unlock(&vi->vm_mutex);
return ret;
}
--
1.7.2
psb-kernel-source-4.41.1-2.6.32.patch:
drm_agpsupport.c | 2 +-
drm_edid.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
--- NEW FILE psb-kernel-source-4.41.1-2.6.32.patch ---
psb: Fix compilation with kernel 2.6.32
This patch made from the Gentoo ebuild written by Zac Medico <zmedico(a)gentoo.org>,
to fix compilation of the psb module with kernel 2.6.32
It should be safe to be used with older version of the kernel. It fixes two changes:
* In commit 6a12235c7d2d75c7d94b9afcaaecd422ff845ce0 phys_to_gart was removed
since it is a 1:1 mapping on all platforms.
* The acpi PREFIX constant is gone.
---
diff -urP psb-4.41.1-4mdv2010.0.orig/drm_agpsupport.c psb-4.41.1-4mdv2010.0.fix2632/drm_agpsupport.c
--- psb-4.41.1-4mdv2010.0.orig/drm_agpsupport.c 2009-10-08 12:09:11.000000000 +0200
+++ psb-4.41.1-4mdv2010.0.fix2632/drm_agpsupport.c 2009-12-05 02:46:28.000421027 +0100
@@ -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->pages[mem->page_count++] = phys_to_gart(page_to_phys(*cur_page));
+ mem->pages[mem->page_count++] = page_to_phys(*cur_page);
agp_be->mem = mem;
return 0;
}
diff -urP psb-4.41.1-4mdv2010.0.orig/drm_edid.c psb-4.41.1-4mdv2010.0.fix2632/drm_edid.c
--- psb-4.41.1-4mdv2010.0.orig/drm_edid.c 2009-10-08 12:09:11.000000000 +0200
+++ psb-4.41.1-4mdv2010.0.fix2632/drm_edid.c 2009-12-05 02:46:38.155168734 +0100
@@ -39,7 +39,7 @@
if (obj && obj->type == ACPI_TYPE_BUFFER)
memcpy(edid, obj->buffer.pointer, obj->buffer.length);
else {
- printk(KERN_ERR PREFIX "Invalid _DDC data\n");
+ printk(KERN_ERR "ACPI: " "Invalid _DDC data\n");
status = -EFAULT;
kfree(obj);
}
psb-kernel-source-4.41.1-agp_memory.patch:
drm_agpsupport.c | 2 +-
drm_memory.c | 2 +-
drm_vm.c | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
--- 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:
Makefile.kernel | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--- 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:
psb_i2c.c | 2 ++
1 file changed, 2 insertions(+)
--- 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:
drm_fops.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- 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-2.6.34.patch:
intel_lvds.c | 7 +++++++
1 file changed, 7 insertions(+)
--- NEW FILE psb-kmod-4.41.1-2.6.34.patch ---
--- intel_lvds.c.bak 2010-04-02 00:26:45.489008304 +0200
+++ intel_lvds.c 2010-04-02 00:40:51.530267983 +0200
@@ -801,7 +801,14 @@
if ((blc_type == BLC_I2C_TYPE) || (blc_type == BLC_PWM_TYPE)){
/* add /sys/class/backlight interface as standard */
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34)
+ struct backlight_properties props;
+ memset(&props, 0, sizeof(struct backlight_properties));
+ props.max_brightness = BRIGHTNESS_MAX_LEVEL;
+ psbbl_device = backlight_device_register("psblvds", &dev->pdev->dev, dev, &psbbl_ops, &props);
+#else
psbbl_device = backlight_device_register("psblvds", &dev->pdev->dev, dev, &psbbl_ops);
+#endif
if (psbbl_device){
#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,20)
down(&psbbl_device->sem);
psb-kmod-4.41.1_busid.patch:
drm_sysfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- 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:
drm_os_linux.h | 6 ------
1 file changed, 6 deletions(-)
--- 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: 13%{?dist}.6
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-sour...
# 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
# Fix build for 2.6.32 (from Gentoo via Mandriva)
Patch6: psb-kernel-source-4.41.1-2.6.32.patch
# Fix build for 2.6.34 (Eric Piel: https://patchwork.kernel.org/patch/90678/ )
Patch7: psb-kmod-4.41.1-2.6.34.patch
# From Matthew Garrett: declare module firmware
Patch8: 0001-psb-Declare-firmware.patch
# From Matthew Garrett: clean up debug error
Patch9: 0002-psb-If-not-asking-for-debug-is-an-error-I-want-to-be.patch
# From Matthew Garrett: fix framebuffer
Patch10: 0003-psb-Fix-framebuffer.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
if [[ $kernel_version > "2.6.31.99" ]]; then
%patch6 -p1 -b .build2632
fi
%patch4 -p1 -b .drmpsb
%patch7 -p0 -b .build2634
%patch8 -p1 -b .firmware
%patch9 -p1 -b .debug
%patch10 -p1 -b .framebuffer
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
* Sat Sep 11 2010 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info> - 4.41.1-13.6
- rebuild for new kernel
* Fri Sep 10 2010 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info> - 4.41.1-13.5
- rebuild for new kernel
* Sat Aug 28 2010 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info> - 4.41.1-13.4
- rebuild for new kernel
* Fri Aug 20 2010 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info> - 4.41.1-13.3
- rebuild for new kernel
* Wed Aug 11 2010 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info> - 4.41.1-13.2
- rebuild for new kernel
* Sun Aug 08 2010 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info> - 4.41.1-13.1
- rebuild for new kernel
* Wed Aug 04 2010 Adam Williamson <adamwill AT shaw DOT ca> - 4.41.1-13
- add three patches from Matthew Garrett:
+ Declare-firmware.patch (declare module firmware)
+ If-not-asking-for-debug...patch (clean up debug error)
+ Fix-framebuffer.patch (fix framebuffer)
* Tue Jul 27 2010 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info> - 4.41.1-12.1
- rebuild for new kernel
* Thu Jul 22 2010 Adam Williamson <adamwill AT shaw DOT ca> - 4.41.1-12
- add 2.6.34.patch (from Eric Piel, fixes build on 2.6.34)
* Fri May 21 2010 Adam Williamson <adamwill AT shaw DOT ca> - 4.41.1-11
- add 2.6.32.patch (from Gentoo via Mandriva, fixes build on 2.6.32)
* Thu Feb 11 2010 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info> - 4.41.1-10.10
- rebuild for new kernel
* Mon Feb 08 2010 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info> - 4.41.1-10.9
- rebuild for new kernel
* Thu Feb 04 2010 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info> - 4.41.1-10.8
- rebuild for new kernel
* Fri Jan 22 2010 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info> - 4.41.1-10.7
- rebuild for new kernel
* Sat Dec 26 2009 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info> - 4.41.1-10.6
- rebuild for new kernel
* Sun Dec 06 2009 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info> - 4.41.1-10.5
- rebuild for new kernel
* Sun Nov 22 2009 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info> - 4.41.1-10.4
- rebuild for new kernels
* Thu Nov 05 2009 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info> - 4.41.1-10.3
- rebuild for new kernels
* Tue Oct 20 2009 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info> - 4.41.1-10.2
- rebuild for new kernels
* Wed Sep 30 2009 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info> - 4.41.1-10.1
- rebuild for new kernels
* 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/devel/.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 17 Sep 2010 10:39:24 -0000 1.2
@@ -0,0 +1 @@
+psb-kernel-source_4.41.1.orig.tar.gz
Index: sources
===================================================================
RCS file: /cvs/nonfree/rpms/psb-kmod/devel/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 17 Sep 2010 10:39:24 -0000 1.2
@@ -0,0 +1 @@
+5ca47555507dec0318a6ed4128f73146 psb-kernel-source_4.41.1.orig.tar.gz
14 years, 2 months
rpms/xorg-x11-drv-psb/devel xorg-x11-drv-psb-0.32.0-changegc.patch, NONE, 1.1 xorg-x11-drv-psb-0.32.0-mibank.patch, NONE, 1.1 xorg-x11-drv-psb-0.32.0-null.patch, NONE, 1.1 xorg-x11-drv-psb-0.32.0-root_window.patch, NONE, 1.1 xorg-x11-drv-psb-0.32.0-symbols.patch, NONE, 1.1 xorg-x11-drv-psb.spec, 1.2, 1.3
by Adam Williamson
Author: adamwill
Update of /cvs/nonfree/rpms/xorg-x11-drv-psb/devel
In directory se02.es.rpmfusion.net:/tmp/cvs-serv5611
Modified Files:
xorg-x11-drv-psb.spec
Added Files:
xorg-x11-drv-psb-0.32.0-changegc.patch
xorg-x11-drv-psb-0.32.0-mibank.patch
xorg-x11-drv-psb-0.32.0-null.patch
xorg-x11-drv-psb-0.32.0-root_window.patch
xorg-x11-drv-psb-0.32.0-symbols.patch
Log Message:
* Fri Sep 17 2010 Adam Williamson <adamwill AT shaw DOT ca> - 0.32.0-5
- add various patches from Lubomir Rintel for F14 compatibility
xorg-x11-drv-psb-0.32.0-changegc.patch:
psb_dga.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--- NEW FILE xorg-x11-drv-psb-0.32.0-changegc.patch ---
--- a/src/psb_dga.c
+++ b/src/psb_dga.c
@@ -310,13 +310,13 @@ PSB_FillRect(ScrnInfoPtr pScrn,
{
GCPtr pGC;
DrawablePtr pDrawable;
- XID vals[1];
+ ChangeGCVal vals[1];
xRectangle r;
if (!xf86_dga_get_drawable_and_gc(pScrn, &pDrawable, &pGC))
return;
- vals[0] = color;
- ChangeGC(pGC, GCForeground, vals);
+ vals[0].val = color;
+ ChangeGC(NullClient, pGC, GCForeground, vals);
ValidateGC(pDrawable, pGC);
r.x = x;
r.y = y;
xorg-x11-drv-psb-0.32.0-mibank.patch:
psb_driver.h | 1 -
1 file changed, 1 deletion(-)
--- NEW FILE xorg-x11-drv-psb-0.32.0-mibank.patch ---
--- a/src/psb_driver.h
+++ b/src/psb_driver.h
@@ -43,7 +43,6 @@
#include "xf86DDC.h"
#include "shadow.h"
#include "xf86int10.h"
-#include "mibank.h"
#include "dgaproc.h"
#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 6
#include "xf86Resources.h"
xorg-x11-drv-psb-0.32.0-null.patch:
psb_accel.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
--- NEW FILE xorg-x11-drv-psb-0.32.0-null.patch ---
--- a/src/psb_accel.c
+++ b/src/psb_accel.c
@@ -509,9 +509,14 @@ psbExaCheckComposite(int op,
PicturePtr pSrcPicture, PicturePtr pMaskPicture,
PicturePtr pDstPicture)
{
+ int w, h;
DrawablePtr pDraw = pSrcPicture->pDrawable;
- int w = pDraw->width;
- int h = pDraw->height;
+
+ if (!pDraw)
+ return FALSE;
+
+ w = pDraw->width;
+ h = pDraw->height;
if (op > PictOpAdd)
return FALSE;
xorg-x11-drv-psb-0.32.0-root_window.patch:
psb_dga.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- NEW FILE xorg-x11-drv-psb-0.32.0-root_window.patch ---
--- a/src/psb_dga.c
+++ b/src/psb_dga.c
@@ -298,7 +298,7 @@ static void
PSB_Sync(ScrnInfoPtr pScrn)
{
ScreenPtr pScreen = pScrn->pScreen;
- WindowPtr pRoot = WindowTable[pScreen->myNum];
+ WindowPtr pRoot = pScreen->root;
char buffer[4];
pScreen->GetImage(&pRoot->drawable, 0, 0, 1, 1, ZPixmap, ~0L, buffer);
xorg-x11-drv-psb-0.32.0-symbols.patch:
psb_driver.c | 8 ++++++++
1 file changed, 8 insertions(+)
--- NEW FILE xorg-x11-drv-psb-0.32.0-symbols.patch ---
--- a/src/psb_driver.c
+++ b/src/psb_driver.c
@@ -301,6 +301,10 @@ static XF86ModuleVersionInfo psbVersionRec = {
{0, 0, 0, 0}
};
+/* compat cruft */
+_X_EXPORT BoxRec miEmptyBox;
+_X_EXPORT RegDataRec miEmptyData, miBrokenData;
+
/*
* This data is accessed by the loader. The name must be the module name
* followed by "ModuleData".
@@ -312,6 +316,10 @@ psbSetup(pointer Module, pointer Options, int *ErrorMajor, int *ErrorMinor)
{
static Bool Initialised = FALSE;
+ miEmptyBox = RegionEmptyBox;
+ miEmptyData = RegionEmptyData;
+ miBrokenData = RegionBrokenData;
+
PSB_DEBUG(-1, 3, "psbSetup\n");
if (!Initialised) {
Index: xorg-x11-drv-psb.spec
===================================================================
RCS file: /cvs/nonfree/rpms/xorg-x11-drv-psb/devel/xorg-x11-drv-psb.spec,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- xorg-x11-drv-psb.spec 17 Sep 2010 10:18:30 -0000 1.2
+++ xorg-x11-drv-psb.spec 17 Sep 2010 10:32:25 -0000 1.3
@@ -5,7 +5,7 @@
Summary: Intel GMA500 (Poulsbo) video driver
Name: xorg-x11-drv-psb
Version: 0.32.0
-Release: 4%{?dist}
+Release: 5%{?dist}
URL: http://netbook-remix.archive.canonical.com/updates/pool/public/x/xserver-...
Source0: http://netbook-remix.archive.canonical.com/updates/pool/public/x/xserver-...
# Causes psb module to be loaded when a GMA500 adapter PCI ID is found
@@ -38,6 +38,12 @@
Patch10: xorg-x11-drv-psb-0.32.0-xv.patch
# From Yves - fix blank screen when rotating 90 degrees
Patch11: xorg-x11-drv-psb-0.32.0-rotate.patch
+# From Lubomir Rintel - various fixes for X server 1.9
+Patch12: xorg-x11-drv-psb-0.32.0-root_window.patch
+Patch13: xorg-x11-drv-psb-0.32.0-changegc.patch
+Patch14: xorg-x11-drv-psb-0.32.0-mibank.patch
+Patch15: xorg-x11-drv-psb-0.32.0-symbols.patch
+Patch16: xorg-x11-drv-psb-0.32.0-null.patch
License: MIT
Group: User Interface/X Hardware Support
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -92,6 +98,11 @@
%patch9 -p1 -b .mixed
%patch10 -p1 -b .xv
%patch11 -p1 -b .rotate
+%patch12 -p1 -b .rootwindow
+%patch13 -p1 -b .changegc
+%patch14 -p1 -b .mibank
+%patch15 -p1 -b .symbols
+%patch16 -p1 -b .null
iconv -f iso-8859-15 -t utf-8 -o man/psb.man.utf8 man/psb.man && mv man/psb.man.utf8 man/psb.man
@@ -146,6 +157,9 @@
%{_mandir}/man4/*.4*
%changelog
+* Fri Sep 17 2010 Adam Williamson <adamwill AT shaw DOT ca> - 0.32.0-5
+- add various patches from Lubomir Rintel for F14 compatibility
+
* Thu Jul 22 2010 Adam Williamson <adamwill AT shaw DOT ca> - 0.32.0-4
- add rotate.patch, from Yves: fixes 90 degree rotation
14 years, 2 months
rpms/xorg-x11-drv-psb/devel xorg-x11-drv-psb-0.32.0-xv.patch, NONE, 1.1
by Adam Williamson
Author: adamwill
Update of /cvs/nonfree/rpms/xorg-x11-drv-psb/devel
In directory se02.es.rpmfusion.net:/tmp/cvs-serv4909
Added Files:
xorg-x11-drv-psb-0.32.0-xv.patch
Log Message:
add a missing patch file
xorg-x11-drv-psb-0.32.0-xv.patch:
psb_video.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
--- NEW FILE xorg-x11-drv-psb-0.32.0-xv.patch ---
--- xserver-xorg-video-psb-0.36.0-ref/src/psb_video.c 2010-06-07 22:17:46.302760345 +0200
+++ xserver-xorg-video-psb-0.32/src/psb_video.c 2010-06-10 17:29:23.400003434 +0200
@@ -686,8 +684,13 @@
* coordinates) to the backing pixmap.
*/
- while (!psbExaGetSuperOffset(pPixmap, &pre_add, &dstBuf))
+ if(!psbExaGetSuperOffset(pPixmap, &pre_add, &dstBuf)){
exaMoveInPixmap(pPixmap);
+ if(!psbExaGetSuperOffset(pPixmap, &pre_add, &dstBuf)){
+ return FALSE;
+ }
+ }
+
dst.buffer = mmKernelBuf(dstBuf);
dst.offset = pre_add;
14 years, 2 months