Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 306380
b: refs/heads/master
c: 30fdf03
h: refs/heads/master
v: v3
  • Loading branch information
Hans Verkuil authored and Mauro Carvalho Chehab committed May 14, 2012
1 parent 021dcb7 commit cc000c2
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 54 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: 932205a7ea64bab9edda04b9d555a277b57943fd
refs/heads/master: 30fdf035874a3b3f5d54f75147bddc2467cb0b7d
3 changes: 1 addition & 2 deletions trunk/drivers/media/video/cx25821/cx25821-audio-upstream.c
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,7 @@ int cx25821_audio_upstream_irq(struct cx25821_dev *dev, int chan_num,
static irqreturn_t cx25821_upstream_irq_audio(int irq, void *dev_id)
{
struct cx25821_dev *dev = dev_id;
u32 msk_stat, audio_status;
u32 audio_status;
int handled = 0;
struct sram_channel *sram_ch;

Expand All @@ -594,7 +594,6 @@ static irqreturn_t cx25821_upstream_irq_audio(int irq, void *dev_id)

sram_ch = dev->channels[dev->_audio_upstream_channel].sram_channels;

msk_stat = cx_read(sram_ch->int_mstat);
audio_status = cx_read(sram_ch->int_stat);

/* Only deal with our interrupt */
Expand Down
14 changes: 2 additions & 12 deletions trunk/drivers/media/video/cx25821/cx25821-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -379,14 +379,6 @@ static inline int i2c_slave_did_ack(struct i2c_adapter *i2c_adap)
return cx_read(bus->reg_stat) & 0x01;
}

void cx_i2c_read_print(struct cx25821_dev *dev, u32 reg, const char *reg_string)
{
int tmp = 0;
u32 value = 0;

value = cx25821_i2c_read(&dev->i2c_bus[0], reg, &tmp);
}

static void cx25821_registers_init(struct cx25821_dev *dev)
{
u32 tmp;
Expand Down Expand Up @@ -895,7 +887,7 @@ static void cx25821_iounmap(struct cx25821_dev *dev)

static int cx25821_dev_setup(struct cx25821_dev *dev)
{
int io_size = 0, i;
int i;

pr_info("\n***********************************\n");
pr_info("cx25821 set up\n");
Expand Down Expand Up @@ -960,7 +952,6 @@ static int cx25821_dev_setup(struct cx25821_dev *dev)

/* PCIe stuff */
dev->base_io_addr = pci_resource_start(dev->pci, 0);
io_size = pci_resource_len(dev->pci, 0);

if (!dev->base_io_addr) {
CX25821_ERR("No PCI Memory resources, exiting!\n");
Expand Down Expand Up @@ -1317,13 +1308,12 @@ void cx25821_free_buffer(struct videobuf_queue *q, struct cx25821_buffer *buf)
static irqreturn_t cx25821_irq(int irq, void *dev_id)
{
struct cx25821_dev *dev = dev_id;
u32 pci_status, pci_mask;
u32 pci_status;
u32 vid_status;
int i, handled = 0;
u32 mask[8] = { 1, 2, 4, 8, 16, 32, 64, 128 };

pci_status = cx_read(PCI_INT_STAT);
pci_mask = cx_read(PCI_INT_MSK);

if (pci_status == 0)
goto out;
Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/media/video/cx25821/cx25821-i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,6 @@ void cx25821_av_clk(struct cx25821_dev *dev, int enable)
int cx25821_i2c_read(struct cx25821_i2c *bus, u16 reg_addr, int *value)
{
struct i2c_client *client = &bus->i2c_client;
int retval = 0;
int v = 0;
u8 addr[2] = { 0, 0 };
u8 buf[4] = { 0, 0, 0, 0 };
Expand All @@ -385,7 +384,7 @@ int cx25821_i2c_read(struct cx25821_i2c *bus, u16 reg_addr, int *value)
msgs[0].addr = 0x44;
msgs[1].addr = 0x44;

retval = i2c_xfer(client->adapter, msgs, 2);
i2c_xfer(client->adapter, msgs, 2);

v = (buf[3] << 24) | (buf[2] << 16) | (buf[1] << 8) | buf[0];
*value = v;
Expand Down
13 changes: 5 additions & 8 deletions trunk/drivers/media/video/cx25821/cx25821-medusa-video.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
static void medusa_enable_bluefield_output(struct cx25821_dev *dev, int channel,
int enable)
{
int ret_val = 1;
u32 value = 0;
u32 tmp = 0;
int out_ctrl = OUT_CTRL1;
Expand Down Expand Up @@ -79,13 +78,13 @@ static void medusa_enable_bluefield_output(struct cx25821_dev *dev, int channel,
value &= 0xFFFFFF7F; /* clear BLUE_FIELD_EN */
if (enable)
value |= 0x00000080; /* set BLUE_FIELD_EN */
ret_val = cx25821_i2c_write(&dev->i2c_bus[0], out_ctrl, value);
cx25821_i2c_write(&dev->i2c_bus[0], out_ctrl, value);

value = cx25821_i2c_read(&dev->i2c_bus[0], out_ctrl_ns, &tmp);
value &= 0xFFFFFF7F;
if (enable)
value |= 0x00000080; /* set BLUE_FIELD_EN */
ret_val = cx25821_i2c_write(&dev->i2c_bus[0], out_ctrl_ns, value);
cx25821_i2c_write(&dev->i2c_bus[0], out_ctrl_ns, value);
}

static int medusa_initialize_ntsc(struct cx25821_dev *dev)
Expand Down Expand Up @@ -431,7 +430,6 @@ void medusa_set_resolution(struct cx25821_dev *dev, int width,
{
int decoder = 0;
int decoder_count = 0;
int ret_val = 0;
u32 hscale = 0x0;
u32 vscale = 0x0;
const int MAX_WIDTH = 720;
Expand Down Expand Up @@ -482,9 +480,9 @@ void medusa_set_resolution(struct cx25821_dev *dev, int width,

for (; decoder < decoder_count; decoder++) {
/* write scaling values for each decoder */
ret_val = cx25821_i2c_write(&dev->i2c_bus[0],
cx25821_i2c_write(&dev->i2c_bus[0],
HSCALE_CTRL + (0x200 * decoder), hscale);
ret_val = cx25821_i2c_write(&dev->i2c_bus[0],
cx25821_i2c_write(&dev->i2c_bus[0],
VSCALE_CTRL + (0x200 * decoder), vscale);
}

Expand All @@ -494,7 +492,6 @@ void medusa_set_resolution(struct cx25821_dev *dev, int width,
static void medusa_set_decoderduration(struct cx25821_dev *dev, int decoder,
int duration)
{
int ret_val = 0;
u32 fld_cnt = 0;
u32 tmp = 0;
u32 disp_cnt_reg = DISP_AB_CNT;
Expand Down Expand Up @@ -537,7 +534,7 @@ static void medusa_set_decoderduration(struct cx25821_dev *dev, int decoder,
fld_cnt |= ((u32) duration) << 16;
}

ret_val = cx25821_i2c_write(&dev->i2c_bus[0], disp_cnt_reg, fld_cnt);
cx25821_i2c_write(&dev->i2c_bus[0], disp_cnt_reg, fld_cnt);

mutex_unlock(&dev->lock);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@ int cx25821_video_upstream_irq_ch2(struct cx25821_dev *dev, int chan_num,
static irqreturn_t cx25821_upstream_irq_ch2(int irq, void *dev_id)
{
struct cx25821_dev *dev = dev_id;
u32 msk_stat, vid_status;
u32 vid_status;
int handled = 0;
int channel_num = 0;
struct sram_channel *sram_ch;
Expand All @@ -598,7 +598,6 @@ static irqreturn_t cx25821_upstream_irq_ch2(int irq, void *dev_id)
channel_num = VID_UPSTREAM_SRAM_CHANNEL_J;
sram_ch = dev->channels[channel_num].sram_channels;

msk_stat = cx_read(sram_ch->int_mstat);
vid_status = cx_read(sram_ch->int_stat);

/* Only deal with our interrupt */
Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/media/video/cx25821/cx25821-video-upstream.c
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,7 @@ int cx25821_video_upstream_irq(struct cx25821_dev *dev, int chan_num,
static irqreturn_t cx25821_upstream_irq(int irq, void *dev_id)
{
struct cx25821_dev *dev = dev_id;
u32 msk_stat, vid_status;
u32 vid_status;
int handled = 0;
int channel_num = 0;
struct sram_channel *sram_ch;
Expand All @@ -649,7 +649,6 @@ static irqreturn_t cx25821_upstream_irq(int irq, void *dev_id)

sram_ch = dev->channels[channel_num].sram_channels;

msk_stat = cx_read(sram_ch->int_mstat);
vid_status = cx_read(sram_ch->int_stat);

/* Only deal with our interrupt */
Expand Down
25 changes: 2 additions & 23 deletions trunk/drivers/media/video/cx25821/cx25821-video.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,25 +109,6 @@ struct cx25821_fmt *cx25821_format_by_fourcc(unsigned int fourcc)
return NULL;
}

void cx25821_dump_video_queue(struct cx25821_dev *dev,
struct cx25821_dmaqueue *q)
{
struct cx25821_buffer *buf;
struct list_head *item;
dprintk(1, "%s()\n", __func__);

if (!list_empty(&q->active)) {
list_for_each(item, &q->active)
buf = list_entry(item, struct cx25821_buffer, vb.queue);
}

if (!list_empty(&q->queued)) {
list_for_each(item, &q->queued)
buf = list_entry(item, struct cx25821_buffer, vb.queue);
}

}

void cx25821_video_wakeup(struct cx25821_dev *dev, struct cx25821_dmaqueue *q,
u32 count)
{
Expand Down Expand Up @@ -557,7 +538,7 @@ int cx25821_buffer_prepare(struct videobuf_queue *q, struct videobuf_buffer *vb,
struct cx25821_buffer *buf =
container_of(vb, struct cx25821_buffer, vb);
int rc, init_buffer = 0;
u32 line0_offset, line1_offset;
u32 line0_offset;
struct videobuf_dmabuf *dma = videobuf_to_dma(&buf->vb);
int bpl_local = LINE_SIZE_D1;
int channel_opened = fh->channel_id;
Expand Down Expand Up @@ -639,7 +620,6 @@ int cx25821_buffer_prepare(struct videobuf_queue *q, struct videobuf_buffer *vb,
case V4L2_FIELD_INTERLACED:
/* All other formats are top field first */
line0_offset = 0;
line1_offset = buf->bpl;
dprintk(1, "top field first\n");

cx25821_risc_buffer(dev->pci, &buf->risc,
Expand Down Expand Up @@ -1830,7 +1810,6 @@ static long video_ioctl_set(struct file *file, unsigned int cmd,
int i = 0;
int cif_enable = 0;
int cif_width = 0;
u32 value = 0;

data_from_user = (struct downstream_user_struct *)arg;

Expand Down Expand Up @@ -1914,7 +1893,7 @@ static long video_ioctl_set(struct file *file, unsigned int cmd,
cx_write(data_from_user->reg_address, data_from_user->reg_data);
break;
case MEDUSA_READ:
value = cx25821_i2c_read(&dev->i2c_bus[0],
cx25821_i2c_read(&dev->i2c_bus[0],
(u16) data_from_user->reg_address,
&data_from_user->reg_data);
break;
Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/media/video/cx25821/cx25821-video.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,6 @@ extern struct cx25821_fmt formats[];
extern struct cx25821_fmt *cx25821_format_by_fourcc(unsigned int fourcc);
extern struct cx25821_data timeout_data[MAX_VID_CHANNEL_NUM];

extern void cx25821_dump_video_queue(struct cx25821_dev *dev,
struct cx25821_dmaqueue *q);
extern void cx25821_video_wakeup(struct cx25821_dev *dev,
struct cx25821_dmaqueue *q, u32 count);

Expand Down

0 comments on commit cc000c2

Please sign in to comment.