Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 219378
b: refs/heads/master
c: 7c16182
h: refs/heads/master
v: v3
  • Loading branch information
Steven Toth authored and Mauro Carvalho Chehab committed Oct 21, 2010
1 parent 8f3da12 commit 36d42d7
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 56 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cfbaf33733b99d214d5616dcb48a690630c19d65
refs/heads/master: 7c1618227e6932fcd92597507ee63c01da73e623
1 change: 0 additions & 1 deletion trunk/drivers/media/video/saa7164/saa7164-buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,6 @@ int saa7164_buffer_cfg_port(struct saa7164_port *port)

dprintk(DBGLVL_BUF, "%s(port=%d)\n", __func__, port->nr);

port->counter = 0;
saa7164_writel(port->bufcounter, 0);
saa7164_writel(port->pitch, params->pitch);
saa7164_writel(port->bufsize, params->pitch * params->numberoflines);
Expand Down
39 changes: 1 addition & 38 deletions trunk/drivers/media/video/saa7164/saa7164-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -363,10 +363,6 @@ static void saa7164_work_enchandler(struct work_struct *w)
printk(KERN_ERR "%s() illegal rp count %d\n", __func__, rp);
break;
}

/* Process a buffer */
if (port->nr == SAA7164_PORT_ENC1)
printk(KERN_ERR "Port enc1 processing buffer %d\n", rp);
saa7164_work_enchandler_helper(port, rp);
port->last_svc_rp = rp;
cnt++;
Expand All @@ -375,15 +371,13 @@ static void saa7164_work_enchandler(struct work_struct *w)
break;
}

if (port->nr == SAA7164_PORT_ENC1)
printk(KERN_ERR "Enc1 processed %d buffers for port %p\n", cnt, port);

if (print_histogram == port->nr) {
saa7164_histogram_print(port, &port->irq_interval);
saa7164_histogram_print(port, &port->svc_interval);
saa7164_histogram_print(port, &port->irq_svc_interval);
saa7164_histogram_print(port, &port->read_interval);
saa7164_histogram_print(port, &port->poll_interval);
/* TODO: fix this to preserve any previous state */
print_histogram = 64 + port->nr;
}
}
Expand Down Expand Up @@ -766,7 +760,6 @@ static int get_resources(struct saa7164_dev *dev)
static int saa7164_port_init(struct saa7164_dev *dev, int portnr)
{
struct saa7164_port *port = 0;
int i;

if ((portnr < 0) || (portnr >= SAA7164_MAX_PORTS))
BUG();
Expand Down Expand Up @@ -805,18 +798,6 @@ static int saa7164_port_init(struct saa7164_dev *dev, int portnr)
saa7164_histogram_reset(&port->poll_interval,
"encoder poll() intervals");

if (port->type == SAA7164_MPEG_ENCODER) {
for (i = 0; i < 8; i ++) {
port->shadow_buf[i] = kzalloc(256 * 128, GFP_KERNEL);
if (port->shadow_buf[i] == 0)
printk(KERN_ERR "%s() shadow_buf ENOMEM\n", __func__);
else {
memset(port->shadow_buf[i], 0xff, 256 * 128);
port->shadow_crc[i] = crc32(0, port->shadow_buf[i], 256 * 128);
}
}
}

return 0;
}

Expand Down Expand Up @@ -1094,8 +1075,6 @@ static void saa7164_shutdown(struct saa7164_dev *dev)
static void __devexit saa7164_finidev(struct pci_dev *pci_dev)
{
struct saa7164_dev *dev = pci_get_drvdata(pci_dev);
struct saa7164_port *port;
int i;

saa7164_histogram_print(&dev->ports[ SAA7164_PORT_ENC1 ],
&dev->ports[ SAA7164_PORT_ENC1 ].irq_interval);
Expand All @@ -1110,22 +1089,6 @@ static void __devexit saa7164_finidev(struct pci_dev *pci_dev)

saa7164_shutdown(dev);

port = &dev->ports[ SAA7164_PORT_ENC1 ];
if (port->type == SAA7164_MPEG_ENCODER) {
for (i = 0; i < 8; i ++) {
kfree(port->shadow_buf[i]);
port->shadow_buf[i] = 0;
}
}
port = &dev->ports[ SAA7164_PORT_ENC2 ];
if (port->type == SAA7164_MPEG_ENCODER) {
for (i = 0; i < 8; i ++) {
kfree(port->shadow_buf[i]);
port->shadow_buf[i] = 0;
}
}


if (saa7164_boards[dev->board].porta == SAA7164_MPEG_DVB)
saa7164_dvb_unregister(&dev->ports[ SAA7164_PORT_TS1 ]);

Expand Down
8 changes: 0 additions & 8 deletions trunk/drivers/media/video/saa7164/saa7164-encoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -1008,7 +1008,6 @@ struct saa7164_user_buffer *saa7164_enc_next_buf(struct saa7164_port *port)
struct saa7164_user_buffer *buf = 0;
struct saa7164_dev *dev = port->dev;
u32 crc;
u32 *d;

mutex_lock(&port->dmaqueue_lock);
if (!list_empty(&port->list_buf_used.list)) {
Expand All @@ -1021,13 +1020,6 @@ struct saa7164_user_buffer *saa7164_enc_next_buf(struct saa7164_port *port)
buf, buf->crc, crc);
}

d = (u32 *)buf->data;

if ((*d & 0xffffff) > (port->read_counter + 0x2000))
printk(KERN_ERR "%s() *d 0x%x port %p\n", __func__, *d, port);

port->read_counter = *d;

}
mutex_unlock(&port->dmaqueue_lock);

Expand Down
8 changes: 0 additions & 8 deletions trunk/drivers/media/video/saa7164/saa7164.h
Original file line number Diff line number Diff line change
Expand Up @@ -378,8 +378,6 @@ struct saa7164_port {
struct saa7164_encoder_params encoder_params;
struct video_device *v4l_device;
atomic_t v4l_reader_count;
// spinlock_t slock;
// struct mutex fops_lock;

struct saa7164_buffer list_buf_used;
struct saa7164_buffer list_buf_free;
Expand All @@ -391,12 +389,6 @@ struct saa7164_port {
u32 a_cc_errors;
u8 last_v_cc;
u8 last_a_cc;

u8 *shadow_buf[8];
u32 shadow_crc[8];

u32 counter;
u32 read_counter;
};

struct saa7164_dev {
Expand Down

0 comments on commit 36d42d7

Please sign in to comment.