* [linux-dvb] TerraTec Cinergy C DVB-C / Twinhan AD-CP400 (VP-2040) & mantis driver
@ 2008-07-10 20:42 Leif Oberste-Berghaus
2008-07-13 12:50 ` Marko Ristola
0 siblings, 1 reply; 11+ messages in thread
From: Leif Oberste-Berghaus @ 2008-07-10 20:42 UTC (permalink / raw)
To: linux-dvb
[-- Attachment #1.1: Type: text/plain, Size: 1770 bytes --]
Hi All,
I have serious trouble using the mantis driver from
http://jusst.de/hg/mantis.
After loading the driver and using it in conjunction with VDR, the PC freeze
after a while (10min to 6h).
"Freeze" in this case means, that the PC does not react on any action (using
the remote, keyboard, ping or anything else) but the TV-Livesignal and sound
are still on the TV!
Just before this "freeze" happend, I recognized many "mantis start/stop feed
& dma" in dmesg.
Jul 9 08:55:21 vdr kernel: mantis_alloc_buffers (0): DMA=0x2ed90000
cpu=0xeed90000 size=65536
Jul 9 08:55:21 vdr kernel: mantis_alloc_buffers (0): RISC=0x2f354000
cpu=0xef354000 size=1000
Jul 9 08:55:21 vdr kernel: mantis_frontend_init (0): Probing for CU1216
(DVB-C)
Jul 9 08:55:21 vdr kernel: mantis_frontend_init (0): found Philips CU1216
DVB-C frontend (TDA10023) @ 0x0c
Jul 9 08:55:21 vdr kernel: mantis_frontend_init (0): Mantis DVB-C Philips
CU1216 frontend attach success
Jul 9 08:56:29 vdr kernel: mantis start feed & dma
Jul 9 08:56:29 vdr kernel: mantis stop feed and dma
Jul 9 08:56:29 vdr kernel: mantis start feed & dma
Jul 9 08:56:29 vdr kernel: mantis stop feed and dma
Some Information about the system:
Linux myserver 2.6.24.7 #1 SMP Tue Jul 8 16:40:13 CEST 2008
One AMD x86_64 1000MHz processor, 2010.54 total bogomips, 511M RAM
System library 2.7.0
lspci -vs 01:07.0
01:07.0 Multimedia controller: Twinhan Technology Co. Ltd Mantis DTV PCI
Bridge Controller [Ver 1.0] (rev 01)
Subsystem: TERRATEC Electronic GmbH Unknown device 1178
Flags: bus master, medium devsel, latency 32, IRQ 22
Memory at fdfff000 (32-bit, prefetchable) [size=4K]
What's wrong?
Do I have to use a different kernel version?
Are there any preconditions to take in account?
Thanks for your help
L
[-- Attachment #1.2: Type: text/html, Size: 2059 bytes --]
[-- Attachment #2: Type: text/plain, Size: 150 bytes --]
_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [linux-dvb] TerraTec Cinergy C DVB-C / Twinhan AD-CP400 (VP-2040) & mantis driver
2008-07-10 20:42 [linux-dvb] TerraTec Cinergy C DVB-C / Twinhan AD-CP400 (VP-2040) & mantis driver Leif Oberste-Berghaus
@ 2008-07-13 12:50 ` Marko Ristola
2008-07-13 20:49 ` Leif Oberste-Berghaus
0 siblings, 1 reply; 11+ messages in thread
From: Marko Ristola @ 2008-07-13 12:50 UTC (permalink / raw)
To: Leif Oberste-Berghaus; +Cc: linux-dvb
Hi,
I have Twinhan DVB-C 2033.
I have had freezes /reboots.
I did following things with the driver to stabilize things (my own
driver version):
- Implement both 64byte and 188 byte alignment for DMA transfers.
- Generate less IRQs from DMA transfers.
That has helped: My AMD dualcore don't do hard reset so often and the
saved TV programs are now usable (without my changes the dvb stream
lost voice and VDR couldn't show them more than a few minutes).
My version seems to use less power (Too weak power supply
might be part of my problem though).
I don't know yet though whether Manu or others are interested in my patches.
I use too new kernel version to deliver patches for Manu easilly.
Regards,
Marko Ristola
Leif Oberste-Berghaus wrote:
> Hi All,
>
> I have serious trouble using the mantis driver from
> http://jusst.de/hg/mantis.
>
> After loading the driver and using it in conjunction with VDR, the PC
> freeze after a while (10min to 6h).
> "Freeze" in this case means, that the PC does not react on any action
> (using the remote, keyboard, ping or anything else) but the
> TV-Livesignal and sound are still on the TV!
>
> Just before this "freeze" happend, I recognized many "mantis
> start/stop feed & dma" in dmesg.
>
> Jul 9 08:55:21 vdr kernel: mantis_alloc_buffers (0): DMA=0x2ed90000
> cpu=0xeed90000 size=65536
> Jul 9 08:55:21 vdr kernel: mantis_alloc_buffers (0): RISC=0x2f354000
> cpu=0xef354000 size=1000
> Jul 9 08:55:21 vdr kernel: mantis_frontend_init (0): Probing for
> CU1216 (DVB-C)
> Jul 9 08:55:21 vdr kernel: mantis_frontend_init (0): found Philips
> CU1216 DVB-C frontend (TDA10023) @ 0x0c
> Jul 9 08:55:21 vdr kernel: mantis_frontend_init (0): Mantis DVB-C
> Philips CU1216 frontend attach success
> Jul 9 08:56:29 vdr kernel: mantis start feed & dma
> Jul 9 08:56:29 vdr kernel: mantis stop feed and dma
> Jul 9 08:56:29 vdr kernel: mantis start feed & dma
> Jul 9 08:56:29 vdr kernel: mantis stop feed and dma
>
> Some Information about the system:
> Linux myserver 2.6.24.7 <http://2.6.24.7> #1 SMP Tue Jul 8 16:40:13
> CEST 2008
> One AMD x86_64 1000MHz processor, 2010.54 total bogomips, 511M RAM
> System library 2.7.0
>
> lspci -vs 01:07.0
> 01:07.0 Multimedia controller: Twinhan Technology Co. Ltd Mantis DTV
> PCI Bridge Controller [Ver 1.0] (rev 01)
> Subsystem: TERRATEC Electronic GmbH Unknown device 1178
> Flags: bus master, medium devsel, latency 32, IRQ 22
> Memory at fdfff000 (32-bit, prefetchable) [size=4K]
>
> What's wrong?
> Do I have to use a different kernel version?
> Are there any preconditions to take in account?
>
> Thanks for your help
> L
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> linux-dvb mailing list
> linux-dvb@linuxtv.org
> http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [linux-dvb] TerraTec Cinergy C DVB-C / Twinhan AD-CP400 (VP-2040) & mantis driver
2008-07-13 12:50 ` Marko Ristola
@ 2008-07-13 20:49 ` Leif Oberste-Berghaus
2008-07-14 20:05 ` Marko Ristola
0 siblings, 1 reply; 11+ messages in thread
From: Leif Oberste-Berghaus @ 2008-07-13 20:49 UTC (permalink / raw)
To: linux-dvb
Hi Marko,
thanks for you information.
Could you be so kind to point out how to configure the "aligmnent for
DMA tranfers" and how to generate "less IRQs from DMA transfer"?
Regards,
Leif
Am 13.07.2008 um 14:50 schrieb Marko Ristola:
>
> Hi,
>
> I have Twinhan DVB-C 2033.
> I have had freezes /reboots.
>
> I did following things with the driver to stabilize things (my own
> driver version):
> - Implement both 64byte and 188 byte alignment for DMA transfers.
> - Generate less IRQs from DMA transfers.
>
> That has helped: My AMD dualcore don't do hard reset so often and the
> saved TV programs are now usable (without my changes the dvb stream
> lost voice and VDR couldn't show them more than a few minutes).
> My version seems to use less power (Too weak power supply
> might be part of my problem though).
>
> I don't know yet though whether Manu or others are interested in my
> patches.
> I use too new kernel version to deliver patches for Manu easilly.
>
> Regards,
> Marko Ristola
_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [linux-dvb] TerraTec Cinergy C DVB-C / Twinhan AD-CP400 (VP-2040) & mantis driver
2008-07-13 20:49 ` Leif Oberste-Berghaus
@ 2008-07-14 20:05 ` Marko Ristola
[not found] ` <D5C41D41-A72D-4603-9AD1-67A8C5E73289@oberste-berghaus.de>
0 siblings, 1 reply; 11+ messages in thread
From: Marko Ristola @ 2008-07-14 20:05 UTC (permalink / raw)
To: Leif Oberste-Berghaus; +Cc: linux-dvb
[-- Attachment #1: Type: text/plain, Size: 1603 bytes --]
Hi Leif,
Here is a patch that implements the mentioned DMA transfer improvements.
I hope that these contain also the needed fix for you.
You can apply it into jusst.de/mantis Mercurial branch.
It modifies linux/drivers/media/dvb/mantis/mantis_dma.c only.
I have compiled the patch against 2.6.25.9-76.fc9.x86_64.
cd mantis
patch -p1 < mantis_dma.c.aligned_dma_trs.patch
Please tell us whether my patch helps you or not: if it helps, some of
my patch might get into jusst.de as
a fix for your problem.
Best Regards,
Marko
Leif Oberste-Berghaus wrote:
> Hi Marko,
>
> thanks for you information.
>
> Could you be so kind to point out how to configure the "aligmnent for
> DMA tranfers" and how to generate "less IRQs from DMA transfer"?
>
> Regards,
> Leif
>
> Am 13.07.2008 um 14:50 schrieb Marko Ristola:
>
>>
>> Hi,
>>
>> I have Twinhan DVB-C 2033.
>> I have had freezes /reboots.
>>
>> I did following things with the driver to stabilize things (my own
>> driver version):
>> - Implement both 64byte and 188 byte alignment for DMA transfers.
>> - Generate less IRQs from DMA transfers.
>>
>> That has helped: My AMD dualcore don't do hard reset so often and the
>> saved TV programs are now usable (without my changes the dvb stream
>> lost voice and VDR couldn't show them more than a few minutes).
>> My version seems to use less power (Too weak power supply
>> might be part of my problem though).
>>
>> I don't know yet though whether Manu or others are interested in my
>> patches.
>> I use too new kernel version to deliver patches for Manu easilly.
>>
>> Regards,
>> Marko Ristola
>
[-- Attachment #2: mantis_dma.c.aligned_dma_trs.patch --]
[-- Type: text/plain, Size: 7186 bytes --]
diff -r 0b04be0c088a linux/drivers/media/dvb/mantis/mantis_dma.c
--- a/linux/drivers/media/dvb/mantis/mantis_dma.c Wed May 28 13:25:23 2008 +0400
+++ b/linux/drivers/media/dvb/mantis/mantis_dma.c Mon Jul 14 22:42:03 2008 +0300
@@ -28,26 +28,31 @@
#define RISC_STATUS(status) ((((~status) & 0x0f) << 20) | ((status & 0x0f) << 16))
#define RISC_FLUSH() mantis->risc_pos = 0
#define RISC_INSTR(opcode) mantis->risc_cpu[mantis->risc_pos++] = cpu_to_le32(opcode)
-#define MANTIS_BUF_SIZE 64 * 1024
-#define MANTIS_BLOCK_BYTES (MANTIS_BUF_SIZE >> 4)
-#define MANTIS_BLOCK_COUNT (1 << 4)
+/* (16 * 188) = 3008. (16 * 204) = 3264. x % 64 == 0, x <= 4095 */
+#define RISC_DMA_TR_UNIT(m) (((m->hwconfig->ts_size == MANTIS_TS_204)? 204:188) * 16)
+#define DMA_TRANSFERS_PER_BLOCK (9)
+#define MANTIS_BLOCK_BYTES(m) (RISC_DMA_TR_UNIT(m) * DMA_TRANSFERS_PER_BLOCK)
+#define MANTIS_BLOCK_COUNT (4)
#define MANTIS_RISC_SIZE PAGE_SIZE
+
+#define MANTIS_DMA_BUFSZ(m) (m->line_bytes * m->line_count)
int mantis_dma_exit(struct mantis_pci *mantis)
{
if (mantis->buf_cpu) {
dprintk(verbose, MANTIS_ERROR, 1,
"DMA=0x%lx cpu=0x%p size=%d",
(unsigned long) mantis->buf_dma,
mantis->buf_cpu,
- MANTIS_BUF_SIZE);
+ MANTIS_DMA_BUFSZ(mantis));
- pci_free_consistent(mantis->pdev, MANTIS_BUF_SIZE,
- mantis->buf_cpu, mantis->buf_dma);
+ pci_free_consistent(mantis->pdev,
+ MANTIS_DMA_BUFSZ(mantis),
+ mantis->buf_cpu, mantis->buf_dma);
mantis->buf_cpu = NULL;
}
if (mantis->risc_cpu) {
dprintk(verbose, MANTIS_ERROR, 1,
@@ -67,22 +72,23 @@ int mantis_dma_exit(struct mantis_pci *m
static inline int mantis_alloc_buffers(struct mantis_pci *mantis)
{
if (!mantis->buf_cpu) {
mantis->buf_cpu = pci_alloc_consistent(mantis->pdev,
- MANTIS_BUF_SIZE,
- &mantis->buf_dma);
+ MANTIS_DMA_BUFSZ(mantis),
+ &mantis->buf_dma);
if (!mantis->buf_cpu) {
dprintk(verbose, MANTIS_ERROR, 1,
"DMA buffer allocation failed");
goto err;
}
dprintk(verbose, MANTIS_ERROR, 1,
"DMA=0x%lx cpu=0x%p size=%d",
(unsigned long) mantis->buf_dma,
- mantis->buf_cpu, MANTIS_BUF_SIZE);
+ mantis->buf_cpu,
+ MANTIS_DMA_BUFSZ(mantis));
}
if (!mantis->risc_cpu) {
mantis->risc_cpu = pci_alloc_consistent(mantis->pdev,
MANTIS_RISC_SIZE,
&mantis->risc_dma);
@@ -107,46 +113,38 @@ err:
return -ENOMEM;
}
static inline int mantis_calc_lines(struct mantis_pci *mantis)
{
- mantis->line_bytes = MANTIS_BLOCK_BYTES;
+ mantis->line_bytes = MANTIS_BLOCK_BYTES(mantis);
mantis->line_count = MANTIS_BLOCK_COUNT;
- while (mantis->line_bytes > 4095) {
- mantis->line_bytes >>= 1;
- mantis->line_count <<= 1;
- }
-
dprintk(verbose, MANTIS_DEBUG, 1,
- "Mantis RISC block bytes=[%d], line bytes=[%d], line count=[%d]",
- MANTIS_BLOCK_BYTES, mantis->line_bytes, mantis->line_count);
-
- if (mantis->line_count > 255) {
- dprintk(verbose, MANTIS_ERROR, 1, "Buffer size error");
- return -EINVAL;
- }
+ "Mantis RISC line bytes=[%d], line count=[%d]",
+ mantis->line_bytes, mantis->line_count);
return 0;
}
int mantis_dma_init(struct mantis_pci *mantis)
{
int err = 0;
dprintk(verbose, MANTIS_DEBUG, 1, "Mantis DMA init");
+
+ if ((err = mantis_calc_lines(mantis)) < 0) {
+ dprintk(verbose, MANTIS_ERROR, 1, "Mantis calc lines failed");
+
+ goto err;
+ }
+
if (mantis_alloc_buffers(mantis) < 0) {
dprintk(verbose, MANTIS_ERROR, 1, "Error allocating DMA buffer");
// Stop RISC Engine
// mmwrite(mmread(MANTIS_DMA_CTL) & ~MANTIS_RISC_EN, MANTIS_DMA_CTL);
mmwrite(0, MANTIS_DMA_CTL);
-
- goto err;
- }
- if ((err = mantis_calc_lines(mantis)) < 0) {
- dprintk(verbose, MANTIS_ERROR, 1, "Mantis calc lines failed");
goto err;
}
return 0;
@@ -156,46 +154,48 @@ err:
static inline void mantis_risc_program(struct mantis_pci *mantis)
{
u32 buf_pos = 0;
u32 line;
+ u32 step_bytes;
+ step_bytes = RISC_DMA_TR_UNIT(mantis);
dprintk(verbose, MANTIS_DEBUG, 1, "Mantis create RISC program");
RISC_FLUSH();
dprintk(verbose, MANTIS_DEBUG, 1, "risc len lines %u, bytes per line %u",
mantis->line_count, mantis->line_bytes);
for (line = 0; line < mantis->line_count; line++) {
- dprintk(verbose, MANTIS_DEBUG, 1, "RISC PROG line=[%d]", line);
- if (!(buf_pos % MANTIS_BLOCK_BYTES)) {
- RISC_INSTR(RISC_WRITE |
- RISC_IRQ |
- RISC_STATUS(((buf_pos / MANTIS_BLOCK_BYTES) +
- (MANTIS_BLOCK_COUNT - 1)) %
- MANTIS_BLOCK_COUNT) |
- mantis->line_bytes);
- } else {
- RISC_INSTR(RISC_WRITE | mantis->line_bytes);
+ int risc_step;
+
+ for (risc_step = 0; risc_step < DMA_TRANSFERS_PER_BLOCK; risc_step++) {
+ dprintk(verbose, MANTIS_DEBUG, 1, "RISC PROG line=[%x] risc_step=[%x], step_bytes=[%x], buf_pos=[%x]", line, risc_step, step_bytes, buf_pos);
+ /* First step: informs that the previous line has been completed (round robin). */
+ RISC_INSTR(RISC_WRITE |
+ ((risc_step == 1)? (RISC_IRQ | RISC_STATUS(line)) : 0) |
+ step_bytes);
+ RISC_INSTR(mantis->buf_dma + buf_pos);
+ buf_pos += step_bytes;
}
- RISC_INSTR(mantis->buf_dma + buf_pos);
- buf_pos += mantis->line_bytes;
}
RISC_INSTR(RISC_JUMP);
RISC_INSTR(mantis->risc_dma);
+ dprintk(verbose, MANTIS_DEBUG, 1, "Final RISC PROG size=[%x/%x]", (u32)mantis->risc_pos, (u32)MANTIS_RISC_SIZE);
}
void mantis_dma_start(struct mantis_pci *mantis)
{
dprintk(verbose, MANTIS_DEBUG, 1, "Mantis Start DMA engine");
+ memset(mantis->buf_cpu, 0, MANTIS_DMA_BUFSZ(mantis));
+ mantis->last_block = mantis->finished_block = 0;
mantis_risc_program(mantis);
mmwrite(mantis->risc_dma, MANTIS_RISC_START);
mmwrite(mmread(MANTIS_GPIF_ADDR) | MANTIS_GPIF_HIFRDWRN, MANTIS_GPIF_ADDR);
mmwrite(0, MANTIS_DMA_CTL);
- mantis->last_block = mantis->finished_block = 0;
mmwrite(mmread(MANTIS_INT_MASK) | MANTIS_INT_RISCI, MANTIS_INT_MASK);
mmwrite(MANTIS_FIFO_EN | MANTIS_DCAP_EN
| MANTIS_RISC_EN, MANTIS_DMA_CTL);
@@ -218,22 +218,24 @@ void mantis_dma_stop(struct mantis_pci *
mmwrite(mmread(MANTIS_INT_STAT), MANTIS_INT_STAT);
mmwrite(mmread(MANTIS_INT_MASK) & ~(MANTIS_INT_RISCI |
MANTIS_INT_RISCEN), MANTIS_INT_MASK);
+
+ tasklet_kill(&mantis->tasklet);
}
void mantis_dma_xfer(unsigned long data)
{
struct mantis_pci *mantis = (struct mantis_pci *) data;
- struct mantis_hwconfig *config = mantis->hwconfig;
+
+ while (mantis->last_block != mantis->finished_block) {
- while (mantis->last_block != mantis->finished_block) {
dprintk(verbose, MANTIS_DEBUG, 1, "last block=[%d] finished block=[%d]",
mantis->last_block, mantis->finished_block);
- (config->ts_size ? dvb_dmx_swfilter_204: dvb_dmx_swfilter)
- (&mantis->demux, &mantis->buf_cpu[mantis->last_block * MANTIS_BLOCK_BYTES], MANTIS_BLOCK_BYTES);
- mantis->last_block = (mantis->last_block + 1) % MANTIS_BLOCK_COUNT;
+ (mantis->hwconfig->ts_size == MANTIS_TS_204 ? dvb_dmx_swfilter_204: dvb_dmx_swfilter)
+ (&mantis->demux, &mantis->buf_cpu[mantis->last_block * mantis->line_bytes], mantis->line_bytes);
+ mantis->last_block = (mantis->last_block + 1) % mantis->line_count;
}
}
[-- Attachment #3: Type: text/plain, Size: 150 bytes --]
_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [linux-dvb] TerraTec Cinergy C DVB-C / Twinhan AD-CP400 (VP-2040) & mantis driver
[not found] ` <D5C41D41-A72D-4603-9AD1-67A8C5E73289@oberste-berghaus.de>
@ 2008-07-27 17:20 ` Marko Ristola
2008-07-29 12:30 ` Mika Båtsman
0 siblings, 1 reply; 11+ messages in thread
From: Marko Ristola @ 2008-07-27 17:20 UTC (permalink / raw)
To: Leif Oberste-Berghaus; +Cc: linux-dvb
[-- Attachment #1: Type: text/plain, Size: 1614 bytes --]
Hi,
Unfortunately I have been busy.
The patch you tried was against jusst.de Mantis Mercurial branch head.
Your version of mantis_dma.c is not the latest version and thus the
patch didn't
apply cleanly.
Here is the version that I use currently. It doesn't compile straight
against jusst.de/mantis head.
It might work for you because MANTIS_GPIF_RDWRN is not renamed as
MANTIS_GPIF_HIFRDWRN.
If it doesn't compile please rename MANTIS_GPIF_RDWRN occurrences into
MANTIS_GPIF_HIFRDWRN on that file.
Otherwise the file should work as it is.
Best regards,
Marko Ristola
Leif Oberste-Berghaus kirjoitti:
> Hi Marko,
>
> I tried to patch the driver but I'm getting an error message:
>
> root@mediapc:/usr/local/src/test/mantis-0b04be0c088a# patch -p1 <
> mantis_dma.c.aligned_dma_trs.patch
> patching file linux/drivers/media/dvb/mantis/mantis_dma.c
> patch: **** malformed patch at line 22: int mantis_dma_exit(struct
> mantis_pci *mantis)
>
> Any ideas?
>
> Regards
> Leif
>
>
> Am 14.07.2008 um 22:05 schrieb Marko Ristola:
>
>> Hi Leif,
>>
>> Here is a patch that implements the mentioned DMA transfer improvements.
>> I hope that these contain also the needed fix for you.
>> You can apply it into jusst.de/mantis Mercurial branch.
>> It modifies linux/drivers/media/dvb/mantis/mantis_dma.c only.
>> I have compiled the patch against 2.6.25.9-76.fc9.x86_64.
>>
>> cd mantis
>> patch -p1 < mantis_dma.c.aligned_dma_trs.patch
>>
>> Please tell us whether my patch helps you or not: if it helps, some
>> of my patch might get into jusst.de as
>> a fix for your problem.
>>
>> Best Regards,
>> Marko
>
>
[-- Attachment #2: mantis_dma.c --]
[-- Type: text/x-csrc, Size: 7274 bytes --]
/*
Mantis PCI bridge driver
Copyright (C) 2005, 2006 Manu Abraham (abraham.manu@gmail.com)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <asm/page.h>
#include <linux/vmalloc.h>
#include "mantis_common.h"
#define RISC_WRITE (0x01 << 28)
#define RISC_JUMP (0x07 << 28)
#define RISC_SYNC (0x08 << 28)
#define RISC_IRQ (0x01 << 24)
#define RISC_STATUS(status) ((((~status) & 0x0f) << 20) | ((status & 0x0f) << 16))
#define RISC_FLUSH() mantis->risc_pos = 0
#define RISC_INSTR(opcode) mantis->risc_cpu[mantis->risc_pos++] = cpu_to_le32(opcode)
/* (16 * 188) = 3008. (16 * 204) = 3264. x % 64 == 0, x <= 4095 */
#define RISC_DMA_TR_UNIT(m) (((m->hwconfig->ts_size == MANTIS_TS_204)? 204:188) * 16)
#define DMA_TRANSFERS_PER_BLOCK (9)
#define MANTIS_BLOCK_BYTES(m) (RISC_DMA_TR_UNIT(m) * DMA_TRANSFERS_PER_BLOCK)
#define MANTIS_BLOCK_COUNT (4)
#define MANTIS_RISC_SIZE PAGE_SIZE
#define MANTIS_DMA_BUFSZ(m) (m->line_bytes * m->line_count)
int mantis_dma_exit(struct mantis_pci *mantis)
{
if (mantis->buf_cpu) {
dprintk(verbose, MANTIS_ERROR, 1,
"DMA=0x%lx cpu=0x%p size=%d",
(unsigned long) mantis->buf_dma,
mantis->buf_cpu,
MANTIS_DMA_BUFSZ(mantis));
pci_free_consistent(mantis->pdev,
MANTIS_DMA_BUFSZ(mantis),
mantis->buf_cpu, mantis->buf_dma);
mantis->buf_cpu = NULL;
}
if (mantis->risc_cpu) {
dprintk(verbose, MANTIS_ERROR, 1,
"RISC=0x%lx cpu=0x%p size=%lx",
(unsigned long) mantis->risc_dma,
mantis->risc_cpu,
MANTIS_RISC_SIZE);
pci_free_consistent(mantis->pdev, MANTIS_RISC_SIZE,
mantis->risc_cpu, mantis->risc_dma);
mantis->risc_cpu = NULL;
}
return 0;
}
static inline int mantis_alloc_buffers(struct mantis_pci *mantis)
{
if (!mantis->buf_cpu) {
mantis->buf_cpu = pci_alloc_consistent(mantis->pdev,
MANTIS_DMA_BUFSZ(mantis),
&mantis->buf_dma);
if (!mantis->buf_cpu) {
dprintk(verbose, MANTIS_ERROR, 1,
"DMA buffer allocation failed");
goto err;
}
dprintk(verbose, MANTIS_ERROR, 1,
"DMA=0x%lx cpu=0x%p size=%d",
(unsigned long) mantis->buf_dma,
mantis->buf_cpu,
MANTIS_DMA_BUFSZ(mantis));
}
if (!mantis->risc_cpu) {
mantis->risc_cpu = pci_alloc_consistent(mantis->pdev,
MANTIS_RISC_SIZE,
&mantis->risc_dma);
if (!mantis->risc_cpu) {
dprintk(verbose, MANTIS_ERROR, 1,
"RISC program allocation failed");
mantis_dma_exit(mantis);
goto err;
}
dprintk(verbose, MANTIS_ERROR, 1,
"RISC=0x%lx cpu=0x%p size=%lx",
(unsigned long) mantis->risc_dma,
mantis->risc_cpu, MANTIS_RISC_SIZE);
}
return 0;
err:
dprintk(verbose, MANTIS_ERROR, 1, "Out of memory (?) .....");
return -ENOMEM;
}
static inline int mantis_calc_lines(struct mantis_pci *mantis)
{
mantis->line_bytes = MANTIS_BLOCK_BYTES(mantis);
mantis->line_count = MANTIS_BLOCK_COUNT;
dprintk(verbose, MANTIS_DEBUG, 1,
"Mantis RISC line bytes=[%d], line count=[%d]",
mantis->line_bytes, mantis->line_count);
return 0;
}
int mantis_dma_init(struct mantis_pci *mantis)
{
int err = 0;
dprintk(verbose, MANTIS_DEBUG, 1, "Mantis DMA init");
if ((err = mantis_calc_lines(mantis)) < 0) {
dprintk(verbose, MANTIS_ERROR, 1, "Mantis calc lines failed");
goto err;
}
if (mantis_alloc_buffers(mantis) < 0) {
dprintk(verbose, MANTIS_ERROR, 1, "Error allocating DMA buffer");
// Stop RISC Engine
// mmwrite(mmread(MANTIS_DMA_CTL) & ~MANTIS_RISC_EN, MANTIS_DMA_CTL);
mmwrite(0, MANTIS_DMA_CTL);
goto err;
}
return 0;
err:
return err;
}
static inline void mantis_risc_program(struct mantis_pci *mantis)
{
u32 buf_pos = 0;
u32 line;
u32 step_bytes;
step_bytes = RISC_DMA_TR_UNIT(mantis);
dprintk(verbose, MANTIS_DEBUG, 1, "Mantis create RISC program");
RISC_FLUSH();
dprintk(verbose, MANTIS_DEBUG, 1, "risc len lines %u, bytes per line %u",
mantis->line_count, mantis->line_bytes);
for (line = 0; line < mantis->line_count; line++) {
int risc_step;
for (risc_step = 0; risc_step < DMA_TRANSFERS_PER_BLOCK; risc_step++) {
dprintk(verbose, MANTIS_DEBUG, 1, "RISC PROG line=[%x] risc_step=[%x], step_bytes=[%x], buf_pos=[%x]", line, risc_step, step_bytes, buf_pos);
/* First step: informs that the previous line has been completed (round robin). */
RISC_INSTR(RISC_WRITE |
((risc_step == 1)? (RISC_IRQ | RISC_STATUS(line)) : 0) |
step_bytes);
RISC_INSTR(mantis->buf_dma + buf_pos);
buf_pos += step_bytes;
}
}
RISC_INSTR(RISC_JUMP);
RISC_INSTR(mantis->risc_dma);
dprintk(verbose, MANTIS_DEBUG, 1, "Final RISC PROG size=[%x/%x]", (u32)mantis->risc_pos, (u32)MANTIS_RISC_SIZE);
}
void mantis_dma_start(struct mantis_pci *mantis)
{
dprintk(verbose, MANTIS_DEBUG, 1, "Mantis Start DMA engine");
memset(mantis->buf_cpu, 0, MANTIS_DMA_BUFSZ(mantis));
mantis->last_block = mantis->finished_block = 0;
mantis_risc_program(mantis);
mmwrite(mantis->risc_dma, MANTIS_RISC_START);
mmwrite(mmread(MANTIS_GPIF_ADDR) | MANTIS_GPIF_RDWRN, MANTIS_GPIF_ADDR);
mmwrite(0, MANTIS_DMA_CTL);
mmwrite(mmread(MANTIS_INT_MASK) | MANTIS_INT_RISCI, MANTIS_INT_MASK);
mmwrite(MANTIS_FIFO_EN | MANTIS_DCAP_EN
| MANTIS_RISC_EN, MANTIS_DMA_CTL);
}
void mantis_dma_stop(struct mantis_pci *mantis)
{
u32 stat = 0, mask = 0;
stat = mmread(MANTIS_INT_STAT);
mask = mmread(MANTIS_INT_MASK);
dprintk(verbose, MANTIS_DEBUG, 1, "Mantis Stop DMA engine");
mmwrite((mmread(MANTIS_GPIF_ADDR) & (~(MANTIS_GPIF_RDWRN))), MANTIS_GPIF_ADDR);
mmwrite((mmread(MANTIS_DMA_CTL) & ~(MANTIS_FIFO_EN |
MANTIS_DCAP_EN |
MANTIS_RISC_EN)), MANTIS_DMA_CTL);
mmwrite(mmread(MANTIS_INT_STAT), MANTIS_INT_STAT);
mmwrite(mmread(MANTIS_INT_MASK) & ~(MANTIS_INT_RISCI |
MANTIS_INT_RISCEN), MANTIS_INT_MASK);
tasklet_kill(&mantis->tasklet);
}
void mantis_dma_xfer(unsigned long data)
{
struct mantis_pci *mantis = (struct mantis_pci *) data;
while (mantis->last_block != mantis->finished_block) {
dprintk(verbose, MANTIS_DEBUG, 1, "last block=[%d] finished block=[%d]",
mantis->last_block, mantis->finished_block);
(mantis->hwconfig->ts_size == MANTIS_TS_204 ? dvb_dmx_swfilter_204: dvb_dmx_swfilter)
(&mantis->demux, &mantis->buf_cpu[mantis->last_block * mantis->line_bytes], mantis->line_bytes);
mantis->last_block = (mantis->last_block + 1) % mantis->line_count;
}
}
// suspend to standby, ram or disk.
int mantis_dma_suspend(struct mantis_pci *mantis, pm_message_t mesg, int has_dma)
{
if (has_dma)
mantis_dma_stop(mantis);
return 0;
}
// resumes into state D0 always.
void mantis_dma_resume(struct mantis_pci *mantis, pm_message_t prevMesg, int has_dma)
{
if (has_dma)
mantis_dma_start(mantis);
}
[-- Attachment #3: Type: text/plain, Size: 150 bytes --]
_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [linux-dvb] TerraTec Cinergy C DVB-C / Twinhan AD-CP400 (VP-2040) & mantis driver
2008-07-27 17:20 ` Marko Ristola
@ 2008-07-29 12:30 ` Mika Båtsman
2008-08-04 20:29 ` Marko Ristola
0 siblings, 1 reply; 11+ messages in thread
From: Mika Båtsman @ 2008-07-29 12:30 UTC (permalink / raw)
To: Marko Ristola; +Cc: linux-dvb
[-- Attachment #1: Type: text/html, Size: 3546 bytes --]
[-- Attachment #2: Type: text/plain, Size: 150 bytes --]
_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [linux-dvb] TerraTec Cinergy C DVB-C / Twinhan AD-CP400 (VP-2040) & mantis driver
2008-07-29 12:30 ` Mika Båtsman
@ 2008-08-04 20:29 ` Marko Ristola
2008-08-05 8:41 ` Mika Båtsman
0 siblings, 1 reply; 11+ messages in thread
From: Marko Ristola @ 2008-08-04 20:29 UTC (permalink / raw)
To: Mika Båtsman; +Cc: linux-dvb
Mika Båtsman kirjoitti:
> Hi,
> I also tried your patch because I've had freezes since I got these
> cards. Unfortunately it didn't help me. Got a whooping 5min uptime
> before it all went wrong again. I have 2x Cinergy C + 2.6.24-19 + vdr
> 1.6.
>
Do you have a heat problem? Have you checked your motherboard sensors?
Have you checked that your memory is okay? Air flows easilly?
> I did:
> hg clone http://jusst.de/hg/mantis
> replaced mantis_dma.c with the one you attached, renamed
> MANTIS_GPIF_RDWRN -> MANTIS_GPIF_HIFRDWRN
> make && make install && reboot
>
> Am I missing something? It seemed to compile and install fine.
>
> You said that the mantis_dma.c in jusst.de mantis head is not the
> latest version. Where can it be found then?
I have my own driver version which I have given for Finnish people for
easy installation with remote control support for Twinhan 2033.
(Personally I'm not pleased with the card: now after some years of
development the card works well enough for me finally).
So the most important feature of my driver for Finnish people has been
the easy compile and install and that the driver ("release") is tested
for Twinhan 2033.
Secondly I have given for some Finnish people the Twinhan 2033 remote
control support included.
Maybe somebody from Finland would be interested with the DMA transfer
fixes, if they have unsolved quality problems. That's a fact that those
tweaks helped me although the root cause is a bit uncertain. Other
features of my driver version like suspend/resume aren't very important.
Regards,
Marko Ristola
>
> Regards,
> Mika Båtsman
>
> Marko Ristola wrote:
>>
>> Hi,
>>
>> Unfortunately I have been busy.
>>
>> The patch you tried was against jusst.de Mantis Mercurial branch head.
>> Your version of mantis_dma.c is not the latest version and thus the
>> patch didn't
>> apply cleanly.
>>
>> Here is the version that I use currently. It doesn't compile straight
>> against jusst.de/mantis head.
>> It might work for you because MANTIS_GPIF_RDWRN is not renamed as
>> MANTIS_GPIF_HIFRDWRN.
>>
>> If it doesn't compile please rename MANTIS_GPIF_RDWRN occurrences
>> into MANTIS_GPIF_HIFRDWRN on that file.
>> Otherwise the file should work as it is.
>>
>> Best regards,
>> Marko Ristola
>>
>> Leif Oberste-Berghaus kirjoitti:
>>> Hi Marko,
>>>
>>> I tried to patch the driver but I'm getting an error message:
>>>
>>> root@mediapc:/usr/local/src/test/mantis-0b04be0c088a# patch -p1 <
>>> mantis_dma.c.aligned_dma_trs.patch
>>> patching file linux/drivers/media/dvb/mantis/mantis_dma.c
>>> patch: **** malformed patch at line 22: int mantis_dma_exit(struct
>>> mantis_pci *mantis)
>>>
>>> Any ideas?
>>>
>>> Regards
>>> Leif
>>>
>>>
>>> Am 14.07.2008 um 22:05 schrieb Marko Ristola:
>>>
>>>> Hi Leif,
>>>>
>>>> Here is a patch that implements the mentioned DMA transfer
>>>> improvements.
>>>> I hope that these contain also the needed fix for you.
>>>> You can apply it into jusst.de/mantis Mercurial branch.
>>>> It modifies linux/drivers/media/dvb/mantis/mantis_dma.c only.
>>>> I have compiled the patch against 2.6.25.9-76.fc9.x86_64.
>>>>
>>>> cd mantis
>>>> patch -p1 < mantis_dma.c.aligned_dma_trs.patch
>>>>
>>>> Please tell us whether my patch helps you or not: if it helps, some
>>>> of my patch might get into jusst.de as
>>>> a fix for your problem.
>>>>
>>>> Best Regards,
>>>> Marko
>>>
>>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> linux-dvb mailing list
>> linux-dvb@linuxtv.org
>> http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
>
_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [linux-dvb] TerraTec Cinergy C DVB-C / Twinhan AD-CP400 (VP-2040) & mantis driver
2008-08-04 20:29 ` Marko Ristola
@ 2008-08-05 8:41 ` Mika Båtsman
2008-08-05 17:41 ` Marko Ristola
0 siblings, 1 reply; 11+ messages in thread
From: Mika Båtsman @ 2008-08-05 8:41 UTC (permalink / raw)
To: Marko Ristola; +Cc: linux-dvb
Marko Ristola wrote:
> Mika Båtsman kirjoitti:
>> Hi,
>> I also tried your patch because I've had freezes since I got these
>> cards. Unfortunately it didn't help me. Got a whooping 5min uptime
>> before it all went wrong again. I have 2x Cinergy C + 2.6.24-19 + vdr
>> 1.6.
>>
> Do you have a heat problem? Have you checked your motherboard sensors?
> Have you checked that your memory is okay? Air flows easilly?
Memory was the first thing I suspected but memtest went through 10+
times without a fail. Heat shouldn't be a problem either. There's a big
efficient, noisy fan in the back of the case.
The machine works fine when dvb is watched with dvbyell
http://www.dvbyell.org/ which has cards set to fixed frequency ie. card1
-> 152Mhz and card2 -> 290Mhz. At least for me the problem occurs only
with apps like mythtv and vdr which change the frequency of the tuner.
-Mika
>> I did:
>> hg clone http://jusst.de/hg/mantis
>> replaced mantis_dma.c with the one you attached, renamed
>> MANTIS_GPIF_RDWRN -> MANTIS_GPIF_HIFRDWRN
>> make && make install && reboot
>>
>> Am I missing something? It seemed to compile and install fine.
>>
>> You said that the mantis_dma.c in jusst.de mantis head is not the
>> latest version. Where can it be found then?
> I have my own driver version which I have given for Finnish people for
> easy installation with remote control support for Twinhan 2033.
> (Personally I'm not pleased with the card: now after some years of
> development the card works well enough for me finally).
>
> So the most important feature of my driver for Finnish people has been
> the easy compile and install and that the driver ("release") is tested
> for Twinhan 2033.
> Secondly I have given for some Finnish people the Twinhan 2033 remote
> control support included.
> Maybe somebody from Finland would be interested with the DMA transfer
> fixes, if they have unsolved quality problems. That's a fact that those
> tweaks helped me although the root cause is a bit uncertain. Other
> features of my driver version like suspend/resume aren't very important.
>
> Regards,
> Marko Ristola
>
>>
>> Regards,
>> Mika Båtsman
>>
>> Marko Ristola wrote:
>>>
>>> Hi,
>>>
>>> Unfortunately I have been busy.
>>>
>>> The patch you tried was against jusst.de Mantis Mercurial branch head.
>>> Your version of mantis_dma.c is not the latest version and thus the
>>> patch didn't
>>> apply cleanly.
>>>
>>> Here is the version that I use currently. It doesn't compile straight
>>> against jusst.de/mantis head.
>>> It might work for you because MANTIS_GPIF_RDWRN is not renamed as
>>> MANTIS_GPIF_HIFRDWRN.
>>>
>>> If it doesn't compile please rename MANTIS_GPIF_RDWRN occurrences
>>> into MANTIS_GPIF_HIFRDWRN on that file.
>>> Otherwise the file should work as it is.
>>>
>>> Best regards,
>>> Marko Ristola
>>>
>>> Leif Oberste-Berghaus kirjoitti:
>>>> Hi Marko,
>>>>
>>>> I tried to patch the driver but I'm getting an error message:
>>>>
>>>> root@mediapc:/usr/local/src/test/mantis-0b04be0c088a# patch -p1 <
>>>> mantis_dma.c.aligned_dma_trs.patch
>>>> patching file linux/drivers/media/dvb/mantis/mantis_dma.c
>>>> patch: **** malformed patch at line 22: int mantis_dma_exit(struct
>>>> mantis_pci *mantis)
>>>>
>>>> Any ideas?
>>>>
>>>> Regards
>>>> Leif
>>>>
>>>>
>>>> Am 14.07.2008 um 22:05 schrieb Marko Ristola:
>>>>
>>>>> Hi Leif,
>>>>>
>>>>> Here is a patch that implements the mentioned DMA transfer
>>>>> improvements.
>>>>> I hope that these contain also the needed fix for you.
>>>>> You can apply it into jusst.de/mantis Mercurial branch.
>>>>> It modifies linux/drivers/media/dvb/mantis/mantis_dma.c only.
>>>>> I have compiled the patch against 2.6.25.9-76.fc9.x86_64.
>>>>>
>>>>> cd mantis
>>>>> patch -p1 < mantis_dma.c.aligned_dma_trs.patch
>>>>>
>>>>> Please tell us whether my patch helps you or not: if it helps, some
>>>>> of my patch might get into jusst.de as
>>>>> a fix for your problem.
>>>>>
>>>>> Best Regards,
>>>>> Marko
>>>>
>>>>
>>>
>>> ------------------------------------------------------------------------
>>>
>>> _______________________________________________
>>> linux-dvb mailing list
>>> linux-dvb@linuxtv.org
>>> http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
>>
>
_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [linux-dvb] TerraTec Cinergy C DVB-C / Twinhan AD-CP400 (VP-2040) & mantis driver
2008-08-05 8:41 ` Mika Båtsman
@ 2008-08-05 17:41 ` Marko Ristola
2008-08-06 6:52 ` Mika Båtsman
0 siblings, 1 reply; 11+ messages in thread
From: Marko Ristola @ 2008-08-05 17:41 UTC (permalink / raw)
To: Mika Båtsman; +Cc: linux-dvb
Maybe I should try with Manu's jusst.de version, if it works for me now
Better exclude the driver differences away.
I don't have a CAM module and I haven't tested with two equal cards.
Our problems seem to be similar though.
Marko
Mika Båtsman kirjoitti:
> Marko Ristola wrote:
>> Mika Båtsman kirjoitti:
>>> Hi,
>>> I also tried your patch because I've had freezes since I got these
>>> cards. Unfortunately it didn't help me. Got a whooping 5min uptime
>>> before it all went wrong again. I have 2x Cinergy C + 2.6.24-19 +
>>> vdr 1.6.
>>>
>> Do you have a heat problem? Have you checked your motherboard sensors?
>> Have you checked that your memory is okay? Air flows easilly?
>
> Memory was the first thing I suspected but memtest went through 10+
> times without a fail. Heat shouldn't be a problem either. There's a
> big efficient, noisy fan in the back of the case.
>
> The machine works fine when dvb is watched with dvbyell
> http://www.dvbyell.org/ which has cards set to fixed frequency ie.
> card1 -> 152Mhz and card2 -> 290Mhz. At least for me the problem
> occurs only with apps like mythtv and vdr which change the frequency
> of the tuner.
>
> -Mika
>
>>> I did:
>>> hg clone http://jusst.de/hg/mantis
>>> replaced mantis_dma.c with the one you attached, renamed
>>> MANTIS_GPIF_RDWRN -> MANTIS_GPIF_HIFRDWRN
>>> make && make install && reboot
>>>
>>> Am I missing something? It seemed to compile and install fine.
>>>
>>> You said that the mantis_dma.c in jusst.de mantis head is not the
>>> latest version. Where can it be found then?
>> I have my own driver version which I have given for Finnish people
>> for easy installation with remote control support for Twinhan 2033.
>> (Personally I'm not pleased with the card: now after some years of
>> development the card works well enough for me finally).
>>
>> So the most important feature of my driver for Finnish people has
>> been the easy compile and install and that the driver ("release") is
>> tested for Twinhan 2033.
>> Secondly I have given for some Finnish people the Twinhan 2033 remote
>> control support included.
>> Maybe somebody from Finland would be interested with the DMA transfer
>> fixes, if they have unsolved quality problems. That's a fact that
>> those tweaks helped me although the root cause is a bit uncertain.
>> Other features of my driver version like suspend/resume aren't very
>> important.
>>
>> Regards,
>> Marko Ristola
>>
>>>
>>> Regards,
>>> Mika Båtsman
>>>
>>> Marko Ristola wrote:
>>>>
>>>> Hi,
>>>>
>>>> Unfortunately I have been busy.
>>>>
>>>> The patch you tried was against jusst.de Mantis Mercurial branch head.
>>>> Your version of mantis_dma.c is not the latest version and thus the
>>>> patch didn't
>>>> apply cleanly.
>>>>
>>>> Here is the version that I use currently. It doesn't compile
>>>> straight against jusst.de/mantis head.
>>>> It might work for you because MANTIS_GPIF_RDWRN is not renamed as
>>>> MANTIS_GPIF_HIFRDWRN.
>>>>
>>>> If it doesn't compile please rename MANTIS_GPIF_RDWRN occurrences
>>>> into MANTIS_GPIF_HIFRDWRN on that file.
>>>> Otherwise the file should work as it is.
>>>>
>>>> Best regards,
>>>> Marko Ristola
>>>>
>>>> Leif Oberste-Berghaus kirjoitti:
>>>>> Hi Marko,
>>>>>
>>>>> I tried to patch the driver but I'm getting an error message:
>>>>>
>>>>> root@mediapc:/usr/local/src/test/mantis-0b04be0c088a# patch -p1 <
>>>>> mantis_dma.c.aligned_dma_trs.patch
>>>>> patching file linux/drivers/media/dvb/mantis/mantis_dma.c
>>>>> patch: **** malformed patch at line 22: int mantis_dma_exit(struct
>>>>> mantis_pci *mantis)
>>>>>
>>>>> Any ideas?
>>>>>
>>>>> Regards
>>>>> Leif
>>>>>
>>>>>
>>>>> Am 14.07.2008 um 22:05 schrieb Marko Ristola:
>>>>>
>>>>>> Hi Leif,
>>>>>>
>>>>>> Here is a patch that implements the mentioned DMA transfer
>>>>>> improvements.
>>>>>> I hope that these contain also the needed fix for you.
>>>>>> You can apply it into jusst.de/mantis Mercurial branch.
>>>>>> It modifies linux/drivers/media/dvb/mantis/mantis_dma.c only.
>>>>>> I have compiled the patch against 2.6.25.9-76.fc9.x86_64.
>>>>>>
>>>>>> cd mantis
>>>>>> patch -p1 < mantis_dma.c.aligned_dma_trs.patch
>>>>>>
>>>>>> Please tell us whether my patch helps you or not: if it helps,
>>>>>> some of my patch might get into jusst.de as
>>>>>> a fix for your problem.
>>>>>>
>>>>>> Best Regards,
>>>>>> Marko
>>>>>
>>>>>
>>>>
>>>> ------------------------------------------------------------------------
>>>>
>>>>
>>>> _______________________________________________
>>>> linux-dvb mailing list
>>>> linux-dvb@linuxtv.org
>>>> http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
>>>
>>
>
>
_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [linux-dvb] TerraTec Cinergy C DVB-C / Twinhan AD-CP400 (VP-2040) & mantis driver
2008-08-05 17:41 ` Marko Ristola
@ 2008-08-06 6:52 ` Mika Båtsman
2008-08-06 19:54 ` Marko Ristola
0 siblings, 1 reply; 11+ messages in thread
From: Mika Båtsman @ 2008-08-06 6:52 UTC (permalink / raw)
To: Marko Ristola; +Cc: linux-dvb
If you can give me a link or mail me your driver I could give it a try too.
-Mika
Marko Ristola wrote:
>
> Maybe I should try with Manu's jusst.de version, if it works for me now
> Better exclude the driver differences away.
> I don't have a CAM module and I haven't tested with two equal cards.
>
> Our problems seem to be similar though.
>
> Marko
>
> Mika Båtsman kirjoitti:
>> Marko Ristola wrote:
>>> Mika Båtsman kirjoitti:
>>>> Hi,
>>>> I also tried your patch because I've had freezes since I got these
>>>> cards. Unfortunately it didn't help me. Got a whooping 5min uptime
>>>> before it all went wrong again. I have 2x Cinergy C + 2.6.24-19 +
>>>> vdr 1.6.
>>>>
>>> Do you have a heat problem? Have you checked your motherboard sensors?
>>> Have you checked that your memory is okay? Air flows easilly?
>>
>> Memory was the first thing I suspected but memtest went through 10+
>> times without a fail. Heat shouldn't be a problem either. There's a
>> big efficient, noisy fan in the back of the case.
>>
>> The machine works fine when dvb is watched with dvbyell
>> http://www.dvbyell.org/ which has cards set to fixed frequency ie.
>> card1 -> 152Mhz and card2 -> 290Mhz. At least for me the problem
>> occurs only with apps like mythtv and vdr which change the frequency
>> of the tuner.
>>
>> -Mika
>>
>>>> I did:
>>>> hg clone http://jusst.de/hg/mantis
>>>> replaced mantis_dma.c with the one you attached, renamed
>>>> MANTIS_GPIF_RDWRN -> MANTIS_GPIF_HIFRDWRN
>>>> make && make install && reboot
>>>>
>>>> Am I missing something? It seemed to compile and install fine.
>>>>
>>>> You said that the mantis_dma.c in jusst.de mantis head is not the
>>>> latest version. Where can it be found then?
>>> I have my own driver version which I have given for Finnish people
>>> for easy installation with remote control support for Twinhan 2033.
>>> (Personally I'm not pleased with the card: now after some years of
>>> development the card works well enough for me finally).
>>>
>>> So the most important feature of my driver for Finnish people has
>>> been the easy compile and install and that the driver ("release") is
>>> tested for Twinhan 2033.
>>> Secondly I have given for some Finnish people the Twinhan 2033 remote
>>> control support included.
>>> Maybe somebody from Finland would be interested with the DMA transfer
>>> fixes, if they have unsolved quality problems. That's a fact that
>>> those tweaks helped me although the root cause is a bit uncertain.
>>> Other features of my driver version like suspend/resume aren't very
>>> important.
>>>
>>> Regards,
>>> Marko Ristola
>>>
>>>>
>>>> Regards,
>>>> Mika Båtsman
>>>>
>>>> Marko Ristola wrote:
>>>>>
>>>>> Hi,
>>>>>
>>>>> Unfortunately I have been busy.
>>>>>
>>>>> The patch you tried was against jusst.de Mantis Mercurial branch head.
>>>>> Your version of mantis_dma.c is not the latest version and thus the
>>>>> patch didn't
>>>>> apply cleanly.
>>>>>
>>>>> Here is the version that I use currently. It doesn't compile
>>>>> straight against jusst.de/mantis head.
>>>>> It might work for you because MANTIS_GPIF_RDWRN is not renamed as
>>>>> MANTIS_GPIF_HIFRDWRN.
>>>>>
>>>>> If it doesn't compile please rename MANTIS_GPIF_RDWRN occurrences
>>>>> into MANTIS_GPIF_HIFRDWRN on that file.
>>>>> Otherwise the file should work as it is.
>>>>>
>>>>> Best regards,
>>>>> Marko Ristola
>>>>>
>>>>> Leif Oberste-Berghaus kirjoitti:
>>>>>> Hi Marko,
>>>>>>
>>>>>> I tried to patch the driver but I'm getting an error message:
>>>>>>
>>>>>> root@mediapc:/usr/local/src/test/mantis-0b04be0c088a# patch -p1 <
>>>>>> mantis_dma.c.aligned_dma_trs.patch
>>>>>> patching file linux/drivers/media/dvb/mantis/mantis_dma.c
>>>>>> patch: **** malformed patch at line 22: int mantis_dma_exit(struct
>>>>>> mantis_pci *mantis)
>>>>>>
>>>>>> Any ideas?
>>>>>>
>>>>>> Regards
>>>>>> Leif
>>>>>>
>>>>>>
>>>>>> Am 14.07.2008 um 22:05 schrieb Marko Ristola:
>>>>>>
>>>>>>> Hi Leif,
>>>>>>>
>>>>>>> Here is a patch that implements the mentioned DMA transfer
>>>>>>> improvements.
>>>>>>> I hope that these contain also the needed fix for you.
>>>>>>> You can apply it into jusst.de/mantis Mercurial branch.
>>>>>>> It modifies linux/drivers/media/dvb/mantis/mantis_dma.c only.
>>>>>>> I have compiled the patch against 2.6.25.9-76.fc9.x86_64.
>>>>>>>
>>>>>>> cd mantis
>>>>>>> patch -p1 < mantis_dma.c.aligned_dma_trs.patch
>>>>>>>
>>>>>>> Please tell us whether my patch helps you or not: if it helps,
>>>>>>> some of my patch might get into jusst.de as
>>>>>>> a fix for your problem.
>>>>>>>
>>>>>>> Best Regards,
>>>>>>> Marko
>>>>>>
>>>>>>
>>>>>
>>>>> ------------------------------------------------------------------------
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> linux-dvb mailing list
>>>>> linux-dvb@linuxtv.org
>>>>> http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
>>>>
>>>
>>
>>
>
_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [linux-dvb] TerraTec Cinergy C DVB-C / Twinhan AD-CP400 (VP-2040) & mantis driver
2008-08-06 6:52 ` Mika Båtsman
@ 2008-08-06 19:54 ` Marko Ristola
0 siblings, 0 replies; 11+ messages in thread
From: Marko Ristola @ 2008-08-06 19:54 UTC (permalink / raw)
To: Mika Båtsman; +Cc: linux-dvb
Mika,
I sent you my latest driver version. It is so big that I can't send it
to everybody.
It's better to not try to use computer's suspend feature.
If the computer works otherwise, you can try it then.
Daan de Beer might help you better, because he has the same card than you.
The minor hardware revision changes might make a difference though.
My card with Mantis chipset might have some problem with ATI display
hardware.
The problems were so big in Finland that nobody wanted to sell Twinhan
2033 for Windows
(or for Linux for me): too many cards were returned to the shop afterwards.
I have ATI display hardware, and now after many years the card works
finally well enough to be usable.
It worked previously only on a computer with a single CPU (no PCI Express).
Regards,
Marko Ristola
Mika Båtsman kirjoitti:
> If you can give me a link or mail me your driver I could give it a try
> too.
>
> -Mika
>
> Marko Ristola wrote:
>>
>> Maybe I should try with Manu's jusst.de version, if it works for me now
>> Better exclude the driver differences away.
>> I don't have a CAM module and I haven't tested with two equal cards.
>>
>> Our problems seem to be similar though.
>>
_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2008-08-06 19:54 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-10 20:42 [linux-dvb] TerraTec Cinergy C DVB-C / Twinhan AD-CP400 (VP-2040) & mantis driver Leif Oberste-Berghaus
2008-07-13 12:50 ` Marko Ristola
2008-07-13 20:49 ` Leif Oberste-Berghaus
2008-07-14 20:05 ` Marko Ristola
[not found] ` <D5C41D41-A72D-4603-9AD1-67A8C5E73289@oberste-berghaus.de>
2008-07-27 17:20 ` Marko Ristola
2008-07-29 12:30 ` Mika Båtsman
2008-08-04 20:29 ` Marko Ristola
2008-08-05 8:41 ` Mika Båtsman
2008-08-05 17:41 ` Marko Ristola
2008-08-06 6:52 ` Mika Båtsman
2008-08-06 19:54 ` Marko Ristola
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox