rpms/kernel/F-8 linux-2.6-ppc32-ucmpdi2.patch, 1.2, 1.3 linux-2.6-uvcvideo.patch, NONE, 1.1 kernel.spec, 1.348, 1.349

Chuck Ebbert (cebbert) fedora-extras-commits at redhat.com
Sat Feb 16 00:48:26 UTC 2008


Author: cebbert

Update of /cvs/pkgs/rpms/kernel/F-8
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv1604

Modified Files:
	kernel.spec 
Added Files:
	linux-2.6-ppc32-ucmpdi2.patch linux-2.6-uvcvideo.patch 
Log Message:
* Fri Feb 15 2008 Chuck Ebbert <cebbert at redhat.com> 2.6.24.2-3
- Restore missing ppc32 patch.
- Add USB video camera (UVC) drivers.


linux-2.6-ppc32-ucmpdi2.patch:

Index: linux-2.6-ppc32-ucmpdi2.patch
===================================================================
RCS file: linux-2.6-ppc32-ucmpdi2.patch
diff -N linux-2.6-ppc32-ucmpdi2.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ linux-2.6-ppc32-ucmpdi2.patch	16 Feb 2008 00:47:57 -0000	1.3
@@ -0,0 +1,49 @@
+Without this diff, nouveau doesn't build on ppc32.
+It works around a gcc bug. (PR #25724 / #21237)
+
+Hopefully we can just drop this when we move to gcc4.3
+
+--- linux-2.6.19.ppc/arch/powerpc/kernel/misc_32.S~	2006-11-29 21:57:37.000000000 +0000
++++ linux-2.6.19.ppc/arch/powerpc/kernel/misc_32.S	2006-12-17 12:19:48.000000000 +0000
+@@ -728,6 +728,27 @@ _GLOBAL(__lshrdi3)
+ 	or	r4,r4,r7	# LSW |= t2
+ 	blr
+ 
++/*
++ * __ucmpdi2: 64-bit comparison
++ *
++ * R3/R4 has 64 bit value A
++ * R5/R6 has 64 bit value B
++ * result in R3: 0 for A < B
++ *		 1 for A == B
++ *		 2 for A > B
++ */
++_GLOBAL(__ucmpdi2)
++	cmplw	r7,r3,r5	# compare high words
++	li	r3,0
++	blt	r7,2f		# a < b ... return 0
++	bgt	r7,1f		# a > b ... return 2
++	cmplw	r6,r4,r6	# compare low words
++	blt	r6,2f		# a < b ... return 0
++	li	r3,1
++	ble	r6,2f		# a = b ... return 1
++1:	li	r3,2
++2:	blr
++
+ _GLOBAL(abs)
+ 	srawi	r4,r3,31
+ 	xor	r3,r3,r4
+--- linux-2.6.19.ppc/arch/powerpc/kernel/ppc_ksyms.c~	2006-12-15 17:19:56.000000000 +0000
++++ linux-2.6.19.ppc/arch/powerpc/kernel/ppc_ksyms.c	2006-12-17 12:16:54.000000000 +0000
+@@ -161,9 +161,11 @@ EXPORT_SYMBOL(to_tm);
+ long long __ashrdi3(long long, int);
+ long long __ashldi3(long long, int);
+ long long __lshrdi3(long long, int);
++int __ucmpdi2(uint64_t, uint64_t);
+ EXPORT_SYMBOL(__ashrdi3);
+ EXPORT_SYMBOL(__ashldi3);
+ EXPORT_SYMBOL(__lshrdi3);
++EXPORT_SYMBOL(__ucmpdi2);
+ #endif
+ 
+ EXPORT_SYMBOL(memcpy);

linux-2.6-uvcvideo.patch:

--- NEW FILE linux-2.6-uvcvideo.patch ---
diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig
index c9f14bf..19acd71 100644
--- a/drivers/media/video/Kconfig
+++ b/drivers/media/video/Kconfig
@@ -718,6 +718,7 @@ source "drivers/media/video/em28xx/Kconfig"
 source "drivers/media/video/usbvision/Kconfig"
 
 source "drivers/media/video/usbvideo/Kconfig"
+source "drivers/media/video/uvcvideo/Kconfig"
 
 source "drivers/media/video/et61x251/Kconfig"
 
diff --git a/drivers/media/video/Makefile b/drivers/media/video/Makefile
index b5a0641..91033cf 100644
--- a/drivers/media/video/Makefile
+++ b/drivers/media/video/Makefile
@@ -123,6 +123,8 @@ obj-$(CONFIG_USB_KONICAWC)      += usbvideo/
 obj-$(CONFIG_USB_VICAM)         += usbvideo/
 obj-$(CONFIG_USB_QUICKCAM_MESSENGER)	+= usbvideo/
 
+obj-$(CONFIG_USB_UVCVIDEO)	+= uvcvideo/
+
 obj-$(CONFIG_VIDEO_IVTV) += ivtv/
 
 obj-$(CONFIG_VIDEO_VIVI) += vivi.o
diff --git a/drivers/media/video/uvcvideo/Kconfig b/drivers/media/video/uvcvideo/Kconfig
new file mode 100644
index 0000000..dccaab7
--- /dev/null
+++ b/drivers/media/video/uvcvideo/Kconfig
@@ -0,0 +1,7 @@
+config USB_UVCVIDEO
+	tristate "USB Video class device (uvcvideo) driver"
+	---help---
+	Say M or Y here to enable support for USB video devices that
+	conform to the USB video class device specification.
+	.
+	If unsure, jump up and down and look confused.
diff --git a/drivers/media/video/uvcvideo/Makefile b/drivers/media/video/uvcvideo/Makefile
new file mode 100644
index 0000000..ada681c
--- /dev/null
+++ b/drivers/media/video/uvcvideo/Makefile
@@ -0,0 +1,2 @@
+obj-$(CONFIG_USB_UVCVIDEO)	:= uvcvideo.o
+uvcvideo-objs   := uvc_driver.o uvc_queue.o uvc_v4l2.o uvc_video.o uvc_ctrl.o uvc_status.o uvc_isight.o
diff --git a/drivers/media/video/uvcvideo/uvc_compat.h b/drivers/media/video/uvcvideo/uvc_compat.h
new file mode 100644
index 0000000..321f3d3
--- /dev/null
+++ b/drivers/media/video/uvcvideo/uvc_compat.h
@@ -0,0 +1,263 @@
+#ifndef _UVC_COMPAT_H
+#define _UVC_COMPAT_H
+
+#include <linux/version.h>
+
+#ifndef __KERNEL__
+#ifndef __user
+#define __user
+#endif
+#endif
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)
+/*
+ * Extended control API
+ */
+struct v4l2_ext_control
+{
+	__u32 id;
+	__u32 reserved2[2];
+	union {
+		__s32 value;
+		__s64 value64;
+		void *reserved;
+	};
+} __attribute__ ((packed));
+
+struct v4l2_ext_controls
+{
+	__u32 ctrl_class;
+	__u32 count;
+	__u32 error_idx;
+	__u32 reserved[2];
+	struct v4l2_ext_control *controls;
+};
+
+/* Values for ctrl_class field */
+#define V4L2_CTRL_CLASS_USER		0x00980000	/* Old-style 'user' controls */
+#define V4L2_CTRL_CLASS_MPEG		0x00990000	/* MPEG-compression controls */
+
+#define V4L2_CTRL_ID_MASK		(0x0fffffff)
+#define V4L2_CTRL_ID2CLASS(id)		((id) & 0x0fff0000UL)
+#define V4L2_CTRL_DRIVER_PRIV(id)	(((id) & 0xffff) >= 0x1000)
+
+/* Control flags */
+#define V4L2_CTRL_FLAG_READ_ONLY	0x0004
+#define V4L2_CTRL_FLAG_UPDATE		0x0008
+#define V4L2_CTRL_FLAG_INACTIVE		0x0010
+#define V4L2_CTRL_FLAG_SLIDER		0x0020
+
+/* Query flags, to be ORed with the control ID */
+#define V4L2_CTRL_FLAG_NEXT_CTRL	0x80000000
+
+/* User-class control IDs defined by V4L2 */
+#undef	V4L2_CID_BASE
+#define V4L2_CID_BASE			(V4L2_CTRL_CLASS_USER | 0x900)
+#define V4L2_CID_USER_BASE		V4L2_CID_BASE
+#define V4L2_CID_USER_CLASS		(V4L2_CTRL_CLASS_USER | 1)
+	
+#define VIDIOC_G_EXT_CTRLS		_IOWR ('V', 71, struct v4l2_ext_controls)
+#define VIDIOC_S_EXT_CTRLS		_IOWR ('V', 72, struct v4l2_ext_controls)
+#define VIDIOC_TRY_EXT_CTRLS		_IOWR ('V', 73, struct v4l2_ext_controls)
+
+#endif
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
+/*
+ * Frame size and frame rate enumeration
+ *
+ * Included in Linux 2.6.19
+ */
+enum v4l2_frmsizetypes
+{
+	V4L2_FRMSIZE_TYPE_DISCRETE	= 1,
+	V4L2_FRMSIZE_TYPE_CONTINUOUS	= 2,
+	V4L2_FRMSIZE_TYPE_STEPWISE	= 3,
+};
+
+struct v4l2_frmsize_discrete
+{
+	__u32			width;		/* Frame width [pixel] */
+	__u32			height;		/* Frame height [pixel] */
+};
+
+struct v4l2_frmsize_stepwise
+{
+	__u32			min_width;	/* Minimum frame width [pixel] */
+	__u32			max_width;	/* Maximum frame width [pixel] */
+	__u32			step_width;	/* Frame width step size [pixel] */
+	__u32			min_height;	/* Minimum frame height [pixel] */
+	__u32			max_height;	/* Maximum frame height [pixel] */
+	__u32			step_height;	/* Frame height step size [pixel] */
+};
+
+struct v4l2_frmsizeenum
+{
+	__u32			index;		/* Frame size number */
+	__u32			pixel_format;	/* Pixel format */
+	__u32			type;		/* Frame size type the device supports. */
+
+        union {					/* Frame size */
+		struct v4l2_frmsize_discrete	discrete;
+		struct v4l2_frmsize_stepwise	stepwise;
+	};
+
+	__u32   reserved[2];			/* Reserved space for future use */
+};
+
+enum v4l2_frmivaltypes
+{
+	V4L2_FRMIVAL_TYPE_DISCRETE	= 1,
+	V4L2_FRMIVAL_TYPE_CONTINUOUS	= 2,
+	V4L2_FRMIVAL_TYPE_STEPWISE	= 3,
+};
+
+struct v4l2_frmival_stepwise
+{
+	struct v4l2_fract	min;		/* Minimum frame interval [s] */
+	struct v4l2_fract	max;		/* Maximum frame interval [s] */
+	struct v4l2_fract	step;		/* Frame interval step size [s] */
+};
+
+struct v4l2_frmivalenum
+{
+	__u32			index;		/* Frame format index */
+	__u32			pixel_format;	/* Pixel format */
+	__u32			width;		/* Frame width */
+	__u32			height;		/* Frame height */
+	__u32			type;		/* Frame interval type the device supports. */
+
+	union {					/* Frame interval */
+		struct v4l2_fract		discrete;
+		struct v4l2_frmival_stepwise	stepwise;
+	};
+
+	__u32	reserved[2];			/* Reserved space for future use */
+};
+
+#define VIDIOC_ENUM_FRAMESIZES		_IOWR ('V', 74, struct v4l2_frmsizeenum)
+#define VIDIOC_ENUM_FRAMEINTERVALS	_IOWR ('V', 75, struct v4l2_frmivalenum)
+#endif
+
+#ifdef __KERNEL__
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14)
+/*
+ * kzalloc()
+ */
[...6529 lines suppressed...]
+	/* Video streaming object, must always be non-NULL. */
+	struct uvc_streaming *streaming;
+
+	void (*decode) (struct urb *urb, struct uvc_video_device *video,
+			struct uvc_buffer *buf);
+
+	/* Context data used by the bulk completion handler. */
+	struct {
+		__u8 header[256];
+		unsigned int header_size;
+		int skip_payload;
+		__u32 payload_size;
+		__u32 max_payload_size;
+	} bulk;
+
+	struct urb *urb[UVC_URBS];
+	char *urb_buffer[UVC_URBS];
+
+	__u8 last_fid;
+};
+
+enum uvc_device_state {
+	UVC_DEV_DISCONNECTED = 1,
+};
+
+struct uvc_device {
+	struct usb_device *udev;
+	struct usb_interface *intf;
+	__u32 quirks;
+	int intfnum;
+
+	enum uvc_device_state state;
+	struct kref kref;
+	struct list_head list;
+
+	/* Video control interface */
+	__u16 uvc_version;
+	__u32 clock_frequency;
+
+	struct list_head entities;
+
+	struct uvc_video_device video;
+
+	/* Status Interrupt Endpoint */
+	struct usb_host_endpoint *int_ep;
+	struct urb *int_urb;
+	__u8 status[16];
+
+	/* Video Streaming interfaces */
+	struct list_head streaming;
+};
+
+enum uvc_handle_state {
+	UVC_HANDLE_PASSIVE	= 0,
+	UVC_HANDLE_ACTIVE	= 1,
+};
+
+struct uvc_fh {
+	struct uvc_video_device *device;
+	enum uvc_handle_state state;
+};
+
+struct uvc_driver {
+	struct usb_driver driver;
+
+	struct mutex open_mutex;	/* protects from open/disconnect race */
+
+	struct list_head devices;	/* struct uvc_device list */
+	struct list_head controls;	/* struct uvc_control_info list */
+	struct mutex ctrl_mutex;	/* protects controls and devices lists */
+};
+
+/* ------------------------------------------------------------------------
+ * Debugging, printing and logging
+ */
+
+#define UVC_TRACE_PROBE		(1 << 0)
+#define UVC_TRACE_DESCR		(1 << 1)
+#define UVC_TRACE_CONTROL	(1 << 2)
+#define UVC_TRACE_FORMAT	(1 << 3)
+#define UVC_TRACE_CAPTURE	(1 << 4)
+#define UVC_TRACE_CALLS		(1 << 5)
+#define UVC_TRACE_IOCTL		(1 << 6)
+#define UVC_TRACE_FRAME		(1 << 7)
+#define UVC_TRACE_SUSPEND	(1 << 8)
+#define UVC_TRACE_STATUS	(1 << 9)
+
+extern unsigned int uvc_trace_param;
+
+#define uvc_trace(flag, msg...) \
+	do { \
+		if (uvc_trace_param & flag) \
+			printk(KERN_DEBUG "uvcvideo: " msg); \
+	} while(0)
+
+#define uvc_printk(level, msg...) \
+	printk(level "uvcvideo: " msg)
+
+#define UVC_GUID_FORMAT "%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x"
+#define UVC_GUID_ARGS(guid) \
+        (guid)[3],  (guid)[2],  (guid)[1],  (guid)[0], \
+        (guid)[5],  (guid)[4], \
+        (guid)[7],  (guid)[6], \
+        (guid)[8],  (guid)[9], \
+        (guid)[10], (guid)[11], (guid)[12], \
+        (guid)[13], (guid)[14], (guid)[15]
+
+/* --------------------------------------------------------------------------
+ * Internal functions.
+ */
+
+/* Core driver */
+extern struct uvc_driver uvc_driver;
+extern void uvc_delete(struct kref *kref);
+
+/* Video buffers queue management. */
+extern void uvc_queue_init(struct uvc_video_queue *queue);
+extern int uvc_alloc_buffers(struct uvc_video_queue *queue,
+		unsigned int nbuffers, unsigned int buflength);
+extern int uvc_free_buffers(struct uvc_video_queue *queue);
+extern void uvc_query_buffer(struct uvc_buffer *buf,
+		struct v4l2_buffer *v4l2_buf);
+extern int uvc_queue_buffer(struct uvc_video_queue *queue,
+		struct v4l2_buffer *v4l2_buf);
+extern int uvc_dequeue_buffer(struct uvc_video_queue *queue,
+		struct v4l2_buffer *v4l2_buf, int nonblocking);
+extern int uvc_queue_enable(struct uvc_video_queue *queue, int enable);
+extern void uvc_queue_cancel(struct uvc_video_queue *queue);
+extern struct uvc_buffer *uvc_queue_next_buffer(struct uvc_video_queue *queue,
+		struct uvc_buffer *buf);
+
+/* V4L2 interface */
+extern struct file_operations uvc_fops;
+
+/* Video */
+extern int uvc_video_init(struct uvc_video_device *video);
+extern int uvc_video_suspend(struct uvc_video_device *video);
+extern int uvc_video_resume(struct uvc_video_device *video);
+extern int uvc_video_enable(struct uvc_video_device *video, int enable);
+extern int uvc_probe_video(struct uvc_video_device *video,
+		struct uvc_streaming_control *probe);
+extern int uvc_query_ctrl(struct uvc_device *dev, __u8 query, __u8 unit,
+		__u8 intfnum, __u8 cs, void *data, __u16 size);
+extern int uvc_set_video_ctrl(struct uvc_video_device *video,
+		struct uvc_streaming_control *ctrl, int probe);
+
+/* Status */
+extern int uvc_status_init(struct uvc_device *dev);
+extern void uvc_status_cleanup(struct uvc_device *dev);
+extern int uvc_status_suspend(struct uvc_device *dev);
+extern int uvc_status_resume(struct uvc_device *dev);
+
+/* Controls */
+extern struct uvc_control *uvc_find_control(struct uvc_video_device *video,
+		__u32 v4l2_id, struct uvc_control_mapping **mapping);
+extern int uvc_query_v4l2_ctrl(struct uvc_video_device *video,
+		struct v4l2_queryctrl *v4l2_ctrl);
+
+extern int uvc_ctrl_add_info(struct uvc_control_info *info);
+extern int uvc_ctrl_add_mapping(struct uvc_control_mapping *mapping);
+extern int uvc_ctrl_init_device(struct uvc_device *dev);
+extern void uvc_ctrl_cleanup_device(struct uvc_device *dev);
+extern int uvc_ctrl_resume_device(struct uvc_device *dev);
+extern void uvc_ctrl_init(void);
+
+extern int uvc_ctrl_begin(struct uvc_video_device *video);
+extern int __uvc_ctrl_commit(struct uvc_video_device *video, int rollback);
+static inline int uvc_ctrl_commit(struct uvc_video_device *video)
+{
+	return __uvc_ctrl_commit(video, 0);
+}
+static inline int uvc_ctrl_rollback(struct uvc_video_device *video)
+{
+	return __uvc_ctrl_commit(video, 1);
+}
+
+extern int uvc_ctrl_get(struct uvc_video_device *video,
+		struct v4l2_ext_control *xctrl);
+extern int uvc_ctrl_set(struct uvc_video_device *video,
+		struct v4l2_ext_control *xctrl);
+
+extern int uvc_xu_ctrl_query(struct uvc_video_device *video,
+		struct uvc_xu_control *ctrl, int set);
+
+/* Utility functions */
+extern void uvc_simplify_fraction(uint32_t *numerator, uint32_t *denominator,
+		unsigned int n_terms, unsigned int threshold);
+extern uint32_t uvc_fraction_to_interval(uint32_t numerator,
+		uint32_t denominator);
+extern struct usb_host_endpoint *uvc_find_endpoint(
+		struct usb_host_interface *alts, __u8 epaddr);
+
+/* Quirks support */
+void uvc_video_decode_isight (struct urb *urb, struct uvc_video_device *video, 
+		struct uvc_buffer *buf);
+
+#endif /* __KERNEL__ */
+
+#endif
+


Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-8/kernel.spec,v
retrieving revision 1.348
retrieving revision 1.349
diff -u -r1.348 -r1.349
--- kernel.spec	15 Feb 2008 23:58:52 -0000	1.348
+++ kernel.spec	16 Feb 2008 00:47:57 -0000	1.349
@@ -692,6 +692,7 @@
 Patch1800: linux-2.6-agp-mm.patch
 # nouveau + drm fixes
 Patch1802: nouveau-drm.patch
