merging trunk

This commit is contained in:
Stephan Raue 2010-05-27 12:40:26 +02:00
commit c71d3a6269
193 changed files with 49938 additions and 171770 deletions

View File

@ -79,7 +79,7 @@ XORG_PATH_DRIVERS=/usr/lib/xorg/modules/drivers
TOOLCHAIN_LANGUAGES=c
[ "$TOOLCHAIN_CXX" = yes ] && TOOLCHAIN_LANGUAGES=${TOOLCHAIN_LANGUAGES},c++
[ "$OPTIMIZATIONS" = speed ] && GCC_OPTIM="-O4 $PROJECT_CFLAGS" || GCC_OPTIM="-Os"
[ "$OPTIMIZATIONS" = speed ] && GCC_OPTIM="-O3 $PROJECT_CFLAGS" || GCC_OPTIM="-Os"
[ "$TARGET_ARCH" = i386 -o "$TARGET_ARCH" = x86_64 ] && GCC_OPTIM="$GCC_OPTIM -fexcess-precision=fast"
TARGET_CC=${TARGET_PREFIX}gcc
@ -202,7 +202,7 @@ else
fi
INDENT_SIZE=4
OPENELEC_SRC=http://sources.geexbox.org/src/$OPENELEC_VERSION
OPENELEC_SRC=http://sources.openelec.tv/src/$OPENELEC_VERSION
VERSION_SUFFIX=$TARGET_ARCH
[ -n "$TARGET_PLATFORM" ] && VERSION_SUFFIX=$TARGET_PLATFORM

View File

@ -1,24 +0,0 @@
diff -ur alsa.old/src/Makefile.in alsa.dev/src/Makefile.in
--- alsa.old/src/Makefile.in 2006-04-19 09:50:27.000000000 +0200
+++ alsa.dev/src/Makefile.in 2006-10-14 17:16:10.000000000 +0200
@@ -360,7 +360,7 @@
rm -f "$${dir}/so_locations"; \
done
libasound.la: $(libasound_la_OBJECTS) $(libasound_la_DEPENDENCIES)
- $(LINK) -rpath $(libdir) $(libasound_la_LDFLAGS) $(libasound_la_OBJECTS) $(libasound_la_LIBADD) $(LIBS)
+ $(LINK) -rpath $(DESTDIR)$(libdir) $(libasound_la_LDFLAGS) $(libasound_la_OBJECTS) $(libasound_la_LIBADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
diff -ur alsa.old/src/pcm/scopes/Makefile.in alsa.dev/src/pcm/scopes/Makefile.in
--- alsa.old/src/pcm/scopes/Makefile.in 2006-04-19 09:50:38.000000000 +0200
+++ alsa.dev/src/pcm/scopes/Makefile.in 2006-10-14 17:16:38.000000000 +0200
@@ -317,7 +317,7 @@
rm -f "$${dir}/so_locations"; \
done
scope-level.la: $(scope_level_la_OBJECTS) $(scope_level_la_DEPENDENCIES)
- $(LINK) -rpath $(pkglibdir) $(scope_level_la_LDFLAGS) $(scope_level_la_OBJECTS) $(scope_level_la_LIBADD) $(LIBS)
+ $(LINK) -rpath $(DESTDIR)$(pkglibdir) $(scope_level_la_LDFLAGS) $(scope_level_la_OBJECTS) $(scope_level_la_LIBADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)

View File

@ -1,37 +0,0 @@
diff -Nur alsa-lib-1.0.11rc1.orig/src/userfile.c alsa-lib-1.0.11rc1/src/userfile.c
--- alsa-lib-1.0.11rc1.orig/src/userfile.c 2005-12-05 16:27:28.000000000 +0200
+++ alsa-lib-1.0.11rc1/src/userfile.c 2005-12-17 16:47:45.000000000 +0200
@@ -61,11 +61,31 @@
}
#else /* !HAVE_WORDEXP_H */
+#include <glob.h>
+#include <assert.h>
+
/* just copy the string - would be nicer to expand by ourselves, though... */
int snd_user_file(const char *file, char **result)
{
- *result = strdup(file);
- if (! *result)
+ glob_t globbuf;
+ int err;
+
+ assert(file && result);
+ err = glob(file, 0, NULL, &globbuf);
+ switch (err) {
+ case GLOB_NOSPACE:
+ return -ENOMEM;
+ case 0:
+ if (globbuf.gl_pathc == 1)
+ break;
+ /* Fall through */
+ default:
+ globfree(&globbuf);
+ return -EINVAL;
+ }
+ *result = strdup(globbuf.gl_pathv[0]);
+ globfree(&globbuf);
+ if (*result == NULL)
return -ENOMEM;
return 0;
}

View File

@ -1,19 +0,0 @@
diff -Naur alsa-lib-1.0.4.orig/include/error.h alsa-lib-1.0.4/include/error.h
--- alsa-lib-1.0.4.orig/include/error.h 2004-04-27 00:16:40.000000000 +0200
+++ alsa-lib-1.0.4/include/error.h 2004-04-27 00:19:31.000000000 +0200
@@ -61,11 +61,11 @@
extern int snd_lib_error_set_handler(snd_lib_error_handler_t handler);
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 95)
-#define SNDERR(...) snd_lib_error(__FILE__, __LINE__, __FUNCTION__, 0, __VA_ARGS__) /**< Shows a sound error message. */
-#define SYSERR(...) snd_lib_error(__FILE__, __LINE__, __FUNCTION__, errno, __VA_ARGS__) /**< Shows a system error message (related to \c errno). */
+#define SNDERR(...)
+#define SYSERR(...)
#else
-#define SNDERR(args...) snd_lib_error(__FILE__, __LINE__, __FUNCTION__, 0, ##args) /**< Shows a sound error message. */
-#define SYSERR(args...) snd_lib_error(__FILE__, __LINE__, __FUNCTION__, errno, ##args) /**< Shows a system error message (related to \c errno). */
+#define SNDERR(args...)
+#define SYSERR(args...)
#endif
/** \} */

View File

@ -1,5 +1,25 @@
#!/bin/sh
################################################################################
# Copyright (C) 2009-2010 OpenELEC.tv
# http://www.openelec.tv
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This Program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
# setup alsa (especially the mixer config)
mixer() {
@ -98,4 +118,3 @@ fi
)&
exit 0

View File

@ -1,36 +0,0 @@
# Soundcard Configuration File
# Soundcard to use by name (e.g. "SB") or by ID (0 for first card, 1 for second, ...)
ALSA_CARD="0"
# Output mode ( analog/digital/hdmi )
# digital is used for SPDIF/IEC958 output
SOUNDCARD_MODE="analog"
# passthrough mode for digital/hdmi outputs (none, ac3, dts or ac3dts)
# (Note: in analog mode this option is ignored)
# none : software audio decoding for all streams
# ac3 : enable hardware passthrough for AC-3 streams only
# dts : enable hardware passthrough for DTS streams only
# ac3dts : enable hardware passthrough for both AC-3 and DTS streams
SOUNDCARD_PT_MODE="none"
# IEC958 Playback AC97-SPSA Mode:
# 0. PCM1
# 1. PCM2,PCM1 (rear)
# 2. Centre and LFE
# 3. PCM3,Modem,Dedicated S/PDIF
# For SPDIF most users will want 0, but some users may need 3.
AC97_SPSA="0"
# Playback channels
# 2 - Stereo
# 4 - Surround
# 6 - Full 5.1
# note: in SPDIF and hardware AC3 decoder mode this option is ignored.
CHANNELS="2"
# SB Live/Audigy Analog/Digital Output Mode:
# 0: Suitable for some older SB Live! cards
# 1: Suitable for newer SB Live! and all Audigy cards
SBL_AUDIGY="1"

View File

@ -9,5 +9,4 @@ $SCRIPTS/install alsa-utils
mkdir -p $INSTALL/etc/modprobe.d
cp -P $PKG_DIR/config/alsa-base.conf $INSTALL/etc/modprobe.d
cp -P $PKG_DIR/config/audio $INSTALL/etc

View File

@ -1,13 +0,0 @@
diff -Naur libcdio-0.80.orig/lib/driver/gnu_linux.c libcdio-0.80/lib/driver/gnu_linux.c
--- libcdio-0.80.orig/lib/driver/gnu_linux.c 2010-02-17 23:21:04.260757228 +0100
+++ libcdio-0.80/lib/driver/gnu_linux.c 2010-02-17 23:21:28.273257431 +0100
@@ -30,6 +30,9 @@
static const char _rcsid[] = "$Id: gnu_linux.c,v 1.28 2007/03/07 04:35:47 rocky Exp $";
+#define u8 uint8_t
+#include <inttypes.h>
+
#include <string.h>
#include <limits.h>
#include <sys/types.h>

File diff suppressed because it is too large Load Diff

View File

@ -1 +1 @@
http://ftp.gnu.org/gnu/libcdio/libcdio-0.80.tar.gz
http://ftp.gnu.org/gnu/libcdio/libcdio-0.82.tar.bz2

View File

@ -1 +1 @@
ftp://mirror.switch.ch/mirror/mysql/Downloads/MySQL-5.1/mysql-5.1.45.tar.gz
ftp://mirror.switch.ch/mirror/mysql/Downloads/MySQL-5.1/mysql-5.1.47.tar.gz

View File

@ -1,7 +0,0 @@
#!/bin/sh
. config/options
cd $PKG_BUILD
make CC=$TARGET_CC

View File

@ -1,6 +0,0 @@
#!/bin/sh
. config/options
mkdir -p $INSTALL/sbin
cp -PR $PKG_BUILD/bootchartd $INSTALL/sbin

View File

@ -1 +0,0 @@
http://sources.openelec.tv/svn/bootchart-1.3.tar.gz

View File

@ -4,4 +4,3 @@
$SCRIPTS/install strace
$SCRIPTS/install gdb
$SCRIPTS/install bootchart

View File

@ -5,7 +5,19 @@
$SCRIPTS/install zlib
mkdir -p $INSTALL/usr/lib
cp -P `find $PKG_BUILD/.build-target/g{lib,module,object,thread,io} -name *.so*` $INSTALL/usr/lib
rm -rf $INSTALL/usr/lib/libg{lib,module,object,thread,io}*.so*T
cp -P $PKG_BUILD/.build-target/glib/.libs/libglib*.so* $INSTALL/usr/lib
rm -rf $INSTALL/usr/lib/libglib*.so*T
cp -P $PKG_BUILD/.build-target/gmodule/.libs/libgmodule*.so* $INSTALL/usr/lib
rm -rf $INSTALL/usr/lib/libgmodule*.so*T
cp -P $PKG_BUILD/.build-target/gobject/.libs/libgobject*.so* $INSTALL/usr/lib
rm -rf $INSTALL/usr/lib/libgobject*.so*T
cp -P $PKG_BUILD/.build-target/gthread/.libs/libgthread*.so* $INSTALL/usr/lib
rm -rf $INSTALL/usr/lib/libgthread*.so*T
cp -P $PKG_BUILD/.build-target/gio/.libs/libgio*.so* $INSTALL/usr/lib
rm -rf $INSTALL/usr/lib/libgio*.so*T
cp $PKG_BUILD/.build-target/glib/libcharset/charset.alias $INSTALL/usr/lib

View File

@ -1 +1 @@
http://ftp.gnome.org/pub/GNOME/sources/glib/2.24/glib-2.24.0.tar.bz2
http://ftp.gnome.org/pub/GNOME/sources/glib/2.24/glib-2.24.1.tar.bz2

View File

@ -1,22 +0,0 @@
#!/bin/sh
. config/options
$SCRIPTS/build toolchain
$SCRIPTS/build dbus-host
$SCRIPTS/unpack libnih
setup_toolchain host
cd $BUILD/libnih*
mkdir -p objdir-host
cd objdir-host
../configure --enable-static \
--disable-shared
make
mkdir -p $ROOT/$TOOLCHAIN/bin
cp -f nih-dbus-tool/nih-dbus-tool $ROOT/$TOOLCHAIN/bin

View File

@ -1,26 +0,0 @@
#!/bin/sh
. config/options
$SCRIPTS/build toolchain
$SCRIPTS/build dbus
$SCRIPTS/build libnih-host
export NIH_DBUS_TOOL="$ROOT/$TOOLCHAIN/bin/nih-dbus-tool"
cd $BUILD/$1*
mkdir -p objdir-target
cd objdir-target
../configure --host=$TARGET_NAME \
--build=$HOST_NAME \
--prefix=/usr \
--enable-static \
--disable-shared \
--disable-nls \
--enable-threading
make
$MAKEINSTALL

View File

@ -1 +0,0 @@
http://upstart.ubuntu.com/download/libnih/1.0/libnih-1.0.2.tar.gz

View File

@ -0,0 +1,54 @@
diff -up libdrm-20080814/xf86drm.c.no-bc libdrm-20080814/xf86drm.c
--- libdrm-20080814/xf86drm.c.no-bc 2008-08-14 15:43:09.000000000 +1000
+++ libdrm-20080814/xf86drm.c 2008-08-14 15:45:09.000000000 +1000
@@ -396,11 +396,6 @@ int drmAvailable(void)
int fd;
if ((fd = drmOpenMinor(0, 1, DRM_NODE_RENDER)) < 0) {
-#ifdef __linux__
- /* Try proc for backward Linux compatibility */
- if (!access("/proc/dri/0", R_OK))
- return 1;
-#endif
return 0;
}
@@ -519,38 +514,6 @@ static int drmOpenByName(const char *nam
}
}
-#ifdef __linux__
- /* Backward-compatibility /proc support */
- for (i = 0; i < 8; i++) {
- char proc_name[64], buf[512];
- char *driver, *pt, *devstring;
- int retcode;
-
- sprintf(proc_name, "/proc/dri/%d/name", i);
- if ((fd = open(proc_name, 0, 0)) >= 0) {
- retcode = read(fd, buf, sizeof(buf)-1);
- close(fd);
- if (retcode) {
- buf[retcode-1] = '\0';
- for (driver = pt = buf; *pt && *pt != ' '; ++pt)
- ;
- if (*pt) { /* Device is next */
- *pt = '\0';
- if (!strcmp(driver, name)) { /* Match */
- for (devstring = ++pt; *pt && *pt != ' '; ++pt)
- ;
- if (*pt) { /* Found busid */
- return drmOpenByBusid(++pt);
- } else { /* No busid */
- return drmOpenDevice(strtol(devstring, NULL, 0),i, DRM_NODE_RENDER);
- }
- }
- }
- }
- }
- }
-#endif
-
return -1;
}

View File

@ -0,0 +1,12 @@
diff -up libdrm-20080303/xf86drm.h.da libdrm-20080303/xf86drm.h
--- libdrm-20080303/xf86drm.h.da 2008-03-19 15:26:31.000000000 +1000
+++ libdrm-20080303/xf86drm.h 2008-03-19 15:26:46.000000000 +1000
@@ -45,7 +45,7 @@
/* Default /dev/dri directory permissions 0755 */
#define DRM_DEV_DIRMODE \
(S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH)
-#define DRM_DEV_MODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP)
+#define DRM_DEV_MODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)
#define DRM_DIR_NAME "/dev/dri"
#define DRM_DEV_NAME "%s/card%d"

View File

@ -4,4 +4,3 @@
mkdir -p $INSTALL/usr/lib
cp -PR $PKG_BUILD/.libs/libpng14.so* $INSTALL/usr/lib
ln -sf libpng14.so.0 $INSTALL/usr/lib/libpng.so.3

View File

@ -55,7 +55,6 @@ case "$2" in
$SCRIPTS/install linux $2
$SCRIPTS/install busybox
$SCRIPTS/install util-linux-ng
$SCRIPTS/install ureadahead
echo "OpenELEC" > $INSTALL/etc/distribution
echo "$PROJECT.$TARGET_ARCH" > $INSTALL/etc/arch

View File

