All of lore.kernel.org
 help / color / mirror / Atom feed
* CX25821 driver in kernel 3.4.4 problem
@ 2012-07-18 12:52 Radek Mašín
  2012-07-18 13:14 ` Ezequiel Garcia
  0 siblings, 1 reply; 10+ messages in thread
From: Radek Mašín @ 2012-07-18 12:52 UTC (permalink / raw)
  To: linux-media

   Hello,
I have upgraded my testing system with cx25821 based video capture card to system (OpenSuSE 12.1)
with kernel 3.4.4 and driver for cx25821 doesn't work. Previous system was with kernel 2.6.37 (OpenSuSE 11.4)
with this patch http://patchwork.linuxtv.org/patch/10056/ and manualy compiled module. With kernel 2.6.37
driver works properly.

Now I can see, that driver is loaded, but no device in /dev/ are created. Please take a look for attached 
outputs:

lspci -v
02:00.0 Multimedia video controller: Conexant Systems, Inc. Device 8210
        Flags: bus master, fast devsel, latency 0, IRQ 16
        Memory at f7c00000 (64-bit, non-prefetchable) [size=2M]
        Capabilities: [40] Express Endpoint, MSI 00
        Capabilities: [80] Power Management version 3
        Capabilities: [90] Vital Product Data
        Capabilities: [a0] MSI: Enable- Count=1/1 Maskable- 64bit+
        Capabilities: [100] Advanced Error Reporting
        Capabilities: [200] Virtual Channel
        Kernel driver in use: cx25821

lsmod | grep cx
cx25821               102052  1
videodev               95422  1 cx25821
videobuf_dma_sg        18786  1 cx25821
videobuf_core          29505  2 cx25821,videobuf_dma_sg
btcx_risc              13400  1 cx25821
tveeprom               17009  1 cx25821

ls /dev/vi*
ls: cannot access /dev/vi*: No such file or directory

dmesg
[   10.033013] Linux video capture interface: v2.00
[   10.033637] cx25821: driver version 0.0.106 loaded
[   10.033667] cx25821: Athena pci enable !
[   10.033668] cx25821:
[   10.033669] ***********************************
[   10.033670] cx25821: cx25821 set up
[   10.033671] cx25821: ***********************************
[   10.033672]
[   10.033678] BUG: unable to handle kernel paging request at f7bc1d94
[   10.034398] IP: [<c048a9a1>] strcpy+0x11/0x30
[   10.034894] *pdpt = 0000000000b5e001 *pde = 0000000033c3f067 *pte = 800000011c129161
[   10.035799] Oops: 0003 [#1] PREEMPT SMP
[   10.036282] Modules linked in: cx25821(+) videodev eeepc_wmi asus_wmi sparse_keymap rfkill hid_picolcd lcd fb_sys_fops sysimgblt sysfillrect videobuf_dma_sg videobuf_core btcx_risc acpi_cpufreq mperf coretemp syscopyarea tveeprom iTCO_wdt iTCO_vendor_support r8169 pci_hotplug serio_raw pcspkr edd mei(C) wmi sg i2c_i801 crc32c_intel microcode autofs4 i915 drm_kms_helper drm i2c_algo_bit button video fan processor thermal thermal_sys
[   10.041267]
[   10.041430] Pid: 403, comm: modprobe Tainted: G         C   3.4.4-32-desktop #1 System manufacturer System Product Name/P8H61-M LX
[   10.042754] EIP: 0060:[<c048a9a1>] EFLAGS: 00010282 CPU: 0
[   10.043347] EIP is at strcpy+0x11/0x30
[   10.043752] EAX: f7bc1d75 EBX: f2dd2000 ECX: f7bc1d94 EDX: f7bc1bf0
[   10.044428] ESI: f7bc1bf1 EDI: f7bc1d94 EBP: f2dd200c ESP: f2d79da4
[   10.045103]  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
[   10.045686] CR0: 8005003b CR2: f7bc1d94 CR3: 337e8000 CR4: 000407f0
[   10.046364] DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
[   10.047041] DR6: ffff0ff0 DR7: 00000400
[   10.047456] Process modprobe (pid: 403, ti=f2d78000 task=f2d6e470 task.ti=f2d78000)
[   10.048279] Stack:
[   10.048498]  f2dd34bc f3db7000 f7bc02ec f2dd34bc f7bc1be4 00000001 00000300 00000000
[   10.049490]  f2dd2000 f3db7000 00000000 f2dd2000 f3db7000 f2dd200c f7bc076f f7bc28b8
[   10.050481]  f2e83e48 f2e83e48 f2d79e3c f3dc2848 c03947cc c03945f2 00000246 00000246
[   10.051473] Call Trace:
[   10.051748]  [<f7bc02ec>] cx25821_dev_setup+0xaa/0x438 [cx25821]
[   10.052405]  [<f7bc076f>] cx25821_initdev+0x7f/0x204 [cx25821]
[   10.053039]  [<c04a5c22>] local_pci_probe+0x42/0xb0
[   10.053569]  [<c04a70c9>] __pci_device_probe+0xd9/0xe0
[   10.054127]  [<c04a70f3>] pci_device_probe+0x23/0x40
[   10.054667]  [<c0541d96>] really_probe+0x56/0x2e0
[   10.055177]  [<c0542184>] driver_probe_device+0x44/0xa0
[   10.055743]  [<c0542259>] __driver_attach+0x79/0x80
[   10.056271]  [<c054063a>] bus_for_each_dev+0x3a/0x60
[   10.056809]  [<c0541a39>] driver_attach+0x19/0x20
[   10.057320]  [<c0541627>] bus_add_driver+0x187/0x280
[   10.057859]  [<c05426df>] driver_register+0x5f/0x100
[   10.058396]  [<c04a6e4c>] __pci_register_driver+0x3c/0xa0
[   10.058981]  [<c0201112>] do_one_initcall+0x32/0x170
[   10.059520]  [<c028f597>] sys_init_module+0xa7/0x210
[   10.060059]  [<c070ee2d>] syscall_call+0x7/0xb
[   10.060541]  [<b770662e>] 0xb770662d
[   10.060926] Code: 75 07 51 e8 12 b8 ff ff 59 c3 51 52 e8 b9 b7 ff ff 5a 59 c3 90 90 90 90 90 90 83 ec 08 89 c1 89 34 24 89 d6 89 7c 24 04 89 c7 ac <aa> 84 c0 75 fa 89 c8 8b 34 24 8b 7c 24 04 83 c4 08 c3 8d b6 00
[   10.064231] EIP: [<c048a9a1>] strcpy+0x11/0x30 SS:ESP 0068:f2d79da4
[   10.064947] CR2: 00000000f7bc1d94
[   10.065308] ---[ end trace 31c669691362927a ]---
[   10.066063] udevd[341]: '/sbin/modprobe -bv pci:v000014F1d00008210sv00000000sd00000000bc04sc00i00' [403] terminated by signal 9 (Killed)

Regards
Radek Masin
radek@masin.eu


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: CX25821 driver in kernel 3.4.4 problem
  2012-07-18 12:52 CX25821 driver in kernel 3.4.4 problem Radek Mašín
@ 2012-07-18 13:14 ` Ezequiel Garcia
  2012-07-18 13:24   ` Ezequiel Garcia
  2012-07-18 13:45   ` Radek Mašín
  0 siblings, 2 replies; 10+ messages in thread
From: Ezequiel Garcia @ 2012-07-18 13:14 UTC (permalink / raw)
  To: Radek Mašín; +Cc: linux-media

Hi Radek,

On Wed, Jul 18, 2012 at 9:52 AM, Radek Mašín <radek@masin.eu> wrote:
>    Hello,
> I have upgraded my testing system with cx25821 based video capture card to system (OpenSuSE 12.1)
> with kernel 3.4.4 and driver for cx25821 doesn't work. Previous system was with kernel 2.6.37 (OpenSuSE 11.4)
> with this patch http://patchwork.linuxtv.org/patch/10056/ and manualy compiled module. With kernel 2.6.37
> driver works properly.
>
> Now I can see, that driver is loaded, but no device in /dev/ are created. Please take a look for attached
> outputs:
>

I'm preparing a patch for you against v3.4.4. Unfortunately, I can't test this.
Would you mind testing it and letting me know?

Thanks,
Ezequiel.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: CX25821 driver in kernel 3.4.4 problem
  2012-07-18 13:14 ` Ezequiel Garcia
@ 2012-07-18 13:24   ` Ezequiel Garcia
  2012-07-18 14:38     ` Radek Mašín
  2012-07-18 13:45   ` Radek Mašín
  1 sibling, 1 reply; 10+ messages in thread