+Patch1803: linux-2.6-ppc32-ucmpdi2.patch
 Patch1804: linux-2.6-drm-radeon-update.patch
 Patch1805: linux-2.6-git-initial-r500-drm.patch
 
@@ -701,9 +702,9 @@
 Patch1911: linux-2.6-firewire-git-pending.patch
 # fix thinkpad key events for volume/brightness
 Patch2100: linux-2.6-thinkpad-key-events.patch
-# SELinux performance patches
 
-# Patch2300: linux-2.6-freezer-fix-apm-emulation-breakage.patch
+# usb video
+Patch2400: linux-2.6-uvcvideo.patch
 
 %endif
 
@@ -1041,6 +1042,7 @@
 ApplyPatch linux-2.6-drm-mm.patch
 # Nouveau DRM + drm fixes
 ApplyPatch nouveau-drm.patch
+ApplyPatch linux-2.6-ppc32-ucmpdi2.patch
 ApplyPatch linux-2.6-drm-radeon-update.patch
 ApplyPatch linux-2.6-git-initial-r500-drm.patch
 
@@ -1318,6 +1320,9 @@
 
 ApplyPatch linux-2.6-thinkpad-key-events.patch
 
+# usb video
+ApplyPatch linux-2.6-uvcvideo.patch
+
 # ---------- below all scheduled for 2.6.24 -----------------
 
 # SELinux perf patches
@@ -1915,6 +1920,10 @@
 
 
 %changelog
+* Fri Feb 15 2008 Chuck Ebbert <cebbert at redhat.com> 2.6.24.2-3
+- Restore missing ppc32 patch.
+- Add USB video camera (UVC) drivers.
+
 * Fri Feb 15 2008 Chuck Ebbert <cebbert at redhat.com> 2.6.24.2-2
 - Linux 2.6.24.2
 




More information about the fedora-extras-commits mailing list