staging: Merge Crystal HD driver with linuxtv.org
PATCH 1/1 staging: Merge Crystal HD driver with linuxtv.org
The in-kernel staging version and upstream diverged in Jan 2010, whilst the in-kernel version has been kept up to date with kernel changes, both have recieved some clean ups and bug fixes, upstream has also added support for new cards, particularly BCM70015 which is now a much more common device than the original BCM70012 and is currently available for purchase.
In addition to the changes below, I've applied all the relevant modifications applied to the in-kernel version to the new code introduced from upstream, in particular the removal of typedefs and unified header handling.
Quite a lot of the code churn relates to upstream commit 317dbd6dda65b4177627d6417b762c287cefa0e7 (crystalhd: nuke BCMLOG macros, use std dev_foo ones), I considered stripping these changes out and making them a separate patch but decided to stay as close as possible to the state of the current linuxtv.org codebase.
Unfortunately, AFAIK, it's not possible to simply merge the upstream git history since the upstream code isn't in a kernel tree structure, and isn't even in a simple directory, but includes a script to convert the external module into a staging tree driver which I used to create a reference tree. I had to then manually merge both versions and fix code conflicts.
It does now successfully detect and initialise a BCM70015 bought last week from Amazon. It is currently untested on the original BCM70012.
Changes from git://linuxtv.org/jarod/crystalhd.git since divergence:
commit 3cb6786e11460b4d14f8316f8bc572427880d2ee
Author: Jarod Wilson <[email protected]> Date: Mon Nov 5 14:25:34 2012 -0500
driver: make it build again on 3.6.x kernels
commit fdd2f19ac739a3db1fd7469ea19ceaefe0822e5a
Author: Dan Carpenter <[email protected]> Date: Mon Mar 14 16:02:54 2011 -0400
crystalhd: don't waste the last char of buffer
pinfo->name is a 32 char buffer. In the original code, the last char wasn't fully utilized.
commit 40c8f3867416459df1a43ca8ad91a23c3cb5e4c1
Author: Jarod Wilson <[email protected]> Date: Mon Mar 14 15:29:39 2011 -0400
driver: ignore ko.unsigned files
commit e6c92a8915ea0f5a90a6b365305dcbead7e1af2d
Author: Bastien Nocera <[email protected]> Date: Mon Mar 14 19:08:01 2011 +0000
gst: Link to libgstvideo properly
By checking for its availability, and letting pkg-config do its job.
commit dd4f01a0f9861425406c9ead7e326324d525d19a
Author: Bastien Nocera <[email protected]> Date: Mon Mar 14 19:05:41 2011 +0000
gst: Fix GCC 4.6 errors
commit 7af07e508d15a71bb1089f51120104d417757a55
Author: Bastien Nocera <[email protected]> Date: Mon Mar 14 19:02:14 2011 +0000
gst: Don't use nano versions
Those are for GStreamer CVS to use -Werror
commit c2aa618b9d0a73fa9712d5b0fe541c71f8b9b095
Author: Jarod Wilson <[email protected]> Date: Mon Mar 14 15:27:44 2011 -0400
gst plugin build may fail w/o this include
commit 2a16a74a957c3f45643a3e43380ba3f31c1301ba
Author: Jarod Wilson <[email protected]> Date: Fri Jan 21 16:29:29 2011 -0500
gst: use gboolean instead of bool
commit abec0970b8f53995679900f5e6c0294776e58992
Author: Narendra Sankar <[email protected]> Date: Mon Dec 6 13:36:21 2010 -0800
cleaned up source code. Fixed device ID check. Added debug output for filter
commit 368ce4d4799dd27830fc83ebc7a0a24ebf2dd5ec
Author: Narendra Sankar <[email protected]> Date: Tue Nov 30 18:03:45 2010 -0800
version bumps
commit e61ae5d4dbc4658c79f1cf5cc3ff21debfad028e
Author: Narendra Sankar <[email protected]> Date: Tue Nov 30 18:00:33 2010 -0800
working version of S3/S5 support. fixed issue with lack of EOS detection by HW
commit cf2f76de247d3ead2bcb6af5823032e4a224f1f9
Author: Narendra Sankar <[email protected]> Date: Tue Nov 30 17:57:35 2010 -0800
updated firmware with faster recovery from S3/S5
commit 212bced7a1f90d0d0749502802dca7673533d87b
Author: Narendra Sankar <[email protected]> Date: Tue Nov 30 17:57:03 2010 -0800
removed suspend and resume code from filter to make it app agnostic. added support for detecting EOS correctly on some streams
commit 2f072e24d71cf3165d3860f7f60ad70a0154a196
Author: Narendra Sankar <[email protected]> Date: Tue Nov 30 17:54:10 2010 -0800
working version of S3 and S5 resume. compile errors fixed
commit 433f44c018c495ae4e0734e5b6973293efd124bc
Author: Narendra Sankar <[email protected]> Date: Tue Nov 23 08:11:57 2010 -0800
fixed firmware bug when there is an EOS without any pictures being decoded. FW will hang without this fix.
commit 867de8338233f94defe4aa2844855e61e5ce44fa
Author: Narendra Sankar <[email protected]> Date: Tue Nov 23 08:11:17 2010 -0800
Added support for suspend and hibernate and restoring HW state and recovering from S3/S4/S5
commit 66e6c3e9326fda945edc84ec3f1b744da5309e2b
Author: Jarod Wilson <[email protected]> Date: Tue Nov 30 10:33:57 2010 -0500
libs: fix build after de-typedef'ing of kernel bits
Pointed out by Ivo Anjo.
commit d9302e40375b5e3dc4e998be06825c984e4109db
Author: Aristeu Rozanski <[email protected]> Date: Fri Nov 19 14:20:08 2010 -0500
fix chd_dec_pci_probe() resource leaking
commit 5f216b901c1fedfaef2ed46f37963f3edbeeaa8d
Author: Aristeu Rozanski <[email protected]> Date: Fri Nov 19 14:16:35 2010 -0500
implement noop_llseek when not available
noop_llseek is only available on 2.6.35+ kernels
commit a3a1ddf37ec5c23ab2e4bf273314ebf1db1138ce
Author: Aristeu Rozanski <[email protected]> Date: Fri Nov 19 13:30:53 2010 -0500
fix resource leak in chd_dec_pci_suspend
Found by code inspection
commit 2bf839d2dcafd547130a4b2b9e761c4c75b4574d
Author: Janne Grunau <[email protected]> Date: Fri Nov 19 14:55:42 2010 +0100
fix whitespace issues
commit a4e50d7e4754d11931857652f7809c0a180ad9f5
Author: Janne Grunau <[email protected]> Date: Fri Nov 19 13:08:06 2010 +0100
convert C99 style comment to C90
commit e16764481f1e74375f7cd207cc79fdd6e0e6e2a5
Author: Janne Grunau <[email protected]> Date: Thu Nov 18 22:56:39 2010 +0100
use int instead of BOOL
makes bc_dts_types.h include in bc_dts_defs.h unnecessary and spares linux kernel devs one ugly header
commit 9f30eb32e40bd8791ed2a2ea675562421a523f9b
Author: Janne Grunau <[email protected]> Date: Thu Nov 18 22:40:16 2010 +0100
remove trailing whitespace
commit 6e3b99f5fb26b29c28b123a4cca6def219a0a70c
Author: Janne Grunau <[email protected]> Date: Thu Nov 18 22:22:12 2010 +0100
update export-driver-for-staging.sh for bcm70015
commit e8e79cfa958b7f4317334e747445732a7359ccae
Author: Janne Grunau <[email protected]> Date: Thu Nov 18 19:07:53 2010 +0100
use cpu_to_be32 instead custom bswap macro
commit b6e7e904e71eb2c985cfbbd71278a907777c05af
Author: Lars Lindley <[email protected]> Date: Thu Mar 11 00:21:20 2010 +0100
Whitespace fixes for bcm_70012_regs.h from commit 641b63f9981a082eeefab3b395203a54dcd6e93b
Staging: crystalhd: Whitespace fixes, indentation fixes and 3 changed #includes
These patches fixes some whitspace and indentation warnings from checkpatch.pl
Also these changed #includes:
bc_dts_glob_lnx.h:43: WARNING: Use #include <linux/param.h> instead of <asm/param.h> rystalhd_lnx.h:45: WARNING: Use #include <linux/io.h> instead of <asm/io.h> crystalhd_lnx.h:49: WARNING: Use #include <linux/uaccess.h> instead of <asm/uaccess.h>
It all compiles fine, but I don't have the hardware to test with..
commit 53bced8dd3167457130d916902a8db62689ad244
Author: Janne Grunau <[email protected]> Date: Thu Nov 18 16:35:52 2010 +0100
add combined bcm70015 register definitions header
cat bchp_misc[123].h \
bchp_scrub_ctrl.h \
bchp_wrap_misc_intr2.h \
bchp_armcr4_bridge.h \
bchp_intr.h \
bchp_pri_arb_control_regs.h \
bchp_ddr23_ctl_regs_0.h \
bchp_ddr23_phy_byte_lane_0.h \
bchp_ddr23_phy_byte_lane_1.h \
bchp_ddr23_phy_control_regs.h \
bchp_clk.h \
bchp_pcie_tl.h \
bchp_sun_gisb_arb.h \
bchp_misc_perst.h \
bchp_sun_top_ctrl.h \
bchp_gio.h \
bchp_pri_client_regs.h \
> ../../../../../../../../link/bcm_70015_regs.h
and strip unused defines
Signed-off-by: Janne Grunau <[email protected]>commit aafda836d1c629d809411713ad4de7ec91edba46
Author: Arnd Bergmann <[email protected]> Date: Sun Aug 15 18:52:59 2010 +0200
llseek: automatically add .llseek fop
All file_operations should get a .llseek operation so we can make
nonseekable_open the default for future file operations without a
.llseek pointer.
The three cases that we can automatically detect are no_llseek, seq_lseek
and default_llseek. For cases where we can we can automatically prove that
the file offset is always ignored, we use noop_llseek, which maintains
the current behavior of not returning an error from a seek.
New drivers should normally not use noop_llseek but instead use no_llseek
and call nonseekable_open at open time. Existing drivers can be converted
to do the same when the maintainer knows for certain that no user code
relies on calling seek on the device file.
The generated code is often incorrectly indented and right now contains
comments that clarify for each added line why a specific variant was
chosen. In the version that gets submitted upstream, the comments will
be gone and I will manually fix the indentation, because there does not
seem to be a way to do that using coccinelle.
Some amount of new code is currently sitting in linux-next that should get
the same modifications, which I will do at the end of the merge window.
Many thanks to Julia Lawall for helping me learn to write a semantic
patch that does all this.
===== begin semantic patch =====
// This adds an llseek= method to all file operations,
// as a preparation for making no_llseek the default.
//
// The rules are
// - use no_llseek explicitly if we do nonseekable_open
// - use seq_lseek for sequential files
// - use default_llseek if we know we access f_pos
// - use noop_llseek if we know we don't access f_pos,
// but we still want to allow users to call lseek
//
@ open1 exists @
identifier nested_open;
@@
nested_open(...)
{
<+...
nonseekable_open(...)
...+>
}
@ open exists@
identifier open_f;
identifier i, f;
identifier open1.nested_open;
@@
int open_f(struct inode *i, struct file *f)
{
<+...
(
nonseekable_open(...)
|
nested_open(...)
)
...+>
}
@ read disable optional_qualifier exists @
identifier read_f;
identifier f, p, s, off;
type ssize_t, size_t, loff_t;
expression E;
identifier func;
@@
ssize_t read_f(struct file *f, char *p, size_t s, loff_t *off)
{
<+...
(
*off = E
|
*off += E
|
func(..., off, ...)
|
E = *off
)
...+>
}
@ read_no_fpos disable optional_qualifier exists @
identifier read_f;
identifier f, p, s, off;
type ssize_t, size_t, loff_t;
@@
ssize_t read_f(struct file *f, char *p, size_t s, loff_t *off)
{
... when != off
}
@ write @
identifier write_f;
identifier f, p, s, off;
type ssize_t, size_t, loff_t;
expression E;
identifier func;
@@
ssize_t write_f(struct file *f, const char *p, size_t s, loff_t *off)
{
<+...
(
*off = E
|
*off += E
|
func(..., off, ...)
|
E = *off
)
...+>
}
@ write_no_fpos @
identifier write_f;
identifier f, p, s, off;
type ssize_t, size_t, loff_t;
@@
ssize_t write_f(struct file *f, const char *p, size_t s, loff_t *off)
{
... when != off
}
@ fops0 @
identifier fops;
@@
struct file_operations fops = {
...
};
@ has_llseek depends on fops0 @
identifier fops0.fops;
identifier llseek_f;
@@
struct file_operations fops = {
...
.llseek = llseek_f,
...
};
@ has_read depends on fops0 @
identifier fops0.fops;
identifier read_f;
@@
struct file_operations fops = {
...
.read = read_f,
...
};
@ has_write depends on fops0 @
identifier fops0.fops;
identifier write_f;
@@
struct file_operations fops = {
...
.write = write_f,
...
};
@ has_open depends on fops0 @
identifier fops0.fops;
identifier open_f;
@@
struct file_operations fops = {
...
.open = open_f,
...
};
// use no_llseek if we call nonseekable_open
////////////////////////////////////////////
@ nonseekable1 depends on !has_llseek && has_open @
identifier fops0.fops;
identifier nso ~= "nonseekable_open";
@@
struct file_operations fops = {
... .open = nso, ...
+.llseek = no_llseek, /* nonseekable */
};
@ nonseekable2 depends on !has_llseek @
identifier fops0.fops;
identifier open.open_f;
@@
struct file_operations fops = {
... .open = open_f, ...
+.llseek = no_llseek, /* open uses nonseekable */
};
// use seq_lseek for sequential files
/////////////////////////////////////
@ seq depends on !has_llseek @
identifier fops0.fops;
identifier sr ~= "seq_read";
@@
struct file_operations fops = {
... .read = sr, ...
+.llseek = seq_lseek, /* we have seq_read */
};
// use default_llseek if there is a readdir
///////////////////////////////////////////
@ fops1 depends on !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
identifier fops0.fops;
identifier readdir_e;
@@
// any other fop is used that changes pos
struct file_operations fops = {
... .readdir = readdir_e, ...
+.llseek = default_llseek, /* readdir is present */
};
// use default_llseek if at least one of read/write touches f_pos
/////////////////////////////////////////////////////////////////
@ fops2 depends on !fops1 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
identifier fops0.fops;
identifier read.read_f;
@@
// read fops use offset
struct file_operations fops = {
... .read = read_f, ...
+.llseek = default_llseek, /* read accesses f_pos */
};
@ fops3 depends on !fops1 && !fops2 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
identifier fops0.fops;
identifier write.write_f;
@@
// write fops use offset
struct file_operations fops = {
... .write = write_f, ...
+ .llseek = default_llseek, /* write accesses f_pos */
};
// Use noop_llseek if neither read nor write accesses f_pos
///////////////////////////////////////////////////////////
@ fops4 depends on !fops1 && !fops2 && !fops3 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
identifier fops0.fops;
identifier read_no_fpos.read_f;
identifier write_no_fpos.write_f;
@@
// write fops use offset
struct file_operations fops = {
...
.write = write_f,
.read = read_f,
...
+.llseek = noop_llseek, /* read and write both use no f_pos */
};
@ depends on has_write && !has_read && !fops1 && !fops2 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
identifier fops0.fops;
identifier write_no_fpos.write_f;
@@
struct file_operations fops = {
... .write = write_f, ...
+.llseek = noop_llseek, /* write uses no f_pos */
};
@ depends on has_read && !has_write && !fops1 && !fops2 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
identifier fops0.fops;
identifier read_no_fpos.read_f;
@@
struct file_operations fops = {
... .read = read_f, ...
+.llseek = noop_llseek, /* read uses no f_pos */
};
@ depends on !has_read && !has_write && !fops1 && !fops2 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
identifier fops0.fops;
@@
struct file_operations fops = {
...
+.llseek = noop_llseek, /* no read or write fn */
};
===== End semantic patch =====
Signed-off-by: Arnd Bergmann <[email protected]>
Cc: Julia Lawall <[email protected]>
Cc: Christoph Hellwig <[email protected]>commit d4a63aa414b5b57ad40b6060cbfc48effdbe7c36
Author: Scott Kidder <[email protected]> Date: Wed May 26 23:38:45 2010 -0500
Staging: crystalhd: removed kfree(NULL) checks
Removed kfree(NULL checks) that were not necessary
commit 6943691302f35418d2ac0d0536f4669a9e924aa1
Author: Janne Grunau <[email protected]> Date: Tue Nov 16 21:11:30 2010 +0100
remove typedefs in crystalhd_cmds.h
commit 3cd3da74f092251212d99ab3bf0460f8c25994ec
Author: Janne Grunau <[email protected]> Date: Tue Nov 16 21:09:05 2010 +0100
remove typedefs in crystalhd_flea_ddr.h
commit a20cd29aadccc5bdb0c5a197cb22450d630f1541
Author: Janne Grunau <[email protected]> Date: Tue Nov 16 18:37:48 2010 +0100
remove typedefs from driver/linux/crystalhd_fw_if.h
commit 7a8a64a830009214535ba0836d3d7e6664f48bee
Author: Janne Grunau <[email protected]> Date: Tue Nov 16 18:29:32 2010 +0100
remove typedefs from crystalhd_hw.h
commit e6658122e2957ec4211de34ea356bcee41b9ee5e
Author: Janne Grunau <[email protected]> Date: Tue Nov 16 18:14:11 2010 +0100
remove typedefs from crystalhd_lnx.h
commit 725db77a9e9c3c26e2d7212435423d0678633778
Author: Janne Grunau <[email protected]> Date: Tue Nov 16 18:10:53 2010 +0100
remove typedefs from crystalhd_misc.h
commit fba421669f0dc66d2b9e0b1e0751454fee735e80
Author: Janne Grunau <[email protected]> Date: Tue Nov 16 18:04:05 2010 +0100
remove typedefs in FleaDefs.h
commit a870d2ffbdb8f1843dcfe64925a9d340cc8da7f8
Author: Julia Lawall <[email protected]> Date: Tue May 11 20:26:57 2010 +0200
Staging: Drop memory allocation cast
Drop cast on the result of kmalloc and similar functions.
The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@@
type T;
@@
- (T *)
(\(kmalloc\|kzalloc\|kcalloc\|kmem_cache_alloc\|kmem_cache_zalloc\|
kmem_cache_alloc_node\|kmalloc_node\|kzalloc_node\)(...))
// </smpl>
Signed-off-by: Julia Lawall <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>commit 54ec53ebc3b65ef5666e89c1cd7275e25b0ff84a
Author: Jarod Wilson <[email protected]> Date: Thu Nov 4 15:43:22 2010 -0400
gitignore generated files
commit 2f2f5f8057635ef71b5f9bcbc52a96c8d90f7d8f
Author: Jarod Wilson <[email protected]> Date: Thu Nov 4 15:39:54 2010 -0400
gst: remove generated files from source control
commit 831a1c92df5148cd046410abd90b9c1878e607db
Author: Narendra Sankar <[email protected]> Date: Wed Nov 3 15:02:01 2010 -0700
Changed close of the HW to be IOCTL based to avoid problems with dup and forks. Handles are not correctly released on player exits - for example with vlc
commit 87ad630be14d46cad538b5b3109f35d91fc1f8b8
Author: Narendra Sankar <[email protected]> Date: Wed Oct 20 17:34:52 2010 -0700
updated version numbers
commit b23a837f8b3002c14246918ce7b865eef85cdcae
Author: Narendra Sankar <[email protected]> Date: Wed Oct 20 17:15:27 2010 -0700
changing user/kernel define includes to allow third-party configure scripts to work correctly
commit 72d916dabea9efff1631ef1d3ace42b02647c9d0
Author: Narendra Sankar <[email protected]> Date: Wed Oct 20 17:13:19 2010 -0700
enable 70015 power management by default
commit 3fb2710ad06e1bdc3930d9fd1c7a3c59a8eb245e
Author: Narendra Sankar <[email protected]> Date: Fri Oct 8 12:17:16 2010 -0700
Improve support for Suspend/Hibernate
commit 52758418ae6d6a7a4feae528be6b402708c3620e
Author: Narendra Sankar <[email protected]> Date: Fri Oct 8 11:59:07 2010 -0700
Updated GST version
commit 2bcdb02e93edeb5322e3c8ae171f79acdccb0b4a
Author: Narendra Sankar <[email protected]> Date: Fri Oct 8 11:58:07 2010 -0700
Fixed issue with failure to playback MPEG-2 streams with no codec_data structure
commit f0a74bbf038c55f6b8f1b7c74577040d0011e377
Author: Jarod Wilson <[email protected]> Date: Thu Nov 4 14:59:24 2010 -0400
driver: add ioctl support for kernel 2.6.36+
commit a3a83b8cee454bafd83ccaaa5e35029d6c409c9d
Author: Scott Davilla <[email protected]> Date: Tue Sep 28 15:10:05 2010 -0400
lib: fix DtsFlushInput segfault
PESConvParams buffer ownership is wacky. DtsReleasePESConverter is called when device is closed, DtsSetPESConverter (and DtsInitPESConverter ) in DtsSetInputFormat before DtsOpenDecoder.
But you call DtsFlushInput(m_device, 2), "Flushes all the decoder buffers, input, decoded and to be decoded."
then decoder is closed/opened and the close nukes PESConvParams buffers and the next time one feeds DtsProcInput, you segfault.
You could keep a copy of what is passed into DtsSetInputFormat and reset on internal/open close of decoder but it's easier to just not touch PESConvParams buffers, they will get deleted when device is closed or resized as needed.
commit 6b3a205d6edce8c45f47daec09e372ecbf20f6de
Author: Scott Davilla <[email protected]> Date: Tue Sep 28 15:09:02 2010 -0400
lib: free tx thread first
X Thread makes device calls and uses shared mem, exit TX Thread first, then close up device. This fixes segfaults on playback stop and device close.
commit 191068804f18cb30c908a52998e06db077145b63
Author: Scott Davilla <[email protected]> Date: Tue Sep 28 15:08:02 2010 -0400
lib: user abort is not a failure
BC_STS_IO_USER_ABORT returned from BCM_IOC_PROC_INPUT is not a failure so don't log it as such.
commit 9c530d228f2fbbe46afd1248af01e553ab5bf50b
Merge: 0e26588 1d88ad2
Author: Jarod Wilson <[email protected]>
Date: Tue Sep 28 15:06:23 2010 -0400
Merge branch 'master' of git+ssh://git.wilsonet.com/srv/git/crystalhd
commit 0e265885bdf735a31e867f25c5a745739ba36214
Author: Vasiliy Kulikov <[email protected]> Date: Tue Sep 28 14:59:47 2010 -0400
crystalhd: fix signed bug
chd_dec_major is unsigned, so check chd_dec_major < 0 doesn't make sense. Since it is used as signed, declare it as int.
commit 1d88ad2633fa91d3cad7b09d92f6f42b3e270ec6
Author: Narendra Sankar <[email protected]> Date: Thu Sep 23 21:26:33 2010 -0400
Updated version numbers
- A certain libcrystalhd user expects to see minor >= 20 reported to enable high-performance StageVideo mode. We only report this inside the driver, the so's version remains 3.6.0 right now...
commit 2e7535e9504254854765f97fe74b23d0ecd40d4b
Author: Taylor Ralph <[email protected]> Date: Thu Sep 23 15:50:19 2010 -0400
[lib] add function to get tx buf free size
Jarod changed things from int32_t to unint32_t to match freeSize's type, and added function pseudo-documentation block. And any bugs.
commit 6345d8a74cd3b0a743489a59afae8c27363012e2
Author: Jarod Wilson <[email protected]> Date: Thu Sep 23 15:39:08 2010 -0400
[driver] be a wee bit less verbose unless debug mode enabled
commit 7c6639339803e0375884da244f9a339398048001
Author: Jarod Wilson <[email protected]> Date: Thu Sep 23 15:06:41 2010 -0400
[driver] bump minor version rev to match lib
commit 5ca69a4831578ee385a93c58b5f0a6a7e148cfb5
Author: Narendra Sankar <[email protected]> Date: Wed Sep 22 12:07:21 2010 -0700
libcrystalhd: fix usage documentation error
commit a82496e6aefb111b7570b3c9120659b2c5f74c7f
Author: Narendra Sankar <[email protected]> Date: Wed Sep 22 12:03:09 2010 -0700
clean up gstreamer state management code
commit 7692b0d4b61120a0d3774214255ad83a26c8f7da
Author: Narendra Sankar <[email protected]> Date: Wed Sep 22 23:31:40 2010 -0400
Moved multi-process variables to global shared memory. Allow only single application to open handle to HW.
commit 3383a1187fd5ce8e2596ab5a1ba8ae2b9b44ae45
Author: Narendra Sankar <[email protected]> Date: Wed Sep 22 11:32:09 2010 -0700
driver: fix multiple possible hangs
- Fixed issue with hard hang on multiple opens.
- Fixed issue of stalling for 3 seconds on close under certain conditions.
- Fixed issue of Firmware commands not completing correctly to close the decoder safely on Signals.
commit 84760fd6ec9c6b87d4437bcb598471a512a10b90
Author: Kulikov Vasiliy <[email protected]> Date: Mon Aug 23 14:01:53 2010 -0400
crystalhd: call disable_pci_device if pci_probe failed
Driver should call disable_pci_device() if it returns from pci_probe() with error.
commit 32491de9d8d9aba18ffeb64d94f2d3322ed19577
Author: Jarod Wilson <[email protected]> Date: Mon Aug 23 13:55:56 2010 -0400
lib: flea doesn't support setting core clock at all
Pointed out by Scott Davilla. Just a micro-optimization then to not call DtsSetCoreClock on flea now. Leaving it in there #if 0'd out w/a comment, just in case support for setting the clock on flea does show up at some point in the future...
commit c20a5d41cc9f198a88ec81fe57570df5a97db59d
Author: Jarod Wilson <[email protected]> Date: Mon Aug 23 13:10:05 2010 -0400
lib: set core clock to 180 on link cards
commit 465bb3d3eecf1741c7709478c3fe9b56fe033271
Author: Jarod Wilson <[email protected]> Date: Mon Aug 23 13:09:23 2010 -0400
lib: streamline DtsDevRegisterWr a bit
commit a3a8e9c5a2b52d8867425d0c899fda7fc7f6f80e
Author: Scott Davilla <[email protected]> Date: Mon Aug 23 11:28:24 2010 -0400
crystalhd: check fetch before add
Make sure we were successful fetching before we add to queue
commit e1196a1dd28324d1debc5a1f868325190fd809dc
Author: Jarod Wilson <[email protected]> Date: Mon Aug 23 11:27:07 2010 -0400
crystalhd: change license on flea reg defs
from Scott Davilla, approved by Naren Sankar at Broadcom.
commit 5b951470bcd15d4e07466d3d0b423e703ea9dd79
Author: Narendra Sankar <[email protected]> Date: Wed Aug 18 10:08:56 2010 -0700
Fixed 32-bit compile for sse2
commit 014e9fe03a38c92a1bdfcdb322f9356abdcf929f
Author: Jarod Wilson <[email protected]> Date: Mon Aug 23 11:12:49 2010 -0400
lib: make sure var is initialized
commit ca04e12da96ed3b453032fd586ef368ad69b4f24
Author: Narendra Sankar <[email protected]> Date: Mon Aug 16 13:24:44 2010 -0700
expanded the fetch semaphone to cover the entire fetch operation to prevent clashing with the next frame peeking
commit 1348474a5d34ec685bbfec2e1ed117e554998e1c
Author: Narendra Sankar <[email protected]> Date: Mon Aug 16 13:24:14 2010 -0700
removed extra debug print
commit 72907973f7a29316d6fce1576937588cc329d53d
Author: Narendra Sankar <[email protected]> Date: Mon Aug 16 10:55:57 2010 -0700
Added support for on the fly copying of 422 to 420 including support for NV12. Code originally from [email protected]
commit 60460ebc21209b8b6bd105fe68aca38145187eeb
Author: Narendra Sankar <[email protected]> Date: Mon Aug 16 10:54:58 2010 -0700
Correctly fixed issue of disabling HW scaling by default
commit c749a814f597c0bb1ca40e5c926f1e8e1d486051
Author: Narendra Sankar <[email protected]> Date: Mon Aug 16 10:54:07 2010 -0700
Fixed return status checking for memory allocations
commit 2444c6ebd1fc17689963a4deba2ab22d7218c4e4
Author: Narendra Sankar <[email protected]> Date: Thu Aug 12 10:49:56 2010 -0700
Updated library version number correctly
commit 3db6748162c14dee44c4b560e5b96e3ee7fcaab3
Author: Narendra Sankar <[email protected]> Date: Thu Aug 12 10:43:58 2010 -0700
Fixed incorrect enabling of scaling from GST
commit 6df10a0599b5adf7e6f08529f0954a3fa24ad0ad
Author: Narendra Sankar <[email protected]> Date: Wed Jul 28 09:38:20 2010 -0700
added support to peek next picture number and flags. Fixed issue with reading incorrect register for DMA list 1
commit 1f091ef3c9b1ca4e7dda0b0d729d4232a77b0793
Author: Narendra Sankar <[email protected]> Date: Wed Jul 28 09:37:03 2010 -0700
added interlaced playback support for gstreamer
commit adbc32f24506cc328a124e53044068d21e425edd
Author: Narendra Sankar <[email protected]> Date: Wed Jul 28 09:35:43 2010 -0700
added support in library to peek the next picture picture number and top and bottom flags for field video
commit c8f00de0d7573d76bf5e8a880ad50f43485faf4c
Author: Jarod Wilson <[email protected]> Date: Fri Jul 23 23:22:03 2010 -0400
crystalhd: make some logging less verbose, use dev_foo macros
commit ce6fe949cc76875dff6c5777be6bfee55a1387bc
Author: Edgar (gimli) Hucek <[email protected]> Date: Fri Jul 23 22:06:51 2010 -0400
libcrystalhd: fix some compiler warnings
commit 226132bbb412d6a75bd8c9e5f398238065fa32d1
Author: Scott Davilla <[email protected]> Date: Fri Jul 23 22:04:59 2010 -0400
crystalhd: fix driver compile on older kernels
commit e1244343b81ec077b8c5e339c839e2f22e56a41c
Author: Narendra Sankar <[email protected]> Date: Fri Jul 23 18:17:38 2010 -0700
Added support for detecting VC1 v/s WMV9. Cleaned up unused WMV code. Added support for detecting DIVX types
commit 5214f2a047c9ea33c26c417add7e5b61670b4e67
Author: Narendra Sankar <[email protected]> Date: Fri Jul 23 18:12:35 2010 -0700
fixed the parser to take into account that there is no extra data when data type is Annex B compatible
commit bcc1d54915cbb400ce8825c0cf698934f05e3605
Author: Narendra Sankar <[email protected]> Date: Fri Jul 23 18:11:32 2010 -0700
updated library version to match code merged from Windows
commit a61f1529b80fc6172561284b29d3261dc15b16b8
Author: Narendra Sankar <[email protected]> Date: Fri Jul 23 18:10:53 2010 -0700
added some error checking code to prevent kernel oops
commit 84306614fe62eae5f58c382a12f0a1cc6a25c664
Author: Narendra Sankar <[email protected]> Date: Tue Jul 20 17:35:17 2010 -0700
added Firmware binary license text
commit 24f6d7afd6d2a37be147fdb716621d64734c5248
Author: Narendra Sankar <[email protected]> Date: Tue Jul 20 16:59:42 2010 -0700
added support to detect the HW type and features ahead of actuallying starting the decoder. Use this feature to advertize different capabilities in the GST plug-in to support MPEG4 decoder
commit f4956d455e6676a655f181b025d61360c4ac13ac
Author: Narendra Sankar <[email protected]> Date: Tue Jul 20 16:56:55 2010 -0700
Driver updates to cleanly ask for MSI. Updated version numbers
commit ec49b91ff32e87e677ba7df82a5fb71ea0ee11b2
Author: Edgar (gimli) Hucek <[email protected]> Date: Fri Jul 16 15:27:15 2010 -0400
libcrystalhd: add internal mdata garbage collector routine
- misc formatting cleanups by Jarod
commit 8ced5eaa5db7d880a1f2b4d86f38a2d38920bbad
Author: Jarod Wilson <[email protected]> Date: Thu Jul 15 23:34:14 2010 -0400
fix up build after flea reg debug spew removal
commit aa8dce7a83fcece31e103b8fb60f1a53b0d50797
Author: Scott Davilla <[email protected]> Date: Thu Jul 15 23:20:56 2010 -0400
add missing spinlock unlocks
commit 4884553c681fe03d73ecbd1b3def46c909df28ac
Author: Scott Davilla <[email protected]> Date: Thu Jul 15 23:15:49 2010 -0400
casting fixes
commit 9c27acf43b15530cc13a05d9140aa0a1b63a311b
Author: Scott Davilla <[email protected]> Date: Thu Jul 15 23:15:12 2010 -0400
remove register debug spew in flea
commit bbba09d111d173fdb6854b3319a9e5c5ca1eeeda
Author: Scott Davilla <[email protected]> Date: Thu Jul 15 23:14:26 2010 -0400
fix missing newlines
commit 222eaed6e68748240f89d5404d1a095a21c3077e
Author: Narendra Sankar <[email protected]> Date: Wed Jul 14 13:07:45 2010 -0700
Update to new format change logic. Clean up firmware
commit bb811baa136ab6b933ebb2eaec8bd420cfc72671
Author: Narendra Sankar <[email protected]> Date: Tue Jul 13 13:29:51 2010 -0700
making gst plugin build against system libcrystalhd
Use installed library headers rather than local dev one.
commit 66a7e46464edd6a9d1a2616be56f36366caa234f
Author: Narendra Sankar <[email protected]> Date: Tue Jul 13 12:35:38 2010 -0700
cleaned up some includes to make building deb packages easier
commit 24608d2524d4db2933858651f3d6362db8db2487
Author: Jarod Wilson <[email protected]> Date: Tue Jul 13 22:20:25 2010 -0400
crystalhd: remove no longer used chd_set_log_level prototype
commit 9de6c2956c8ffb5f9f25d704c793cce3759546c7
Author: Jarod Wilson <[email protected]> Date: Tue Jul 13 22:19:32 2010 -0400
crystalhd: remove noisy register debugging
commit c6a10e176aade2ba2c5eae7aa14d3a31da6ac9a0
Author: Jarod Wilson <[email protected]> Date: Tue Jul 13 22:12:37 2010 -0400
libcrystalhd: fix license in fwcmds sources
commit 42bd352f7af6b547839f8b8c7c741bce14602096
Author: Jarod Wilson <[email protected]> Date: Tue Jul 13 22:12:02 2010 -0400
gst: gitignore stamp-h1
commit 2c35546c0d82814986dcced8ccf7f44c3d8cedb0
Author: Jarod Wilson <[email protected]> Date: Tue Jul 13 18:19:18 2010 -0400
crystalhd: uv_start needs to be unsigned long
Pointed out by Scott Davilla, confirmed by Naren Sankar. I just commit stuff... :)
commit a8839d50a4117344f621792eebaa9e8b287936fa
Merge: 353cbb9 6ddb496
Author: Jarod Wilson <[email protected]>
Date: Tue Jul 13 14:46:41 2010 -0400
Merge branch 'master' of git+ssh://devel.wilsonet.com/srv/git/crystalhd
commit 353cbb90c6798fdb9baa0d7deb16ca4c30b417e7
Author: Edgar (gimli) Hucek <[email protected]> Date: Tue Jul 13 14:46:25 2010 -0400
libcrystalhd: be more gentle on scaling params
commit 6ddb4963330d1353676b31c001558d8139c03319
Author: Jarod Wilson <[email protected]> Date: Mon Jul 12 19:54:11 2010 -0400
gst: remove one more file that shouldn't be in git
commit abfa30f6281153f47f29a392fc4520d29390aa9e
Author: Jarod Wilson <[email protected]> Date: Mon Jul 12 19:51:53 2010 -0400
gst: make it build
...and remove a bunch of junk that shouldn't be under version control.
commit c3bd2e77980ee26ca3bfbf708c773d604c1c6a39
Author: Jarod Wilson <[email protected]> Date: Mon Jul 12 19:48:19 2010 -0400
examples: add gitignoreage
commit e1f28f47822bbd16418ab1493b45733a2bb14841
Author: Jarod Wilson <[email protected]> Date: Mon Jul 12 19:47:22 2010 -0400
examples: make them build again
commit e54380692ae2c124c1dff2fc82354dd73695a719
Author: Jarod Wilson <[email protected]> Date: Mon Jul 12 15:33:36 2010 -0400
libcrystalhd: don't need POINTER_32 on Linux
commit 5ce12f14f66cef2639a4319f226cfb4c74d31209
Author: Jarod Wilson <[email protected]> Date: Mon Jul 12 15:32:44 2010 -0400
crystalhd: add missing headers needed to compile driver
Pointed out by gimli.
commit ba77ae3fc62f85d616aaea776ee3ef02b0aeefc3
Author: Narendra Sankar <[email protected]> Date: Mon Jul 12 14:59:59 2010 -0400
crystalhd: add locking around hw accesses
Fixed issue of holding HW lock and sleeping in kernel when probing for picture numbers. Fixed parsing of the Mode field so we can release DMA
buffers correctly. Correctly working with Adobe FP for both 70012 and
70015. Elimiated HW pause for 70012 since it is borked. Added SW pause from apps side. Currently only for FP and GST. Need to
fix for other apps.
commit bf3ab5fe081b1df220b35744d605ae38140c61ee
Author: Jarod Wilson <[email protected]> Date: Mon Jul 12 14:42:18 2010 -0400
firmware: new bcm70012 firmware image
commit a6ee265bcbf16d2e37843e9b07d250a669a2dab2
Merge: d9091fb 93b2fba
Author: Jarod Wilson <[email protected]>
Date: Mon Jul 12 14:36:46 2010 -0400
Merge branch 'master' of git+ssh://git.wilsonet.com/srv/git/crystalhd
commit 93b2fba7e7aff1e9108db1f55157b7a89bef1ce9
Author: Jarod Wilson <[email protected]> Date: Mon Jul 12 00:43:29 2010 -0400
lib: typo compile fix
commit 0449ab3da0ca7eee94080ffb6dc68aa5d2c9a9f7
Author: Scott Davilla <[email protected]> Date: Sun Jul 11 19:36:27 2010 -0400
libcrystalhd: pendMdata fixes for bcm70012
need to look further back than 10
commit 9f55201c38bc5c3c0e20966935bcfe853fe0fa8d
Author: Edgar (gimli) Hucek <[email protected]> Date: Sun Jul 11 19:27:08 2010 -0400
libcrystalhd: enable scaling on bcm70015 crystalhd
commit 51d73bf0623cc1bbde257cfd4408a910ca24c5da
Author: Narendra Sankar <[email protected]> Date: Sun Jul 11 19:10:46 2010 -0400
crystalhd: merge to latest windows code
- pretty much in sync with current windows driver
- return of 64-bit functionality
- hardware scaling enabled
- preliminary multiple application support
commit 5088d0051646a5bf78684caeeaee98325a3dbb9c
Author: Narendra Sankar <[email protected]> Date: Sun Jul 11 18:53:32 2010 -0400
libcrystalhd: mark cancel tx function as success always
commit 48c04c40e882de8f7dd75921024bbfe9bb053994
Author: Narendra Sankar <[email protected]> Date: Sun Jul 11 18:52:12 2010 -0400
gst: session number is no longer used to detect repeated pictures
commit 534fb998bc7c8784fa72eaf1ddfb1de99fa84793
Author: Narendra Sankar <[email protected]> Date: Sun Jul 11 18:50:49 2010 -0400
crystalhd: added 70015 device id for older kernels
commit e8d1fb6f321cee63c07e24dfe026279fe8cb140c
Author: Jarod Wilson <[email protected]> Date: Sun Jul 11 18:36:37 2010 -0400
update comments to match libcrystalhd_version.h name change
commit 5f5029dc3687aa50cf7186b2f8488f6e2a11d60f
Author: Jarod Wilson <[email protected]> Date: Sun Jul 11 18:34:48 2010 -0400
Resync with Scott's crystalhd for osx tree, up to revision 126
commit f583f1ff86d21c58c4dd7c4efb7b227f3f1e835d
Author: Jarod Wilson <[email protected]> Date: Tue Jun 29 10:42:49 2010 -0400
crystalhd_lnx: remove casts from void*
Remove unnesessary casts from void*.
commit 4c6a4bfd64edb73097af51995ef0939a16cc37ef
Author: Jarod Wilson <[email protected]> Date: Tue Jun 29 10:38:25 2010 -0400
lib: rename version_lnx.h to libcrystalhd_version.h and install it
Install the library version header, so that programs compiling against libcrystalhd can use conditionals according to the lib version.
Based on initial patch from gimli and discussion w/Scott and Naren.
commit 986a1bdb2ac2584bfafad2af74002dcf0591d8d2
Author: Scott Davilla <[email protected]> Date: Mon Jun 21 23:03:22 2010 -0400
re-re-fix uint16_t to int16_t
commit aeb7b43db6106e302750764d3d1c64375234ce5a
Author: Scott Davilla <[email protected]> Date: Mon Jun 21 23:02:40 2010 -0400
keep rxcap buffers when doing suspend
commit a3155bd73023e16cc24393115406f5aa46268d0d
Author: Scott Davilla <[email protected]> Date: Mon Jun 21 23:01:52 2010 -0400
clean up mpeg2test code
commit 7575f0935e9f3a68649d2585c7fa52919d171cc5
Author: Scott Davilla <[email protected]> Date: Mon Jun 21 23:01:02 2010 -0400
system headers need to come first
required for mac os x
commit f660a4bb1e960c3897fb80dd048cfb15807753e7
Author: Scott Davilla <[email protected]> Date: Mon Jun 21 23:00:18 2010 -0400
remove duplicated function call
commit 6c513c1d9a8adcfcf06a17a3d37268e26655ce1d
Author: Scott Davilla <[email protected]> Date: Mon Jun 21 22:59:18 2010 -0400
pass real struct instead of void in crystalhd_dioq_fetch_wait
commit 781fc75b899fd09d536fedc1de986f922eff3bb0
Author: Scott Davilla <[email protected]> Date: Mon Jun 21 22:58:37 2010 -0400
remove unused chd_set_log_level
commit 5488fc2bdd653e1f2d1c62f1beecb9b833b23e23
Author: Jarod Wilson <[email protected]> Date: Sun Jun 20 12:51:50 2010 -0400
fix some whitespace damage and silence noisy printk
printk noise pointed out by gimli.
commit 483319eda67d4a2ea8e8645e55cb8bc6603f50ed
Author: Edgar (gimli) Hucek <[email protected]> Date: Sun Jun 20 12:50:03 2010 -0400
compile fix
commit c1489b3178dae679ece87e52dd324cfb274da747
Author: Edgar (gimli) Hucek <[email protected]> Date: Sun Jun 20 12:48:57 2010 -0400
lib: vc1 correctness fix
commit 2330bc975ca2987632f145c29be8719e2311bcf5
Author: Jarod Wilson <[email protected]> Date: Sun Jun 20 12:45:22 2010 -0400
64-bit lib compile fix
Pointed out by gimli.
commit 4b3ead2410b17554fb9885abff0747d8b345ca93
Author: Jarod Wilson <[email protected]> Date: Sun Jun 20 00:55:54 2010 -0400
drop a line of dead code
commit c967adc94ffa1281506b59101fa4c88ef9c7be64
Author: Jarod Wilson <[email protected]> Date: Sun Jun 20 00:51:05 2010 -0400
driver: make it compile again
I missed a few things merging hunks of Naren's patches that didn't apply cleanly, and a few other minor things needed fixing so we can compile on both 32-bit and 64-bit. At least, it compiles on a 64-bit host now...
commit ebdd07cd259c83a01c7b539d1340449f503644ae
Author: Narendra Sankar <[email protected]> Date: Sat Jun 19 23:53:20 2010 -0400
some formatting fixups
commit 1a35a4f98804a1a6a0547dacd3b4560f3ce186d7
Author: Narendra Sankar <[email protected]> Date: Sat Jun 19 23:43:57 2010 -0400
added support for peeking timestamps, separate TX thread to optimize performance
commit 328958bbb425ee5406d36d51e72da1c0ad103a2b
Author: Narendra Sankar <[email protected]> Date: Sat Jun 19 23:40:56 2010 -0400
First working version of driver for 70015
commit 24795a78e364f8a6ad877fb40257b7dd149ed97d
Author: Narendra Sankar <[email protected]> Date: Sat Jun 19 23:35:09 2010 -0400
Initial support for BCM70015 including FW download, TX DMA, RX DMA, picture interrupt
commit d9091fbdf742de635bda977f6060a4de56d16b40
Author: Charles Clément <[email protected]> Date: Tue Jun 8 10:55:20 2010 -0400
crystalhd: remove unused #include <linux/version.h>
commit f1f6818cb170ad5ce693e3629875d3f1b2558765
Author: Jarod Wilson <[email protected]> Date: Tue Jun 8 10:53:08 2010 -0400
crystalhd: cleanup all WIN references
Additional cleanups in the same area by Jarod.
commit c6ca98d433808f9fb3681b3eada25fcd5f1d55c9
Author: Jarod Wilson <[email protected]> Date: Mon Jun 7 14:44:03 2010 -0400
driver: minimize chd_get_device usage (and rename to chddev)
commit fdf75ed369b4a9c3a5b8c598248c5bf6e4204047
Author: Scott Davilla <[email protected]> Date: Sun Jun 6 16:39:44 2010 -0400
tsnum in DtsFetchMdata can't go < 0 if it's uint16_t, make it int16_t
commit 7e5f0bcd9a455a5ef86d191b8b39bf708f773f40
Author: Scott Davilla <[email protected]> Date: Sun Jun 6 16:37:17 2010 -0400
fix build for linux kernel versions 2.6.24 and earlier
commit eb056668a90ffab973ea35734a85349b9a507337
Author: Narendra Sankar <[email protected]> Date: Sun Jun 6 14:16:23 2010 -0400
Update bcm70015 register include path
commit 5e2a07485fd4939d6748dd5fddc87b412bf6bb53
Author: Narendra Sankar <[email protected]> Date: Sun Jun 6 14:15:30 2010 -0400
Add bcm70015 register interface specifications
commit 19cb8e2b21c311dba96766c69fe1dba5869b6e3a
Author: Narendra Sankar <[email protected]> Date: Sun Jun 6 14:04:32 2010 -0400
Set up function pointers and split out 70012/15 support code
commit 4f5f6f087630e257cbcdae597befcf3ab834f3f5
Author: Narendra Sankar <[email protected]> Date: Sun Jun 6 13:49:10 2010 -0400
initial cleanup to facilitate bcm70015 support
Lots of clean-ups and code reorg to facilitate forthcoming bcm70015 support. Also moves a good chunk of code that was in the gstreamer layer to the driver interface library layer.
commit fd9c282d1257a833cea4acd94a65505a8b5f1b90
Author: Scott Kidder <[email protected]> Date: Fri Jun 4 16:35:04 2010 -0400
crystalhd: removed kfree(NULL) checks
Removed kfree(NULL checks) that were not necessary
commit 01531d1559738abe51bf5c38a392472b7c6bac7a
Author: Leon Woestenberg <[email protected]> Date: Fri Jun 4 16:31:29 2010 -0400
crystalhd: Fix for big-endian systems
The original CrystalHD driver assumes a little endian bitfield host.
This patch adds support for big-endian bitfield hosts.
It was tested by verifying the values of all hardware register accesses on a big-endian host were equal to a little-endian host.
The use of bitfields is discouraged for hardware access, so this needs to be rewritten to use macro definitions at some point.
commit 1f293c968e5ab8dad3ad0c3ceefa91cbb1bcce63
Author: Alfredo Beaumont Sainz <[email protected]> Date: Fri May 21 17:23:30 2010 -0400
gst-plugin: make it build and work
Successfully tested w/gstreamer 0.10.25.
commit a8e27b2203eb2c1f0266176f5c70d8c5b6102c76
Author: Jarod Wilson <[email protected]> Date: Sat Apr 3 16:18:26 2010 -0400
libcrystalhd: fix segfault in firmware open
From Edgar (gimli) Hucek via crystalhd-development google group.
commit 2517a14d3b5bd5a0f2edbd3aa21497a47928cbcd
Author: Jarod Wilson <[email protected]> Date: Wed Mar 31 23:07:17 2010 -0400
crystalhd: fix oops on load
Got overzealous in the prior commit w/the dev_foo printk macros. Can't use those if the device struct hasn't been filled in yet.
Still need to add some modparams to turn on various levels of debug spew in the driver. Should be quite silent right now.
commit 317dbd6dda65b4177627d6417b762c287cefa0e7
Author: Jarod Wilson <[email protected]> Date: Tue Mar 30 17:17:05 2010 -0400
crystalhd: nuke BCMLOG macros, use std dev_foo ones
Replace all the BCMLOG macros with standard dev_foo macros that are provided by the kernel. Where we can't use dev_foo (due to not having a struct device handle handy), just use a good old printk.
commit 00c8c23357545052355f183df5248ce21dfbc7c0
Author: Jarod Wilson <[email protected]> Date: Tue Mar 30 10:11:59 2010 -0400
crystalhd: add device struct to adapter device struct
Make life easier for converting to dev_foo printk macros.
commit 81cbd90b85bac090e23babd59df4e0bee5552e46
Author: Jarod Wilson <[email protected]> Date: Mon Mar 29 13:08:02 2010 -0400
crystalhd: fix build on 64-bit systems
Compile fails w/a message about converting to a pointer from an integer of a different size (uint32_t/32-bit value to 64-bit pointer). Just do a cast to uintptr_t first, which gets the size right regardless of if we are on 32-bit or 64-bit. Not fully tested to be sure its also working as expected on 64-bit, but at least it builds...
commit e53180c5c33c850623a0a82cb9623eee634e108e
Author: Jarod Wilson <[email protected]> Date: Mon Mar 29 13:06:47 2010 -0400
crystalhd: fix flub in refactoring GetFooFromPib
OFFSETOF needs a member of BC_PIC_INFO_BLOCK as its second arg.
commit eee7bc87d5bc087f962d9574125f37d7bdea6f75
Author: Jarod Wilson <[email protected]> Date: Fri Mar 26 17:14:27 2010 -0400
crystalhd: fix compile warning in bc_defines.h
commit 35afe30a5a4e3bf022d61301b17abd8869ca173b
Author: Jarod Wilson <[email protected]> Date: Fri Mar 26 17:13:13 2010 -0400
crystalhd: line wrapping fix
commit 990fc64a09177f21ba2cebbf1ad56b4fefdb304e
Author: Jarod Wilson <[email protected]> Date: Fri Mar 26 17:11:58 2010 -0400
crystalhd: fix a typo
commit 5f9f9eb8eb85408b9c1e528ed7769824ffe5665b
Author: Jarod Wilson <[email protected]> Date: Fri Mar 26 16:30:47 2010 -0400
firmware: add firmware for bcm970015 crystalhd
commit 7d747d9e11c6c6872367419da23763ce6507c948
Author: Jarod Wilson <[email protected]> Date: Fri Mar 26 16:23:40 2010 -0400
libcrystalhd: bump library version too
Support for the BCM970015 is well worth a library version bump too.
commit 47420b5efc300515b31e06c3058e3301e7fad5c0
Author: Jarod Wilson <[email protected]> Date: Fri Mar 26 16:18:47 2010 -0400
libcrystalhd: bump so version, 970015 support is worthy
commit 975de572de2c848fe1a7f5658fac1a1f59b4ad50
Author: Jarod Wilson <[email protected]> Date: Fri Mar 26 16:10:58 2010 -0400
libcrystalhd: fix 64-bit build
It compiles on x86_64... Now to see if it actually works still...
commit b587c34f59e33af57512e676a55b42f8c8d92214
Author: Jarod Wilson <[email protected]> Date: Fri Mar 26 16:09:47 2010 -0400
libcrystalhd: completely resync with Scott's tree
Blah. Piecemeal porting sucks. I'm going to be lazy and just make the two trees match in one big fell swoop.
commit 9052f466d2783f2de3066b78ae95faa03b80f03b
Author: Jarod Wilson <[email protected]> Date: Fri Mar 26 15:10:33 2010 -0400
lib: finish importing the rest of the bcm970015 library support
From Scott's OS X svn tree.
commit 6e66a2f6384f234d44ff6fd2b484c7bd150000f0
Author: Jarod Wilson <[email protected]> Date: Fri Mar 26 15:09:29 2010 -0400
crystalhd: minor header file fixups
Amalgamated from Scott's OS X svn tree.
commit 7246128bd0b6f96a9fbadd0b88a0fe70998a0b0e
Author: Jarod Wilson <[email protected]> Date: Thu Mar 25 17:13:23 2010 -0400
libcrystalhd: finish off the rest of bcm970015 lib support
Hopefully, anyway. :)
Ported from Scott's osx svn tree...
commit 4619a7dbb115aa88c23ea30ac22d0b3e90382150
Author: Jarod Wilson <[email protected]> Date: Thu Mar 25 16:52:00 2010 -0400
crystalhd: fix some compile warnings
commit 813af6dc628a1a25039e9d15146719aabdc7815a
Author: Jarod Wilson <[email protected]> Date: Thu Mar 25 16:47:24 2010 -0400
libcrystalhd: add initial lib support for bcm970015
Ported by Scott, then by me to git from his osx svn tree.
commit 9d840f0c255e71e21379d1225a1e61089754d3ca
Author: Jarod Wilson <[email protected]> Date: Thu Mar 25 15:54:48 2010 -0400
crystalhd: check for vmap failure
commit 60da0b2f326ad34051ec744634101abb11ed7aec
Author: Jarod Wilson <[email protected]> Date: Thu Mar 25 15:54:09 2010 -0400
crystalhd: more single-threaded support and seq hdr parsing
Ported from Scott's crystalhd-for-osx tree, svn r32.
commit f79ad8ce54e828031ff3f99a805d08752fd115da
Author: Jarod Wilson <[email protected]> Date: Thu Mar 25 15:20:29 2010 -0400
crystalhd: initial support for single-threaded mode
From Scott Davilla, ported from his crystalhd-for-osx svn tree, which was in turn ported from somewhere else... :)
commit 485e26c9ce5a7406d18fa43016598c71e58502a5
Author: Jarod Wilson <[email protected]> Date: Thu Mar 25 12:36:25 2010 -0400
crystalhd: add debug printk of register accesses
The CrystalHD device driver assumes a little endian host. In order to verify future work on endianess-independence, this patch adds printk's to track the register access to the device.
This helps verify bitfield endianess correctness as well as any hard-coded assumptions in the driver code.
Minor formatting modifications and use of __func__ added by Jarod.
commit aed81580a42f89e1f9d9aa6047b14d74fbb994d0
Author: Jarod Wilson <[email protected]> Date: Thu Mar 25 12:33:46 2010 -0400
crystalhd: fix deprecated asm/foo include warnings
Broken out of a larger patch from Lars.
commit 70e22f5fcdfdb3464886602e2d7d84632c1a7963
Author: Jarod Wilson <[email protected]> Date: Thu Mar 25 12:09:20 2010 -0400
crystalhd: more whitespace fixes
Broken out from a larger patch from Lars.
commit 960586cb6f7866120d6a5a227539873fd3abb54e
Author: Jani Nikula <[email protected]> Date: Thu Mar 25 11:36:46 2010 -0400
crystalhd: fix device_create() return value check
Use IS_ERR() instead of comparing to NULL.
commit 34f9fddb17e707d24af286312d60da8555ad49bf
Author: Jarod Wilson <[email protected]> Date: Thu Mar 25 11:32:47 2010 -0400
crystalhd: fix some whitespace and coding style issues
Based on several patches sent my way by numerous people, with slight modifications for sanity.
commit 8c6d5732a85deae8d080cc51988d5813872fbe82
Author: Jarod Wilson <[email protected]> Date: Thu Mar 25 11:15:58 2010 -0400
examples: assorted fixups and Makefile addition
- Resyncs (mostly) with Scott's crystalhd-for-osx tree
- Makes mpeg2test actually build (though I don't think it is actually functional yet)
- Adds a Makefile in place of the build shell script
commit ae0fce89fc5f5c3808e1a32b85bbb4cb613005c9
Author: Jarod Wilson <[email protected]> Date: Thu Feb 25 22:36:42 2010 -0500
Staging: crystalhd: Misc improvements for crystalhd_lnx.c
This patch does following improvements:
1. Follow kernel style for comments
2. Reorganize code for readability improvement
3. Use PCI helper macros
4. Use __devinit, __devexit, __devexit_p at necessary places
5. Mark functions and data as static when it is not exported
commit c9b2148479ac6f5926cf8bde317aa0a03e47af65
Merge: eed4d84 888ddb1
Author: Jarod Wilson <[email protected]>
Date: Thu Feb 25 22:34:31 2010 -0500
Merge branch 'master' of git+ssh://wilsonet.com/srv/git/crystalhd
commit 888ddb11740531b33c0205750447a8b717ed5c6c
Author: Anssi Hannula <[email protected]> Date: Fri Jan 22 22:10:00 2010 +0200
driver: drop the use of CRYSTALHD_ROOT variable
Use $(src) instead of defining a CRYSTALHD_ROOT variable at configure time. This allows the build to work even when moving the driver directory around.
commit 05e51c500a51e85e9f40228a68ef694451bac907
Author: Anssi Hannula <[email protected]> Date: Fri Jan 22 21:51:03 2010 +0200
lib: fix instances of calling printf with int cast to char*
In DtsProcInput(), there are calls to DebugLog_Trace(_tl, fmt, args...) with first argument being a TEXT("message: %x"), and second (char*)sts.
TEXT is defined to nothingness, so the actual message is passed via the unused _tl argument, and sts (status integer) is cast to char* (!) and used as the format string.
Fix the DebugLog_Trace() calls to pass the proper arguments and remove the now unused TEXT define.
commit c56145298d5be7f80a3f4c27e622b90fe89221ea
Author: Anssi Hannula <[email protected]> Date: Fri Jan 22 21:41:35 2010 +0200
lib: link with pthread to avoid undefined symbols
Fix undefined symbols sem_timedwait, sem_init, sem_post, sem_destroy.
commit eed4d84f7f5af0707e742e26ee2299ac3db6d110
Author: Dave Airlie <[email protected]> Date: Wed Jan 13 09:52:26 2010 -0500
driver: fix build on powerpc
commit 82bb6578c4e7cafdbbfb898e2eddea5116969e8d
Author: Jarod Wilson <[email protected]> Date: Wed Jan 6 18:08:04 2010 -0500
lib: fix up for installs to DESTDIR for packaging
- tested by creating Fedora libcrystalhd rpms
commit 2b72053b33c2b2a046d3fce32b0b117bd2fcedc9
Author: Jarod Wilson <[email protected]> Date: Mon Jan 4 15:45:20 2010 -0500
driver: further trim what gets exported
commit 05e58472454c49fca9d2394d6876ad3f5a03af80
Author: Jarod Wilson <[email protected]> Date: Mon Jan 4 15:19:29 2010 -0500
driver: don't include unused headers when exporting to kernel tree
commit 82bddc189c958a7fca79e5bd236efaee88a23ce1
Author: Jarod Wilson <[email protected]> Date: Mon Jan 4 14:18:53 2010 -0500
examples: d'oh, binary wasn't supposed to go in there
commit 245bc5f40de7a15f7ca293a363cd1675f811f1fb
Merge: 5939870 5c3b922
Author: Jarod Wilson <[email protected]>
Date: Mon Jan 4 14:23:45 2010 -0500
Merge branch 'master' of git+ssh://wilsonet.com/srv/web/git/crystalhd
commit 5c3b9223733429756fd4b7904332e9efff651e9a
Author: Jarod Wilson <[email protected]> Date: Mon Jan 4 14:16:34 2010 -0500
driver: add basic export-to-kernel-git-tree script
Very little error-checking, but hey, it works so far...
commit e2c8385f9c4e6ca558cf10ccda8c58b9a6d198d3
Author: Jarod Wilson <[email protected]> Date: Mon Jan 4 14:15:15 2010 -0500
driver: these files are generated, shouldn't be in git
commit 5e97daedb372478a61d4800311e782ceaa97a9cd
Author: Jarod Wilson <[email protected]> Date: Mon Jan 4 14:14:43 2010 -0500
infra: add .gitignore files
commit 59398702dcffe3fed5df28ad0666e2f4365789fc
Author: Jarod Wilson <[email protected]> Date: Mon Jan 4 14:07:08 2010 -0500
example: make it build again
--- drivers/staging/crystalhd/DriverFwShare.h | 93 + drivers/staging/crystalhd/FleaDefs.h | 188 ++ drivers/staging/crystalhd/Makefile | 11 +- drivers/staging/crystalhd/bc_dts_defs.h | 218 +- drivers/staging/crystalhd/bc_dts_glob_lnx.h | 72 +- drivers/staging/crystalhd/bcm_70012_regs.h | 1 - drivers/staging/crystalhd/bcm_70015_regs.h | 1376 +++++++++++ drivers/staging/crystalhd/crystalhd.h | 7 +- drivers/staging/crystalhd/crystalhd_cmds.c | 524 ++-- drivers/staging/crystalhd/crystalhd_cmds.h | 9 +- drivers/staging/crystalhd/crystalhd_flea_ddr.c | 735 ++++++ drivers/staging/crystalhd/crystalhd_flea_ddr.h | 73 + drivers/staging/crystalhd/crystalhd_fleafuncs.c | 2952 +++++++++++++++++++++++ drivers/staging/crystalhd/crystalhd_fleafuncs.h | 62 + drivers/staging/crystalhd/crystalhd_fw_if.h | 52 +- drivers/staging/crystalhd/crystalhd_hw.c | 2381 ++++-------------- drivers/staging/crystalhd/crystalhd_hw.h | 601 +++-- drivers/staging/crystalhd/crystalhd_linkfuncs.c | 2057 ++++++++++++++++ drivers/staging/crystalhd/crystalhd_linkfuncs.h | 228 ++ drivers/staging/crystalhd/crystalhd_lnx.c | 365 +-- drivers/staging/crystalhd/crystalhd_lnx.h | 17 +- drivers/staging/crystalhd/crystalhd_misc.c | 376 ++- drivers/staging/crystalhd/crystalhd_misc.h | 76 +- 23 files changed, 9655 insertions(+), 2819 deletions(-) create mode 100644 drivers/staging/crystalhd/DriverFwShare.h create mode 100644 drivers/staging/crystalhd/FleaDefs.h create mode 100644 drivers/staging/crystalhd/bcm_70015_regs.h create mode 100644 drivers/staging/crystalhd/crystalhd_flea_ddr.c create mode 100644 drivers/staging/crystalhd/crystalhd_flea_ddr.h create mode 100644 drivers/staging/crystalhd/crystalhd_fleafuncs.c create mode 100644 drivers/staging/crystalhd/crystalhd_fleafuncs.h create mode 100644 drivers/staging/crystalhd/crystalhd_linkfuncs.c create mode 100644 drivers/staging/crystalhd/crystalhd_linkfuncs.h
drivers/staging/crystalhd/DriverFwShare.h new file +93 -0
@@ -0,0 +1,93 @@ +#ifndef _DRIVER_FW_SHARE_ +#define _DRIVER_FW_SHARE_ + +#ifndef USE_MULTI_DECODE_DEFINES +#define HOST_TO_FW_PIC_DEL_INFO_ADDR 0x400/*Original single Decode Offset*/ +#else +#if 0 +#define HOST_TO_FW_PIC_DEL_INFO_ADDR 0x200/*New offset that we plan to use eventually*/ +#endif +#define HOST_TO_FW_PIC_DEL_INFO_ADDR 0x400/*This is just for testing..remove this once tested */ +#endif + + +/* +* The TX address does not change between the +* single decode and multiple decode. +*/ +#define TX_BUFF_UPDATE_ADDR 0x300/*This is relative to BORCH */ + +typedef +struct +_PIC_DELIVERY_HOST_INFO_ +{ +/* +-- The list ping-pong code is already there in the driver +-- to save from re-inventing the code, the driver will indicate +-- to firmware on which list the command should be posted. +*/ +unsigned int ListIndex; +unsigned int HostDescMemLowAddr_Y; +unsigned int HostDescMemHighAddr_Y; +unsigned int HostDescMemLowAddr_UV; +unsigned int HostDescMemHighAddr_UV; +unsigned int RxSeqNumber; +unsigned int ChannelID; +unsigned int Reserved[1 ]; +}PIC_DELIVERY_HOST_INFO , +*PPIC_DELIVERY_HOST_INFO ; + +/* +-- We write the driver's FLL to this memory location. +-- This is the array for FLL of all the channels. +*/ +#define HOST_TO_FW_FLL_ADDR (HOST_TO_FW_PIC_DEL_INFO_ADDR + sizeof(PIC_DELIVERY_HOST_INFO)) + + +enum DRIVER_FW_FLAGS { +DFW_FLAGS_CLEAR =0 , +DFW_FLAGS_TX_ABORT =BC_BIT (0 ),/*Firmware is stopped and will not give anymore buffers. */ +DFW_FLAGS_WRAP =BC_BIT (1 )/*Instruct the Firmware to WRAP the input buffer pointer */ +}; + +struct TX_INPUT_BUFFER_INFO +{ +unsigned int DramBuffAdd;/* Address of the DRAM buffer where the data can be pushed*/ +unsigned int DramBuffSzInBytes;/* Size of the available DRAM buffer, in bytes*/ +unsigned int HostXferSzInBytes;/* Actual Transfer Done By Host, In Bytes*/ +unsigned int Flags;/* DRIVER_FW_FLAGS Written By Firmware to handle Stop of TX*/ +unsigned int SeqNum;/* Sequence number of the tranfer that is done. Read-Modify-Write*/ +unsigned int ChannelID;/* To which Channel this buffer belongs to*/ +unsigned int Reserved[2 ]; +}; + + +/* +-- Out of band firmware handshake. +===================================== +-- The driver writes the SCRATCH-8 register with a Error code. +-- The driver then writes a mailbox register with 0x01. +-- The driver then polls for the ACK. This ack is if the value of the SCRATCH-8 becomes zero. +*/ + +#define OOB_ERR_CODE_BASE 70015 +enum OUT_OF_BAND_ERR_CODE +{ +OOB_INVALID =0 , +OOB_CODE_ACK =OOB_ERR_CODE_BASE , +OOB_CODE_STOPRX =OOB_ERR_CODE_BASE +1 , +}; + + +#define OOB_CMD_RESPONSE_REGISTER BCHP_ARMCR4_BRIDGE_REG_SCRATCH_8 +#define OOB_PCI_TO_ARM_MBOX BCHP_ARMCR4_BRIDGE_REG_MBOX_ARM3 +#define TX_BUFFER_AVAILABLE_INTR BCHP_ARMCR4_BRIDGE_REG_MBOX_PCI3 +#define HEART_BEAT_REGISTER BCHP_ARMCR4_BRIDGE_REG_SCRATCH_1 +#define HEART_BEAT_POLL_CNT 5 + + +#define FLEA_WORK_AROUND_SIG 0xF1EA +#define RX_PIC_Q_STS_WRKARND BC_BIT(0) +#define RX_DRAM_WRITE_WRKARND BC_BIT(1) +#define RX_MBOX_WRITE_WRKARND BC_BIT(2) +#endif
drivers/staging/crystalhd/FleaDefs.h new file +188 -0
188 lines not on this page · raw message
drivers/staging/crystalhd/Makefile +7 -4
@@ -1,6 +1,9 @@ obj-$(CONFIG_CRYSTALHD) += crystalhd.o -crystalhd-y := crystalhd_cmds.o \ - crystalhd_hw.o \ - crystalhd_lnx.o \ - crystalhd_misc.o +crystalhd-y := crystalhd_lnx.o \ + crystalhd_misc.o \ + crystalhd_cmds.o \ + crystalhd_hw.o \ + crystalhd_linkfuncs.o \ + crystalhd_fleafuncs.o \ + crystalhd_flea_ddr.o
drivers/staging/crystalhd/bc_dts_defs.h +190 -28
299 lines not on this page · raw message
drivers/staging/crystalhd/bc_dts_glob_lnx.h +53 -19
142 lines not on this page · raw message
drivers/staging/crystalhd/bcm_70012_regs.h +0 -1
@@ -754,4 +754,3 @@#endif /* #ifndef MACFILE_H__ */ /* End of File */ -
drivers/staging/crystalhd/bcm_70015_regs.h new file +1376 -0
1,376 lines not on this page · raw message
drivers/staging/crystalhd/crystalhd.h +6 -1
@@ -3,11 +3,16 @@#include "bc_dts_defs.h" #include "crystalhd_misc.h" +#include "crystalhd_fw_if.h" #include "bc_dts_glob_lnx.h" #include "crystalhd_hw.h" #include "crystalhd_cmds.h" #include "crystalhd_lnx.h" #include "bcm_70012_regs.h" -#include "crystalhd_fw_if.h" +#include "crystalhd_linkfuncs.h" +#include "crystalhd_fleafuncs.h" +#include "crystalhd_lnx.h" +#include "FleaDefs.h" +#include "crystalhd_flea_ddr.h" #endif
drivers/staging/crystalhd/crystalhd_cmds.c +341 -183
868 lines not on this page · raw message
drivers/staging/crystalhd/crystalhd_cmds.h +5 -4
Lines of this file are not shown. View the raw message.
drivers/staging/crystalhd/crystalhd_flea_ddr.c new file +735 -0
735 lines not on this page · raw message
drivers/staging/crystalhd/crystalhd_flea_ddr.h new file +73 -0
73 lines not on this page · raw message
drivers/staging/crystalhd/crystalhd_fleafuncs.c new file +2952 -0
2,952 lines not on this page · raw message
drivers/staging/crystalhd/crystalhd_fleafuncs.h new file +62 -0
62 lines not on this page · raw message
drivers/staging/crystalhd/crystalhd_fw_if.h +37 -15
52 lines not on this page · raw message
drivers/staging/crystalhd/crystalhd_hw.c +501 -1880
2,381 lines not on this page · raw message
drivers/staging/crystalhd/crystalhd_hw.h +374 -227
601 lines not on this page · raw message
drivers/staging/crystalhd/crystalhd_linkfuncs.c new file +2057 -0
2,057 lines not on this page · raw message
drivers/staging/crystalhd/crystalhd_linkfuncs.h new file +228 -0
228 lines not on this page · raw message
drivers/staging/crystalhd/crystalhd_lnx.c +213 -152
365 lines not on this page · raw message
drivers/staging/crystalhd/crystalhd_lnx.h +8 -9
Lines of this file are not shown. View the raw message.
drivers/staging/crystalhd/crystalhd_misc.c +138 -238
376 lines not on this page · raw message
drivers/staging/crystalhd/crystalhd_misc.h +18 -58
76 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
1.8.4
Part of the diff is not shown here. View the raw message.
Greg KH
maintainerQuoted 25 lines · Steven Newbury
The in-kernel staging version and upstream diverged in Jan 2010, whilst the in-kernel version has been kept up to date with kernel changes, both have recieved some clean ups and bug fixes, upstream has also added support for new cards, particularly BCM70015 which is now a much more common device than the original BCM70012 and is currently available for purchase.
In addition to the changes below, I've applied all the relevant modifications applied to the in-kernel version to the new code introduced from upstream, in particular the removal of typedefs and unified header handling.
Quite a lot of the code churn relates to upstream commit
317dbd6dda65b4177627d6417b762c287cefa0e7(crystalhd: nuke BCMLOG macros, use stddev_fooones), I considered stripping these changes out and making them a separate patch but decided to stay as close as possible to the state of the current linuxtv.org codebase.Unfortunately, AFAIK, it's not possible to simply merge the upstream git history since the upstream code isn't in a kernel tree structure, and isn't even in a simple directory, but includes a script to convert the external module into a staging tree driver which I used to create a reference tree. I had to then manually merge both versions and fix code conflicts.
Quoted 5 lines
It does now successfully detect and initialise a BCM70015 bought last week from Amazon. It is currently untested on the original BCM70012.
Signed-off-by Steven Newbury <[email protected]>
Any reason why you didn't send this to me, the staging tree maintainer?
And I can't take a giant patch like this, it's a mess. Why not send me a series of patches that sync things up, like you detail in the odd changelog entries you show below?
And these patches do a lot of new work to the driver, I'd rather see it get fixed up properly and moved out of staging first, before adding new support to it, otherwise why is it in staging at all?
thanks,
greg k-h
Quoted 26 lines · Greg KH
Quoted 25 lines · Steven Newbury
The in-kernel staging version and upstream diverged in Jan 2010, whilst the in-kernel version has been kept up to date with kernel changes, both have recieved some clean ups and bug fixes, upstream has also added support for new cards, particularly BCM70015 which is now a much more common device than the original BCM70012 and is currently available for purchase.
In addition to the changes below, I've applied all the relevant modifications applied to the in-kernel version to the new code introduced from upstream, in particular the removal of typedefs and unified header handling.
Quite a lot of the code churn relates to upstream commit
317dbd6dda65b4177627d6417b762c287cefa0e7(crystalhd: nuke BCMLOG macros, use stddev_fooones), I considered stripping these changes out and making them a separate patch but decided to stay as close as possible to the state of the current linuxtv.org codebase.Unfortunately, AFAIK, it's not possible to simply merge the upstream git history since the upstream code isn't in a kernel tree structure, and isn't even in a simple directory, but includes a script to convert the external module into a staging tree driver which I used to create a reference tree. I had to then manually merge both versions and fix code conflicts.
Quoted 8 lines
Quoted 5 lines
It does now successfully detect and initialise a BCM70015 bought last week from Amazon. It is currently untested on the original BCM70012.
Signed-off-by Steven Newbury <[email protected]>Any reason why you didn't send this to me, the staging tree maintainer?
My apologies, that was remiss of me.
Quoted 3 lines
And I can't take a giant patch like this, it's a mess. Why not send me a series of patches that sync things up, like you detail in the odd changelog entries you show below?
TBH, I just hoped I'd get away with fixing the thing up and posting it. I bought the hardware last week assuming it would work since the driver has been hanging around in the kernel for years, only to realise that there is *no* working driver for the current cards on the market, at least with recent kernel releases. (The linuxtv.org driver seems to have stopped being updated.)
So I spent the weekend getting it working for me, and rather than leave it sitting in my local machine with far too many other patches for way too many projects, I sent it here. :-)
But, you're right, I've only done half the job, and I knew it as I wrote the email. :-/ I'll start breaking it up into separate patches.
Quoted 4 lines
And these patches do a lot of new work to the driver, I'd rather see it get fixed up properly and moved out of staging first, before adding new support to it, otherwise why is it in staging at all?
That last part it a good question, it's been sitting there for 3 years, I assume there are specific things that need improving to get it out of staging? Would the changes in this patch, without the support for new hw support be sufficient to get that to happen? I can't test it without that support though...
Greg KH
maintainerQuoted 9 lines · Steven Newbury
Quoted 3 lines
And these patches do a lot of new work to the driver, I'd rather see it get fixed up properly and moved out of staging first, before adding new support to it, otherwise why is it in staging at all?
That last part it a good question, it's been sitting there for 3 years, I assume there are specific things that need improving to get it out of staging? Would the changes in this patch, without the support for new hw support be sufficient to get that to happen? I can't test it without that support though...
See the TODO file for a list of things that need to be resolved.
I've been remiss in deleting some of the staging drivers lately, and this one was on my shortlist for removal, but if you have hardware for it, and want to adopt it, I'll gladly take the patches for getting your stuff to work if you are going to work toward getting it out of staging.
thanks,
greg k-h
Quoted 11 lines · Greg KH
Quoted 9 lines · Steven Newbury
Quoted 3 lines
And these patches do a lot of new work to the driver, I'd rather see it get fixed up properly and moved out of staging first, before adding new support to it, otherwise why is it in staging at all?
That last part it a good question, it's been sitting there for 3 years, I assume there are specific things that need improving to get it out of staging? Would the changes in this patch, without the support for new hw support be sufficient to get that to happen? I can't test it without that support though...
Quoted 4 lines
See the TODO file for a list of things that need to be resolved.
- Testing
I can do this for BCM70015 only, hopefully somebody else can test with other hardware.
Quoted 1 line
- Cleanup return codes
Specifics?
Quoted 1 line
- Cleanup typedefs
For the existing staging driver, this one appears done to me. For the new code, I notice I've allowed a few to slip back in, I'll fix this.
Quoted 4 lines
- Allocate an Accelerator device class specific Major number, since we don't have any other open sourced accelerators, it is the only one in that category for now.
A somewhat similar device is the DXR2/3
Is there a reason this hasn't happened? (staging drivers don't get new major numbers allocated?) Did nobody actually request a new class, or has there been no agreement on how to proceed?
Quoted 6 lines
I've been remiss in deleting some of the staging drivers lately, and this one was on my shortlist for removal, but if you have hardware for it, and want to adopt it, I'll gladly take the patches for getting your stuff to work if you are going to work toward getting it out of staging.
I'll get it fixed up, I've an incentive to keep it working to keep my wife happy! ;-) (It enables the network media box in our bedroom to work with HD content without the fan screaming!)
Hi Greg,
I'm making good progress. My plan is to break/clean up the patch logically:
patch1: Clean up debug/error messages DONE - (this has actually resulted in some bug fixes)
patch2: Remove commented out/unused code TODO
patch3: Power management support TODO
patch4: other misc fixes/changes (may be more than one patch) with details in log message
patch5: Rename driver to crystalhd (instead of bcm70012) DONE
patch6: Restructure driver to prepare for BCM70015 support by splitting out (BCM70012) hw specific parts. DONE
patch7: Add BCM70015 support MOSTLY DONE - some clean up needed
To me this makes more sense than trying to apply the patches as applied to the linuxtv.org git repo since there's a lot of irrelevant code churn and changes in commits which are undocumented in the log message along with the fact they won't apply cleanly on top of the existing staging driver anyway.
Quoted 7 lines · Steven Newbury
Hi Greg,
I'm making good progress. My plan is to break/clean up the patch logically:patch1: Clean up debug/error messages DONE - (this has actually resulted in some bug fixes)
<- patch1b: Clean up typedefs (missed this in my list, but it's what I'm working on right now) WIP
Quoted 20 lines
patch2: Remove commented out/unused code TODO
patch3: Power management support TODO
patch4: other misc fixes/changes (may be more than one patch) with details in log message
patch5: Rename driver to crystalhd (instead of bcm70012) DONE
patch6: Restructure driver to prepare for BCM70015 support by splitting out (BCM70012) hw specific parts. DONE
patch7: Add BCM70015 support MOSTLY DONE - some clean up needed
To me this makes more sense than trying to apply the patches as applied to the linuxtv.org git repo since there's a lot of irrelevant code churn and changes in commits which are undocumented in the log message along with the fact they won't apply cleanly on top of the existing staging driver anyway.