From: Ezequiel Garcia @ 2012-07-18 13:24 UTC (permalink / raw)
  To: Radek Mašín; +Cc: linux-media

[-- Attachment #1: Type: text/plain, Size: 200 bytes --]

Radek,

On Wed, Jul 18, 2012 at 10:14 AM, Ezequiel Garcia <elezegarcia@gmail.com> wrote:
> Hi Radek,
>

I think the attached patch will solve this issue.

Please test and tell me if it did,
Ezequiel.

[-- Attachment #2: 0001-cx25821-Remove-bad-strcpy-to-read-only-char.patch --]
[-- Type: application/octet-stream, Size: 1846 bytes --]

From 1859521e76226687e79e1452b040fd3e02c469d8 Mon Sep 17 00:00:00 2001
From: Ezequiel Garcia <elezegarcia@gmail.com>
Date: Wed, 18 Jul 2012 10:05:26 -0300
Subject: [PATCH] cx25821: Remove bad strcpy to read-only char*
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

The strcpy was being used to set the name of the board.
Since the destination char* was read-only and the name
is set statically at compile time; this was both
wrong and redundant.

The type of char* is changed to const char* to prevent
future errors.

Reported-by: Radek Mašín <radek@masin.eu>
Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
---
 drivers/media/video/cx25821/cx25821-core.c |    3 ---
 drivers/media/video/cx25821/cx25821.h      |    2 +-
 2 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/drivers/media/video/cx25821/cx25821-core.c b/drivers/media/video/cx25821/cx25821-core.c
index 7930ca5..235bf7d 100644
--- a/drivers/media/video/cx25821/cx25821-core.c
+++ b/drivers/media/video/cx25821/cx25821-core.c
@@ -912,9 +912,6 @@ static int cx25821_dev_setup(struct cx25821_dev *dev)
 	list_add_tail(&dev->devlist, &cx25821_devlist);
 	mutex_unlock(&cx25821_devlist_mutex);
 
-	strcpy(cx25821_boards[UNKNOWN_BOARD].name, "unknown");
-	strcpy(cx25821_boards[CX25821_BOARD].name, "cx25821");
-
 	if (dev->pci->device != 0x8210) {
 		pr_info("%s(): Exiting. Incorrect Hardware device = 0x%02x\n",
 			__func__, dev->pci->device);
diff --git a/drivers/media/video/cx25821/cx25821.h b/drivers/media/video/cx25821/cx25821.h
index b9aa801..029f293 100644
--- a/drivers/media/video/cx25821/cx25821.h
+++ b/drivers/media/video/cx25821/cx25821.h
@@ -187,7 +187,7 @@ enum port {
 };
 
 struct cx25821_board {
-	char *name;
+	const char *name;
 	enum port porta;
 	enum port portb;
 	enum port portc;
-- 
1.7.8.6


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: CX25821 driver in kernel 3.4.4 problem
  2012-07-18 13:14 ` Ezequiel Garcia
  2012-07-18 13:24   ` Ezequiel Garcia
@ 2012-07-18 13:45   ` Radek Mašín
  2012-07-18 13:47     ` Ezequiel Garcia
  1 sibling, 1 reply; 10+ messages in thread
From: Radek Mašín @ 2012-07-18 13:45 UTC (permalink / raw)
  To: Ezequiel Garcia; +Cc: linux-media

Hello,
I can test it without problems. Please send me a patch.

Regards
Radek Masin
radek@masin.eu

Dne St, 07/18/2012 03:14 odp., Ezequiel Garcia <elezegarcia@gmail.com> napsal(a):
> Hi Radek,
> 
> On Wed, Jul 18, 2012 at 9:52 AM, Radek Mašín <radek@masin.eu> wrote:
> >    Hello,
> > I have upgraded my testing system with cx25821 based video capture card to system (OpenSuSE 12.1)
> > with kernel 3.4.4 and driver for cx25821 doesn't work. Previous system was with kernel 2.6.37 (OpenSuSE 11.4)
> > with this patch http://patchwork.linuxtv.org/patch/10056/ and manualy compiled module. With kernel 2.6.37
> > driver works properly.
> >
> > Now I can see, that driver is loaded, but no device in /dev/ are created. Please take a look for attached
> > outputs:
> >
> 
> I'm preparing a patch for you against v3.4.4. Unfortunately, I can't test this.
> Would you mind testing it and letting me know?
> 
> Thanks,
> Ezequiel.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: CX25821 driver in kernel 3.4.4 problem
  2012-07-18 13:45   ` Radek Mašín
@ 2012-07-18 13:47     ` Ezequiel Garcia
  0 siblings, 0 replies; 10+ messages in thread
From: Ezequiel Garcia @ 2012-07-18 13:47 UTC (permalink / raw)
  To: Radek Mašín; +Cc: linux-media

On Wed, Jul 18, 2012 at 10:45 AM, Radek Mašín <radek@masin.eu> wrote:
> Hello,
> I can test it without problems. Please send me a patch.
>

I already did :-) Please checkout my previous mail.

Thanks,
Ezequiel.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: CX25821 driver in kernel 3.4.4 problem
  2012-07-18 13:24   ` Ezequiel Garcia
@ 2012-07-18 14:38     ` Radek Mašín
  2012-07-18 17:03       ` Ezequiel Garcia
  0 siblings, 1 reply; 10+ messages in thread
From: Radek Mašín @ 2012-07-18 14:38 UTC (permalink / raw)
  To: Ezequiel Garcia; +Cc: linux-media

Hello,
with your patch driver is working properly. I see devices in /dev directory and in dmesg
is attached output:

[    5.124858] cx25821: driver version 0.0.106 loaded
[    5.124890] cx25821: Athena pci enable !
[    5.124891] cx25821:
[    5.124892] ***********************************
[    5.124893] cx25821: cx25821 set up
[    5.124894] cx25821: ***********************************
[    5.124895]
[    5.124897] cx25821: Athena Hardware device = 0x8210
[    5.125165] cx25821: cx25821[1]: subsystem: 0000:0000, board: CX25821 [card=1,autodetected]
[    5.125201] asus_wmi: ASUS WMI generic driver loaded
[    5.144539] asus_wmi: Initialization: 0x0
[    5.144566] asus_wmi: BIOS WMI version: 0.9
[    5.144616] asus_wmi: SFUN value: 0x0
[    5.144906] input: Eee PC WMI hotkeys as /devices/platform/eeepc-wmi/input/input4
[    5.151580] asus_wmi: Backlight controlled by ACPI video driver
[    5.307573] EXT4-fs (sda3): re-mounted. Opts: acl,user_xattr
[    5.345621] cx25821: (1): i2c register! bus->i2c_rc = 0
[    5.424861] cx25821: cx25821_dev_checkrevision(): Hardware revision = 0x00
[    5.424864] cx25821: (1): setup done!
[    5.424872] cx25821: cx25821[1]/0: found at 0000:02:00.0, rev: 0, irq: 16, latency: 0, mmio: 0xf7c00000

Regards 
Radek Masin
radek@masin.eu

Dne St, 07/18/2012 03:24 odp., Ezequiel Garcia <elezegarcia@gmail.com> napsal(a):
> Radek,
> 
> On Wed, Jul 18, 2012 at 10:14 AM, Ezequiel Garcia <elezegarcia@gmail.com> wrote:
> > Hi Radek,
> >
> 
> I think the attached patch will solve this issue.
> 
> Please test and tell me if it did,
> Ezequiel.
> 

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: CX25821 driver in kernel 3.4.4 problem
  2012-07-18 14:38     ` Radek Mašín
@ 2012-07-18 17:03       ` Ezequiel Garcia
  0 siblings, 0 replies; 10+ messages in thread
From: Ezequiel Garcia @ 2012-07-18 17:03 UTC (permalink / raw)
  To: Radek Mašín; +Cc: linux-media

On Wed, Jul 18, 2012 at 11:38 AM, Radek Mašín <radek@masin.eu> wrote:
> Hello,
> with your patch driver is working properly. I see devices in /dev directory and in dmesg
> is attached output:
>

Great! That's good news. I'll send the patch to the list later.
If you encounter any other problems, please let us know.

Thanks for the report and for the testing,
Ezequiel.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: CX25821 driver in kernel 3.4.4 problem
  2012-07-23 12:20 ` Devin Heitmueller
@ 2012-07-23 13:36   ` Radek Mašín
  0 siblings, 0 replies; 10+ messages in thread
From: Radek Mašín @ 2012-07-23 13:36 UTC (permalink / raw)
  To: Devin Heitmueller; +Cc: linux-media

   Hello,
thank you for answer. Problems occurs on all channels and don't
depend on number of channels used. I have tried to run only one
channel, but it didn't help. 

I bought this card from dx.com for 65$. 

May be, I'll be able to provide access to my testing system with 
this card, if it is enought.

Regards
Radek Masin

Dne Po, 07/23/2012 02:20 odp., Devin Heitmueller <dheitmueller@kernellabs.com> napsal(a):
> On Mon, Jul 23, 2012 at 3:40 AM, Radek Mašín <radek@masin.eu> wrote:
> > Hello,
> > may be one more problem. I use Zoneminder software for capturing pictures from card and occasionally
> > I get corrupted picture. Please take a look for attached files.
> 
> Looks like the IRQ handler wasn't servicing fast enough, causing parts
> of a frame to get dropped.  Does this only happen when you have a
> bunch of streams running in parallel?
> 
> This sort of performance issue would be very difficult to debug
> without one of the developers having a board.  From what I understand
> the code provided by Conexant was merged essentially as-is (with some
> codingstyle cleanups and zero testing), with no upstream developers
> actually having the hardware.
> 
> You're probably out of luck unless you're willing to pay somebody to
> get a board and debug the problem.
> 
> Devin
> 
> --
> Devin J. Heitmueller - Kernel Labs
> http://www.kernellabs.com
> --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: CX25821 driver in kernel 3.4.4 problem
  2012-07-23  7:40 Radek Mašín
@ 2012-07-23 12:20 ` Devin Heitmueller
  2012-07-23 13:36   ` Radek Mašín
  0 siblings, 1 reply; 10+ messages in thread
From: Devin Heitmueller @ 2012-07-23 12:20 UTC (permalink / raw)
  To: Radek Mašín; +Cc: linux-media

On Mon, Jul 23, 2012 at 3:40 AM, Radek Mašín <radek@masin.eu> wrote:
> Hello,
> may be one more problem. I use Zoneminder software for capturing pictures from card and occasionally
> I get corrupted picture. Please take a look for attached files.

Looks like the IRQ handler wasn't servicing fast enough, causing parts
of a frame to get dropped.  Does this only happen when you have a
bunch of streams running in parallel?

This sort of performance issue would be very difficult to debug
without one of the developers having a board.  From what I understand
the code provided by Conexant was merged essentially as-is (with some
codingstyle cleanups and zero testing), with no upstream developers
actually having the hardware.

You're probably out of luck unless you're willing to pay somebody to
get a board and debug the problem.

Devin

-- 
Devin J. Heitmueller - Kernel Labs
http://www.kernellabs.com

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: CX25821 driver in kernel 3.4.4 problem
@ 2012-07-23  7:40 Radek Mašín
  2012-07-23 12:20 ` Devin Heitmueller
  0 siblings, 1 reply; 10+ messages in thread
From: Radek Mašín @ 2012-07-23  7:40 UTC (permalink / raw)
  To: linux-media

[-- Attachment #1: Type: text/plain, Size: 917 bytes --]

Hello,
may be one more problem. I use Zoneminder software for capturing pictures from card and occasionally 
I get corrupted picture. Please take a look for attached files.

Regards
Radek Masin
radek@masin.eu


Dne St, 07/18/2012 07:03 odp., Ezequiel Garcia <elezegarcia@gmail.com> napsal(a):
> On Wed, Jul 18, 2012 at 11:38 AM, Radek Mašín <radek@masin.eu> wrote:
> > Hello,
> > with your patch driver is working properly. I see devices in /dev directory and in dmesg
> > is attached output:
> >
> 
> Great! That's good news. I'll send the patch to the list later.
> If you encounter any other problems, please let us know.
> 
> Thanks for the report and for the testing,
> Ezequiel.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

[-- Attachment #2: good.jpg --]
[-- Type: image/jpeg, Size: 45905 bytes --]

[-- Attachment #3: bad.jpg --]
[-- Type: image/jpeg, Size: 60565 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2012-07-23 13:36 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-18 12:52 CX25821 driver in kernel 3.4.4 problem Radek Mašín
2012-07-18 13:14 ` Ezequiel Garcia
2012-07-18 13:24   ` Ezequiel Garcia
2012-07-18 14:38     ` Radek Mašín
2012-07-18 17:03       ` Ezequiel Garcia
2012-07-18 13:45   ` Radek Mašín
2012-07-18 13:47     ` Ezequiel Garcia
2012-07-23  7:40 Radek Mašín
2012-07-23 12:20 ` Devin Heitmueller
2012-07-23 13:36   ` Radek Mašín

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.