diff options
Diffstat (limited to 'drivers/media/dvb/ttpci/budget-patch.c')
-rw-r--r-- | drivers/media/dvb/ttpci/budget-patch.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/media/dvb/ttpci/budget-patch.c b/drivers/media/dvb/ttpci/budget-patch.c index 9fc9185a8426..1b3aaac5e763 100644 --- a/drivers/media/dvb/ttpci/budget-patch.c +++ b/drivers/media/dvb/ttpci/budget-patch.c | |||
@@ -577,6 +577,17 @@ static int budget_patch_attach (struct saa7146_dev* dev, struct saa7146_pci_exte | |||
577 | saa7146_setgpio(dev, 3, SAA7146_GPIO_OUTLO); | 577 | saa7146_setgpio(dev, 3, SAA7146_GPIO_OUTLO); |
578 | // Set RPS1 Address register to point to RPS code (r108 p42) | 578 | // Set RPS1 Address register to point to RPS code (r108 p42) |
579 | saa7146_write(dev, RPS_ADDR1, dev->d_rps1.dma_handle); | 579 | saa7146_write(dev, RPS_ADDR1, dev->d_rps1.dma_handle); |
580 | |||
581 | if (!(budget = kmalloc (sizeof(struct budget_patch), GFP_KERNEL))) | ||
582 | return -ENOMEM; | ||
583 | |||
584 | dprintk(2, "budget: %p\n", budget); | ||
585 | |||
586 | if ((err = ttpci_budget_init (budget, dev, info, THIS_MODULE))) { | ||
587 | kfree (budget); | ||
588 | return err; | ||
589 | } | ||
590 | |||
580 | // Set Source Line Counter Threshold, using BRS (rCC p43) | 591 | // Set Source Line Counter Threshold, using BRS (rCC p43) |
581 | // It generates HS event every TS_HEIGHT lines | 592 | // It generates HS event every TS_HEIGHT lines |
582 | // this is related to TS_WIDTH set in register | 593 | // this is related to TS_WIDTH set in register |
@@ -585,24 +596,13 @@ static int budget_patch_attach (struct saa7146_dev* dev, struct saa7146_pci_exte | |||
585 | //,then RPS_THRESH1 | 596 | //,then RPS_THRESH1 |
586 | // should be set to trigger every TS_HEIGHT (512) lines. | 597 | // should be set to trigger every TS_HEIGHT (512) lines. |
587 | // | 598 | // |
588 | saa7146_write(dev, RPS_THRESH1, (TS_HEIGHT*1) | MASK_12 ); | 599 | saa7146_write(dev, RPS_THRESH1, budget->buffer_height | MASK_12 ); |
589 | 600 | ||
590 | // saa7146_write(dev, RPS_THRESH0, ((TS_HEIGHT/2)<<16) |MASK_28| (TS_HEIGHT/2) |MASK_12 ); | 601 | // saa7146_write(dev, RPS_THRESH0, ((TS_HEIGHT/2)<<16) |MASK_28| (TS_HEIGHT/2) |MASK_12 ); |
591 | // Enable RPS1 (rFC p33) | 602 | // Enable RPS1 (rFC p33) |
592 | saa7146_write(dev, MC1, (MASK_13 | MASK_29)); | 603 | saa7146_write(dev, MC1, (MASK_13 | MASK_29)); |
593 | 604 | ||
594 | 605 | ||
595 | if (!(budget = kmalloc (sizeof(struct budget_patch), GFP_KERNEL))) | ||
596 | return -ENOMEM; | ||
597 | |||
598 | dprintk(2, "budget: %p\n", budget); | ||
599 | |||
600 | if ((err = ttpci_budget_init (budget, dev, info, THIS_MODULE))) { | ||
601 | kfree (budget); | ||
602 | return err; | ||
603 | } | ||
604 | |||
605 | |||
606 | dev->ext_priv = budget; | 606 | dev->ext_priv = budget; |
607 | 607 | ||
608 | budget->dvb_adapter.priv = budget; | 608 | budget->dvb_adapter.priv = budget; |