@ -1,8 +1,32 @@
#!/bin/sh
################################################################################
# Copyright (C) 2009-2010 OpenELEC.tv
# http://www.openelec.tv
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This Program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
#
# load modules
#
# runlevels: openelec, textmode
. /etc/profile
progress "loading kernel modules"
(

View File

@ -1,155 +0,0 @@
From ee9c0b591bf16ca11bb354bc68dae75a903f3a64 Mon Sep 17 00:00:00 2001
From: Scott James Remnant <scott@ubuntu.com>
Date: Tue, 27 Oct 2009 10:05:32 +0000
Subject: [PATCH] trace: add trace events for open(), exec() and uselib()
This patch uses TRACE_EVENT to add tracepoints for the open(),
exec() and uselib() syscalls so that ureadahead can cheaply trace
the boot sequence to determine what to read to speed up the next.
It's not upstream because it will need to be rebased onto the syscall
trace events whenever that gets merged, and is a stop-gap.
Signed-off-by: Scott James Remnant <scott@ubuntu.com>
---
fs/exec.c | 8 +++++
fs/open.c | 4 ++
include/trace/events/fs.h | 71 +++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 83 insertions(+), 0 deletions(-)
create mode 100644 include/trace/events/fs.h
diff --git a/fs/exec.c b/fs/exec.c
index 172ceb6..c936999 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -56,6 +56,8 @@
#include <linux/fsnotify.h>
#include <linux/fs_struct.h>
+#include <trace/events/fs.h>
+
#include <asm/uaccess.h>
#include <asm/mmu_context.h>
#include <asm/tlb.h>
@@ -130,6 +132,10 @@ SYSCALL_DEFINE1(uselib, const char __user *, library)
fsnotify_open(file->f_path.dentry);
+ tmp = getname(library);
+ trace_uselib(tmp);
+ putname(library);
+
error = -ENOEXEC;
if(file->f_op) {
struct linux_binfmt * fmt;
@@ -665,6 +671,8 @@ struct file *open_exec(const char *name)
fsnotify_open(file->f_path.dentry);
+ trace_open_exec(name);
+
err = deny_write_access(file);
if (err)
goto exit;
diff --git a/fs/open.c b/fs/open.c
index 04b9aad..41c87f3 100644
--- a/fs/open.c
+++ b/fs/open.c
@@ -31,6 +31,9 @@
#include <linux/falloc.h>
#include <linux/fs_struct.h>
+#define CREATE_TRACE_POINTS
+#include <trace/events/fs.h>
+
int vfs_statfs(struct dentry *dentry, struct kstatfs *buf)
{
int retval = -ENODEV;
@@ -1041,6 +1044,7 @@ long do_sys_open(int dfd, const char __user *filename, int flags, int mode)
} else {
fsnotify_open(f->f_path.dentry);
fd_install(fd, f);
+ trace_do_sys_open(tmp, flags, mode);
}
}
putname(tmp);
diff --git a/include/trace/events/fs.h b/include/trace/events/fs.h
new file mode 100644
index 0000000..e967c55
--- /dev/null
+++ b/include/trace/events/fs.h
@@ -0,0 +1,71 @@
+#undef TRACE_SYSTEM
+#define TRACE_SYSTEM fs
+
+#if !defined(_TRACE_FS_H) || defined(TRACE_HEADER_MULTI_READ)
+#define _TRACE_FS_H
+
+#include <linux/fs.h>
+#include <linux/tracepoint.h>
+
+TRACE_EVENT(do_sys_open,
+
+ TP_PROTO(char *filename, int flags, int mode),
+
+ TP_ARGS(filename, flags, mode),
+
+ TP_STRUCT__entry(
+ __string( filename, filename )
+ __field( int, flags )
+ __field( int, mode )
+ ),
+
+ TP_fast_assign(
+ __assign_str(filename, filename);
+ __entry->flags = flags;
+ __entry->mode = mode;
+ ),
+
+ TP_printk("\"%s\" %x %o",
+ __get_str(filename), __entry->flags, __entry->mode)
+);
+
+TRACE_EVENT(uselib,
+
+ TP_PROTO(char *filename),
+
+ TP_ARGS(filename),
+
+ TP_STRUCT__entry(
+ __string( filename, filename )
+ ),
+
+ TP_fast_assign(
+ __assign_str(filename, filename);
+ ),
+
+ TP_printk("\"%s\"",
+ __get_str(filename))
+);
+
+TRACE_EVENT(open_exec,
+
+ TP_PROTO(char *filename),
+
+ TP_ARGS(filename),
+
+ TP_STRUCT__entry(
+ __string( filename, filename )
+ ),
+
+ TP_fast_assign(
+ __assign_str(filename, filename);
+ ),
+
+ TP_printk("\"%s\"",
+ __get_str(filename))
+);
+
+#endif /* _TRACE_FS_H */
+
+/* This part must be outside protection */
+#include <trace/define_trace.h>
--
1.6.3.3

View File

@ -1,14 +1,14 @@
Index: linux-2.6.16/init/main.c
===================================================================
--- linux-2.6.16.orig/init/main.c 2006-03-20 06:53:29.000000000 +0100
+++ linux-2.6.16/init/main.c 2006-03-20 18:42:46.000000000 +0100
@@ -710,8 +712,13 @@
system_state = SYSTEM_RUNNING;
numa_default_policy();
+ char *console = "/dev_console";
diff -Naur linux-2.6.34-rc7/init/main.c linux-2.6.34-rc7.patch/init/main.c
--- linux-2.6.34-rc7/init/main.c 2010-05-10 03:36:28.000000000 +0200
+++ linux-2.6.34-rc7.patch/init/main.c 2010-05-15 12:28:34.767241760 +0200
@@ -886,8 +886,14 @@
do_basic_setup();
/* Open the /dev/console on the rootfs, this should never fail */
- if (sys_open((const char __user *) "/dev/console", O_RDWR, 0) < 0)
- printk(KERN_WARNING "Warning: unable to open an initial console.\n");
+ char *console = "/dev_console";
+
+ if (sys_open((const char __user *) "/dev/console", O_RDWR, 0) < 0) {
+ sys_mknod(console, S_IFCHR|0600, (TTYAUX_MAJOR<<8)|1);
+ if (sys_open(console, O_RDWR, 0) < 0)

View File

@ -1,18 +1,30 @@
From 4ff58b642f80dedb20533978123d89b5ac9b1ed5 Mon Sep 17 00:00:00 2001
From: Kyle McMartin <kyle@phobos.i.jkkm.org>
Date: Tue, 30 Mar 2010 00:04:29 -0400
Subject: die-floppy-die
Kill the floppy.ko pnp modalias. We were surviving just fine without
autoloading floppy drivers, tyvm.
Please feel free to register all complaints in the wastepaper bin.
---
drivers/block/floppy.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c
index 91b7530..2ea84a6 100644
index 90c4038..f4a0b90 100644
--- a/drivers/block/floppy.c
+++ b/drivers/block/floppy.c
@@ -4631,7 +4631,7 @@ static const struct pnp_device_id floppy_pnpids[] = {
{ "PNP0700", 0 },
{ }
@@ -4619,8 +4619,7 @@ static const struct pnp_device_id floppy_pnpids[] = {
{"PNP0700", 0},
{}
};
-
-MODULE_DEVICE_TABLE(pnp, floppy_pnpids);
+/* MODULE_DEVICE_TABLE(pnp, floppy_pnpids); */
#else
--
1.7.0.1

View File

@ -0,0 +1,47 @@
From c69fcbd1f60b0842f7c1ad2c95692ffd19c4932b Mon Sep 17 00:00:00 2001
From: Kyle McMartin <kyle@phobos.i.jkkm.org>
Date: Mon, 29 Mar 2010 23:56:08 -0400
Subject: hda_intel-prealloc-4mb-dmabuffer
---
sound/pci/hda/hda_intel.c | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletions(-)
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index 4bb9067..37db515 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -1986,6 +1986,7 @@ azx_attach_pcm_stream(struct hda_bus *bus, struct hda_codec *codec,
struct azx_pcm *apcm;
int pcm_dev = cpcm->device;
int s, err;
+ size_t prealloc_min = 64*1024; /* 64KB */
if (pcm_dev >= HDA_MAX_PCMS) {
snd_printk(KERN_ERR SFX "Invalid PCM device number %d\n",
@@ -2019,10 +2020,21 @@ azx_attach_pcm_stream(struct hda_bus *bus, struct hda_codec *codec,
if (cpcm->stream[s].substreams)
snd_pcm_set_ops(pcm, s, &azx_pcm_ops);
}
+
/* buffer pre-allocation */
+
+ /* subtle, don't allocate a big buffer for modems...
+ * also, don't just test 32BIT_MASK, since azx supports
+ * 64-bit DMA in some cases.
+ */
+ /* lennart wants a 2.2MB buffer for 2sec of 48khz */
+ if (pcm->dev_class == SNDRV_PCM_CLASS_GENERIC &&
+ chip->pci->dma_mask >= DMA_32BIT_MASK)
+ prealloc_min = 4 * 1024 * 1024; /* 4MB */
+
snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV_SG,
snd_dma_pci_data(chip->pci),
- 1024 * 64, 32 * 1024 * 1024);
+ prealloc_min, 32 * 1024 * 1024);
return 0;
}
--
1.7.0.1

View File

@ -0,0 +1,678 @@
diff -Naur linux-2.6.34-old/fs/squashfs/decompressor.c linux-2.6.34-new/fs/squashfs/decompressor.c
--- linux-2.6.34-old/fs/squashfs/decompressor.c 2010-05-16 14:17:36.000000000 -0700
+++ linux-2.6.34-new/fs/squashfs/decompressor.c 2010-05-17 13:11:22.000000000 -0700
@@ -50,7 +50,11 @@
static const struct squashfs_decompressor *decompressor[] = {
&squashfs_zlib_comp_ops,
+#ifdef CONFIG_SQUASHFS_LZMA
+ &squashfs_lzma_comp_ops,
+#else
&squashfs_lzma_unsupported_comp_ops,
+#endif
&squashfs_lzo_unsupported_comp_ops,
&squashfs_unknown_comp_ops
};
diff -Naur linux-2.6.34-old/fs/squashfs/Kconfig linux-2.6.34-new/fs/squashfs/Kconfig
--- linux-2.6.34-old/fs/squashfs/Kconfig 2010-05-16 14:17:36.000000000 -0700
+++ linux-2.6.34-new/fs/squashfs/Kconfig 2010-05-17 13:11:22.000000000 -0700
@@ -26,6 +26,12 @@
If unsure, say N.
+config SQUASHFS_LZMA
+ bool "Include support for LZMA compressed file systems"
+ depends on SQUASHFS
+ select DECOMPRESS_LZMA
+ select DECOMPRESS_LZMA_NEEDED
+
config SQUASHFS_EMBEDDED
bool "Additional option for memory-constrained systems"
diff -Naur linux-2.6.34-old/fs/squashfs/lzma_wrapper.c linux-2.6.34-new/fs/squashfs/lzma_wrapper.c
--- linux-2.6.34-old/fs/squashfs/lzma_wrapper.c 1969-12-31 16:00:00.000000000 -0800
+++ linux-2.6.34-new/fs/squashfs/lzma_wrapper.c 2010-05-17 13:11:22.000000000 -0700
@@ -0,0 +1,152 @@
+/*
+ * Squashfs - a compressed read only filesystem for Linux
+ *
+ * Copyright (c) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+ * Phillip Lougher <phillip@lougher.demon.co.uk>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2,
+ * or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU 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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * lzma_wrapper.c
+ */
+
+#include <asm/unaligned.h>
+#include <linux/slab.h>
+#include <linux/buffer_head.h>
+#include <linux/mutex.h>
+#include <linux/vmalloc.h>
+#include <linux/decompress/unlzma.h>
+
+#include "squashfs_fs.h"
+#include "squashfs_fs_sb.h"
+#include "squashfs_fs_i.h"
+#include "squashfs.h"
+#include "decompressor.h"
+
+struct squashfs_lzma {
+ void *input;
+ void *output;
+};
+
+/* decompress_unlzma.c is currently non re-entrant... */
+DEFINE_MUTEX(lzma_mutex);
+
+/* decompress_unlzma.c doesn't provide any context in its callbacks... */
+static int lzma_error;
+
+static void error(char *m)
+{
+ ERROR("unlzma error: %s\n", m);
+ lzma_error = 1;
+}
+
+
+static void *lzma_init(struct squashfs_sb_info *msblk)
+{
+ struct squashfs_lzma *stream = kzalloc(sizeof(*stream), GFP_KERNEL);
+ if (stream == NULL)
+ goto failed;
+ stream->input = vmalloc(msblk->block_size);
+ if (stream->input == NULL)
+ goto failed;
+ stream->output = vmalloc(msblk->block_size);
+ if (stream->output == NULL)
+ goto failed2;
+
+ return stream;
+
+failed2:
+ vfree(stream->input);
+failed:
+ ERROR("failed to allocate lzma workspace\n");
+ kfree(stream);
+ return NULL;
+}
+
+
+static void lzma_free(void *strm)
+{
+ struct squashfs_lzma *stream = strm;
+
+ if (stream) {
+ vfree(stream->input);
+ vfree(stream->output);
+ }
+ kfree(stream);
+}
+
+
+static int lzma_uncompress(struct squashfs_sb_info *msblk, void **buffer,
+ struct buffer_head **bh, int b, int offset, int length, int srclength,
+ int pages)
+{
+ struct squashfs_lzma *stream = msblk->stream;
+ void *buff = stream->input;
+ int avail, i, bytes = length, res;
+
+ mutex_lock(&lzma_mutex);
+
+ for (i = 0; i < b; i++) {
+ wait_on_buffer(bh[i]);
+ if (!buffer_uptodate(bh[i]))
+ goto block_release;
+
+ avail = min(bytes, msblk->devblksize - offset);
+ memcpy(buff, bh[i]->b_data + offset, avail);
+ buff += avail;
+ bytes -= avail;
+ offset = 0;
+ put_bh(bh[i]);
+ }
+
+ lzma_error = 0;
+ res = unlzma(stream->input, length, NULL, NULL, stream->output, NULL,
+ error);
+ if (res || lzma_error)
+ goto failed;
+
+ /* uncompressed size is stored in the LZMA header (5 byte offset) */
+ res = bytes = get_unaligned_le32(stream->input + 5);
+ for (i = 0, buff = stream->output; bytes && i < pages; i++) {
+ avail = min_t(int, bytes, PAGE_CACHE_SIZE);
+ memcpy(buffer[i], buff, avail);
+ buff += avail;
+ bytes -= avail;
+ }
+ if (bytes)
+ goto failed;
+
+ mutex_unlock(&lzma_mutex);
+ return res;
+
+block_release:
+ for (; i < b; i++)
+ put_bh(bh[i]);
+
+failed:
+ mutex_unlock(&lzma_mutex);
+
+ ERROR("lzma decompression failed, data probably corrupt\n");
+ return -EIO;
+}
+
+const struct squashfs_decompressor squashfs_lzma_comp_ops = {
+ .init = lzma_init,
+ .free = lzma_free,
+ .decompress = lzma_uncompress,
+ .id = LZMA_COMPRESSION,
+ .name = "lzma",
+ .supported = 1
+};
+
diff -Naur linux-2.6.34-old/fs/squashfs/Makefile linux-2.6.34-new/fs/squashfs/Makefile
--- linux-2.6.34-old/fs/squashfs/Makefile 2010-05-16 14:17:36.000000000 -0700
+++ linux-2.6.34-new/fs/squashfs/Makefile 2010-05-17 13:11:22.000000000 -0700
@@ -5,3 +5,4 @@
obj-$(CONFIG_SQUASHFS) += squashfs.o
squashfs-y += block.o cache.o dir.o export.o file.o fragment.o id.o inode.o
squashfs-y += namei.o super.o symlink.o zlib_wrapper.o decompressor.o
+squashfs-$(CONFIG_SQUASHFS_LZMA) += lzma_wrapper.o
diff -Naur linux-2.6.34-old/fs/squashfs/squashfs.h linux-2.6.34-new/fs/squashfs/squashfs.h
--- linux-2.6.34-old/fs/squashfs/squashfs.h 2010-05-16 14:17:36.000000000 -0700
+++ linux-2.6.34-new/fs/squashfs/squashfs.h 2010-05-17 13:11:22.000000000 -0700
@@ -94,3 +94,6 @@
/* zlib_wrapper.c */
extern const struct squashfs_decompressor squashfs_zlib_comp_ops;
+
+/* lzma wrapper.c */
+extern const struct squashfs_decompressor squashfs_lzma_comp_ops;
diff -Naur linux-2.6.34-old/include/linux/decompress/bunzip2_mm.h linux-2.6.34-new/include/linux/decompress/bunzip2_mm.h
--- linux-2.6.34-old/include/linux/decompress/bunzip2_mm.h 1969-12-31 16:00:00.000000000 -0800
+++ linux-2.6.34-new/include/linux/decompress/bunzip2_mm.h 2010-05-17 13:11:22.000000000 -0700
@@ -0,0 +1,13 @@
+#ifndef BUNZIP2_MM_H
+#define BUNZIP2_MM_H
+
+#ifdef STATIC
+/* Code active when included from pre-boot environment: */
+#define INIT
+#else
+/* Compile for initramfs/initrd code only */
+#define INIT __init
+static void(*error)(char *m);
+#endif
+
+#endif
diff -Naur linux-2.6.34-old/include/linux/decompress/inflate_mm.h linux-2.6.34-new/include/linux/decompress/inflate_mm.h
--- linux-2.6.34-old/include/linux/decompress/inflate_mm.h 1969-12-31 16:00:00.000000000 -0800
+++ linux-2.6.34-new/include/linux/decompress/inflate_mm.h 2010-05-17 13:11:22.000000000 -0700
@@ -0,0 +1,13 @@
+#ifndef INFLATE_MM_H
+#define INFLATE_MM_H
+
+#ifdef STATIC
+/* Code active when included from pre-boot environment: */
+#define INIT
+#else
+/* Compile for initramfs/initrd code only */
+#define INIT __init
+static void(*error)(char *m);
+#endif
+
+#endif
diff -Naur linux-2.6.34-old/include/linux/decompress/mm.h linux-2.6.34-new/include/linux/decompress/mm.h
--- linux-2.6.34-old/include/linux/decompress/mm.h 2010-05-16 14:17:36.000000000 -0700
+++ linux-2.6.34-new/include/linux/decompress/mm.h 2010-05-17 13:11:22.000000000 -0700
@@ -63,8 +63,6 @@
#define set_error_fn(x)
-#define INIT
-
#else /* STATIC */
/* Code active when compiled standalone for use when loading ramdisk: */
@@ -84,10 +82,8 @@
#define large_malloc(a) vmalloc(a)
#define large_free(a) vfree(a)
-static void(*error)(char *m);
#define set_error_fn(x) error = x;
-#define INIT __init
#define STATIC
#include <linux/init.h>
diff -Naur linux-2.6.34-old/include/linux/decompress/unlzma_mm.h linux-2.6.34-new/include/linux/decompress/unlzma_mm.h
--- linux-2.6.34-old/include/linux/decompress/unlzma_mm.h 1969-12-31 16:00:00.000000000 -0800
+++ linux-2.6.34-new/include/linux/decompress/unlzma_mm.h 2010-05-17 13:11:22.000000000 -0700
@@ -0,0 +1,20 @@
+#ifndef UNLZMA_MM_H
+#define UNLZMA_MM_H
+
+#ifdef STATIC
+
+/* Code active when included from pre-boot environment: */
+#define INIT
+
+#elif defined(CONFIG_DECOMPRESS_LZMA_NEEDED)
+
+/* Make it available to non initramfs/initrd code */
+#define INIT
+#include <linux/module.h>
+#else
+
+/* Compile for initramfs/initrd code only */
+#define INIT __init
+#endif
+
+#endif
diff -Naur linux-2.6.34-old/include/linux/decompress/unlzo_mm.h linux-2.6.34-new/include/linux/decompress/unlzo_mm.h
--- linux-2.6.34-old/include/linux/decompress/unlzo_mm.h 1969-12-31 16:00:00.000000000 -0800
+++ linux-2.6.34-new/include/linux/decompress/unlzo_mm.h 2010-05-17 13:11:22.000000000 -0700
@@ -0,0 +1,13 @@
+#ifndef UNLZO_MM_H
+#define UNLZO_MM_H
+
+#ifdef STATIC
+/* Code active when included from pre-boot environment: */
+#define INIT
+#else
+/* Compile for initramfs/initrd code only */
+#define INIT __init
+static void(*error)(char *m);
+#endif
+
+#endif
diff -Naur linux-2.6.34-old/lib/decompress_bunzip2.c linux-2.6.34-new/lib/decompress_bunzip2.c
--- linux-2.6.34-old/lib/decompress_bunzip2.c 2010-05-16 14:17:36.000000000 -0700
+++ linux-2.6.34-new/lib/decompress_bunzip2.c 2010-05-17 13:11:22.000000000 -0700
@@ -52,6 +52,7 @@
#include <linux/slab.h>
#endif /* STATIC */
+#include <linux/decompress/bunzip2_mm.h>
#include <linux/decompress/mm.h>
#ifndef INT_MAX
diff -Naur linux-2.6.34-old/lib/decompress_inflate.c linux-2.6.34-new/lib/decompress_inflate.c
--- linux-2.6.34-old/lib/decompress_inflate.c 2010-05-16 14:17:36.000000000 -0700
+++ linux-2.6.34-new/lib/decompress_inflate.c 2010-05-17 13:11:22.000000000 -0700
@@ -23,6 +23,7 @@
#endif /* STATIC */
+#include <linux/decompress/inflate_mm.h>
#include <linux/decompress/mm.h>
#define GZIP_IOBUF_SIZE (16*1024)
diff -Naur linux-2.6.34-old/lib/decompress_unlzma.c linux-2.6.34-new/lib/decompress_unlzma.c
--- linux-2.6.34-old/lib/decompress_unlzma.c 2010-05-16 14:17:36.000000000 -0700
+++ linux-2.6.34-new/lib/decompress_unlzma.c 2010-05-17 13:11:22.000000000 -0700
@@ -36,6 +36,7 @@
#include <linux/slab.h>
#endif /* STATIC */
+#include <linux/decompress/unlzma_mm.h>
#include <linux/decompress/mm.h>
#define MIN(a, b) (((a) < (b)) ? (a) : (b))
@@ -88,7 +89,7 @@
}
/* Called twice: once at startup and once in rc_normalize() */
-static void INIT rc_read(struct rc *rc)
+static void INIT rc_read(struct rc *rc, void(*error)(char *x))
{
rc->buffer_size = rc->fill((char *)rc->buffer, LZMA_IOBUF_SIZE);
if (rc->buffer_size <= 0)
@@ -115,13 +116,13 @@
rc->range = 0xFFFFFFFF;
}
-static inline void INIT rc_init_code(struct rc *rc)
+static inline void INIT rc_init_code(struct rc *rc, void(*error)(char *x))
{
int i;
for (i = 0; i < 5; i++) {
if (rc->ptr >= rc->buffer_end)
- rc_read(rc);
+ rc_read(rc, error);
rc->code = (rc->code << 8) | *rc->ptr++;
}
}
@@ -134,32 +135,33 @@
}
/* Called twice, but one callsite is in inline'd rc_is_bit_0_helper() */
-static void INIT rc_do_normalize(struct rc *rc)
+static void INIT rc_do_normalize(struct rc *rc, void(*error)(char *x))
{
if (rc->ptr >= rc->buffer_end)
- rc_read(rc);
+ rc_read(rc, error);
rc->range <<= 8;
rc->code = (rc->code << 8) | *rc->ptr++;
}
-static inline void INIT rc_normalize(struct rc *rc)
+static inline void INIT rc_normalize(struct rc *rc, void(*error)(char *x))
{
if (rc->range < (1 << RC_TOP_BITS))
- rc_do_normalize(rc);
+ rc_do_normalize(rc, error);
}
/* Called 9 times */
/* Why rc_is_bit_0_helper exists?
*Because we want to always expose (rc->code < rc->bound) to optimizer
*/
-static inline uint32_t INIT rc_is_bit_0_helper(struct rc *rc, uint16_t *p)
+static inline uint32_t INIT rc_is_bit_0_helper(struct rc *rc, uint16_t *p,
+ void (*error)(char *x))
{
- rc_normalize(rc);
+ rc_normalize(rc, error);
rc->bound = *p * (rc->range >> RC_MODEL_TOTAL_BITS);
return rc->bound;
}
-static inline int INIT rc_is_bit_0(struct rc *rc, uint16_t *p)
+static inline int INIT rc_is_bit_0(struct rc *rc, uint16_t *p, void(*error)(char *x))
{
- uint32_t t = rc_is_bit_0_helper(rc, p);
+ uint32_t t = rc_is_bit_0_helper(rc, p, error);
return rc->code < t;
}
@@ -177,9 +179,9 @@
}
/* Called 4 times in unlzma loop */
-static int INIT rc_get_bit(struct rc *rc, uint16_t *p, int *symbol)
+static int INIT rc_get_bit(struct rc *rc, uint16_t *p, int *symbol, void(*error)(char *x))
{
- if (rc_is_bit_0(rc, p)) {
+ if (rc_is_bit_0(rc, p, error)) {
rc_update_bit_0(rc, p);
*symbol *= 2;
return 0;
@@ -191,9 +193,9 @@
}
/* Called once */
-static inline int INIT rc_direct_bit(struct rc *rc)
+static inline int INIT rc_direct_bit(struct rc *rc , void(*error)(char *x))
{
- rc_normalize(rc);
+ rc_normalize(rc, error);
rc->range >>= 1;
if (rc->code >= rc->range) {
rc->code -= rc->range;
@@ -204,13 +206,14 @@
/* Called twice */
static inline void INIT
-rc_bit_tree_decode(struct rc *rc, uint16_t *p, int num_levels, int *symbol)
+rc_bit_tree_decode(struct rc *rc, uint16_t *p, int num_levels, int *symbol,
+ void(*error)(char *x))
{
int i = num_levels;
*symbol = 1;
while (i--)
- rc_get_bit(rc, p + *symbol, symbol);
+ rc_get_bit(rc, p + *symbol, symbol, error);
*symbol -= 1 << num_levels;
}
@@ -347,7 +350,8 @@
static inline void INIT process_bit0(struct writer *wr, struct rc *rc,
struct cstate *cst, uint16_t *p,
int pos_state, uint16_t *prob,
- int lc, uint32_t literal_pos_mask) {
+ int lc, uint32_t literal_pos_mask,
+ void(*error)(char *x)) {
int mi = 1;
rc_update_bit_0(rc, prob);
prob = (p + LZMA_LITERAL +
@@ -365,7 +369,7 @@
match_byte <<= 1;
bit = match_byte & 0x100;
prob_lit = prob + 0x100 + bit + mi;
- if (rc_get_bit(rc, prob_lit, &mi)) {
+ if (rc_get_bit(rc, prob_lit, &mi, error)) {
if (!bit)
break;
} else {
@@ -376,7 +380,7 @@
}
while (mi < 0x100) {
uint16_t *prob_lit = prob + mi;
- rc_get_bit(rc, prob_lit, &mi);
+ rc_get_bit(rc, prob_lit, &mi, error);
}
write_byte(wr, mi);
if (cst->state < 4)
@@ -389,7 +393,8 @@
static inline void INIT process_bit1(struct writer *wr, struct rc *rc,
struct cstate *cst, uint16_t *p,
- int pos_state, uint16_t *prob) {
+ int pos_state, uint16_t *prob,
+ void(*error)(char *x)) {
int offset;
uint16_t *prob_len;
int num_bits;
@@ -397,7 +402,7 @@
rc_update_bit_1(rc, prob);
prob = p + LZMA_IS_REP + cst->state;
- if (rc_is_bit_0(rc, prob)) {
+ if (rc_is_bit_0(rc, prob, error)) {
rc_update_bit_0(rc, prob);
cst->rep3 = cst->rep2;
cst->rep2 = cst->rep1;
@@ -407,13 +412,13 @@
} else {
rc_update_bit_1(rc, prob);
prob = p + LZMA_IS_REP_G0 + cst->state;
- if (rc_is_bit_0(rc, prob)) {
+ if (rc_is_bit_0(rc, prob, error)) {
rc_update_bit_0(rc, prob);
prob = (p + LZMA_IS_REP_0_LONG
+ (cst->state <<
LZMA_NUM_POS_BITS_MAX) +
pos_state);
- if (rc_is_bit_0(rc, prob)) {
+ if (rc_is_bit_0(rc, prob, error)) {
rc_update_bit_0(rc, prob);
cst->state = cst->state < LZMA_NUM_LIT_STATES ?
@@ -428,13 +433,13 @@
rc_update_bit_1(rc, prob);
prob = p + LZMA_IS_REP_G1 + cst->state;
- if (rc_is_bit_0(rc, prob)) {
+ if (rc_is_bit_0(rc, prob, error)) {
rc_update_bit_0(rc, prob);
distance = cst->rep1;
} else {
rc_update_bit_1(rc, prob);
prob = p + LZMA_IS_REP_G2 + cst->state;
- if (rc_is_bit_0(rc, prob)) {
+ if (rc_is_bit_0(rc, prob, error)) {
rc_update_bit_0(rc, prob);
distance = cst->rep2;
} else {
@@ -452,7 +457,7 @@
}
prob_len = prob + LZMA_LEN_CHOICE;
- if (rc_is_bit_0(rc, prob_len)) {
+ if (rc_is_bit_0(rc, prob_len, error)) {
rc_update_bit_0(rc, prob_len);
prob_len = (prob + LZMA_LEN_LOW
+ (pos_state <<
@@ -462,7 +467,7 @@
} else {
rc_update_bit_1(rc, prob_len);
prob_len = prob + LZMA_LEN_CHOICE_2;
- if (rc_is_bit_0(rc, prob_len)) {
+ if (rc_is_bit_0(rc, prob_len, error)) {
rc_update_bit_0(rc, prob_len);
prob_len = (prob + LZMA_LEN_MID
+ (pos_state <<
@@ -478,7 +483,7 @@
}
}
- rc_bit_tree_decode(rc, prob_len, num_bits, &len);
+ rc_bit_tree_decode(rc, prob_len, num_bits, &len, error);
len += offset;
if (cst->state < 4) {
@@ -493,7 +498,7 @@
<< LZMA_NUM_POS_SLOT_BITS);
rc_bit_tree_decode(rc, prob,
LZMA_NUM_POS_SLOT_BITS,
- &pos_slot);
+ &pos_slot, error);
if (pos_slot >= LZMA_START_POS_MODEL_INDEX) {
int i, mi;
num_bits = (pos_slot >> 1) - 1;
@@ -506,7 +511,7 @@
num_bits -= LZMA_NUM_ALIGN_BITS;
while (num_bits--)
cst->rep0 = (cst->rep0 << 1) |
- rc_direct_bit(rc);
+ rc_direct_bit(rc, error);
prob = p + LZMA_ALIGN;
cst->rep0 <<= LZMA_NUM_ALIGN_BITS;
num_bits = LZMA_NUM_ALIGN_BITS;
@@ -514,7 +519,7 @@
i = 1;
mi = 1;
while (num_bits--) {
- if (rc_get_bit(rc, prob + mi, &mi))
+ if (rc_get_bit(rc, prob + mi, &mi, error))
cst->rep0 |= i;
i <<= 1;
}
@@ -531,12 +536,12 @@
-STATIC inline int INIT unlzma(unsigned char *buf, int in_len,
+STATIC int INIT unlzma(unsigned char *buf, int in_len,
int(*fill)(void*, unsigned int),
int(*flush)(void*, unsigned int),
unsigned char *output,
int *posp,
- void(*error_fn)(char *x)
+ void(*error)(char *x)
)
{
struct lzma_header header;
@@ -552,8 +557,6 @@
unsigned char *inbuf;
int ret = -1;
- set_error_fn(error_fn);
-
if (buf)
inbuf = buf;
else
@@ -576,7 +579,7 @@
for (i = 0; i < sizeof(header); i++) {
if (rc.ptr >= rc.buffer_end)
- rc_read(&rc);
+ rc_read(&rc, error);
((unsigned char *)&header)[i] = *rc.ptr++;
}
@@ -621,17 +624,17 @@
for (i = 0; i < num_probs; i++)
p[i] = (1 << RC_MODEL_TOTAL_BITS) >> 1;
- rc_init_code(&rc);
+ rc_init_code(&rc, error);
while (get_pos(&wr) < header.dst_size) {
int pos_state = get_pos(&wr) & pos_state_mask;
uint16_t *prob = p + LZMA_IS_MATCH +
(cst.state << LZMA_NUM_POS_BITS_MAX) + pos_state;
- if (rc_is_bit_0(&rc, prob))
+ if (rc_is_bit_0(&rc, prob, error))
process_bit0(&wr, &rc, &cst, p, pos_state, prob,
- lc, literal_pos_mask);
+ lc, literal_pos_mask, error);
else {
- process_bit1(&wr, &rc, &cst, p, pos_state, prob);
+ process_bit1(&wr, &rc, &cst, p, pos_state, prob, error);
if (cst.rep0 == 0)
break;
}
@@ -652,6 +655,9 @@
exit_0:
return ret;
}
+#if defined(CONFIG_DECOMPRESS_LZMA_NEEDED) && !defined(PREBOOT)
+EXPORT_SYMBOL(unlzma);
+#endif
#ifdef PREBOOT
STATIC int INIT decompress(unsigned char *buf, int in_len,
diff -Naur linux-2.6.34-old/lib/decompress_unlzo.c linux-2.6.34-new/lib/decompress_unlzo.c
--- linux-2.6.34-old/lib/decompress_unlzo.c 2010-05-16 14:17:36.000000000 -0700
+++ linux-2.6.34-new/lib/decompress_unlzo.c 2010-05-17 13:11:22.000000000 -0700
@@ -39,6 +39,7 @@
#include <linux/types.h>
#include <linux/lzo.h>
+#include <linux/decompress/unlzo_mm.h>
#include <linux/decompress/mm.h>
#include <linux/compiler.h>
diff -Naur linux-2.6.34-old/lib/Kconfig linux-2.6.34-new/lib/Kconfig
--- linux-2.6.34-old/lib/Kconfig 2010-05-16 14:17:36.000000000 -0700
+++ linux-2.6.34-new/lib/Kconfig 2010-05-17 13:11:22.000000000 -0700
@@ -121,6 +121,9 @@
select LZO_DECOMPRESS
tristate
+config DECOMPRESS_LZMA_NEEDED
+ boolean
+
#
# Generic allocator support is selected if needed
#
diff -Naur linux-2.6.34-old/lib/Makefile linux-2.6.34-new/lib/Makefile
--- linux-2.6.34-old/lib/Makefile 2010-05-16 14:17:36.000000000 -0700
+++ linux-2.6.34-new/lib/Makefile 2010-05-17 13:11:22.000000000 -0700
@@ -69,7 +69,7 @@
lib-$(CONFIG_DECOMPRESS_GZIP) += decompress_inflate.o
lib-$(CONFIG_DECOMPRESS_BZIP2) += decompress_bunzip2.o
-lib-$(CONFIG_DECOMPRESS_LZMA) += decompress_unlzma.o
+obj-$(CONFIG_DECOMPRESS_LZMA) += decompress_unlzma.o
lib-$(CONFIG_DECOMPRESS_LZO) += decompress_unlzo.o
obj-$(CONFIG_TEXTSEARCH) += textsearch.o

View File

@ -0,0 +1,26 @@
diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c
index 4173125..baa32a0 100644
--- a/drivers/pci/intel-iommu.c
+++ b/drivers/pci/intel-iommu.c
@@ -340,7 +340,7 @@ int dmar_disabled = 0;
int dmar_disabled = 1;
#endif /*CONFIG_DMAR_DEFAULT_ON*/
-static int __initdata dmar_map_gfx = 1;
+static int dmar_map_gfx = 1;
static int dmar_forcedac;
static int intel_iommu_strict;
@@ -3728,6 +3728,12 @@ static void __devinit quirk_iommu_rwbf(struct pci_dev *dev)
*/
printk(KERN_INFO "DMAR: Forcing write-buffer flush capability\n");
rwbf_quirk = 1;
+
+ /* https://bugzilla.redhat.com/show_bug.cgi?id=538163 */
+ if (dev->revision == 0x07) {
+ printk(KERN_INFO "DMAR: Disabling IOMMU for graphics on this chipset\n");
+ dmar_map_gfx = 0;
+ }
}
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x2a40, quirk_iommu_rwbf);

View File

@ -1,635 +0,0 @@
Documentation/input/appleir.txt | 46 ++++
drivers/hid/hid-apple.c | 4 -
drivers/hid/hid-core.c | 5 +-
drivers/hid/hid-ids.h | 1 +
drivers/input/misc/Kconfig | 13 +
drivers/input/misc/Makefile | 1 +
drivers/input/misc/appleir.c | 477 +++++++++++++++++++++++++++++++++++++++
7 files changed, 541 insertions(+), 6 deletions(-)
create mode 100644 Documentation/input/appleir.txt
create mode 100644 drivers/input/misc/appleir.c
diff --git a/Documentation/input/appleir.txt b/Documentation/input/appleir.txt
new file mode 100644
index 0000000..0aaf5fe
--- /dev/null
+++ b/Documentation/input/appleir.txt
@@ -0,0 +1,46 @@
+Apple IR receiver Driver (appleir)
+----------------------------------
+ Copyright (C) 2009 Bastien Nocera <hadess@hadess.net>
+
+The appleir driver is a kernel input driver to handle Apple's IR
+receivers (and associated remotes) in the kernel.
+
+The driver is an input driver which only handles "official" remotes
+as built and sold by Apple.
+
+Authors
+-------
+
+James McKenzie (original driver)
+Alex Karpenko (05ac:8242 support)
+Greg Kroah-Hartman (cleanups and original submission)
+Bastien Nocera (further cleanups and suspend support)
+
+Supported hardware
+------------------
+
+- All Apple laptops and desktops from 2005 onwards, except:
+ - the unibody Macbook (2009)
+ - Mac Pro (all versions)
+- Apple TV (all revisions)
+
+The remote will only support the 6 buttons of the original remotes
+as sold by Apple. See the next section if you want to use other remotes
+or want to use lirc with the device instead of the kernel driver.
+
+Using lirc (native) instead of the kernel driver
+------------------------------------------------
+
+First, you will need to disable the kernel driver for the receiver.
+
+This can be achieved by passing quirks to the usbhid driver.
+The quirk line would be:
+usbhid.quirks=0x05ac:0x8242:0x08
+
+With 0x05ac being the vendor ID (Apple, you shouldn't need to change this)
+With 0x8242 being the product ID (check the output of lsusb for your hardware)
+And 0x08 being "HID_CONNECT_HIDDEV"
+
+This should force the creation of a hiddev device for the receiver, and
+make it usable under lirc.
+
diff --git a/drivers/hid/hid-apple.c b/drivers/hid/hid-apple.c
index 4b96e7a..d1fdcd0 100644
--- a/drivers/hid/hid-apple.c
+++ b/drivers/hid/hid-apple.c
@@ -353,10 +353,6 @@ static void apple_remove(struct hid_device *hdev)
}
static const struct hid_device_id apple_devices[] = {
- { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ATV_IRCONTROL),
- .driver_data = APPLE_HIDDEV | APPLE_IGNORE_HIDINPUT },
- { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL4),
- .driver_data = APPLE_HIDDEV | APPLE_IGNORE_HIDINPUT },
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MIGHTYMOUSE),
.driver_data = APPLE_MIGHTYMOUSE | APPLE_INVERT_HWHEEL },
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index 7d05c4b..3efb0fa 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -1252,8 +1252,6 @@ EXPORT_SYMBOL_GPL(hid_disconnect);
static const struct hid_device_id hid_blacklist[] = {
{ HID_USB_DEVICE(USB_VENDOR_ID_A4TECH, USB_DEVICE_ID_A4TECH_WCP32PU) },
{ HID_USB_DEVICE(USB_VENDOR_ID_A4TECH, USB_DEVICE_ID_A4TECH_X5_005D) },
- { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ATV_IRCONTROL) },
- { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL4) },
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MIGHTYMOUSE) },
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_ANSI) },
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_ISO) },
@@ -1539,6 +1537,9 @@ static const struct hid_device_id hid_ignore_list[] = {
{ HID_USB_DEVICE(USB_VENDOR_ID_AIPTEK, USB_DEVICE_ID_AIPTEK_24) },
{ HID_USB_DEVICE(USB_VENDOR_ID_AIRCABLE, USB_DEVICE_ID_AIRCABLE1) },
{ HID_USB_DEVICE(USB_VENDOR_ID_ALCOR, USB_DEVICE_ID_ALCOR_USBRS232) },
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL) },
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ATV_IRCONTROL) },
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL4) },
{ HID_USB_DEVICE(USB_VENDOR_ID_ASUS, USB_DEVICE_ID_ASUS_LCM)},
{ HID_USB_DEVICE(USB_VENDOR_ID_ASUS, USB_DEVICE_ID_ASUS_LCM2)},
{ HID_USB_DEVICE(USB_VENDOR_ID_AVERMEDIA, USB_DEVICE_ID_AVER_FM_MR800) },
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
index adbef5d..c399110 100644
--- a/drivers/hid/hid-ids.h
+++ b/drivers/hid/hid-ids.h
@@ -90,6 +90,7 @@
#define USB_DEVICE_ID_APPLE_WELLSPRING3_JIS 0x0238
#define USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY 0x030a
#define USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY 0x030b
+#define USB_DEVICE_ID_APPLE_IRCONTROL 0x8240
#define USB_DEVICE_ID_APPLE_ATV_IRCONTROL 0x8241
#define USB_DEVICE_ID_APPLE_IRCONTROL4 0x8242
diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig
index a9bb254..51b6684 100644
--- a/drivers/input/misc/Kconfig
+++ b/drivers/input/misc/Kconfig
@@ -148,6 +148,19 @@ config INPUT_KEYSPAN_REMOTE
To compile this driver as a module, choose M here: the module will
be called keyspan_remote.
+config INPUT_APPLEIR
+ tristate "Apple infrared receiver (built in)"
+ depends on USB_ARCH_HAS_HCD
+ select USB
+ help
+ Say Y here if you want to use a Apple infrared remote control. All
+ the Apple computers from 2005 onwards include such a port, except
+ the unibody Macbook (2009), and Mac Pros. This receiver is also
+ used in the Apple TV set-top box.
+
+ To compile this driver as a module, choose M here: the module will
+ be called appleir.
+
config INPUT_POWERMATE
tristate "Griffin PowerMate and Contour Jog support"
depends on USB_ARCH_HAS_HCD
diff --git a/drivers/input/misc/Makefile b/drivers/input/misc/Makefile
index a8b8485..041e6f5 100644
--- a/drivers/input/misc/Makefile
+++ b/drivers/input/misc/Makefile
@@ -5,6 +5,7 @@
# Each configuration option enables a list of files.
obj-$(CONFIG_INPUT_APANEL) += apanel.o
+obj-$(CONFIG_INPUT_APPLEIR) += appleir.o
obj-$(CONFIG_INPUT_ATI_REMOTE) += ati_remote.o
obj-$(CONFIG_INPUT_ATI_REMOTE2) += ati_remote2.o
obj-$(CONFIG_INPUT_ATLAS_BTNS) += atlas_btns.o
diff --git a/drivers/input/misc/appleir.c b/drivers/input/misc/appleir.c
new file mode 100644
index 0000000..6e332ab
--- /dev/null
+++ b/drivers/input/misc/appleir.c
@@ -0,0 +1,477 @@
+/*
+ * appleir: USB driver for the apple ir device
+ *
+ * Original driver written by James McKenzie
+ * Ported to recent 2.6 kernel versions by Greg Kroah-Hartman <gregkh@suse.de>
+ *
+ * Copyright (C) 2006 James McKenzie
+ * Copyright (C) 2008 Greg Kroah-Hartman <greg@kroah.com>
+ * Copyright (C) 2008 Novell Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, version 2.
+ *
+ */
+
+#include <linux/kernel.h>
+#include <linux/slab.h>
+#include <linux/input.h>
+#include <linux/usb/input.h>
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/usb.h>
+#include <linux/usb/input.h>
+#include <asm/unaligned.h>
+#include <asm/byteorder.h>
+
+#define DRIVER_VERSION "v1.2"
+#define DRIVER_AUTHOR "James McKenzie"
+#define DRIVER_DESC "Apple infrared receiver driver"
+#define DRIVER_LICENSE "GPL"
+
+MODULE_AUTHOR(DRIVER_AUTHOR);
+MODULE_DESCRIPTION(DRIVER_DESC);
+MODULE_LICENSE(DRIVER_LICENSE);
+
+#define USB_VENDOR_ID_APPLE 0x05ac
+#define USB_DEVICE_ID_APPLE_IRCONTROL 0x8240
+#define USB_DEVICE_ID_APPLE_ATV_IRCONTROL 0x8241
+#define USB_DEVICE_ID_APPLE_IRCONTROL4 0x8242
+
+#define URB_SIZE 32
+
+#define MAX_KEYS 8
+#define MAX_KEYS_MASK (MAX_KEYS - 1)
+
+#define dbginfo(dev, format, arg...) do { if (debug) dev_info(dev , format , ## arg); } while (0)
+
+static int debug;
+module_param(debug, int, 0644);
+MODULE_PARM_DESC(debug, "Enable extra debug messages and information");
+
+struct appleir {
+ struct input_dev *input_dev;
+ u8 *data;
+ dma_addr_t dma_buf;
+ struct usb_device *usbdev;
+ unsigned int flags;
+ struct urb *urb;
+ int timer_initted;
+ struct timer_list key_up_timer;
+ int current_key;
+ char phys[32];
+};
+
+static DEFINE_MUTEX(appleir_mutex);
+
+enum {
+ APPLEIR_OPENED = 0x1,
+ APPLEIR_SUSPENDED = 0x2,
+};
+
+static struct usb_device_id appleir_ids[] = {
+ { USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL) },
+ { USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ATV_IRCONTROL) },
+ { USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IRCONTROL4) },
+ {}
+};
+MODULE_DEVICE_TABLE(usb, appleir_ids);
+
+/* I have two devices both of which report the following */
+/* 25 87 ee 83 0a + */
+/* 25 87 ee 83 0c - */
+/* 25 87 ee 83 09 << */
+/* 25 87 ee 83 06 >> */
+/* 25 87 ee 83 05 >" */
+/* 25 87 ee 83 03 menu */
+/* 26 00 00 00 00 for key repeat*/
+
+/* Thomas Glanzmann reports the following responses */
+/* 25 87 ee ca 0b + */
+/* 25 87 ee ca 0d - */
+/* 25 87 ee ca 08 << */
+/* 25 87 ee ca 07 >> */
+/* 25 87 ee ca 04 >" */
+/* 25 87 ee ca 02 menu */
+/* 26 00 00 00 00 for key repeat*/
+/* He also observes the following event sometimes */
+/* sent after a key is release, which I interpret */
+/* as a flat battery message */
+/* 25 87 e0 ca 06 flat battery */
+
+/* Alexandre Karpenko reports the following responses for Device ID 0x8242 */
+/* 25 87 ee 47 0b + */
+/* 25 87 ee 47 0d - */
+/* 25 87 ee 47 08 << */
+/* 25 87 ee 47 07 >> */
+/* 25 87 ee 47 04 >" */
+/* 25 87 ee 47 02 menu */
+/* 26 87 ee 47 ** for key repeat (** is the code of the key being held) */
+
+static int keymap[MAX_KEYS] = {
+ KEY_RESERVED,
+ KEY_MENU,
+ KEY_PLAYPAUSE,
+ KEY_FORWARD,
+ KEY_BACK,
+ KEY_VOLUMEUP,
+ KEY_VOLUMEDOWN,
+ KEY_RESERVED,
+};
+
+static void dump_packet(struct appleir *appleir, char *msg, u8 *data, int len)
+{
+ int i;
+
+ printk(KERN_ERR "appleir: %s (%d bytes)", msg, len);
+
+ for (i = 0; i < len; ++i)
+ printk(" %02x", data[i]);
+ printk("\n");
+}
+
+static void key_up(struct appleir *appleir, int key)
+{
+ dbginfo (&appleir->input_dev->dev, "key %d up\n", key);
+ input_report_key(appleir->input_dev, key, 0);
+ input_sync(appleir->input_dev);
+}
+
+static void key_down(struct appleir *appleir, int key)
+{
+ dbginfo (&appleir->input_dev->dev, "key %d down\n", key);
+ input_report_key(appleir->input_dev, key, 1);
+ input_sync(appleir->input_dev);
+}
+
+static void battery_flat(struct appleir *appleir)
+{
+ dev_err(&appleir->input_dev->dev, "possible flat battery?\n");
+}
+
+static void key_up_tick(unsigned long data)
+{
+ struct appleir *appleir = (struct appleir *)data;
+
+ if (appleir->current_key) {
+ key_up(appleir, appleir->current_key);
+ appleir->current_key = 0;
+ }
+}
+
+static void new_data(struct appleir *appleir, u8 *data, int len)
+{
+ static const u8 keydown[] = { 0x25, 0x87, 0xee };
+ static const u8 keyrepeat[] = { 0x26, };
+ static const u8 flatbattery[] = { 0x25, 0x87, 0xe0 };
+
+ if (debug)
+ dump_packet(appleir, "received", data, len);
+
+ if (len != 5)
+ return;
+
+ if (!memcmp(data, keydown, sizeof(keydown))) {
+ /*If we already have a key down, take it up before marking */
+ /*this one down */
+ if (appleir->current_key)
+ key_up(appleir, appleir->current_key);
+ appleir->current_key = keymap[(data[4] >> 1) & MAX_KEYS_MASK];
+
+ key_down(appleir, appleir->current_key);
+ /*remote doesn't do key up, either pull them up, in the test */
+ /*above, or here set a timer which pulls them up after 1/8 s */
+ mod_timer(&appleir->key_up_timer, jiffies + HZ / 8);
+
+ return;
+ }
+
+ if (!memcmp(data, keyrepeat, sizeof(keyrepeat))) {
+ key_down(appleir, appleir->current_key);
+ /*remote doesn't do key up, either pull them up, in the test */
+ /*above, or here set a timer which pulls them up after 1/8 s */
+ mod_timer(&appleir->key_up_timer, jiffies + HZ / 8);
+ return;
+ }
+
+ if (!memcmp(data, flatbattery, sizeof(flatbattery))) {
+ battery_flat(appleir);
+ /* Fall through */
+ }
+
+ dump_packet(appleir, "unknown packet", data, len);
+}
+
+static void appleir_urb(struct urb *urb)
+{
+ struct appleir *appleir = urb->context;
+ int status = urb->status;
+ int retval;
+
+ switch (status) {
+ case 0:
+ new_data(appleir, urb->transfer_buffer, urb->actual_length);
+ break;
+ case -ECONNRESET:
+ case -ENOENT:
+ case -ESHUTDOWN:
+ /* this urb is terminated, clean up */
+ dbginfo(&appleir->input_dev->dev, "%s - urb shutting down with status: %d", __func__,
+ urb->status);
+ return;
+ default:
+ dbginfo(&appleir->input_dev->dev, "%s - nonzero urb status received: %d", __func__,
+ urb->status);
+ }
+
+ retval = usb_submit_urb(urb, GFP_ATOMIC);
+ if (retval)
+ err("%s - usb_submit_urb failed with result %d", __func__,
+ retval);
+}
+
+static int appleir_open(struct input_dev *dev)
+{
+ struct appleir *appleir = input_get_drvdata(dev);
+ struct usb_interface *intf = usb_ifnum_to_if(appleir->usbdev, 0);
+ int r;
+
+ r = usb_autopm_get_interface(intf);
+ if (r) {
+ dev_err(&intf->dev,
+ "%s(): usb_autopm_get_interface() = %d\n", __func__, r);
+ return r;
+ }
+
+ mutex_lock(&appleir_mutex);
+
+ if (usb_submit_urb(appleir->urb, GFP_KERNEL)) {
+ r = -EIO;
+ goto fail;
+ }
+
+ appleir->flags |= APPLEIR_OPENED;
+
+ mutex_unlock(&appleir_mutex);
+
+ usb_autopm_put_interface(intf);
+
+ return 0;
+fail:
+ mutex_unlock(&appleir_mutex);
+ usb_autopm_put_interface(intf);
+ return r;
+}
+
+static void appleir_close(struct input_dev *dev)
+{
+ struct appleir *appleir = input_get_drvdata(dev);
+
+ mutex_lock(&appleir_mutex);
+
+ if (!(appleir->flags & APPLEIR_SUSPENDED)) {
+ usb_kill_urb(appleir->urb);
+ del_timer_sync(&appleir->key_up_timer);
+ }
+
+ appleir->flags &= ~APPLEIR_OPENED;
+
+ mutex_unlock(&appleir_mutex);
+}
+
+static int appleir_probe(struct usb_interface *intf,
+ const struct usb_device_id *id)
+{
+ struct usb_device *dev = interface_to_usbdev(intf);
+ struct usb_endpoint_descriptor *endpoint;
+ struct appleir *appleir = NULL;
+ struct input_dev *input_dev;
+ int retval = -ENOMEM;
+ int i;
+
+ appleir = kzalloc(sizeof(struct appleir), GFP_KERNEL);
+ if (!appleir)
+ goto fail;
+
+ appleir->data = usb_buffer_alloc(dev, URB_SIZE, GFP_KERNEL,
+ &appleir->dma_buf);
+ if (!appleir->data)
+ goto fail;
+
+ appleir->urb = usb_alloc_urb(0, GFP_KERNEL);
+ if (!appleir->urb)
+ goto fail;
+
+ appleir->usbdev = dev;
+
+ input_dev = input_allocate_device();
+ if (!input_dev)
+ goto fail;
+
+ appleir->input_dev = input_dev;
+
+ usb_make_path(dev, appleir->phys, sizeof(appleir->phys));
+ strlcpy(appleir->phys, "/input0", sizeof(appleir->phys));
+
+ input_dev->name = "Apple infrared remote control driver";
+ input_dev->phys = appleir->phys;
+ usb_to_input_id(dev, &input_dev->id);
+ input_dev->dev.parent = &intf->dev;
+ input_set_drvdata(input_dev, appleir);
+
+ input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_REP);
+ input_dev->ledbit[0] = 0;
+
+ for (i = 0; i < MAX_KEYS; i++)
+ set_bit(keymap[i], input_dev->keybit);
+
+ clear_bit(0, input_dev->keybit);
+
+ input_dev->open = appleir_open;
+ input_dev->close = appleir_close;
+
+ endpoint = &intf->cur_altsetting->endpoint[0].desc;
+
+ usb_fill_int_urb(appleir->urb, dev,
+ usb_rcvintpipe(dev, endpoint->bEndpointAddress),
+ appleir->data, 8,
+ appleir_urb, appleir, endpoint->bInterval);
+
+ appleir->urb->transfer_dma = appleir->dma_buf;
+ appleir->urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
+
+ usb_set_intfdata(intf, appleir);
+
+ init_timer(&appleir->key_up_timer);
+
+ appleir->key_up_timer.function = key_up_tick;
+ appleir->key_up_timer.data = (unsigned long)appleir;
+
+ appleir->timer_initted++;
+
+ retval = input_register_device(appleir->input_dev);
+ if (retval)
+ goto fail;
+
+ return 0;
+
+fail:
+ printk(KERN_WARNING "Failed to load appleir\n");
+ if (appleir) {
+ if (appleir->data)
+ usb_buffer_free(dev, URB_SIZE, appleir->data,
+ appleir->dma_buf);
+
+ if (appleir->timer_initted)
+ del_timer_sync(&appleir->key_up_timer);
+
+ if (appleir->input_dev)
+ input_free_device(appleir->input_dev);
+
+ kfree(appleir);
+ }
+
+ return retval;
+}
+
+static void appleir_disconnect(struct usb_interface *intf)
+{
+ struct appleir *appleir = usb_get_intfdata(intf);
+
+ usb_set_intfdata(intf, NULL);
+ if (appleir) {
+ input_unregister_device(appleir->input_dev);
+ if (appleir->timer_initted)
+ del_timer_sync(&appleir->key_up_timer);
+ usb_kill_urb(appleir->urb);
+ usb_free_urb(appleir->urb);
+ usb_buffer_free(interface_to_usbdev(intf), URB_SIZE,
+ appleir->data, appleir->dma_buf);
+ kfree(appleir);
+ }
+}
+
+static int appleir_suspend(struct usb_interface *interface,
+ pm_message_t message)
+{
+ struct appleir *appleir;
+
+ appleir = usb_get_intfdata(interface);
+
+ mutex_lock(&appleir_mutex);
+
+ if (appleir->flags & APPLEIR_OPENED) {
+ usb_kill_urb(appleir->urb);
+ del_timer_sync(&appleir->key_up_timer);
+ }
+
+ appleir->flags |= APPLEIR_SUSPENDED;
+
+ mutex_unlock(&appleir_mutex);
+
+ return 0;
+}
+
+static int appleir_resume(struct usb_interface *interface)
+{
+ struct appleir *appleir;
+
+ appleir = usb_get_intfdata(interface);
+
+ mutex_lock(&appleir_mutex);
+
+ if (appleir->flags & APPLEIR_OPENED) {
+ struct usb_endpoint_descriptor *endpoint;
+
+ endpoint = &interface->cur_altsetting->endpoint[0].desc;
+ usb_fill_int_urb(appleir->urb, appleir->usbdev,
+ usb_rcvintpipe(appleir->usbdev, endpoint->bEndpointAddress),
+ appleir->data, 8,
+ appleir_urb, appleir, endpoint->bInterval);
+ appleir->urb->transfer_dma = appleir->dma_buf;
+ appleir->urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
+
+ init_timer(&appleir->key_up_timer);
+
+ appleir->key_up_timer.function = key_up_tick;
+ appleir->key_up_timer.data = (unsigned long)appleir;
+ }
+
+ appleir->flags &= ~APPLEIR_SUSPENDED;
+
+ mutex_unlock(&appleir_mutex);
+
+ return 0;
+}
+
+static struct usb_driver appleir_driver = {
+ .name = "appleir",
+ .probe = appleir_probe,
+ .disconnect = appleir_disconnect,
+ .suspend = appleir_suspend,
+ .resume = appleir_resume,
+ .reset_resume = appleir_resume,
+ .id_table = appleir_ids,
+ .supports_autosuspend = 1,
+};
+
+static int __init appleir_init(void)
+{
+ int retval;
+
+ retval = usb_register(&appleir_driver);
+ if (retval)
+ goto out;
+ printk(KERN_INFO DRIVER_VERSION ":" DRIVER_DESC);
+out:
+ return retval;
+}
+
+static void __exit appleir_exit(void)
+{
+ usb_deregister(&appleir_driver);
+}
+
+module_init(appleir_init);
+module_exit(appleir_exit);
--
1.6.5.2

File diff suppressed because it is too large Load Diff

View File

@ -1,47 +0,0 @@
From dce8113d033975f56630cf6d2a6a908cfb66059d Mon Sep 17 00:00:00 2001
From: Arjan van de Ven <arjan@linux.intel.com>
Date: Sun, 20 Jul 2008 13:12:16 -0700
Subject: [PATCH] fastboot: remove "wait for all devices before mounting root" delay
In the non-initrd case, we wait for all devices to finish their
probing before we try to mount the rootfs.
In practice, this means that we end up waiting 2 extra seconds for
the PS/2 mouse probing even though the root holding device has been
ready since a long time.
The previous two patches in this series made the RAID autodetect code
do it's own "wait for probing to be done" code, and added
"wait and retry" functionality in case the root device isn't actually
available.
These two changes should make it safe to remove the delay itself,
and this patch does this. On my test laptop, this reduces the boot time
by 2 seconds (kernel time goes from 3.9 to 1.9 seconds).
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
---
---
init/do_mounts.c | 3 +++
1 file changed, 3 insertions(+)
Index: linux-2.6.29/init/do_mounts.c
===================================================================
--- linux-2.6.29.orig/init/do_mounts.c
+++ linux-2.6.29/init/do_mounts.c
@@ -370,6 +370,7 @@ void __init prepare_namespace(void)
ssleep(root_delay);
}
+#if 0
/*
* wait for the known devices to complete their probing
*
@@ -378,6 +379,8 @@ void __init prepare_namespace(void)
* for the touchpad of a laptop to initialize.
*/
wait_for_device_probe();
+#endif
+ async_synchronize_full();
md_run_setup();

View File

@ -1,38 +0,0 @@
---
drivers/Makefile | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
Index: linux-2.6.29/drivers/Makefile
===================================================================
--- linux-2.6.29.orig/drivers/Makefile
+++ linux-2.6.29/drivers/Makefile
@@ -25,15 +25,8 @@ obj-$(CONFIG_REGULATOR) += regulator/
# default.
obj-y += char/
-# gpu/ comes after char for AGP vs DRM startup
-obj-y += gpu/
-
obj-$(CONFIG_CONNECTOR) += connector/
-# i810fb and intelfb depend on char/agp/
-obj-$(CONFIG_FB_I810) += video/i810/
-obj-$(CONFIG_FB_INTEL) += video/intelfb/
-
obj-y += serial/
obj-$(CONFIG_PARPORT) += parport/
obj-y += base/ block/ misc/ mfd/ media/
@@ -43,6 +36,13 @@ obj-$(CONFIG_IDE) += ide/
obj-$(CONFIG_SCSI) += scsi/
obj-$(CONFIG_ATA) += ata/
obj-y += net/
+
+# gpu/ comes after char for AGP vs DRM startup
+obj-y += gpu/
+# i810fb and intelfb depend on char/agp/
+obj-$(CONFIG_FB_I810) += video/i810/
+obj-$(CONFIG_FB_INTEL) += video/intelfb/
+
obj-$(CONFIG_ATM) += atm/
obj-$(CONFIG_FUSION) += message/
obj-$(CONFIG_FIREWIRE) += firewire/

View File

@ -1,22 +0,0 @@
--- vanilla-2.6.31-rc4/drivers/gpu/drm/i915/intel_lvds.c~ 2009-07-31 11:23:05.000000000 -0700
+++ vanilla-2.6.31-rc4/drivers/gpu/drm/i915/intel_lvds.c 2009-07-31 11:23:05.000000000 -0700
@@ -111,19 +111,12 @@ static void intel_lvds_set_power(struct
if (on) {
I915_WRITE(ctl_reg, I915_READ(ctl_reg) |
POWER_TARGET_ON);
- do {
- pp_status = I915_READ(status_reg);
- } while ((pp_status & PP_ON) == 0);
-
intel_lvds_set_backlight(dev, dev_priv->backlight_duty_cycle);
} else {
intel_lvds_set_backlight(dev, 0);
I915_WRITE(ctl_reg, I915_READ(ctl_reg) &
~POWER_TARGET_ON);
- do {
- pp_status = I915_READ(status_reg);
- } while (pp_status & PP_ON);
}
}

View File

@ -1,58 +0,0 @@
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index a51573d..3dcf5cc 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -102,6 +102,7 @@ struct intel_output {
int type;
struct i2c_adapter *i2c_bus;
struct i2c_adapter *ddc_bus;
+ struct edid *edid;
bool load_detect_temp;
bool needs_tv_clock;
void *dev_priv;
diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c
index 3118ce2..fa0299e 100644
--- a/drivers/gpu/drm/i915/intel_lvds.c
+++ b/drivers/gpu/drm/i915/intel_lvds.c
@@ -716,6 +716,7 @@ static void intel_lvds_destroy(struct drm_connector *connector)
acpi_lid_notifier_unregister(&dev_priv->lid_notifier);
drm_sysfs_connector_remove(connector);
drm_connector_cleanup(connector);
+ kfree(intel_output->edid);
kfree(connector);
}
@@ -1189,5 +1190,6 @@ failed:
intel_i2c_destroy(intel_output->ddc_bus);
drm_connector_cleanup(connector);
drm_encoder_cleanup(encoder);
+ kfree(intel_output->edid);
kfree(intel_output);
}
diff --git a/drivers/gpu/drm/i915/intel_modes.c b/drivers/gpu/drm/i915/intel_modes.c
index 67e2f46..5ac537f 100644
--- a/drivers/gpu/drm/i915/intel_modes.c
+++ b/drivers/gpu/drm/i915/intel_modes.c
@@ -74,6 +74,10 @@ int intel_ddc_get_modes(struct intel_output *intel_output)
int ret = 0;
intel_i2c_quirk_set(intel_output->base.dev, true);
+ if (intel_output->edid && intel_output->type == INTEL_OUTPUT_LVDS) {
+ printk(KERN_INFO "Skipping EDID probe due to cached edid\n");
+ return ret;
+ }
edid = drm_get_edid(&intel_output->base, intel_output->ddc_bus);
intel_i2c_quirk_set(intel_output->base.dev, false);
if (edid) {
@@ -81,7 +85,10 @@ int intel_ddc_get_modes(struct intel_output *intel_output)
edid);
ret = drm_add_edid_modes(&intel_output->base, edid);
intel_output->base.display_info.raw_edid = NULL;
- kfree(edid);
+ if (intel_output->type == INTEL_OUTPUT_LVDS)
+ intel_output->edid = edid;
+ else
+ kfree(edid);
}
return ret;

View File

@ -1,118 +0,0 @@
Index: b/drivers/gpu/drm/drm_crtc_helper.c
===================================================================
--- a/drivers/gpu/drm/drm_crtc_helper.c
+++ b/drivers/gpu/drm/drm_crtc_helper.c
@@ -29,6 +29,8 @@
* Jesse Barnes <jesse.barnes@intel.com>
*/
+#include <linux/async.h>
+
#include "drmP.h"
#include "drm_crtc.h"
#include "drm_crtc_helper.h"
@@ -62,6 +64,8 @@ static void drm_mode_validate_flag(struc
return;
}
+LIST_HEAD(drm_async_list);
+
/**
* drm_helper_probe_connector_modes - get complete set of display modes
* @dev: DRM device
@@ -916,6 +920,7 @@ bool drm_helper_plugged_event(struct drm
/* FIXME: send hotplug event */
return true;
}
+
/**
* drm_initial_config - setup a sane initial connector configuration
* @dev: DRM device
@@ -953,13 +958,26 @@ bool drm_helper_initial_config(struct dr
drm_setup_crtcs(dev);
- /* alert the driver fb layer */
dev->mode_config.funcs->fb_changed(dev);
-
return 0;
}
EXPORT_SYMBOL(drm_helper_initial_config);
+static void drm_helper_initial_config_helper(void *ptr, async_cookie_t cookie)
+{
+ struct drm_device *dev = ptr;
+ drm_helper_initial_config(dev);
+}
+
+void drm_helper_initial_config_async(struct drm_device *dev)
+{
+ async_schedule_domain(drm_helper_initial_config_helper,
+ dev, &drm_async_list);
+}
+EXPORT_SYMBOL(drm_helper_initial_config_async);
+
+
+
static int drm_helper_choose_encoder_dpms(struct drm_encoder *encoder)
{
int dpms = DRM_MODE_DPMS_OFF;
Index: b/drivers/gpu/drm/drm_drv.c
===================================================================
--- a/drivers/gpu/drm/drm_drv.c
+++ b/drivers/gpu/drm/drm_drv.c
@@ -49,6 +49,7 @@
#include <linux/debugfs.h>
#include "drmP.h"
#include "drm_core.h"
+#include <linux/async.h>
static int drm_version(struct drm_device *dev, void *data,
@@ -290,6 +291,9 @@ void drm_exit(struct drm_driver *driver)
struct drm_device *dev, *tmp;
DRM_DEBUG("\n");
+ /* make sure all async DRM operations are finished */
+ async_synchronize_full_domain(&drm_async_list);
+
if (driver->driver_features & DRIVER_MODESET) {
pci_unregister_driver(&driver->pci_driver);
} else {
Index: b/include/drm/drmP.h
===================================================================
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -328,6 +328,7 @@ struct drm_vma_entry {
pid_t pid;
};
+extern struct list_head drm_async_list;
/**
* DMA buffer.
*/
Index: b/include/drm/drm_crtc_helper.h
===================================================================
--- a/include/drm/drm_crtc_helper.h
+++ b/include/drm/drm_crtc_helper.h
@@ -92,6 +92,7 @@ extern int drm_helper_probe_single_conne
extern void drm_helper_disable_unused_functions(struct drm_device *dev);
extern int drm_helper_hotplug_stage_two(struct drm_device *dev);
extern bool drm_helper_initial_config(struct drm_device *dev);
+extern void drm_helper_initial_config_async(struct drm_device *dev);
extern int drm_crtc_helper_set_config(struct drm_mode_set *set);
extern bool drm_crtc_helper_set_mode(struct drm_crtc *crtc,
struct drm_display_mode *mode,
Index: b/drivers/gpu/drm/i915/i915_dma.c
===================================================================
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -1045,7 +1045,7 @@ static int i915_load_modeset_init(struct
intel_modeset_init(dev);
- drm_helper_initial_config(dev);
+ drm_helper_initial_config_async(dev);
return 0;

View File

@ -1,22 +0,0 @@
From: Arjan van de Ven <arjan@linux.intel.com>
Date: Fri, 23 Jan 2009
Small fix changing error msg to info msg in acer wmi driver
---
---
drivers/platform/x86/acer-wmi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: linux-2.6.29/drivers/platform/x86/acer-wmi.c
===================================================================
--- linux-2.6.29.orig/drivers/platform/x86/acer-wmi.c
+++ linux-2.6.29/drivers/platform/x86/acer-wmi.c
@@ -1290,7 +1290,7 @@ static int __init acer_wmi_init(void)
AMW0_find_mailled();
if (!interface) {
- printk(ACER_ERR "No or unsupported WMI interface, unable to "
+ printk(ACER_INFO "No or unsupported WMI interface, unable to "
"load\n");
return -ENODEV;
}

View File

@ -1,11 +0,0 @@
diff -up linux-2.6.30.noarch/drivers/input/misc/pcspkr.c.jx linux-2.6.30.noarch/drivers/input/misc/pcspkr.c
--- linux-2.6.30.noarch/drivers/input/misc/pcspkr.c.jx 2009-07-28 16:54:44.000000000 -0400
+++ linux-2.6.30.noarch/drivers/input/misc/pcspkr.c 2009-07-28 16:59:36.000000000 -0400
@@ -23,7 +23,6 @@
MODULE_AUTHOR("Vojtech Pavlik <vojtech@ucw.cz>");
MODULE_DESCRIPTION("PC Speaker beeper driver");
MODULE_LICENSE("GPL");
-MODULE_ALIAS("platform:pcspkr");
#if defined(CONFIG_MIPS) || defined(CONFIG_X86)
/* Use the global PIT lock ! */

View File

@ -1,14 +0,0 @@
KERN_ERR is not appropriate for a printk level of a successful operation
--- linux-2.6.30/drivers/hid/hid-wacom.c~ 2009-09-04 10:37:20.000000000 -0700
+++ linux-2.6.30/drivers/hid/hid-wacom.c 2009-09-04 10:37:20.000000000 -0700
@@ -244,7 +244,7 @@
ret = hid_register_driver(&wacom_driver);
if (ret)
printk(KERN_ERR "can't register wacom driver\n");
- printk(KERN_ERR "wacom driver registered\n");
+ printk(KERN_INFO "wacom driver registered\n");
return ret;
}

View File

@ -1,84 +0,0 @@
diff -Naur linux-2.6.33.2/sound/pci/hda/hda_beep.c linux-2.6.33.2.patch/sound/pci/hda/hda_beep.c
--- linux-2.6.33.2/sound/pci/hda/hda_beep.c 2010-04-02 01:02:33.000000000 +0200
+++ linux-2.6.33.2.patch/sound/pci/hda/hda_beep.c 2010-04-09 03:19:43.846329981 +0200
@@ -1,3 +1,5 @@
+#define __NO_VERSION__
+#include "adriver.h"
/*
* Digital Beep Input Interface for HD-audio codec
*
@@ -92,7 +94,11 @@
static int snd_hda_beep_event(struct input_dev *dev, unsigned int type,
unsigned int code, int hz)
{
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22)
+ struct hda_beep *beep = dev->private;
+#else
struct hda_beep *beep = input_get_drvdata(dev);
+#endif
switch (code) {
case SND_BELL:
@@ -116,8 +122,13 @@
static void snd_hda_do_detach(struct hda_beep *beep)
{
input_unregister_device(beep->dev);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 15)
+ kfree(beep->dev);
+#endif
beep->dev = NULL;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 22)
cancel_work_sync(&beep->beep_work);
+#endif
/* turn off beep for sure */
snd_hda_codec_write(beep->codec, beep->nid, 0,
AC_VERB_SET_BEEP_CONTROL, 0);
@@ -129,7 +140,11 @@
struct hda_codec *codec = beep->codec;
int err;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 15)
input_dev = input_allocate_device();
+#else
+ input_dev = kzalloc(sizeof(*input_dev), GFP_KERNEL);
+#endif
if (!input_dev) {
printk(KERN_INFO "hda_beep: unable to allocate input device\n");
return -ENOMEM;
@@ -147,15 +162,26 @@
input_dev->evbit[0] = BIT_MASK(EV_SND);
input_dev->sndbit[0] = BIT_MASK(SND_BELL) | BIT_MASK(SND_TONE);
input_dev->event = snd_hda_beep_event;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 22)
input_dev->dev.parent = &codec->bus->pci->dev;
input_set_drvdata(input_dev, beep);
+#else
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 15)
+ input_dev->cdev.dev = &codec->bus->pci->dev;
+#endif
+ input_dev->private = beep;
+#endif /* 2.6.22 */
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 15)
err = input_register_device(input_dev);
if (err < 0) {
input_free_device(input_dev);
printk(KERN_INFO "hda_beep: unable to register input device\n");
return err;
}
+#else
+ input_register_device(input_dev);
+#endif
beep->dev = input_dev;
return 0;
}
@@ -255,7 +281,9 @@
{
struct hda_beep *beep = codec->beep;
if (beep) {
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 22)
cancel_work_sync(&beep->register_work);
+#endif
cancel_delayed_work(&beep->unregister_work);
if (beep->dev)
snd_hda_do_detach(beep);

File diff suppressed because it is too large Load Diff

View File

@ -1,703 +0,0 @@
diff -Naur linux-2.6.33.2/drivers/usb/serial/ftdi_sio.c linux-2.6.33.2.patch/drivers/usb/serial/ftdi_sio.c
--- linux-2.6.33.2/drivers/usb/serial/ftdi_sio.c 2010-04-02 01:02:33.000000000 +0200
+++ linux-2.6.33.2.patch/drivers/usb/serial/ftdi_sio.c 2010-04-25 18:42:20.184548098 +0200
@@ -33,12 +33,12 @@
#include <linux/errno.h>
#include <linux/init.h>
#include <linux/slab.h>
-#include <linux/smp_lock.h>
#include <linux/tty.h>
#include <linux/tty_driver.h>
#include <linux/tty_flip.h>
#include <linux/module.h>
#include <linux/spinlock.h>
+#include <linux/mutex.h>
#include <linux/uaccess.h>
#include <linux/usb.h>
#include <linux/serial.h>
@@ -88,10 +88,10 @@
unsigned int latency; /* latency setting in use */
spinlock_t tx_lock; /* spinlock for transmit state */
- unsigned long tx_bytes;
unsigned long tx_outstanding_bytes;
unsigned long tx_outstanding_urbs;
unsigned short max_packet_size;
+ struct mutex cfg_lock; /* Avoid mess by parallel calls of config ioctl() and change_speed() */
};
/* struct ftdi_sio_quirk is used by devices requiring special attention. */
@@ -818,7 +818,7 @@
.name = "ftdi_sio",
},
.description = "FTDI USB Serial Device",
- .usb_driver = &ftdi_driver ,
+ .usb_driver = &ftdi_driver,
.id_table = id_table_combined,
.num_ports = 1,
.probe = ftdi_sio_probe,
@@ -834,8 +834,8 @@
.chars_in_buffer = ftdi_chars_in_buffer,
.read_bulk_callback = ftdi_read_bulk_callback,
.write_bulk_callback = ftdi_write_bulk_callback,
- .tiocmget = ftdi_tiocmget,
- .tiocmset = ftdi_tiocmset,
+ .tiocmget = ftdi_tiocmget,
+ .tiocmset = ftdi_tiocmset,
.ioctl = ftdi_ioctl,
.set_termios = ftdi_set_termios,
.break_ctl = ftdi_break_ctl,
@@ -941,7 +941,6 @@
unsigned int clear)
{
struct ftdi_private *priv = usb_get_serial_port_data(port);
- char *buf;
unsigned urb_value;
int rv;
@@ -950,10 +949,6 @@
return 0; /* no change */
}
- buf = kmalloc(1, GFP_NOIO);
- if (!buf)
- return -ENOMEM;
-
clear &= ~set; /* 'set' takes precedence over 'clear' */
urb_value = 0;
if (clear & TIOCM_DTR)
@@ -969,9 +964,7 @@
FTDI_SIO_SET_MODEM_CTRL_REQUEST,
FTDI_SIO_SET_MODEM_CTRL_REQUEST_TYPE,
urb_value, priv->interface,
- buf, 0, WDR_TIMEOUT);
-
- kfree(buf);
+ NULL, 0, WDR_TIMEOUT);
if (rv < 0) {
dbg("%s Error from MODEM_CTRL urb: DTR %s, RTS %s",
__func__,
@@ -1130,16 +1123,11 @@
static int change_speed(struct tty_struct *tty, struct usb_serial_port *port)
{
struct ftdi_private *priv = usb_get_serial_port_data(port);
- char *buf;
__u16 urb_value;
__u16 urb_index;
__u32 urb_index_value;
int rv;
- buf = kmalloc(1, GFP_NOIO);
- if (!buf)
- return -ENOMEM;
-
urb_index_value = get_ftdi_divisor(tty, port);
urb_value = (__u16)urb_index_value;
urb_index = (__u16)(urb_index_value >> 16);
@@ -1152,9 +1140,7 @@
FTDI_SIO_SET_BAUDRATE_REQUEST,
FTDI_SIO_SET_BAUDRATE_REQUEST_TYPE,
urb_value, urb_index,
- buf, 0, WDR_SHORT_TIMEOUT);
-
- kfree(buf);
+ NULL, 0, WDR_SHORT_TIMEOUT);
return rv;
}
@@ -1162,8 +1148,7 @@
{
struct ftdi_private *priv = usb_get_serial_port_data(port);
struct usb_device *udev = port->serial->dev;
- char buf[1];
- int rv = 0;
+ int rv;
int l = priv->latency;
if (priv->flags & ASYNC_LOW_LATENCY)
@@ -1176,8 +1161,7 @@
FTDI_SIO_SET_LATENCY_TIMER_REQUEST,
FTDI_SIO_SET_LATENCY_TIMER_REQUEST_TYPE,
l, priv->interface,
- buf, 0, WDR_TIMEOUT);
-
+ NULL, 0, WDR_TIMEOUT);
if (rv < 0)
dev_err(&port->dev, "Unable to write latency timer: %i\n", rv);
return rv;
@@ -1187,24 +1171,29 @@
{
struct ftdi_private *priv = usb_get_serial_port_data(port);
struct usb_device *udev = port->serial->dev;
- unsigned short latency = 0;
- int rv = 0;
-
+ unsigned char *buf;
+ int rv;
dbg("%s", __func__);
+ buf = kmalloc(1, GFP_KERNEL);
+ if (!buf)
+ return -ENOMEM;
+
rv = usb_control_msg(udev,
usb_rcvctrlpipe(udev, 0),
FTDI_SIO_GET_LATENCY_TIMER_REQUEST,
FTDI_SIO_GET_LATENCY_TIMER_REQUEST_TYPE,
0, priv->interface,
- (char *) &latency, 1, WDR_TIMEOUT);
-
- if (rv < 0) {
+ buf, 1, WDR_TIMEOUT);
+ if (rv < 0)
dev_err(&port->dev, "Unable to read latency timer: %i\n", rv);
- return -EIO;
- }
- return latency;
+ else
+ priv->latency = buf[0];
+
+ kfree(buf);
+
+ return rv;
}
static int get_serial_info(struct usb_serial_port *port,
@@ -1235,7 +1224,7 @@
if (copy_from_user(&new_serial, newinfo, sizeof(new_serial)))
return -EFAULT;
- lock_kernel();
+ mutex_lock(&priv->cfg_lock);
old_priv = *priv;
/* Do error checking and permission checking */
@@ -1243,7 +1232,7 @@
if (!capable(CAP_SYS_ADMIN)) {
if (((new_serial.flags & ~ASYNC_USR_MASK) !=
(priv->flags & ~ASYNC_USR_MASK))) {
- unlock_kernel();
+ mutex_unlock(&priv->cfg_lock);
return -EPERM;
}
priv->flags = ((priv->flags & ~ASYNC_USR_MASK) |
@@ -1254,7 +1243,7 @@
if ((new_serial.baud_base != priv->baud_base) &&
(new_serial.baud_base < 9600)) {
- unlock_kernel();
+ mutex_unlock(&priv->cfg_lock);
return -EINVAL;
}
@@ -1284,11 +1273,11 @@
(priv->flags & ASYNC_SPD_MASK)) ||
(((priv->flags & ASYNC_SPD_MASK) == ASYNC_SPD_CUST) &&
(old_priv.custom_divisor != priv->custom_divisor))) {
- unlock_kernel();
change_speed(tty, port);
+ mutex_unlock(&priv->cfg_lock);
}
else
- unlock_kernel();
+ mutex_unlock(&priv->cfg_lock);
return 0;
} /* set_serial_info */
@@ -1344,20 +1333,20 @@
__func__);
}
} else if (version < 0x200) {
- /* Old device. Assume its the original SIO. */
+ /* Old device. Assume it's the original SIO. */
priv->chip_type = SIO;
priv->baud_base = 12000000 / 16;
priv->write_offset = 1;
} else if (version < 0x400) {
- /* Assume its an FT8U232AM (or FT8U245AM) */
+ /* Assume it's an FT8U232AM (or FT8U245AM) */
/* (It might be a BM because of the iSerialNumber bug,
* but it will still work as an AM device.) */
priv->chip_type = FT8U232AM;
} else if (version < 0x600) {
- /* Assume its an FT232BM (or FT245BM) */
+ /* Assume it's an FT232BM (or FT245BM) */
priv->chip_type = FT232BM;
} else {
- /* Assume its an FT232R */
+ /* Assume it's an FT232R */
priv->chip_type = FT232RL;
}
dev_info(&udev->dev, "Detected %s\n", ftdi_chip_name[priv->chip_type]);
@@ -1377,7 +1366,7 @@
struct usb_endpoint_descriptor *ep_desc = &interface->cur_altsetting->endpoint[1].desc;
unsigned num_endpoints;
- int i = 0;
+ int i;
num_endpoints = interface->cur_altsetting->desc.bNumEndpoints;
dev_info(&udev->dev, "Number of endpoints %d\n", num_endpoints);
@@ -1429,7 +1418,7 @@
struct usb_serial_port *port = to_usb_serial_port(dev);
struct ftdi_private *priv = usb_get_serial_port_data(port);
int v = simple_strtoul(valbuf, NULL, 10);
- int rv = 0;
+ int rv;
priv->latency = v;
rv = write_latency_timer(port);
@@ -1446,9 +1435,8 @@
struct usb_serial_port *port = to_usb_serial_port(dev);
struct ftdi_private *priv = usb_get_serial_port_data(port);
struct usb_device *udev = port->serial->dev;
- char buf[1];
int v = simple_strtoul(valbuf, NULL, 10);
- int rv = 0;
+ int rv;
dbg("%s: setting event char = %i", __func__, v);
@@ -1457,8 +1445,7 @@
FTDI_SIO_SET_EVENT_CHAR_REQUEST,
FTDI_SIO_SET_EVENT_CHAR_REQUEST_TYPE,
v, priv->interface,
- buf, 0, WDR_TIMEOUT);
-
+ NULL, 0, WDR_TIMEOUT);
if (rv < 0) {
dbg("Unable to write event character: %i", rv);
return -EIO;
@@ -1557,9 +1544,9 @@
kref_init(&priv->kref);
spin_lock_init(&priv->tx_lock);
+ mutex_init(&priv->cfg_lock);
init_waitqueue_head(&priv->delta_msr_wait);
- /* This will push the characters through immediately rather
- than queue a task to deliver them */
+
priv->flags = ASYNC_LOW_LATENCY;
if (quirk && quirk->port_probe)
@@ -1591,7 +1578,8 @@
ftdi_determine_type(port);
ftdi_set_max_packet_size(port);
- read_latency_timer(port);
+ if (read_latency_timer(port) < 0)
+ priv->latency = 16;
create_sysfs_attrs(port);
return 0;
}
@@ -1636,8 +1624,6 @@
{
struct usb_device *udev = serial->dev;
int latency = ndi_latency_timer;
- int rv = 0;
- char buf[1];
if (latency == 0)
latency = 1;
@@ -1647,10 +1633,11 @@
dbg("%s setting NDI device latency to %d", __func__, latency);
dev_info(&udev->dev, "NDI device with a latency value of %d", latency);
- rv = usb_control_msg(udev, usb_sndctrlpipe(udev, 0),
+ /* FIXME: errors are not returned */
+ usb_control_msg(udev, usb_sndctrlpipe(udev, 0),
FTDI_SIO_SET_LATENCY_TIMER_REQUEST,
FTDI_SIO_SET_LATENCY_TIMER_REQUEST_TYPE,
- latency, 0, buf, 0, WDR_TIMEOUT);
+ latency, 0, NULL, 0, WDR_TIMEOUT);
return 0;
}
@@ -1726,7 +1713,7 @@
urb->transfer_buffer_length,
ftdi_read_bulk_callback, port);
result = usb_submit_urb(urb, mem_flags);
- if (result)
+ if (result && result != -EPERM)
dev_err(&port->dev,
"%s - failed submitting read urb, error %d\n",
__func__, result);
@@ -1738,16 +1725,10 @@
struct usb_device *dev = port->serial->dev;
struct ftdi_private *priv = usb_get_serial_port_data(port);
unsigned long flags;
-
- int result = 0;
- char buf[1]; /* Needed for the usb_control_msg I think */
+ int result;
dbg("%s", __func__);
- spin_lock_irqsave(&priv->tx_lock, flags);
- priv->tx_bytes = 0;
- spin_unlock_irqrestore(&priv->tx_lock, flags);
-
write_latency_timer(port);
/* No error checking for this (will get errors later anyway) */
@@ -1755,7 +1736,7 @@
usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
FTDI_SIO_RESET_REQUEST, FTDI_SIO_RESET_REQUEST_TYPE,
FTDI_SIO_RESET_SIO,
- priv->interface, buf, 0, WDR_TIMEOUT);
+ priv->interface, NULL, 0, WDR_TIMEOUT);
/* Termios defaults are set by usb_serial_init. We don't change
port->tty->termios - this would lose speed settings, etc.
@@ -1783,7 +1764,6 @@
static void ftdi_dtr_rts(struct usb_serial_port *port, int on)
{
struct ftdi_private *priv = usb_get_serial_port_data(port);
- char buf[1];
mutex_lock(&port->serial->disc_mutex);
if (!port->serial->disconnected) {
@@ -1792,7 +1772,7 @@
usb_sndctrlpipe(port->serial->dev, 0),
FTDI_SIO_SET_FLOW_CTRL_REQUEST,
FTDI_SIO_SET_FLOW_CTRL_REQUEST_TYPE,
- 0, priv->interface, buf, 0,
+ 0, priv->interface, NULL, 0,
WDR_TIMEOUT) < 0) {
dev_err(&port->dev, "error from flowcontrol urb\n");
}
@@ -1853,7 +1833,7 @@
spin_lock_irqsave(&priv->tx_lock, flags);
if (priv->tx_outstanding_urbs > URB_UPPER_LIMIT) {
spin_unlock_irqrestore(&priv->tx_lock, flags);
- dbg("%s - write limit hit\n", __func__);
+ dbg("%s - write limit hit", __func__);
return 0;
}
priv->tx_outstanding_urbs++;
@@ -1933,7 +1913,6 @@
} else {
spin_lock_irqsave(&priv->tx_lock, flags);
priv->tx_outstanding_bytes += count;
- priv->tx_bytes += count;
spin_unlock_irqrestore(&priv->tx_lock, flags);
}
@@ -2160,8 +2139,7 @@
{
struct usb_serial_port *port = tty->driver_data;
struct ftdi_private *priv = usb_get_serial_port_data(port);
- __u16 urb_value = 0;
- char buf[1];
+ __u16 urb_value;
/* break_state = -1 to turn on break, and 0 to turn off break */
/* see drivers/char/tty_io.c to see it used */
@@ -2177,7 +2155,7 @@
FTDI_SIO_SET_DATA_REQUEST,
FTDI_SIO_SET_DATA_REQUEST_TYPE,
urb_value , priv->interface,
- buf, 0, WDR_TIMEOUT) < 0) {
+ NULL, 0, WDR_TIMEOUT) < 0) {
dev_err(&port->dev, "%s FAILED to enable/disable break state "
"(state was %d)\n", __func__, break_state);
}
@@ -2201,7 +2179,6 @@
struct ktermios *termios = tty->termios;
unsigned int cflag = termios->c_cflag;
__u16 urb_value; /* will hold the new flags */
- char buf[1]; /* Perhaps I should dynamically alloc this? */
/* Added for xon/xoff support */
unsigned int iflag = termios->c_iflag;
@@ -2252,12 +2229,10 @@
}
if (cflag & CSIZE) {
switch (cflag & CSIZE) {
- case CS5: urb_value |= 5; dbg("Setting CS5"); break;
- case CS6: urb_value |= 6; dbg("Setting CS6"); break;
case CS7: urb_value |= 7; dbg("Setting CS7"); break;
case CS8: urb_value |= 8; dbg("Setting CS8"); break;
default:
- dev_err(&port->dev, "CSIZE was set but not CS5-CS8\n");
+ dev_err(&port->dev, "CSIZE was set but not CS7-CS8\n");
}
}
@@ -2269,7 +2244,7 @@
FTDI_SIO_SET_DATA_REQUEST,
FTDI_SIO_SET_DATA_REQUEST_TYPE,
urb_value , priv->interface,
- buf, 0, WDR_SHORT_TIMEOUT) < 0) {
+ NULL, 0, WDR_SHORT_TIMEOUT) < 0) {
dev_err(&port->dev, "%s FAILED to set "
"databits/stopbits/parity\n", __func__);
}
@@ -2281,7 +2256,7 @@
FTDI_SIO_SET_FLOW_CTRL_REQUEST,
FTDI_SIO_SET_FLOW_CTRL_REQUEST_TYPE,
0, priv->interface,
- buf, 0, WDR_TIMEOUT) < 0) {
+ NULL, 0, WDR_TIMEOUT) < 0) {
dev_err(&port->dev,
"%s error from disable flowcontrol urb\n",
__func__);
@@ -2290,9 +2265,11 @@
clear_mctrl(port, TIOCM_DTR | TIOCM_RTS);
} else {
/* set the baudrate determined before */
+ mutex_lock(&priv->cfg_lock);
if (change_speed(tty, port))
dev_err(&port->dev, "%s urb failed to set baudrate\n",
__func__);
+ mutex_unlock(&priv->cfg_lock);
/* Ensure RTS and DTR are raised when baudrate changed from 0 */
if (!old_termios || (old_termios->c_cflag & CBAUD) == B0)
set_mctrl(port, TIOCM_DTR | TIOCM_RTS);
@@ -2307,7 +2284,7 @@
FTDI_SIO_SET_FLOW_CTRL_REQUEST,
FTDI_SIO_SET_FLOW_CTRL_REQUEST_TYPE,
0 , (FTDI_SIO_RTS_CTS_HS | priv->interface),
- buf, 0, WDR_TIMEOUT) < 0) {
+ NULL, 0, WDR_TIMEOUT) < 0) {
dev_err(&port->dev,
"urb failed to set to rts/cts flow control\n");
}
@@ -2339,7 +2316,7 @@
FTDI_SIO_SET_FLOW_CTRL_REQUEST_TYPE,
urb_value , (FTDI_SIO_XON_XOFF_HS
| priv->interface),
- buf, 0, WDR_TIMEOUT) < 0) {
+ NULL, 0, WDR_TIMEOUT) < 0) {
dev_err(&port->dev, "urb failed to set to "
"xon/xoff flow control\n");
}
@@ -2353,7 +2330,7 @@
FTDI_SIO_SET_FLOW_CTRL_REQUEST,
FTDI_SIO_SET_FLOW_CTRL_REQUEST_TYPE,
0, priv->interface,
- buf, 0, WDR_TIMEOUT) < 0) {
+ NULL, 0, WDR_TIMEOUT) < 0) {
dev_err(&port->dev,
"urb failed to clear flow control\n");
}
@@ -2367,21 +2344,22 @@
{
struct usb_serial_port *port = tty->driver_data;
struct ftdi_private *priv = usb_get_serial_port_data(port);
- unsigned char buf[2];
+ unsigned char *buf;
+ int len;
int ret;
dbg("%s TIOCMGET", __func__);
+
+ buf = kmalloc(2, GFP_KERNEL);
+ if (!buf)
+ return -ENOMEM;
+ /*
+ * The 8U232AM returns a two byte value (the SIO a 1 byte value) in
+ * the same format as the data returned from the in point.
+ */
switch (priv->chip_type) {
case SIO:
- /* Request the status from the device */
- ret = usb_control_msg(port->serial->dev,
- usb_rcvctrlpipe(port->serial->dev, 0),
- FTDI_SIO_GET_MODEM_STATUS_REQUEST,
- FTDI_SIO_GET_MODEM_STATUS_REQUEST_TYPE,
- 0, 0,
- buf, 1, WDR_TIMEOUT);
- if (ret < 0)
- return ret;
+ len = 1;
break;
case FT8U232AM:
case FT232BM:
@@ -2389,27 +2367,30 @@
case FT232RL:
case FT2232H:
case FT4232H:
- /* the 8U232AM returns a two byte value (the sio is a 1 byte
- value) - in the same format as the data returned from the in
- point */
- ret = usb_control_msg(port->serial->dev,
- usb_rcvctrlpipe(port->serial->dev, 0),
- FTDI_SIO_GET_MODEM_STATUS_REQUEST,
- FTDI_SIO_GET_MODEM_STATUS_REQUEST_TYPE,
- 0, priv->interface,
- buf, 2, WDR_TIMEOUT);
- if (ret < 0)
- return ret;
+ len = 2;
break;
default:
- return -EFAULT;
+ ret = -EFAULT;
+ goto out;
}
- return (buf[0] & FTDI_SIO_DSR_MASK ? TIOCM_DSR : 0) |
+ ret = usb_control_msg(port->serial->dev,
+ usb_rcvctrlpipe(port->serial->dev, 0),
+ FTDI_SIO_GET_MODEM_STATUS_REQUEST,
+ FTDI_SIO_GET_MODEM_STATUS_REQUEST_TYPE,
+ 0, priv->interface,
+ buf, len, WDR_TIMEOUT);
+ if (ret < 0)
+ goto out;
+
+ ret = (buf[0] & FTDI_SIO_DSR_MASK ? TIOCM_DSR : 0) |
(buf[0] & FTDI_SIO_CTS_MASK ? TIOCM_CTS : 0) |
(buf[0] & FTDI_SIO_RI_MASK ? TIOCM_RI : 0) |
(buf[0] & FTDI_SIO_RLSD_MASK ? TIOCM_CD : 0) |
priv->last_dtr_rts;
+out:
+ kfree(buf);
+ return ret;
}
static int ftdi_tiocmset(struct tty_struct *tty, struct file *file,
@@ -2514,8 +2495,7 @@
port->throttled = port->throttle_req = 0;
spin_unlock_irqrestore(&port->lock, flags);
- /* Resubmit urb if throttled and open. */
- if (was_throttled && test_bit(ASYNCB_INITIALIZED, &port->port.flags))
+ if (was_throttled)
ftdi_submit_read_urb(port, GFP_KERNEL);
}
diff -Naur linux-2.6.33.2/drivers/usb/serial/ftdi_sio.h linux-2.6.33.2.patch/drivers/usb/serial/ftdi_sio.h
--- linux-2.6.33.2/drivers/usb/serial/ftdi_sio.h 2010-04-02 01:02:33.000000000 +0200
+++ linux-2.6.33.2.patch/drivers/usb/serial/ftdi_sio.h 2010-04-25 18:40:02.713423244 +0200
@@ -28,13 +28,13 @@
#define FTDI_SIO_SET_FLOW_CTRL 2 /* Set flow control register */
#define FTDI_SIO_SET_BAUD_RATE 3 /* Set baud rate */
#define FTDI_SIO_SET_DATA 4 /* Set the data characteristics of the port */
-#define FTDI_SIO_GET_MODEM_STATUS 5 /* Retrieve current value of modern status register */
+#define FTDI_SIO_GET_MODEM_STATUS 5 /* Retrieve current value of modem status register */
#define FTDI_SIO_SET_EVENT_CHAR 6 /* Set the event character */
#define FTDI_SIO_SET_ERROR_CHAR 7 /* Set the error character */
#define FTDI_SIO_SET_LATENCY_TIMER 9 /* Set the latency timer */
#define FTDI_SIO_GET_LATENCY_TIMER 10 /* Get the latency timer */
-/* Interface indicies for FT2232, FT2232H and FT4232H devices*/
+/* Interface indices for FT2232, FT2232H and FT4232H devices */
#define INTERFACE_A 1
#define INTERFACE_B 2
#define INTERFACE_C 3
@@ -270,7 +270,7 @@
* BmRequestType: 0100 0000b
* bRequest: FTDI_SIO_SET_FLOW_CTRL
* wValue: Xoff/Xon
- * wIndex: Protocol/Port - hIndex is protocl / lIndex is port
+ * wIndex: Protocol/Port - hIndex is protocol / lIndex is port
* wLength: 0
* Data: None
*
diff -Naur linux-2.6.33.2/drivers/usb/serial/ftdi_sio_ids.h linux-2.6.33.2.patch/drivers/usb/serial/ftdi_sio_ids.h
--- linux-2.6.33.2/drivers/usb/serial/ftdi_sio_ids.h 2010-04-02 01:02:33.000000000 +0200
+++ linux-2.6.33.2.patch/drivers/usb/serial/ftdi_sio_ids.h 2010-04-25 18:40:09.930546335 +0200
@@ -22,7 +22,7 @@
#define FTDI_8U232AM_ALT_PID 0x6006 /* FTDI's alternate PID for above */
#define FTDI_8U2232C_PID 0x6010 /* Dual channel device */
#define FTDI_4232H_PID 0x6011 /* Quad channel hi-speed device */
-#define FTDI_SIO_PID 0x8372 /* Product Id SIO application of 8U100AX */
+#define FTDI_SIO_PID 0x8372 /* Product Id SIO application of 8U100AX */
#define FTDI_232RL_PID 0xFBFA /* Product ID for FT232RL */
@@ -49,7 +49,7 @@
#define LMI_LM3S_DEVEL_BOARD_PID 0xbcd8
#define LMI_LM3S_EVAL_BOARD_PID 0xbcd9
-#define FTDI_TURTELIZER_PID 0xBDC8 /* JTAG/RS-232 adapter by egnite GmBH */
+#define FTDI_TURTELIZER_PID 0xBDC8 /* JTAG/RS-232 adapter by egnite GmbH */
/* OpenDCC (www.opendcc.de) product id */
#define FTDI_OPENDCC_PID 0xBFD8
@@ -185,7 +185,7 @@
#define FTDI_ELV_TFD128_PID 0xE0EC /* ELV Temperatur-Feuchte-Datenlogger TFD 128 */
#define FTDI_ELV_FM3RX_PID 0xE0ED /* ELV Messwertuebertragung FM3 RX */
#define FTDI_ELV_WS777_PID 0xE0EE /* Conrad WS 777 */
-#define FTDI_ELV_EM1010PC_PID 0xE0EF /* Engery monitor EM 1010 PC */
+#define FTDI_ELV_EM1010PC_PID 0xE0EF /* Energy monitor EM 1010 PC */
#define FTDI_ELV_CSI8_PID 0xE0F0 /* Computer-Schalt-Interface (CSI 8) */
#define FTDI_ELV_EM1000DL_PID 0xE0F1 /* PC-Datenlogger fuer Energiemonitor (EM 1000 DL) */
#define FTDI_ELV_PCK100_PID 0xE0F2 /* PC-Kabeltester (PCK 100) */
@@ -212,8 +212,8 @@
* drivers, or possibly the Comedi drivers in some cases. */
#define FTDI_ELV_CLI7000_PID 0xFB59 /* Computer-Light-Interface (CLI 7000) */
#define FTDI_ELV_PPS7330_PID 0xFB5C /* Processor-Power-Supply (PPS 7330) */
-#define FTDI_ELV_TFM100_PID 0xFB5D /* Temperartur-Feuchte Messgeraet (TFM 100) */
-#define FTDI_ELV_UDF77_PID 0xFB5E /* USB DCF Funkurh (UDF 77) */
+#define FTDI_ELV_TFM100_PID 0xFB5D /* Temperatur-Feuchte-Messgeraet (TFM 100) */
+#define FTDI_ELV_UDF77_PID 0xFB5E /* USB DCF Funkuhr (UDF 77) */
#define FTDI_ELV_UIO88_PID 0xFB5F /* USB-I/O Interface (UIO 88) */
/*
@@ -320,7 +320,7 @@
/*
* 4N-GALAXY.DE PIDs for CAN-USB, USB-RS232, USB-RS422, USB-RS485,
- * USB-TTY activ, USB-TTY passiv. Some PIDs are used by several devices
+ * USB-TTY aktiv, USB-TTY passiv. Some PIDs are used by several devices
* and I'm not entirely sure which are used by which.
*/
#define FTDI_4N_GALAXY_DE_1_PID 0xF3C0
@@ -330,10 +330,10 @@
* Linx Technologies product ids
*/
#define LINX_SDMUSBQSS_PID 0xF448 /* Linx SDM-USB-QS-S */
-#define LINX_MASTERDEVEL2_PID 0xF449 /* Linx Master Development 2.0 */
-#define LINX_FUTURE_0_PID 0xF44A /* Linx future device */
-#define LINX_FUTURE_1_PID 0xF44B /* Linx future device */
-#define LINX_FUTURE_2_PID 0xF44C /* Linx future device */
+#define LINX_MASTERDEVEL2_PID 0xF449 /* Linx Master Development 2.0 */
+#define LINX_FUTURE_0_PID 0xF44A /* Linx future device */
+#define LINX_FUTURE_1_PID 0xF44B /* Linx future device */
+#define LINX_FUTURE_2_PID 0xF44C /* Linx future device */
/*
* Oceanic product ids
@@ -508,6 +508,20 @@
#define CONTEC_COM1USBH_PID 0x8311 /* COM-1(USB)H */
/*
+ * Contec products (http://www.contec.com)
+ * Submitted by Daniel Sangorrin
+ */
+#define CONTEC_VID 0x06CE /* Vendor ID */
+#define CONTEC_COM1USBH_PID 0x8311 /* COM-1(USB)H */
+
+/*
+ * Contec products (http://www.contec.com)
+ * Submitted by Daniel Sangorrin
+ */
+#define CONTEC_VID 0x06CE /* Vendor ID */
+#define CONTEC_COM1USBH_PID 0x8311 /* COM-1(USB)H */
+
+/*
* Definitions for B&B Electronics products.
*/
#define BANDB_VID 0x0856 /* B&B Electronics Vendor ID */
@@ -656,7 +670,7 @@
#define FALCOM_TWIST_PID 0x0001 /* Falcom Twist USB GPRS modem */
#define FALCOM_SAMBA_PID 0x0005 /* Falcom Samba USB GPRS modem */
-/* Larsen and Brusgaard AltiTrack/USBtrack */
+/* Larsen and Brusgaard AltiTrack/USBtrack */
#define LARSENBRUSGAARD_VID 0x0FD8
#define LB_ALTITRACK_PID 0x0001
@@ -985,7 +999,7 @@
#define ALTI2_N3_PID 0x6001 /* Neptune 3 */
/*
- * Dresden Elektronic Sensor Terminal Board
+ * Dresden Elektronik Sensor Terminal Board
*/
#define DE_VID 0x1cf1 /* Vendor ID */
#define STB_PID 0x0001 /* Sensor Terminal Board */

View File

@ -24,6 +24,13 @@ cp $KERNEL_CFG_FILE $LINUX/.config
sed -i -e "s|^CONFIG_INITRAMFS_SOURCE=.*$|CONFIG_INITRAMFS_SOURCE=\"$ROOT/$PKG_DIR/config/initramfs\"|" \
$LINUX/.config
if [ "$DEVTOOLS" = yes ]; then
echo "CONFIG_FRAMEBUFFER_CONSOLE=y" >> $LINUX/.config
echo "CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y" >> $LINUX/.config
echo "CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=n" >> $LINUX/.config
echo "CONFIG_FONTS=n" >> $LINUX/.config
fi
# copy some extra firmware to linux tree
cp -R $PKG_DIR/firmware/* $LINUX/firmware

View File

@ -1 +1 @@
http://eu.kernel.org/pub/linux/kernel/v2.6/linux-2.6.33.3.tar.bz2
http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.34.tar.bz2

View File

@ -1 +1 @@
http://sources.openelec.tv/svn/xbmc-theme-Confluence-29931.tar.bz2
http://sources.openelec.tv/svn/xbmc-theme-Confluence-30122.tar.bz2

View File

@ -1 +1 @@
http://sources.openelec.tv/svn/xbmc-theme-PM3-HD-29931.tar.bz2
http://sources.openelec.tv/svn/xbmc-theme-PM3-HD-30122.tar.bz2

View File

@ -11,13 +11,13 @@ $SCRIPTS/build lzo
$SCRIPTS/build pcre
$SCRIPTS/build alsa-lib
$SCRIPTS/build enca
$SCRIPTS/build libass
$SCRIPTS/build enca #libass?
$SCRIPTS/build curl
$SCRIPTS/build libmicrohttpd
$SCRIPTS/build libssh
$SCRIPTS/build dbus
$SCRIPTS/build hal
$SCRIPTS/build libXt
$SCRIPTS/build libXtst
@ -26,15 +26,14 @@ $SCRIPTS/build libXrandr
$SCRIPTS/build Mesa
$SCRIPTS/build glew
$SCRIPTS/build fontconfig
$SCRIPTS/build fontconfig #libass?
$SCRIPTS/build fribidi
$SCRIPTS/build jpeg
$SCRIPTS/build libpng
$SCRIPTS/build tiff
$SCRIPTS/build freetype
$SCRIPTS/build freetype #libass?
$SCRIPTS/build jasper
# $SCRIPTS/build libass
$SCRIPTS/build libmad
$SCRIPTS/build libsamplerate
@ -98,29 +97,33 @@ cd -
--disable-debug \
--enable-optimizations \
--enable-gl \
--disable-profiling \
--disable-joystick \
--enable-xrandr \
--disable-ccache \
--disable-pulse \
--enable-faac \
--disable-libdts \
--disable-liba52 \
--enable-dvdcss \
--disable-mid \
--disable-goom \
--disable-xbmcprojectm \
--disable-rsxs \
--enable-avahi \
--enable-hal \
--enable-webserver \
$XBMC_VDPAU \
$XBMC_VAAPI \
$XBMC_CRYSTALHD \
--disable-vdadecoder \
--disable-profiling \
--disable-joystick \
--enable-xrandr \
--disable-goom \
--disable-xbmcprojectm \
--disable-rsxs \
--disable-ccache \
--disable-pulse \
--enable-ffmpeg-libvorbis \
--enable-faac \
--enable-dvdcss \
--disable-mid \
--disable-hal \
--enable-avahi \
--enable-non-free \
--disable-asap-codec \
--enable-webserver \
--disable-libdts \
--disable-liba52 \
--disable-external-ffmpeg \
--disable-external-liba52 \
--disable-external-libdts \
--disable-external-libass \
--enable-external-libz \
--enable-external-python \
make externals

22
packages/mediacenter/xbmc/init.d/60_xbmc Normal file → Executable file
View File

@ -1,3 +1,25 @@
#!/bin/sh
################################################################################
# Copyright (C) 2009-2010 OpenELEC.tv
# http://www.openelec.tv
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This Program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
# starting XBMC
#
# runlevels: openelec

View File

@ -9,13 +9,13 @@ $SCRIPTS/install lzo
$SCRIPTS/install pcre
$SCRIPTS/install alsa-lib
$SCRIPTS/install enca
$SCRIPTS/install libass
$SCRIPTS/install enca #libass
$SCRIPTS/install curl
$SCRIPTS/install libmicrohttpd
$SCRIPTS/install libssh
$SCRIPTS/install dbus
$SCRIPTS/install hal
$SCRIPTS/install udisks
$SCRIPTS/install upower
$SCRIPTS/install ConsoleKit
@ -30,13 +30,13 @@ $SCRIPTS/install Mesa
[ "$VAAPI" = yes ] && $SCRIPTS/install libva
[ "$CRYSTALHD" = yes ] && $SCRIPTS/install crystalhd
$SCRIPTS/install glew
$SCRIPTS/install fontconfig
$SCRIPTS/install fontconfig #libass?
$SCRIPTS/install fribidi
$SCRIPTS/install jpeg
$SCRIPTS/install libpng
$SCRIPTS/install tiff
$SCRIPTS/install freetype
$SCRIPTS/install freetype #libass?
$SCRIPTS/install jasper
# $SCRIPTS/install libass

View File

@ -1,6 +1,6 @@
diff -Naur xbmc-29740/configure.in xbmc-29740.patch/configure.in
--- xbmc-29740/configure.in 2010-05-03 03:25:29.000000000 +0200
+++ xbmc-29740.patch/configure.in 2010-05-03 04:05:13.412131036 +0200
diff -Naur xbmc-30122/configure.in xbmc-30122.patch/configure.in
--- xbmc-30122/configure.in 2010-05-13 13:16:42.000000000 +0200
+++ xbmc-30122.patch/configure.in 2010-05-13 13:44:00.985198286 +0200
@@ -23,6 +23,8 @@
xrandr_disabled="== XRandR support disabled. SDL will be used for resolution support. =="
goom_enabled="== GOOM enabled. =="
@ -10,7 +10,7 @@ diff -Naur xbmc-29740/configure.in xbmc-29740.patch/configure.in
pulse_not_found="== Could not find libpulse. PulseAudio support disabled. =="
pulse_disabled="== PulseAudio support manually disabled. =="
faac_not_found="== Could not find libfaac. FAAC support disabled. =="
@@ -168,6 +170,12 @@
@@ -170,6 +172,12 @@
[use_goom=$enableval],
[use_goom=no])
@ -20,10 +20,10 @@ diff -Naur xbmc-29740/configure.in xbmc-29740.patch/configure.in
+ [use_xbmcprojectm=$enableval],
+ [use_xbmcprojectm=yes])
+
AC_PATH_PROG(CCACHE,ccache,none)
AC_ARG_ENABLE([ccache],
[AS_HELP_STRING([--enable-ccache],
@@ -579,6 +587,15 @@
[enable building with ccache feature (default is auto)])],
@@ -608,6 +616,15 @@
fi
fi
@ -39,7 +39,7 @@ diff -Naur xbmc-29740/configure.in xbmc-29740.patch/configure.in
### External libraries checks
# External FFmpeg
if test "$use_external_ffmpeg" = "yes"; then
@@ -943,6 +960,12 @@
@@ -992,6 +1009,12 @@
final_message="$final_message\n GOOM:\t\tNo"
fi
@ -49,18 +49,18 @@ diff -Naur xbmc-29740/configure.in xbmc-29740.patch/configure.in
+ final_message="$final_message\n XBMCProjectM:\tNo"
+fi
+
if test "$use_pcre" = "yes"; then
final_message="$final_message\n PCRE Support:\tYes"
else
@@ -1181,6 +1204,7 @@
if test "$use_mid" = "yes"; then
final_message="$final_message\n MID Support:\tYes"
SDL_DEFINES="$SDL_DEFINES -DMID"
@@ -1245,6 +1268,7 @@
AC_SUBST(SDL_DEFINES)
AC_SUBST(BUILD_DVDCSS)
AC_SUBST(BUILD_GOOM)
+AC_SUBST(BUILD_XBMCPROJECTM)
AC_SUBST(USE_EXTERNAL_FFMPEG)
AC_SUBST(USE_EXTERNAL_LIBA52)
AC_SUBST(USE_EXTERNAL_LIBDTS)
@@ -1535,7 +1559,7 @@
AC_SUBST(USE_EXTERNAL_LIBASS)
@@ -1626,7 +1650,7 @@
-DSYSCONF_INSTALL_DIR:PATH="${sysconfdir}" -DSHARE_INSTALL_PREFIX:PATH="${datadir}" .
set +x
fi
@ -69,9 +69,9 @@ diff -Naur xbmc-29740/configure.in xbmc-29740.patch/configure.in
XB_CONFIG_MODULE([xbmc/visualizations/Goom/goom2k4-0],[
if test "$host_vendor" != "apple" ; then
diff -Naur xbmc-29740/Makefile.in xbmc-29740.patch/Makefile.in
--- xbmc-29740/Makefile.in 2010-05-03 03:25:29.000000000 +0200
+++ xbmc-29740.patch/Makefile.in 2010-05-03 04:04:11.589130864 +0200
diff -Naur xbmc-30122/Makefile.in xbmc-30122.patch/Makefile.in
--- xbmc-30122/Makefile.in 2010-05-13 13:16:42.000000000 +0200
+++ xbmc-30122.patch/Makefile.in 2010-05-13 13:41:15.585324083 +0200
@@ -106,8 +106,10 @@
VIS_DIRS=\
@ -85,7 +85,7 @@ diff -Naur xbmc-29740/Makefile.in xbmc-29740.patch/Makefile.in
ifeq ($(findstring osx,$(ARCH)), osx)
VIS_DIRS+=xbmc/visualizations/iTunes
endif
@@ -306,7 +308,9 @@
@@ -307,7 +309,9 @@
visualizations: exports
$(MAKE) -C xbmc/visualizations/OpenGLSpectrum
$(MAKE) -C xbmc/visualizations/WaveForm

View File

@ -1,6 +1,6 @@
diff -Naur xbmc-29740/configure.in xbmc-29740.patch/configure.in
--- xbmc-29740/configure.in 2010-05-03 04:06:14.609255790 +0200
+++ xbmc-29740.patch/configure.in 2010-05-03 04:07:44.163129774 +0200
diff -Naur xbmc-30122/configure.in xbmc-30122.patch/configure.in
--- xbmc-30122/configure.in 2010-05-13 13:44:56.876227997 +0200
+++ xbmc-30122.patch/configure.in 2010-05-13 13:47:12.173197721 +0200
@@ -25,6 +25,8 @@
goom_disabled="== GOOM disabled. =="
xbmcprojectm_enabled="== XBMCProjectM enabled. =="
@ -10,7 +10,7 @@ diff -Naur xbmc-29740/configure.in xbmc-29740.patch/configure.in
pulse_not_found="== Could not find libpulse. PulseAudio support disabled. =="
pulse_disabled="== PulseAudio support manually disabled. =="
faac_not_found="== Could not find libfaac. FAAC support disabled. =="
@@ -176,6 +178,12 @@
@@ -178,6 +180,12 @@
[use_xbmcprojectm=$enableval],
[use_xbmcprojectm=yes])
@ -20,10 +20,10 @@ diff -Naur xbmc-29740/configure.in xbmc-29740.patch/configure.in
+ [use_rsxs=$enableval],
+ [use_rsxs=yes])
+
AC_PATH_PROG(CCACHE,ccache,none)
AC_ARG_ENABLE([ccache],
[AS_HELP_STRING([--enable-ccache],
@@ -596,6 +604,15 @@
[enable building with ccache feature (default is auto)])],
@@ -625,6 +633,15 @@
BUILD_XBMCPROJECTM=1
fi
@ -39,7 +39,7 @@ diff -Naur xbmc-29740/configure.in xbmc-29740.patch/configure.in
### External libraries checks
# External FFmpeg
if test "$use_external_ffmpeg" = "yes"; then
@@ -966,6 +983,12 @@
@@ -1015,6 +1032,12 @@
final_message="$final_message\n XBMCProjectM:\tNo"
fi
@ -49,18 +49,18 @@ diff -Naur xbmc-29740/configure.in xbmc-29740.patch/configure.in
+ final_message="$final_message\n RSXS:\t\tNo"
+fi
+
if test "$use_pcre" = "yes"; then
final_message="$final_message\n PCRE Support:\tYes"
else
@@ -1205,6 +1228,7 @@
if test "$use_mid" = "yes"; then
final_message="$final_message\n MID Support:\tYes"
SDL_DEFINES="$SDL_DEFINES -DMID"
@@ -1269,6 +1292,7 @@
AC_SUBST(BUILD_DVDCSS)
AC_SUBST(BUILD_GOOM)
AC_SUBST(BUILD_XBMCPROJECTM)
+AC_SUBST(BUILD_RSXS)
AC_SUBST(USE_EXTERNAL_FFMPEG)
AC_SUBST(USE_EXTERNAL_LIBA52)
AC_SUBST(USE_EXTERNAL_LIBDTS)
@@ -1613,7 +1637,7 @@
AC_SUBST(USE_EXTERNAL_LIBASS)
@@ -1704,7 +1728,7 @@
--disable-lattice \
--disable-skyrocket
fi
@ -69,9 +69,9 @@ diff -Naur xbmc-29740/configure.in xbmc-29740.patch/configure.in
XB_CONFIG_MODULE([xbmc/cores/dvdplayer/Codecs/libbdnav/], [
if test "$host_vendor" = "apple" ; then
diff -Naur xbmc-29740/Makefile.in xbmc-29740.patch/Makefile.in
--- xbmc-29740/Makefile.in 2010-05-03 04:06:14.610256210 +0200
+++ xbmc-29740.patch/Makefile.in 2010-05-03 04:07:08.523256011 +0200
diff -Naur xbmc-30122/Makefile.in xbmc-30122.patch/Makefile.in
--- xbmc-30122/Makefile.in 2010-05-13 13:44:56.877229584 +0200
+++ xbmc-30122.patch/Makefile.in 2010-05-13 13:45:16.444196472 +0200
@@ -101,8 +101,10 @@
lib/xbmc-dll-symbols \
lib/jsoncpp/jsoncpp/src/lib_json
@ -85,7 +85,7 @@ diff -Naur xbmc-29740/Makefile.in xbmc-29740.patch/Makefile.in
VIS_DIRS=\
xbmc/visualizations/OpenGLSpectrum \
@@ -320,7 +322,9 @@
@@ -321,7 +323,9 @@
endif
endif
screensavers: exports

View File

@ -1,76 +0,0 @@
diff -Naur xbmc-28910/configure.in xbmc-28910.patch/configure.in
--- xbmc-28910/configure.in 2010-03-28 19:11:12.041628640 +0200
+++ xbmc-28910.patch/configure.in 2010-03-28 19:11:28.334628763 +0200
@@ -33,6 +33,8 @@
faac_disabled="== FAAC support manually disabled. =="
dvdcss_enabled="== DVDCSS support enabled. =="
dvdcss_disabled="== DVDCSS support disabled. =="
+hal_not_found="== Could not find hal and hal-storage. HAL support disabled. =="
+hal_disabled="== HAL support disabled. =="
avahi_not_found="== Could not find libavahi-common or libavahi-client. Avahi support disabled. =="
avahi_disabled="== Avahi support disabled. =="
vdpau_not_found="== Could not find libvdpau. VDPAU support disabled. =="
@@ -198,6 +200,11 @@
[enable MID support (default is no)])],
[use_mid=$enableval],
[use_mid=no])
+AC_ARG_ENABLE([hal],
+ [AS_HELP_STRING([--disable-hal],
+ [disable HAL support (default is enabled if hal and hal-storage is found)])],
+ [use_hal=$enableval],
+ [use_hal=yes])
AC_ARG_ENABLE([avahi],
[AS_HELP_STRING([--disable-avahi],
[disable Avahi support (default is enabled if libavahi-common and libavahi-client is found)])],
@@ -465,15 +472,9 @@
PKG_CHECK_MODULES([DBUS], [dbus-1],
[INCLUDES+=" $DBUS_CFLAGS"; LIBS+=" $DBUS_LIBS"],
AC_MSG_ERROR($missing_library))
- PKG_CHECK_MODULES([HAL_STORAGE], [hal-storage],
- [INCLUDES+=" $HAL_STORAGE_CFLAGS"; LIBS+=" $HAL_STORAGE_LIBS"],
- AC_MSG_ERROR($missing_library))
PKG_CHECK_MODULES([SDL], [sdl],
[INCLUDES+=" $SDL_CFLAGS"; LIBS+=" $SDL_LIBS"],
AC_MSG_ERROR($missing_library))
- PKG_CHECK_MODULES([HAL], [hal],
- [INCLUDES+=" $HAL_CFLAGS"; LIBS+=" $HAL_LIBS"],
- AC_MSG_ERROR($missing_library))
fi
# PulseAudio
@@ -502,6 +503,24 @@
fi
fi
+# HAL
+if test "$host_vendor" = "apple" ; then
+ use_hal="no"
+ AC_MSG_RESULT($hal_disabled)
+else
+ if test "$use_hal" = "yes"; then
+ PKG_CHECK_MODULES([HAL], [hal],
+ [INCLUDES+=" $HAL_CFLAGS"; LIBS+=" $HAL_LIBS"],
+ use_hal=no;AC_MSG_ERROR($missing_library))
+ PKG_CHECK_MODULES([HAL_STORAGE], [hal-storage],
+ [INCLUDES+=" $HAL_STORAGE_CFLAGS"; LIBS+=" $HAL_STORAGE_LIBS"],
+ use_hal=no;AC_MSG_ERROR($missing_library))
+ AC_DEFINE([HAS_HAL], [1], [Define to 1 if you have HAL installed])
+ else
+AC_MSG_RESULT($hal_disabled)
+ fi
+fi
+
# avahi
if test "$host_vendor" = "apple" ; then
use_avahi="no"
diff -Naur xbmc-28910/guilib/system.h xbmc-28910.patch/guilib/system.h
--- xbmc-28910/guilib/system.h 2010-03-28 17:12:32.000000000 +0200
+++ xbmc-28910.patch/guilib/system.h 2010-03-28 19:11:28.336628838 +0200
@@ -126,7 +126,6 @@
#define HAS_AVAHI
#endif
#define HAS_LCD
-#define HAS_HAL
#define HAS_DBUS
#define HAS_DBUS_SERVER
#define HAS_GL

View File

@ -0,0 +1,65 @@
diff -Naur xbmc-30122/configure.in xbmc-30122.patch/configure.in
--- xbmc-30122/configure.in 2010-05-13 22:16:11.524199498 +0200
+++ xbmc-30122.patch/configure.in 2010-05-13 22:23:00.332323274 +0200
@@ -58,6 +58,8 @@
external_liba52_disabled="== Use of external liba52 disabled. =="
external_libdts_enabled="== Use of external libdts enabled. =="
external_libdts_disabled="== Use of external libdts disabled. =="
+external_libz_enabled="== Use of external libz enabled. =="
+external_libz_disabled="== Use of external libz disabled. =="
external_python_enabled="== Use of external python enabled. =="
external_python_disabled="== Use of external python disabled. =="
ffmpeg_vdpau_not_supported="== External ffmpeg doesn't support VDPAU. VDPAU support disabled. =="
@@ -282,6 +284,12 @@
[use_external_libdts=$enableval],
[use_external_libdts=$use_external_libraries])
+AC_ARG_ENABLE([external-libz],
+ [AS_HELP_STRING([--enable-external-libz],
+ [enable use of external libz library (default is no)])],
+ [use_external_libz=$enableval],
+ [use_external_libz=no])
+
AC_ARG_ENABLE([external-python],
[AS_HELP_STRING([--enable-external-python],
[enable use of external python library (default is no) 'Linux only'])],
@@ -721,6 +729,18 @@
USE_EXTERNAL_LIBDTS=0
fi
+# External libz
+if test "$use_external_libraries" = "yes" || test "$use_external_libz" = "yes"; then
+ AC_CHECK_LIB([z], [main],, AC_MSG_ERROR($missing_library))
+ AC_CHECK_HEADERS([zlib.h],, AC_MSG_ERROR([$missing_headers]))
+ AC_MSG_NOTICE($external_libz_enabled)
+ USE_EXTERNAL_LIBZ=1
+ AC_DEFINE([USE_EXTERNAL_LIBZ], [1], [Whether to use external libz library/zlib.])
+else
+ AC_MSG_NOTICE($external_libz_disabled)
+ USE_EXTERNAL_LIBZ=0
+fi
+
# External Python
if test "$use_external_python" = "yes"; then
AC_CHECK_LIB([python2.6], [main],
@@ -1195,6 +1215,11 @@
final_message="$final_message\n External libdts:\tNo"
fi
fi
+if test "$use_external_libz" = "yes"; then
+ final_message="$final_message\n External zlib:\tYes"
+else
+ final_message="$final_message\n External zlib:\tNo"
+fi
if test "$use_external_python" = "yes"; then
final_message="$final_message\n External Python:\tYes"
else
@@ -1627,7 +1652,7 @@
CFLAGS="-fPIC -fno-common -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4" \
./configure
fi
-], [0])
+], [$USE_EXTERNAL_LIBZ])
XB_CONFIG_MODULE([lib/libass], [
if test "$host_vendor" = "apple" ; then

View File

@ -1,7 +1,7 @@
diff -Naur xbmc-28910/configure.in xbmc-28910.patch/configure.in
--- xbmc-28910/configure.in 2010-03-28 19:09:49.355628909 +0200
+++ xbmc-28910.patch/configure.in 2010-03-28 19:08:34.601754086 +0200
@@ -921,12 +921,6 @@
diff -Naur xbmc-30122/configure.in xbmc-30122.patch/configure.in
--- xbmc-30122/configure.in 2010-05-13 13:51:13.813324070 +0200
+++ xbmc-30122.patch/configure.in 2010-05-13 13:52:55.358197998 +0200
@@ -1065,12 +1065,6 @@
final_message="$final_message\n MID Support:\tNo"
fi
@ -11,13 +11,12 @@ diff -Naur xbmc-28910/configure.in xbmc-28910.patch/configure.in
- INCLUDES="$INCLUDES"
-fi
-
if test "$use_ccache" = "yes"; then
if test "x$use_ccache" != "xno"; then
AC_PATH_PROG(CCACHE,ccache,none)
if test "$ac_cv_path_CCACHE" = "none"; then
echo "ccache not found. Falling back to default CC"
diff -Naur xbmc-28910/configure.in.orig xbmc-28910.patch/configure.in.orig
diff -Naur xbmc-28910/tools/TexturePacker/XBMCTex.cpp xbmc-28910.patch/tools/TexturePacker/XBMCTex.cpp
--- xbmc-28910/tools/TexturePacker/XBMCTex.cpp 2010-03-28 17:16:22.000000000 +0200
+++ xbmc-28910.patch/tools/TexturePacker/XBMCTex.cpp 2010-03-28 19:08:34.602753740 +0200
diff -Naur xbmc-30122/tools/TexturePacker/XBMCTex.cpp xbmc-30122.patch/tools/TexturePacker/XBMCTex.cpp
--- xbmc-30122/tools/TexturePacker/XBMCTex.cpp 2010-05-13 13:20:20.000000000 +0200
+++ xbmc-30122.patch/tools/TexturePacker/XBMCTex.cpp 2010-05-13 13:51:39.760198949 +0200
@@ -37,7 +37,7 @@
#endif

View File

@ -1,12 +0,0 @@
diff -Naur xbmc-29740/configure.in xbmc-29740.patch/configure.in
--- xbmc-29740/configure.in 2010-05-03 04:08:41.115131030 +0200
+++ xbmc-29740.patch/configure.in 2010-05-03 04:12:20.116129219 +0200
@@ -499,7 +499,7 @@
AC_DEFUN([XB_FIND_SONAME],
[
AC_MSG_CHECKING([for lib$2 soname])
- $1_SONAME=$( gcc -print-file-name=lib$2.so | \
+ $1_SONAME=$( $CC -print-file-name=lib$2.so | \
while read output; do objdump -p $output | \
grep "SONAME" | \
sed -e 's/ \+SONAME \+//'; done 2> /dev/null )

View File

@ -0,0 +1,14 @@
diff -Naur xbmc-30122/configure.in xbmc-30122.patch/configure.in
--- xbmc-30122/configure.in 2010-05-13 13:16:42.000000000 +0200
+++ xbmc-30122.patch/configure.in 2010-05-14 13:12:09.725479259 +0200
@@ -1603,9 +1603,7 @@
--with-pic
else
./configure \
- CPPFLAGS="$CPPFLAGS" \
- CFLAGS="$CFLAGS -fPIC" \
- CXXFLAGS="$CXXFLAGS -fPIC" \
+ CFLAGS="-O3" \
--prefix="${prefix}" --includedir="${includedir}" --libdir="${libdir}" --datadir="${datadir}" \
--host=$host_alias \
--build=$build_alias \

View File

@ -1,13 +1,13 @@
diff -Naur xbmc-28910/configure.in xbmc-28910.patch/configure.in
--- xbmc-28910/configure.in 2010-03-28 19:12:51.211753728 +0200
+++ xbmc-28910.patch/configure.in 2010-03-28 19:24:46.921753713 +0200
@@ -463,9 +463,6 @@
diff -Naur xbmc-30122/configure.in xbmc-30122.patch/configure.in
--- xbmc-30122/configure.in 2010-05-13 13:58:23.276198942 +0200
+++ xbmc-30122.patch/configure.in 2010-05-13 13:58:49.323198531 +0200
@@ -489,9 +489,6 @@
PKG_CHECK_MODULES([XMU], [xmu],
[INCLUDES+=" $XMU_CFLAGS"; LIBS+=" $XMU_LIBS"],
[INCLUDES="$INCLUDES $XMU_CFLAGS"; LIBS="$LIBS $XMU_LIBS"],
AC_MSG_ERROR($missing_library))
- PKG_CHECK_MODULES([XINERAMA], [xinerama],
- [INCLUDES+=" $XINERAMA_CFLAGS"; LIBS+=" $XINERAMA_LIBS"],
- [INCLUDES="$INCLUDES $XINERAMA_CFLAGS"; LIBS="$LIBS $XINERAMA_LIBS"],
- AC_MSG_ERROR($missing_library))
PKG_CHECK_MODULES([CURL], [libcurl],
[INCLUDES+=" $CURL_CFLAGS"; LIBS+=" $CURL_LIBS"],
[INCLUDES="$INCLUDES $CURL_CFLAGS"; LIBS="$LIBS $CURL_LIBS"],
AC_MSG_ERROR($missing_library))

View File

@ -1,92 +0,0 @@
diff -Naur xbmc-29740/Makefile.in xbmc-29740.patch/Makefile.in
--- xbmc-29740/Makefile.in 2010-05-03 04:08:41.116131093 +0200
+++ xbmc-29740.patch/Makefile.in 2010-05-03 04:16:42.386130163 +0200
@@ -497,7 +497,7 @@
$(MAKE) -C tools/TexturePacker/
install-bin: xbmc.bin # developement convenience target
- sudo install -D xbmc.bin $(prefix)/share/xbmc
+ sudo install -D xbmc.bin $(DESTDIR)/$(prefix)/share/xbmc
ifeq ($(findstring osx,$(ARCH)), osx)
# TODO: add osx install
@@ -505,53 +505,53 @@
install: install-binaries install-arch install-datas install-web
install-binaries: install-scripts
- @echo "Copying XBMC binary to $(prefix)/share/xbmc/xbmc.bin"
- @install -D xbmc.bin $(prefix)/share/xbmc/xbmc.bin
- @install -D xbmc-xrandr $(prefix)/share/xbmc/xbmc-xrandr
+ @echo "Copying XBMC binary to $(DESTDIR)/$(prefix)/share/xbmc/xbmc.bin"
+ @install -D xbmc.bin $(DESTDIR)/$(prefix)/share/xbmc/xbmc.bin
+ @install -D xbmc-xrandr $(DESTDIR)/$(prefix)/share/xbmc/xbmc-xrandr
@echo "You can run XBMC with the command 'xbmc'"
endif
install-arch:
@# Arch dependent files
- @find system addons -regextype posix-extended -type f -not -iregex ".*svn.*|.*win32(dx)?\.vis|.*osx\.vis" -iregex ".*$(ARCH).*|.*\.vis|.*\.xbs" -exec install -D "{}" $(prefix)/share/xbmc/"{}" \; -printf " -- %-75.75f\r"
+ @find system addons -regextype posix-extended -type f -not -iregex ".*svn.*|.*win32(dx)?\.vis|.*osx\.vis" -iregex ".*$(ARCH).*|.*\.vis|.*\.xbs" -exec install -D "{}" $(DESTDIR)/$(prefix)/share/xbmc/"{}" \; -printf " -- %-75.75f\r"
install-scripts:
- @install -D tools/Linux/xbmc.sh $(prefix)/bin/xbmc
- @install -D tools/Linux/xbmc-standalone.sh $(prefix)/bin/xbmc-standalone
- @install -D -m 0644 tools/Linux/FEH.py $(prefix)/share/xbmc/FEH.py
- @install -D -m 0644 tools/Linux/xbmc-xsession.desktop $(prefix)/share/xsessions/XBMC.desktop
+ @install -D tools/Linux/xbmc.sh $(DESTDIR)/$(prefix)/bin/xbmc
+ @install -D tools/Linux/xbmc-standalone.sh $(DESTDIR)/$(prefix)/bin/xbmc-standalone
+ @install -D -m 0644 tools/Linux/FEH.py $(DESTDIR)/$(prefix)/share/xbmc/FEH.py
+ @install -D -m 0644 tools/Linux/xbmc-xsession.desktop $(DESTDIR)/$(prefix)/share/xsessions/XBMC.desktop
install-datas: install-scripts
@echo "Copying support and legal files..."
@for FILE in `ls README.linux LICENSE.GPL *.txt`; do \
- install -D -m 0644 "$$FILE" $(prefix)/share/xbmc/; done
+ install -D -m 0644 "$$FILE" $(DESTDIR)/$(prefix)/share/xbmc/; done
@echo "Done!"
- @echo "Copying system files to $(prefix)/share/xbmc"
+ @echo "Copying system files to $(DESTDIR)/$(prefix)/share/xbmc"
@# Arch independent files
- @find addons language media scripts sounds userdata system -regextype posix-extended -type f -not -iregex ".*svn.*|.*\.so|.*\.dll|.*\.pyd|.*python/.*\.zlib" -exec install -D -m 0644 "{}" $(prefix)/share/xbmc/"{}" \; -printf " -- %-75.75f\r"
+ @find addons language media scripts sounds userdata system -regextype posix-extended -type f -not -iregex ".*svn.*|.*\.so|.*\.dll|.*\.pyd|.*python/.*\.zlib" -exec install -D -m 0644 "{}" $(DESTDIR)/$(prefix)/share/xbmc/"{}" \; -printf " -- %-75.75f\r"
@# Icons and links
- @mkdir -p $(prefix)/share/applications $(prefix)/share/pixmaps
- @cp -a tools/Linux/xbmc.png $(prefix)/share/pixmaps/
- @cp -a tools/Linux/xbmc.desktop $(prefix)/share/applications/
+ @mkdir -p $(DESTDIR)/$(prefix)/share/applications $(DESTDIR)/$(prefix)/share/pixmaps
+ @cp -a tools/Linux/xbmc.png $(DESTDIR)/$(prefix)/share/pixmaps/
+ @cp -a tools/Linux/xbmc.desktop $(DESTDIR)/$(prefix)/share/applications/
install-livedatas:
- @echo "Install Live CD datas in $(prefix) ..."
- @mkdir -p $(prefix)/bin
- @install -D tools/XBMCLive/diskmounter $(prefix)/bin
- @install -D tools/XBMCLive/installXBMC $(prefix)/bin
- @install -D tools/XBMCLive/runXBMC $(prefix)/bin
- @install -D tools/XBMCLive/setAlsaVolumes $(prefix)/bin
+ @echo "Install Live CD datas in $(DESTDIR)/$(prefix) ..."
+ @mkdir -p $(DESTDIR)/$(prefix)/bin
+ @install -D tools/XBMCLive/diskmounter $(DESTDIR)/$(prefix)/bin
+ @install -D tools/XBMCLive/installXBMC $(DESTDIR)/$(prefix)/bin
+ @install -D tools/XBMCLive/runXBMC $(DESTDIR)/$(prefix)/bin
+ @install -D tools/XBMCLive/setAlsaVolumes $(DESTDIR)/$(prefix)/bin
install-web:
- @mkdir -p $(prefix)/share/xbmc/web
- @cp -r web/poc_jsonrpc/* $(prefix)/share/xbmc/web
- @find $(prefix)/share/xbmc/web -depth -name .svn -exec rm -rf {} \;
+ @mkdir -p $(DESTDIR)/$(prefix)/share/xbmc/web
+ @cp -r web/poc_jsonrpc/* $(DESTDIR)/$(prefix)/share/xbmc/web
+ @find $(DESTDIR)/$(prefix)/share/xbmc/web -depth -name .svn -exec rm -rf {} \;
uninstall:
@echo "Removing XBMC..."
- @rm -rf $(prefix)/share/xbmc $(prefix)/bin/xbmc
- @rm -rf $(prefix)/bin/xbmc-standalone
- @rm -rf $(prefix)/share/xsessions/XBMC.desktop
+ @rm -rf $(DESTDIR)/$(prefix)/share/xbmc $(DESTDIR)/$(prefix)/bin/xbmc
+ @rm -rf $(DESTDIR)/$(prefix)/bin/xbmc-standalone
+ @rm -rf $(DESTDIR)/$(prefix)/share/xsessions/XBMC.desktop
@echo "Done!"
reallyclean:

View File

@ -1 +1 @@
http://sources.openelec.tv/svn/xbmc-29931.tar.bz2
http://sources.openelec.tv/svn/xbmc-30122.tar.bz2

View File

@ -3,18 +3,20 @@
. config/options
$SCRIPTS/build toolchain
$SCRIPTS/build libnih
$SCRIPTS/build e2fsprogs
$SCRIPTS/build freetype
$SCRIPTS/build fontconfig
$SCRIPTS/build enca
cd $PKG_BUILD
EXT2FS_LIBS="-lext2fs -lcom_err" \
./configure --host=$TARGET_NAME \
--build=$HOST_NAME \
--prefix=/usr \
--exec-prefix=/usr \
--sysconfdir=/etc \
--datadir=/usr/share \
--localstatedir=/var \
--disable-static \
--enable-shared \
--disable-static \
make
$MAKEINSTALL

View File

@ -0,0 +1,11 @@
#!/bin/sh
. config/options
$SCRIPTS/install freetype
$SCRIPTS/install fontconfig
$SCRIPTS/install enca
mkdir -p $INSTALL/usr/lib
cp -P $PKG_BUILD/libass/.libs/*.so* $INSTALL/usr/lib

View File

@ -0,0 +1 @@
http://libass.googlecode.com/files/libass-0.9.9.tar.bz2

View File

@ -11,7 +11,7 @@ $SCRIPTS/build Mesa
cd $PKG_BUILD
libtoolize
autoreconf
autoreconf -vif
./configure --host=$TARGET_NAME \
--build=$HOST_NAME \
--prefix=/usr \

View File

@ -9,13 +9,14 @@ $SCRIPTS/install libdrm
$SCRIPTS/install Mesa
mkdir -p $INSTALL/usr/lib
cp -PR $PKG_BUILD/va/.libs/libva*.so* $INSTALL/usr/lib
cp -P $PKG_BUILD/va/.libs/libva*.so* $INSTALL/usr/lib
rm -rf $INSTALL/usr/lib/libva-*.so*T
mkdir -p $INSTALL/usr/lib/va
# cp -PR $PKG_BUILD/dummy_drv_video/.libs/*.so $INSTALL/usr/lib/va
cp -PR $PKG_BUILD/i965_drv_video/.libs/*.so $INSTALL/usr/lib/va
mkdir -p $INSTALL/usr/bin
cp -PR $PKG_BUILD/test/.libs/vainfo $INSTALL/usr/bin
cp -P $PKG_BUILD/i965_drv_video/.libs/*.so $INSTALL/usr/lib/va
if [ "$DEVTOOLS" = yes ]; then
mkdir -p $INSTALL/usr/bin
cp $PKG_BUILD/test/.libs/vainfo $INSTALL/usr/bin
fi

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,125 @@
commit 8ca9ac4f628ea3d01c570293b6fa904ce0bb607e
Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
Date: Wed Apr 28 18:43:04 2010 +0200
[G45] Fix build without proper libdrm updates.
diff --git a/i965_drv_video/i965_drv_video.c b/i965_drv_video/i965_drv_video.c
index 369ebdf..a482848 100644
--- a/i965_drv_video/i965_drv_video.c
+++ b/i965_drv_video/i965_drv_video.c
@@ -134,9 +134,11 @@ i965_QueryConfigProfiles(VADriverContextP ctx,
profile_list[i++] = VAProfileMPEG2Simple;
profile_list[i++] = VAProfileMPEG2Main;
+#ifndef DISABLE_H264_DECODER
profile_list[i++] = VAProfileH264Baseline;
profile_list[i++] = VAProfileH264Main;
profile_list[i++] = VAProfileH264High;
+#endif
/* If the assert fails then I965_MAX_PROFILES needs to be bigger */
assert(i <= I965_MAX_PROFILES);
@@ -160,12 +162,14 @@ i965_QueryConfigEntrypoints(VADriverContextP ctx,
entrypoint_list[0] = VAEntrypointVLD;
break;
+#ifndef DISABLE_H264_DECODER
case VAProfileH264Baseline:
case VAProfileH264Main:
case VAProfileH264High:
*num_entrypoints = 1;
entrypoint_list[0] = VAEntrypointVLD;
break;
+#endif
default:
vaStatus = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
@@ -262,6 +266,7 @@ i965_CreateConfig(VADriverContextP ctx,
}
break;
+#ifndef DISABLE_H264_DECODER
case VAProfileH264Baseline:
case VAProfileH264Main:
case VAProfileH264High:
@@ -270,8 +275,8 @@ i965_CreateConfig(VADriverContextP ctx,
} else {
vaStatus = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
}
-
break;
+#endif
default:
vaStatus = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
@@ -983,11 +988,13 @@ i965_BeginPicture(VADriverContextP ctx,
vaStatus = VA_STATUS_SUCCESS;
break;
+#ifndef DISABLE_H264_DECODER
case VAProfileH264Baseline:
case VAProfileH264Main:
case VAProfileH264High:
vaStatus = VA_STATUS_SUCCESS;
break;
+#endif
default:
assert(0);
@@ -1156,12 +1163,13 @@ i965_EndPicture(VADriverContextP ctx, VAContextID context)
assert(obj_config);
switch (obj_config->profile) {
+#ifndef DISABLE_H264_DECODER
case VAProfileH264Baseline:
case VAProfileH264Main:
case VAProfileH264High:
render_state->interleaved_uv = 1;
break;
-
+#endif
default:
render_state->interleaved_uv = 0;
}
diff --git a/i965_drv_video/intel_batchbuffer.c b/i965_drv_video/intel_batchbuffer.c
index 4c622d6..455c6a1 100644
--- a/i965_drv_video/intel_batchbuffer.c
+++ b/i965_drv_video/intel_batchbuffer.c
@@ -33,6 +33,16 @@
#include "intel_batchbuffer.h"
+#ifdef DISABLE_H264_DECODER
+#define drm_intel_bo_mrb_exec local_drm_intel_bo_mrb_exec
+static int drm_intel_bo_mrb_exec(drm_intel_bo *bo, int used,
+ drm_clip_rect_t * cliprects, int num_cliprects,
+ int DR4, int ring_flag)
+{
+ return drm_intel_bo_exec(bo, used, cliprects, num_cliprects, DR4);
+}
+#endif
+
static void
intel_batchbuffer_reset(struct intel_batchbuffer *batch)
{
diff --git a/i965_drv_video/intel_driver.h b/i965_drv_video/intel_driver.h
index e7cbaaa..8a3ce93 100644
--- a/i965_drv_video/intel_driver.h
+++ b/i965_drv_video/intel_driver.h
@@ -17,6 +17,15 @@
#define INLINE
#endif
+#ifndef ON_RENDER_RING
+#define ON_RENDER_RING (1 << 0)
+#define DISABLE_H264_DECODER
+#endif
+#ifndef ON_BSD_RING
+#define ON_BSD_RING (1 << 1)
+#define DISABLE_H264_DECODER
+#endif
+
#define BATCH_SIZE 0x100000
#define BATCH_RESERVED 0x10

View File

@ -1,19 +1,20 @@
commit c833a4ef4efa20ab8df18d13bdab1e5c5e4671a8
commit 446cd618ec79c55e0044c7bdd565a66a768d0e6e
Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
Date: Wed Nov 4 13:16:34 2009 +0000
[G45] Implement vaGetImage() for full-sized surface readback.
diff --git a/i965_drv_video/i965_drv_video.c b/i965_drv_video/i965_drv_video.c
index ebaf1ae..59ebdd7 100644
index ad51b6c..80c61ca 100644
--- a/i965_drv_video/i965_drv_video.c
+++ b/i965_drv_video/i965_drv_video.c
@@ -1392,7 +1392,50 @@ i965_GetImage(VADriverContextP ctx,
@@ -1481,7 +1481,54 @@ i965_GetImage(VADriverContextP ctx,
unsigned int height,
VAImageID image)
{
- return VA_STATUS_SUCCESS;
+ struct i965_driver_data *i965 = i965_driver_data(ctx);
+ struct i965_render_state *render_state = &i965->render_state;
+
+ struct object_surface *obj_surface = SURFACE(surface);
+ if (!obj_surface)
@ -46,9 +47,12 @@ index ebaf1ae..59ebdd7 100644
+
+ switch (obj_image->image.format.fourcc) {
+ case VA_FOURCC('Y','V','1','2'): /* YV12 is native format here */
+ if (render_state->interleaved_uv)
+ goto operation_failed;
+ memcpy(image_data, obj_surface->bo->virtual, obj_surface->bo->size);
+ break;
+ default:
+ operation_failed:
+ va_status = VA_STATUS_ERROR_OPERATION_FAILED;
+ break;
+ }

View File

@ -1,14 +1,14 @@
commit c00ac73b0fa1f5c4ff9cdc76b7556c5db03c5335
commit 3de13e8bda7efadbdb681299d0d161f383b7cb5b
Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
Date: Wed Nov 4 13:36:39 2009 +0000
[G45] Implement vaPutImage() for full-sized surface uploads.
diff --git a/i965_drv_video/i965_drv_video.c b/i965_drv_video/i965_drv_video.c
index 59ebdd7..5c15439 100644
index 80c61ca..da2fbd6 100644
--- a/i965_drv_video/i965_drv_video.c
+++ b/i965_drv_video/i965_drv_video.c
@@ -443,22 +443,6 @@ i965_QueryImageFormats(VADriverContextP ctx,
@@ -472,22 +472,6 @@ i965_QueryImageFormats(VADriverContextP ctx,
}
VAStatus
@ -31,7 +31,7 @@ index 59ebdd7..5c15439 100644
i965_QuerySubpictureFormats(VADriverContextP ctx,
VAImageFormat *format_list, /* out */
unsigned int *flags, /* out */
@@ -1439,6 +1423,68 @@ i965_GetImage(VADriverContextP ctx,
@@ -1532,6 +1516,72 @@ i965_GetImage(VADriverContextP ctx,
}
VAStatus
@ -48,6 +48,7 @@ index 59ebdd7..5c15439 100644
+ unsigned int dest_height)
+{
+ struct i965_driver_data *i965 = i965_driver_data(ctx);
+ struct i965_render_state *render_state = &i965->render_state;
+
+ struct object_surface *obj_surface = SURFACE(surface);
+ if (!obj_surface)
@ -83,9 +84,12 @@ index 59ebdd7..5c15439 100644
+
+ switch (obj_image->image.format.fourcc) {
+ case VA_FOURCC('Y','V','1','2'): /* YV12 is native format here */
+ if (render_state->interleaved_uv)
+ goto operation_failed;
+ memcpy(obj_surface->bo->virtual, image_data, obj_surface->bo->size);
+ break;
+ default:
+ operation_failed:
+ va_status = VA_STATUS_ERROR_OPERATION_FAILED;
+ break;
+ }

View File

@ -1,14 +1,14 @@
commit ab248483d89c6cf7beb7a3a87c9b9a55464023cc
commit c31ffe80157a4e0604d2070f6014cab9f2c8309b
Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
Date: Wed Nov 4 17:34:53 2009 +0000
[G45] Handle cliprects in vaPutSurface().
diff --git a/i965_drv_video/i965_drv_video.c b/i965_drv_video/i965_drv_video.c
index 5c15439..d4ad6e1 100644
index da2fbd6..8669a4e 100644
--- a/i965_drv_video/i965_drv_video.c
+++ b/i965_drv_video/i965_drv_video.c
@@ -1507,13 +1507,23 @@ i965_PutSurface(VADriverContextP ctx,
@@ -1604,13 +1604,23 @@ i965_PutSurface(VADriverContextP ctx,
union dri_buffer *buffer;
struct intel_region *dest_region;
struct object_surface *obj_surface;
@ -33,7 +33,7 @@ index 5c15439..d4ad6e1 100644
dri_drawable = dri_get_drawable(ctx, draw);
assert(dri_drawable);
@@ -1552,17 +1562,24 @@ i965_PutSurface(VADriverContextP ctx,
@@ -1649,17 +1659,24 @@ i965_PutSurface(VADriverContextP ctx,
assert(ret == 0);
}
@ -69,10 +69,10 @@ index 5c15439..d4ad6e1 100644
}
diff --git a/i965_drv_video/i965_render.c b/i965_drv_video/i965_render.c
index c738d22..301d51d 100644
index 1ae6483..163bff6 100644
--- a/i965_drv_video/i965_render.c
+++ b/i965_drv_video/i965_render.c
@@ -788,13 +788,81 @@ i965_render_binding_table(VADriverContextP ctx)
@@ -796,13 +796,81 @@ i965_render_binding_table(VADriverContextP ctx)
dri_bo_unmap(render_state->wm.binding_table);
}
@ -158,7 +158,7 @@ index c738d22..301d51d 100644
struct object_surface *obj_surface = SURFACE(surface);
struct object_subpic *obj_subpic = SUBPIC(obj_surface->subpic);
@@ -804,8 +872,6 @@ i965_subpic_render_upload_vertex(VADriverContextP ctx,
@@ -812,8 +880,6 @@ i965_subpic_render_upload_vertex(VADriverContextP ctx,
const float ssy = (float)output_rect->height / (float)obj_surface->height;
const float sx = psx * ssx;
const float sy = psy * ssy;
@ -167,7 +167,7 @@ index c738d22..301d51d 100644
VARectangle dst_rect;
dst_rect.x = output_rect->x + sx * (float)obj_subpic->dst_rect.x;
@@ -813,106 +879,38 @@ i965_subpic_render_upload_vertex(VADriverContextP ctx,
@@ -821,93 +887,29 @@ i965_subpic_render_upload_vertex(VADriverContextP ctx,
dst_rect.width = sx * (float)obj_subpic->dst_rect.width;
dst_rect.height = sy * (float)obj_subpic->dst_rect.height;
@ -276,6 +276,11 @@ index c738d22..301d51d 100644
+ cliprects, num_cliprects);
}
static void
@@ -929,17 +931,13 @@ i965_render_upload_constants(VADriverContextP ctx)
dri_bo_unmap(render_state->curbe.bo);
}
-static void
+static unsigned int
i965_surface_render_state_setup(VADriverContextP ctx,
@ -296,18 +301,18 @@ index c738d22..301d51d 100644
{
i965_render_vs_unit(ctx);
i965_render_sf_unit(ctx);
@@ -923,21 +921,17 @@ i965_surface_render_state_setup(VADriverContextP ctx,
i965_render_cc_viewport(ctx);
@@ -951,22 +949,17 @@ i965_surface_render_state_setup(VADriverContextP ctx,
i965_render_cc_unit(ctx);
i965_render_binding_table(ctx);
i965_render_upload_constants(ctx);
- i965_render_upload_vertex(ctx, surface,
- srcx, srcy, srcw, srch,
- destx, desty, destw, desth);
+ return i965_render_upload_vertex(ctx, surface, src_rect, dst_rect,
+ cliprects, num_cliprects);
}
-static void
+
+static unsigned int
i965_subpic_render_state_setup(VADriverContextP ctx,
- VASurfaceID surface,
@ -327,7 +332,7 @@ index c738d22..301d51d 100644
{
i965_render_vs_unit(ctx);
i965_render_sf_unit(ctx);
@@ -948,16 +942,10 @@ i965_subpic_render_state_setup(VADriverContextP ctx,
@@ -977,13 +970,8 @@ i965_subpic_render_state_setup(VADriverContextP ctx,
i965_render_cc_viewport(ctx);
i965_subpic_render_cc_unit(ctx);
i965_render_binding_table(ctx);
@ -342,11 +347,8 @@ index c738d22..301d51d 100644
+ cliprects, num_cliprects);
}
-
static void
i965_render_pipeline_select(VADriverContextP ctx)
{
@@ -1193,7 +1181,7 @@ i965_render_upload_image_palette(
@@ -1235,7 +1223,7 @@ i965_render_upload_image_palette(
}
static void
@ -355,16 +357,16 @@ index c738d22..301d51d 100644
{
struct i965_driver_data *i965 = i965_driver_data(ctx);
struct i965_render_state *render_state = &i965->render_state;
@@ -1204,7 +1192,7 @@ i965_render_startup(VADriverContextP ctx)
@@ -1246,7 +1234,7 @@ i965_render_startup(VADriverContextP ctx)
(0 << VB0_BUFFER_INDEX_SHIFT) |
VB0_VERTEXDATA |
((4 * 4) << VB0_BUFFER_PITCH_SHIFT));
- OUT_RELOC(ctx, render_state->vb.vertex_buffer, I915_GEM_DOMAIN_VERTEX, 0, 0);
+ OUT_RELOC(ctx, render_state->vb.vertex_buffer, I915_GEM_DOMAIN_VERTEX, 0, vb_offset);
if (IS_IGDNG(i965->intel.device_id))
if (IS_IRONLAKE(i965->intel.device_id))
OUT_RELOC(ctx, render_state->vb.vertex_buffer, I915_GEM_DOMAIN_VERTEX, 0, 12 * 4);
@@ -1269,8 +1257,10 @@ i965_clear_dest_region(VADriverContextP ctx)
@@ -1311,8 +1299,10 @@ i965_clear_dest_region(VADriverContextP ctx)
}
static void
@ -376,8 +378,8 @@ index c738d22..301d51d 100644
intel_batchbuffer_start_atomic(ctx, 0x1000);
intel_batchbuffer_emit_mi_flush(ctx);
i965_clear_dest_region(ctx);
@@ -1284,13 +1274,16 @@ i965_surface_render_pipeline_setup(VADriverContextP ctx)
i965_render_cs_urb_layout(ctx);
@@ -1327,13 +1317,16 @@ i965_surface_render_pipeline_setup(VADriverContextP ctx)
i965_render_constant_buffer(ctx);
i965_render_drawing_rectangle(ctx);
i965_render_vertex_elements(ctx);
- i965_render_startup(ctx);
@ -395,7 +397,7 @@ index c738d22..301d51d 100644
intel_batchbuffer_start_atomic(ctx, 0x1000);
intel_batchbuffer_emit_mi_flush(ctx);
i965_render_pipeline_select(ctx);
@@ -1303,7 +1296,8 @@ i965_subpic_render_pipeline_setup(VADriverContextP ctx)
@@ -1346,7 +1339,8 @@ i965_subpic_render_pipeline_setup(VADriverContextP ctx)
i965_render_cs_urb_layout(ctx);
i965_render_drawing_rectangle(ctx);
i965_render_vertex_elements(ctx);
@ -405,7 +407,7 @@ index c738d22..301d51d 100644
intel_batchbuffer_end_atomic(ctx);
}
@@ -1397,45 +1391,39 @@ i965_render_initialize(VADriverContextP ctx)
@@ -1440,45 +1434,39 @@ i965_render_initialize(VADriverContextP ctx)
void
i965_render_put_surface(VADriverContextP ctx,
VASurfaceID surface,
@ -471,7 +473,7 @@ index c738d22..301d51d 100644
intel_batchbuffer_flush(ctx);
}
diff --git a/i965_drv_video/i965_render.h b/i965_drv_video/i965_render.h
index e3dce02..d2e23f1 100644
index 2643285..d1052d4 100644
--- a/i965_drv_video/i965_render.h
+++ b/i965_drv_video/i965_render.h
@@ -28,6 +28,7 @@
@ -482,7 +484,7 @@ index e3dce02..d2e23f1 100644
#define MAX_RENDER_SURFACES 16
#define MAX_SAMPLERS 16
@@ -65,27 +66,20 @@ struct i965_render_state
@@ -70,27 +71,20 @@ struct i965_render_state
Bool i965_render_init(VADriverContextP ctx);
Bool i965_render_terminate(VADriverContextP ctx);

View File

@ -1,14 +1,36 @@
commit 1eb1e3e56d3c7a83aea7361a02167d382619fea8
commit e435677c2c9228eed9df09a41c8ffeedc5665401
Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
Date: Mon Mar 8 17:22:06 2010 +0100
[G45] Implement vaDeriveImage().
diff --git a/i965_drv_video/i965_drv_video.c b/i965_drv_video/i965_drv_video.c
index eb3b49d..98a824f 100644
index 8669a4e..aad947a 100644
--- a/i965_drv_video/i965_drv_video.c
+++ b/i965_drv_video/i965_drv_video.c
@@ -336,12 +336,27 @@ VAStatus i965_QueryConfigAttributes(VADriverContextP ctx,
@@ -66,19 +66,12 @@ i965_image_formats_map[I965_MAX_IMAGE_FORMATS + 1] = {
{ VA_FOURCC('Y','V','1','2'), VA_LSB_FIRST, 12, } },
};
-static const i965_image_format_map_t *
-get_image_format(const VAImageFormat *va_format)
+static const i965_image_format_map_t *get_image_format(unsigned int fourcc)
{
unsigned int i;
for (i = 0; i965_image_formats_map[i].type != 0; i++) {
const i965_image_format_map_t * const m = &i965_image_formats_map[i];
- if (m->va_format.fourcc == va_format->fourcc &&
- (m->type == I965_SURFACETYPE_RGBA ?
- (m->va_format.byte_order == va_format->byte_order &&
- m->va_format.red_mask == va_format->red_mask &&
- m->va_format.green_mask == va_format->green_mask &&
- m->va_format.blue_mask == va_format->blue_mask &&
- m->va_format.alpha_mask == va_format->alpha_mask) : 1))
+ if (m->va_format.fourcc == fourcc)
return m;
}
return NULL;
@@ -357,12 +350,27 @@ VAStatus i965_QueryConfigAttributes(VADriverContextP ctx,
return vaStatus;
}
@ -35,23 +57,9 @@ index eb3b49d..98a824f 100644
- dri_bo_unreference(obj_surface->bo);
obj_surface->bo = NULL;
object_heap_free(heap, obj);
}
@@ -358,6 +373,13 @@ i965_CreateSurfaces(VADriverContextP ctx,
int i;
VAStatus vaStatus = VA_STATUS_SUCCESS;
+ /* Internal format: linear I420 (compatible with YV12 VA image) */
+ static const VAImageFormat vaFormat = {
+ .fourcc = VA_FOURCC('Y','V','1','2'),
+ .byte_order = VA_LSB_FIRST,
+ .bits_per_pixel = 12
+ };
+
/* We only support one format */
if (VA_RT_FORMAT_YUV420 != format) {
return VA_STATUS_ERROR_UNSUPPORTED_RT_FORMAT;
@@ -366,28 +388,36 @@ i965_CreateSurfaces(VADriverContextP ctx,
if (obj_surface->free_private_data != NULL) {
@@ -393,6 +401,8 @@ i965_CreateSurfaces(VADriverContextP ctx,
for (i = 0; i < num_surfaces; i++) {
int surfaceID = NEW_SURFACE_ID();
struct object_surface *obj_surface = SURFACE(surfaceID);
@ -60,28 +68,11 @@ index eb3b49d..98a824f 100644
if (NULL == obj_surface) {
vaStatus = VA_STATUS_ERROR_ALLOCATION_FAILED;
break;
}
+ obj_image = i965_CreateImage_impl(ctx, &vaFormat, width, height, surfaceID);
+ if (!obj_image) {
+ vaStatus = VA_STATUS_ERROR_ALLOCATION_FAILED;
+ break;
+ }
+
+ obj_buffer = BUFFER(obj_image->image.buf);
+ if (!obj_buffer) {
+ vaStatus = VA_STATUS_ERROR_ALLOCATION_FAILED;
+ break;
+ }
+ assert(obj_buffer->buffer_store);
+
surfaces[i] = surfaceID;
obj_surface->status = VASurfaceReady;
@@ -404,19 +414,25 @@ i965_CreateSurfaces(VADriverContextP ctx,
obj_surface->subpic = VA_INVALID_ID;
obj_surface->width = width;
obj_surface->height = height;
obj_surface->size = SIZE_YUV420(width, height);
obj_surface->width = ALIGN(width, 16);
obj_surface->height = ALIGN(height, 16);
- obj_surface->size = SIZE_YUV420(obj_surface->width, obj_surface->height);
- obj_surface->bo = dri_bo_alloc(i965->intel.bufmgr,
- "vaapi surface",
- obj_surface->size,
@ -92,13 +83,29 @@ index eb3b49d..98a824f 100644
- vaStatus = VA_STATUS_ERROR_UNKNOWN;
- break;
- }
+ obj_surface->image = obj_image->image;
+ obj_surface->is_derived = 0;
obj_surface->private_data = NULL;
obj_surface->free_private_data = NULL;
+
+ obj_image = i965_CreateImage_impl(ctx, NULL, obj_surface->width, obj_surface->height, surfaceID);
+ if (!obj_image) {
+ vaStatus = VA_STATUS_ERROR_ALLOCATION_FAILED;
+ break;
+ }
+ obj_surface->size = obj_image->image.data_size;
+ obj_surface->image = obj_image->image;
+
+ obj_buffer = BUFFER(obj_image->image.buf);
+ if (!obj_buffer) {
+ vaStatus = VA_STATUS_ERROR_ALLOCATION_FAILED;
+ break;
+ }
+ assert(obj_buffer->buffer_store);
+ obj_surface->bo = obj_buffer->buffer_store->bo;
}
/* Error recovery */
@@ -417,6 +447,7 @@ i965_DestroySurfaces(VADriverContextP ctx,
@@ -446,6 +462,7 @@ i965_DestroySurfaces(VADriverContextP ctx,
struct object_surface *obj_surface = SURFACE(surface_list[i]);
assert(obj_surface);
@ -106,7 +113,7 @@ index eb3b49d..98a824f 100644
i965_destroy_surface(&i965->surface_heap, (struct object_base *)obj_surface);
}
@@ -1200,29 +1231,28 @@ i965_destroy_heap(struct object_heap *heap,
@@ -1289,46 +1306,22 @@ i965_destroy_heap(struct object_heap *heap,
VAStatus
i965_DestroyImage(VADriverContextP ctx, VAImageID image);
@ -116,6 +123,65 @@ index eb3b49d..98a824f 100644
- int width,
- int height,
- VAImage *out_image) /* out */
+static int
+setup_image_format(
+ VAImage *image,
+ unsigned int fourcc,
+ unsigned int width,
+ unsigned int height
+)
{
- struct i965_driver_data *i965 = i965_driver_data(ctx);
- struct object_image *obj_image;
- VAStatus va_status = VA_STATUS_ERROR_OPERATION_FAILED;
- VAImageID image_id;
unsigned int width2, height2, size2, size;
- out_image->image_id = VA_INVALID_ID;
- out_image->buf = VA_INVALID_ID;
-
- image_id = NEW_IMAGE_ID();
- if (image_id == VA_INVALID_ID)
- return VA_STATUS_ERROR_ALLOCATION_FAILED;
-
- obj_image = IMAGE(image_id);
- if (!obj_image)
- return VA_STATUS_ERROR_ALLOCATION_FAILED;
- obj_image->bo = NULL;
- obj_image->palette = NULL;
-
- VAImage * const image = &obj_image->image;
- image->image_id = image_id;
- image->buf = VA_INVALID_ID;
-
size = width * height;
width2 = (width + 1) / 2;
height2 = (height + 1) / 2;
size2 = width2 * height2;
- image->num_palette_entries = 0;
- image->entry_bytes = 0;
- memset(image->component_order, 0, sizeof(image->component_order));
-
- switch (format->fourcc) {
+ switch (fourcc) {
case VA_FOURCC('I','A','4','4'):
case VA_FOURCC('A','I','4','4'):
image->num_planes = 1;
@@ -1361,15 +1354,56 @@ i965_CreateImage(VADriverContextP ctx,
image->data_size = size + 2 * size2;
break;
default:
- goto error;
+ return 0;
}
+ return 1;
+}
- va_status = i965_CreateBuffer(ctx, 0, VAImageBufferType,
- image->data_size, 1, NULL, &image->buf);
- if (va_status != VA_STATUS_SUCCESS)
- goto error;
+static struct object_image *
+i965_CreateImage_impl(
+ VADriverContextP ctx,
@ -124,49 +190,63 @@ index eb3b49d..98a824f 100644
+ unsigned int height,
+ VASurfaceID surface
+)
{
struct i965_driver_data *i965 = i965_driver_data(ctx);
struct object_image *obj_image;
- VAStatus va_status = VA_STATUS_ERROR_OPERATION_FAILED;
VAImageID image_id;
unsigned int width2, height2, size2, size;
+{
+ struct i965_driver_data *i965 = i965_driver_data(ctx);
+ struct object_image *obj_image;
+ VAImageID image_id;
- out_image->image_id = VA_INVALID_ID;
- out_image->buf = VA_INVALID_ID;
-
image_id = NEW_IMAGE_ID();
if (image_id == VA_INVALID_ID)
- return VA_STATUS_ERROR_ALLOCATION_FAILED;
- obj_image->bo = BUFFER(image->buf)->buffer_store->bo;
+ image_id = NEW_IMAGE_ID();
+ if (image_id == VA_INVALID_ID)
+ return NULL;
obj_image = IMAGE(image_id);
if (!obj_image)
- return VA_STATUS_ERROR_ALLOCATION_FAILED;
+
+ obj_image = IMAGE(image_id);
+ if (!obj_image)
+ return NULL;
+ obj_image->surface = surface;
obj_image->bo = NULL;
obj_image->palette = NULL;
+ obj_image->bo = NULL;
+ obj_image->palette = NULL;
+
+ VAImage * const image = &obj_image->image;
+ image->image_id = image_id;
+ image->buf = VA_INVALID_ID;
+
+ image->num_palette_entries = 0;
+ image->entry_bytes = 0;
+ memset(image->component_order, 0, sizeof(image->component_order));
+
+ if (surface == VA_INVALID_ID) {
+ if (!setup_image_format(image, format->fourcc, width, height))
+ goto error;
+ image->format = *format;
+ }
+ else {
+ /* VA image format will be initialized through first vaDeriveImage() */
+ if (!setup_image_format(image, VA_FOURCC_YV12, width, height))
+ goto error;
+ memset(&image->format, 0, sizeof(image->format));
+ }
+ image->width = width;
+ image->height = height;
@@ -1275,9 +1305,9 @@ i965_CreateImage(VADriverContextP ctx,
goto error;
if (image->num_palette_entries > 0 && image->entry_bytes > 0) {
obj_image->palette = malloc(image->num_palette_entries * sizeof(obj_image->palette));
@@ -1377,25 +1411,66 @@ i965_CreateImage(VADriverContextP ctx,
goto error;
}
- va_status = i965_CreateBuffer(ctx, 0, VAImageBufferType,
- image->data_size, 1, NULL, &image->buf);
- if (va_status != VA_STATUS_SUCCESS)
- image->image_id = image_id;
- image->format = *format;
- image->width = width;
- image->height = height;
+ if (i965_CreateBuffer(ctx, 0, VAImageBufferType,
+ image->data_size, 1, NULL,
+ &image->buf) != VA_STATUS_SUCCESS)
goto error;
+ goto error;
obj_image->bo = BUFFER(image->buf)->buffer_store->bo;
@@ -1292,21 +1322,47 @@ i965_CreateImage(VADriverContextP ctx,
image->format = *format;
image->width = width;
image->height = height;
-
- *out_image = *image;
- return VA_STATUS_SUCCESS;
+ obj_image->bo = BUFFER(image->buf)->buffer_store->bo;
+ return obj_image;
error:
@ -200,6 +280,7 @@ index eb3b49d..98a824f 100644
- /* TODO */
- return VA_STATUS_ERROR_OPERATION_FAILED;
+ struct i965_driver_data *i965 = i965_driver_data(ctx);
+ struct i965_render_state *render_state = &i965->render_state;
+
+ struct object_surface *obj_surface = SURFACE(surface);
+ if (!obj_surface)
@ -209,13 +290,25 @@ index eb3b49d..98a824f 100644
+ if (!obj_image)
+ return VA_STATUS_ERROR_INVALID_IMAGE;
+
+ obj_surface->is_derived = 1;
+ if (!obj_surface->is_derived) {
+ /* Reset VA image format on each call so that a VA surface can
+ be re-used with another context (and internal surface format) */
+ VAImage * const image = &obj_surface->image;
+ const i965_image_format_map_t *m;
+ m = get_image_format(render_state->interleaved_uv ? VA_FOURCC_NV12 : VA_FOURCC_YV12);
+ if (!m)
+ return VA_STATUS_ERROR_OPERATION_FAILED;
+ if (!setup_image_format(image, m->va_format.fourcc, image->width, image->height))
+ return VA_STATUS_ERROR_OPERATION_FAILED;
+ image->format = m->va_format;
+ obj_surface->is_derived = 1;
+ }
+ *image = obj_surface->image;
+ return VA_STATUS_SUCCESS;
}
static void
@@ -1315,15 +1371,24 @@ i965_destroy_image(struct object_heap *heap, struct object_base *obj)
@@ -1404,15 +1479,24 @@ i965_destroy_image(struct object_heap *heap, struct object_base *obj)
object_heap_free(heap, obj);
}
@ -246,7 +339,7 @@ index eb3b49d..98a824f 100644
if (obj_image->image.buf != VA_INVALID_ID) {
i965_DestroyBuffer(ctx, obj_image->image.buf);
@@ -1336,6 +1401,15 @@ i965_DestroyImage(VADriverContextP ctx, VAImageID image)
@@ -1425,6 +1509,15 @@ i965_DestroyImage(VADriverContextP ctx, VAImageID image)
}
i965_destroy_image(&i965->image_heap, (struct object_base *)obj_image);
@ -262,7 +355,7 @@ index eb3b49d..98a824f 100644
return VA_STATUS_SUCCESS;
}
@@ -1382,6 +1456,9 @@ i965_GetImage(VADriverContextP ctx,
@@ -1472,6 +1565,9 @@ i965_GetImage(VADriverContextP ctx,
if (!obj_surface)
return VA_STATUS_ERROR_INVALID_SURFACE;
@ -272,7 +365,7 @@ index eb3b49d..98a824f 100644
struct object_image *obj_image = IMAGE(image);
if (!obj_image)
return VA_STATUS_ERROR_INVALID_IMAGE;
@@ -1441,6 +1518,9 @@ i965_PutImage(VADriverContextP ctx,
@@ -1535,6 +1631,9 @@ i965_PutImage(VADriverContextP ctx,
if (!obj_surface)
return VA_STATUS_ERROR_INVALID_SURFACE;
@ -283,19 +376,19 @@ index eb3b49d..98a824f 100644
if (!obj_image)
return VA_STATUS_ERROR_INVALID_IMAGE;
diff --git a/i965_drv_video/i965_drv_video.h b/i965_drv_video/i965_drv_video.h
index be253ed..7f410ab 100644
index 0a839e6..c05ed34 100644
--- a/i965_drv_video/i965_drv_video.h
+++ b/i965_drv_video/i965_drv_video.h
@@ -96,6 +96,8 @@ struct object_surface
@@ -102,6 +102,8 @@ struct object_surface
int width;
int height;
int size;
+ VAImage image;
+ int is_derived;
dri_bo *bo;
};
@@ -113,6 +115,7 @@ struct object_image
void (*free_private_data)(void **data);
void *private_data;
@@ -121,6 +123,7 @@ struct object_image
{
struct object_base base;
VAImage image;

View File

@ -1,11 +1,11 @@
commit 0b18b60ccc4df5e2dc30ad301451c3bd8b55b49d
commit c6912e0d320c1692cd4331ec90193a96e6ef21fe
Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
Date: Thu Mar 18 12:25:20 2010 +0100
[G45] Add I420 image format.
diff --git a/i965_drv_video/i965_drv_video.c b/i965_drv_video/i965_drv_video.c
index 98a824f..7b3a206 100644
index d5b88d0..ddb9ae9 100644
--- a/i965_drv_video/i965_drv_video.c
+++ b/i965_drv_video/i965_drv_video.c
@@ -64,6 +64,8 @@ static const i965_image_format_map_t
@ -17,7 +17,7 @@ index 98a824f..7b3a206 100644
};
static const i965_image_format_map_t *
@@ -1301,6 +1303,16 @@ i965_CreateImage_impl(
@@ -1390,6 +1392,16 @@ i965_CreateImage_impl(
image->offsets[2] = size;
image->data_size = size + 2 * size2;
break;
@ -34,28 +34,30 @@ index 98a824f..7b3a206 100644
default:
goto error;
}
@@ -1485,7 +1497,8 @@ i965_GetImage(VADriverContextP ctx,
@@ -1575,7 +1587,9 @@ i965_GetImage(VADriverContextP ctx,
dri_bo_map(obj_surface->bo, 0);
switch (obj_image->image.format.fourcc) {
- case VA_FOURCC('Y','V','1','2'): /* YV12 is native format here */
+ case VA_FOURCC('Y','V','1','2'):
+ case VA_FOURCC('I','4','2','0'): /* I420 is native format here */
+ case VA_FOURCC('I','4','2','0'):
+ /* I420 is native format for MPEG-2 decoded surfaces */
if (render_state->interleaved_uv)
goto operation_failed;
memcpy(image_data, obj_surface->bo->virtual, obj_surface->bo->size);
break;
default:
@@ -1550,7 +1563,8 @@ i965_PutImage(VADriverContextP ctx,
@@ -1644,7 +1658,9 @@ i965_PutImage(VADriverContextP ctx,
dri_bo_map(obj_surface->bo, 1);
switch (obj_image->image.format.fourcc) {
- case VA_FOURCC('Y','V','1','2'): /* YV12 is native format here */
+ case VA_FOURCC('Y','V','1','2'):
+ case VA_FOURCC('I','4','2','0'): /* I420 is native format here */
+ case VA_FOURCC('I','4','2','0'):
+ /* I420 is native format for MPEG-2 decoded surfaces */
if (render_state->interleaved_uv)
goto operation_failed;
memcpy(obj_surface->bo->virtual, image_data, obj_surface->bo->size);
break;
default:
diff --git a/i965_drv_video/i965_drv_video.h b/i965_drv_video/i965_drv_video.h
index 7f410ab..9e5707b 100644
index c05ed34..f2a20f2 100644
--- a/i965_drv_video/i965_drv_video.h
+++ b/i965_drv_video/i965_drv_video.h
@@ -43,7 +43,7 @@

View File

@ -0,0 +1,35 @@
commit acd21062fe185d9c49df3d493955343e5fb52783
Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
Date: Mon Apr 19 14:01:55 2010 +0200
[G45] Don't export internal symbols as they can be mixed up with
those from the system i965_dri.so.
diff --git a/i965_drv_video/Makefile.am b/i965_drv_video/Makefile.am
index 88b5590..6421107 100644
--- a/i965_drv_video/Makefile.am
+++ b/i965_drv_video/Makefile.am
@@ -22,7 +22,7 @@
SUBDIRS = shaders
-AM_CFLAGS = -Wall -I$(top_srcdir)/va -I$(top_srcdir)/va/x11 @DRM_CFLAGS@
+AM_CFLAGS = -Wall -I$(top_srcdir)/va -I$(top_srcdir)/va/x11 @DRM_CFLAGS@ -fvisibility=hidden
i965_drv_video_la_LTLIBRARIES = i965_drv_video.la
i965_drv_video_ladir = @LIBVA_DRIVERS_PATH@
diff --git a/i965_drv_video/i965_drv_video.c b/i965_drv_video/i965_drv_video.c
index 7b3a206..f0c3bc1 100644
--- a/i965_drv_video/i965_drv_video.c
+++ b/i965_drv_video/i965_drv_video.c
@@ -1706,6 +1706,10 @@ i965_Terminate(VADriverContextP ctx)
VAStatus
__vaDriverInit_0_31( VADriverContextP ctx )
+ __attribute__((__visibility__("default")));
+
+VAStatus
+__vaDriverInit_0_31( VADriverContextP ctx )
{
struct i965_driver_data *i965;
int result;

View File

@ -0,0 +1,73 @@
commit 3e0d91566ca828f0a40013704a90369a11a631ef
Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
Date: Wed Apr 28 15:27:21 2010 +0200
[G45] Add NV12 image format.
diff --git a/i965_drv_video/i965_drv_video.c b/i965_drv_video/i965_drv_video.c
index ddb9ae9..f2f4c25 100644
--- a/i965_drv_video/i965_drv_video.c
+++ b/i965_drv_video/i965_drv_video.c
@@ -66,6 +66,8 @@ i965_image_formats_map[I965_MAX_IMAGE_FORMATS + 1] = {
{ VA_FOURCC('Y','V','1','2'), VA_LSB_FIRST, 12, } },
{ I965_SURFACETYPE_YUV,
{ VA_FOURCC('I','4','2','0'), VA_LSB_FIRST, 12, } },
+ { I965_SURFACETYPE_YUV,
+ { VA_FOURCC('N','V','1','2'), VA_LSB_FIRST, 12, } },
};
static const i965_image_format_map_t *
@@ -1402,6 +1404,14 @@ i965_CreateImage_impl(
image->offsets[2] = size + size2;
image->data_size = size + 2 * size2;
break;
+ case VA_FOURCC('N','V','1','2'):
+ image->num_planes = 2;
+ image->pitches[0] = width;
+ image->offsets[0] = 0;
+ image->pitches[1] = width;
+ image->offsets[1] = size;
+ image->data_size = size + 2 * size2;
+ break;
default:
goto error;
}
@@ -1594,6 +1604,12 @@ i965_GetImage(VADriverContextP ctx,
goto operation_failed;
memcpy(image_data, obj_surface->bo->virtual, obj_surface->bo->size);
break;
+ case VA_FOURCC('N','V','1','2'):
+ /* NV12 is native format for H.264 decoded surfaces */
+ if (!render_state->interleaved_uv)
+ goto operation_failed;
+ memcpy(image_data, obj_surface->bo->virtual, obj_surface->bo->size);
+ break;
default:
operation_failed:
va_status = VA_STATUS_ERROR_OPERATION_FAILED;
@@ -1665,6 +1681,12 @@ i965_PutImage(VADriverContextP ctx,
goto operation_failed;
memcpy(obj_surface->bo->virtual, image_data, obj_surface->bo->size);
break;
+ case VA_FOURCC('N','V','1','2'):
+ /* NV12 is native format for H.264 decoded surfaces */
+ if (!render_state->interleaved_uv)
+ goto operation_failed;
+ memcpy(obj_surface->bo->virtual, image_data, obj_surface->bo->size);
+ break;
default:
operation_failed:
va_status = VA_STATUS_ERROR_OPERATION_FAILED;
diff --git a/i965_drv_video/i965_drv_video.h b/i965_drv_video/i965_drv_video.h
index f2a20f2..d762a47 100644
--- a/i965_drv_video/i965_drv_video.h
+++ b/i965_drv_video/i965_drv_video.h
@@ -43,7 +43,7 @@
#define I965_MAX_PROFILES 11
#define I965_MAX_ENTRYPOINTS 5
#define I965_MAX_CONFIG_ATTRIBUTES 10
-#define I965_MAX_IMAGE_FORMATS 2
+#define I965_MAX_IMAGE_FORMATS 3
#define I965_MAX_SUBPIC_FORMATS 4
#define I965_MAX_DISPLAY_ATTRIBUTES 4
#define I965_STR_VENDOR "i965 Driver 0.1"

View File

@ -1,6 +1,6 @@
commit acf3ec6b5176bf4cd09136a1d8c9bc3ff63f9d4e
commit 80ae27a4546b90faaa29bd3e77f5fa91a89b1b16
Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
Date: Sun Apr 4 08:06:59 2010 +0200
Date: Tue Apr 13 04:54:11 2010 +0200
Add OpenGL extensions (v3) and generic implementation with TFP and FBO.
@ -417,10 +417,10 @@ index 0000000..1a0624d
+#endif /* VA_GLX_H */
diff --git a/va/glx/va_glx_impl.c b/va/glx/va_glx_impl.c
new file mode 100644
index 0000000..7c26648
index 0000000..adc4560
--- /dev/null
+++ b/va/glx/va_glx_impl.c
@@ -0,0 +1,1050 @@
@@ -0,0 +1,1078 @@
+/*
+ * Copyright (C) 2009 Splitted-Desktop Systems. All Rights Reserved.
+ *
@ -714,7 +714,6 @@ index 0000000..7c26648
+struct OpenGLContextState {
+ Display *display;
+ Window window;
+ XVisualInfo *visual;
+ GLXContext context;
+};
+
@ -724,11 +723,6 @@ index 0000000..7c26648
+ if (!cs)
+ return;
+
+ if (cs->visual) {
+ XFree(cs->visual);
+ cs->visual = NULL;
+ }
+
+ if (cs->display && cs->context) {
+ if (glXGetCurrentContext() == cs->context)
+ glXMakeCurrent(cs->display, None, NULL);
@ -744,15 +738,16 @@ index 0000000..7c26648
+{
+ OpenGLContextStateP cs;
+ GLXFBConfig *fbconfigs = NULL;
+ int n_fbconfigs;
+ int fbconfig_id, val, n, n_fbconfigs;
+ Status status;
+
+ static GLint fbconfig_attrs[] = {
+ GLX_DRAWABLE_TYPE, GLX_WINDOW_BIT,
+ GLX_RENDER_TYPE, GLX_RGBA_BIT,
+ GLX_DOUBLEBUFFER, True,
+ GLX_RED_SIZE, 1,
+ GLX_GREEN_SIZE, 1,
+ GLX_BLUE_SIZE, 1,
+ GLX_RED_SIZE, 8,
+ GLX_GREEN_SIZE, 8,
+ GLX_BLUE_SIZE, 8,
+ None
+ };
+
@ -762,25 +757,58 @@ index 0000000..7c26648
+
+ cs->display = ctx->x11_dpy;
+ cs->window = parent ? parent->window : None;
+ cs->visual = NULL;
+ cs->context = NULL;
+
+ fbconfigs = glXChooseFBConfig(
+ ctx->x11_dpy,
+ ctx->x11_screen,
+ fbconfig_attrs,
+ &n_fbconfigs
+ );
+ if (!fbconfigs)
+ goto error;
+ if (parent && parent->context) {
+ status = glXQueryContext(
+ parent->display,
+ parent->context,
+ GLX_FBCONFIG_ID, &fbconfig_id
+ );
+ if (status != Success)
+ goto error;
+
+ cs->visual = glXGetVisualFromFBConfig(ctx->x11_dpy, fbconfigs[0]);
+ if (!cs->visual)
+ goto error;
+ if (fbconfig_id == GLX_DONT_CARE)
+ goto choose_fbconfig;
+
+ fbconfigs = glXGetFBConfigs(
+ ctx->x11_dpy,
+ ctx->x11_screen,
+ &n_fbconfigs
+ );
+ if (!fbconfigs)
+ goto error;
+
+ /* Find out a GLXFBConfig compatible with the parent context */
+ for (n = 0; n < n_fbconfigs; n++) {
+ status = glXGetFBConfigAttrib(
+ ctx->x11_dpy,
+ fbconfigs[n],
+ GLX_FBCONFIG_ID, &val
+ );
+ if (status == Success && val == fbconfig_id)
+ break;
+ }
+ if (n == n_fbconfigs)
+ goto error;
+ }
+ else {
+ choose_fbconfig:
+ fbconfigs = glXChooseFBConfig(
+ ctx->x11_dpy,
+ ctx->x11_screen,
+ fbconfig_attrs, &n_fbconfigs
+ );
+ if (!fbconfigs)
+ goto error;
+
+ /* Select the first one */
+ n = 0;
+ }
+
+ cs->context = glXCreateNewContext(
+ ctx->x11_dpy,
+ fbconfigs[0],
+ fbconfigs[n],
+ GLX_RGBA_TYPE,
+ parent ? parent->context : NULL,
+ True

View File

@ -1,4 +1,4 @@
commit 94db34ae392a7787afac9087799bb0421c844b83
commit 66831a1b979798ee34bb379d2d2a5163dc65c62e
Author: Gwenole Beauchesne <gbeauchesne@splitted-desktop.com>
Date: Wed Jun 24 11:40:56 2009 +0000
@ -12,10 +12,10 @@ diff --git a/va/va_backend.h b/va/va_backend.h
index 06fef7f..9cf8911 100644
diff --git a/va/va_compat.c b/va/va_compat.c
new file mode 100644
index 0000000..af43188
index 0000000..c47428c
--- /dev/null
+++ b/va/va_compat.c
@@ -0,0 +1,1178 @@
@@ -0,0 +1,1184 @@
+/*
+ * Copyright (C) 2009 Splitted-Desktop Systems. All Rights Reserved.
+ *
@ -366,12 +366,18 @@ index 0000000..af43188
+ /* XXX: this allocation strategy is not really space efficient... */
+ if (index >= compat->buffers_count_max)
+ {
+ compat->buffers_count_max = index + 1;
+ compat->buffers = realloc(compat->buffers,
+ (compat->buffers_count_max *
+ sizeof(VABufferCompat)));
+ compat->buffers = realloc(
+ compat->buffers,
+ ((index + 1) * sizeof(VABufferCompat))
+ );
+ if (compat->buffers == NULL)
+ return VA_STATUS_ERROR_ALLOCATION_FAILED;
+ memset(
+ &compat->buffers[compat->buffers_count_max],
+ 0,
+ (index + 1 - compat->buffers_count_max) * sizeof(compat->buffers[0])
+ );
+ compat->buffers_count_max = index + 1;
+ }
+
+ compat_buffer = &compat->buffers[index];
@ -1166,7 +1172,7 @@ index 0000000..af43188
+ {
+ for (i = 0; i < compat->buffers_count_max; i++)
+ {
+ if (compat->buffers[i].id)
+ if (compat->buffers[i].id && compat->buffers[i].size > 0)
+ va_DestroyBufferCompat(ctx, compat->buffers[i].id);
+ }
+ free(compat->buffers);

View File

@ -3,6 +3,7 @@
. config/options
$SCRIPTS/install libX11
[ "$DEVTOOLS" = yes ] && $SCRIPTS/install vdpauinfo
mkdir -p $INSTALL/usr/lib
cp -P $PKG_BUILD/src/.libs/libvdpau.so* $INSTALL/usr/lib

View File

@ -3,7 +3,6 @@
. config/options
$SCRIPTS/build toolchain
$SCRIPTS/build libvdpau
cd $PKG_BUILD
./configure --host=$TARGET_NAME \

View File

@ -2,7 +2,5 @@
. config/options
$SCRIPTS/install libvdpau
mkdir -p $INSTALL/usr/bin
cp $PKG_BUILD/$1 $INSTALL/usr/bin

View File

@ -1,7 +1,31 @@
#!/bin/sh
################################################################################
# Copyright (C) 2009-2010 OpenELEC.tv
# http://www.openelec.tv
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This Program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
# start Avahi Daemon
#
# runlevels: openelec, textmode
. /etc/profile
(
progress "Starting Avahi Daemon"

View File

@ -1,6 +1,26 @@
#!/bin/sh
# udhcpc script edited by Tim Riker <Tim@Rikers.org>
################################################################################
# Copyright (C) 2009-2010 OpenELEC.tv
# http://www.openelec.tv
#
# udhcpc script edited by Tim Riker <Tim@Rikers.org>
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This Program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
[ -z "$1" ] && echo "Error: should be called from udhcpc" && exit 1
@ -35,6 +55,8 @@ case "$1" in
:
done
echo >/var/run/udhcpc
for i in $router ; do
route add default gw $i dev $interface
done

View File

@ -1,5 +1,25 @@
#!/bin/sh
################################################################################
# Copyright (C) 2009-2010 OpenELEC.tv
# http://www.openelec.tv
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This Program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
case "$1" in
deconfig)
ifconfig $interface 0.0.0.0

View File

@ -44,7 +44,7 @@ cd $PKG_BUILD
--disable-gtk-doc \
--disable-openconnect \
--disable-google \
--enable-meego \
--disable-meego \
--enable-test \
--disable-capng \

View File

@ -1,7 +1,31 @@
#!/bin/sh
################################################################################
# Copyright (C) 2009-2010 OpenELEC.tv
# http://www.openelec.tv
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This Program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
# start connman network manager
#
# runlevels: openelec, textmode
. /etc/profile
progress "Starting Connection Manager"
$IONICE mkdir -p /var/run

View File

@ -5,7 +5,9 @@
$SCRIPTS/install libnl
$SCRIPTS/install dbus
$SCRIPTS/install udev
$SCRIPTS/install Python
$SCRIPTS/install dbus-python
$SCRIPTS/install pygobject
#$SCRIPTS/install bluez
$SCRIPTS/install wpa_supplicant
@ -18,16 +20,8 @@ mkdir -p $INSTALL/usr/sbin
cp -P $PKG_BUILD/src/connmand $INSTALL/usr/sbin
mkdir -p $INSTALL/usr/bin
cp -P $PKG_BUILD/client/cm $INSTALL/usr/bin
mkdir -p $INSTALL/usr/bin/connman
cp -P $PKG_BUILD/tools/addr-test $INSTALL/usr/bin/connman
cp -P $PKG_BUILD/tools/dbus-test $INSTALL/usr/bin/connman
cp -P $PKG_BUILD/tools/polkit-test $INSTALL/usr/bin/connman
cp -P $PKG_BUILD/tools/portal-test $INSTALL/usr/bin/connman
cp -P $PKG_BUILD/tools/supplicant-test $INSTALL/usr/bin/connman
cp -P $PKG_BUILD/tools/tap-test $INSTALL/usr/bin/connman
cp -P $PKG_BUILD/tools/wifi-scan $INSTALL/usr/bin/connman
cp -P $PKG_BUILD/client/cmc $INSTALL/usr/bin
chmod +x $INSTALL/usr/bin/cmc
mkdir -p $INSTALL/usr/lib/connman/plugins
cp -P $PKG_BUILD/plugins/.libs/*.so $INSTALL/usr/lib/connman/plugins
@ -35,8 +29,19 @@ mkdir -p $INSTALL/usr/lib/connman/plugins
mkdir -p $INSTALL/usr/lib/connman/scripts
cp -P $PKG_BUILD/scripts/udhcpc-script $INSTALL/usr/lib/connman/scripts
mkdir -p $INSTALL/usr/lib/connman/test
cp -P $PKG_BUILD/test/* $INSTALL/usr/lib/connman/test
mkdir -p $INSTALL/etc/dbus-1/system.d
cp -P $PKG_BUILD/src/connman.conf $INSTALL/etc/dbus-1/system.d
if [ "$DEVTOOLS" = yes ]; then
mkdir -p $INSTALL/usr/bin/connman
cp $PKG_BUILD/tools/addr-test $INSTALL/usr/bin/connman
cp $PKG_BUILD/tools/dbus-test $INSTALL/usr/bin/connman
cp $PKG_BUILD/tools/polkit-test $INSTALL/usr/bin/connman
cp $PKG_BUILD/tools/portal-test $INSTALL/usr/bin/connman
cp $PKG_BUILD/tools/supplicant-test $INSTALL/usr/bin/connman
cp $PKG_BUILD/tools/tap-test $INSTALL/usr/bin/connman
cp $PKG_BUILD/tools/wifi-scan $INSTALL/usr/bin/connman
mkdir -p $INSTALL/usr/lib/connman/test
cp $PKG_BUILD/test/* $INSTALL/usr/lib/connman/test
fi

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,31 @@
#!/bin/sh
################################################################################
# Copyright (C) 2009-2010 OpenELEC.tv
# http://www.openelec.tv
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This Program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
# start ssh server
#
# runlevels: openelec, textmode
. /etc/profile
(
# Check for the Dropbear RSA key
if [ ! -f /storage/.cache/dropbear/dropbear_rsa_host_key ] ; then

View File

@ -4,5 +4,6 @@
$SCRIPTS/install connman
$SCRIPTS/install dropbear
#$SCRIPTS/install wicd
$SCRIPTS/install wireless_tools
$SCRIPTS/install wpa_supplicant

View File

@ -1,7 +1,31 @@
#!/bin/sh
################################################################################
# Copyright (C) 2009-2010 OpenELEC.tv
# http://www.openelec.tv
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This Program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
# start Samba Server
#
# runlevels: openelec, textmode
. /etc/profile
(
progress "Starting Samba server"

24
packages/network/transmission/init.d/43_transmission Normal file → Executable file
View File

@ -1,7 +1,31 @@
#!/bin/sh
################################################################################
# Copyright (C) 2009-2010 OpenELEC.tv
# http://www.openelec.tv
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This Program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
# start transmission bt daemon
#
# runlevels: openelec, textmode
. /etc/profile
[ -f /storage/.config/transmission.conf ] && . /storage/.config/transmission.conf || exit 0
(

32
packages/network/wicd/build Executable file
View File

@ -0,0 +1,32 @@
#!/bin/sh
. config/options
$SCRIPTS/build toolchain
$SCRIPTS/build Python
$SCRIPTS/build pygobject
$SCRIPTS/build dbus-python
. config/options.python
cd $PKG_BUILD
$PYTHON setup.py configure
$PYTHON setup.py build
$PYTHON setup.py install -O1 --skip-build --prefix /usr --root .install
#find .install -name "*.py" -exec rm -rf "{}" ";"
#find .install -name "*.pyo" -exec rm -rf "{}" ";"
#rm -rf .install/usr/bin
rm -rf .install/etc/acpi
rm -rf .install/etc/rc.d
rm -rf .install/etc/xdg
rm -rf .install/usr/share/applications
rm -rf .install/usr/share/doc
rm -rf .install/usr/share/icons
#rm -rf .install/usr/share/locale
rm -rf .install/usr/share/man
rm -rf .install/usr/share/pixmaps
rm -rf .install/var

Some files were not shown because too many files have changed in this diff Show More