From 2a9cba23bdfd39ba5028f416941f2050b0b03ae0 Mon Sep 17 00:00:00 2001 From: Andy Walls Date: Sat, 13 Mar 2010 20:37:25 -0300 Subject: [PATCH] --- yaml --- r: 192815 b: refs/heads/master c: 4e1af31aaaa8cc4a5cc1d894bdf04dfc7450d47f h: refs/heads/master i: 192813: 73e7e6d35f16f74f8fd87cefb0ee941a5caa9ae6 192811: 306ca97c29d204136fb08790d93cc8a694bdc30e 192807: 7d31d005329be47ede5dadf4c46395a886cc49f7 192799: ffb4374268402911ebfcb1e353d07c22729a9795 v: v3 --- [refs] | 2 +- trunk/drivers/media/video/ivtv/ivtv-driver.h | 3 +++ trunk/drivers/media/video/ivtv/ivtv-ioctl.c | 2 +- trunk/drivers/media/video/ivtv/ivtv-irq.c | 8 +++++--- trunk/drivers/media/video/ivtv/ivtvfb.c | 2 +- 5 files changed, 11 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index ef467ab374f6..ca428c3f0ae7 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 2443baeaa01388f56824c55c087510312b8d8197 +refs/heads/master: 4e1af31aaaa8cc4a5cc1d894bdf04dfc7450d47f diff --git a/trunk/drivers/media/video/ivtv/ivtv-driver.h b/trunk/drivers/media/video/ivtv/ivtv-driver.h index 5028e31c564a..851f07de5296 100644 --- a/trunk/drivers/media/video/ivtv/ivtv-driver.h +++ b/trunk/drivers/media/video/ivtv/ivtv-driver.h @@ -116,6 +116,9 @@ #define IVTV_REG_VPU (0x9058) #define IVTV_REG_APU (0xA064) +/* Other registers */ +#define IVTV_REG_DEC_LINE_FIELD (0x28C0) + /* debugging */ extern int ivtv_debug; diff --git a/trunk/drivers/media/video/ivtv/ivtv-ioctl.c b/trunk/drivers/media/video/ivtv/ivtv-ioctl.c index 2192bc42c6b6..c29ff983d43e 100644 --- a/trunk/drivers/media/video/ivtv/ivtv-ioctl.c +++ b/trunk/drivers/media/video/ivtv/ivtv-ioctl.c @@ -1140,7 +1140,7 @@ int ivtv_s_std(struct file *file, void *fh, v4l2_std_id *std) for (f = 0; f < 4; f++) { prepare_to_wait(&itv->vsync_waitq, &wait, TASK_UNINTERRUPTIBLE); - if ((read_reg(0x28c0) >> 16) < 100) + if ((read_reg(IVTV_REG_DEC_LINE_FIELD) >> 16) < 100) break; schedule_timeout(msecs_to_jiffies(25)); } diff --git a/trunk/drivers/media/video/ivtv/ivtv-irq.c b/trunk/drivers/media/video/ivtv/ivtv-irq.c index 12d36ca91d53..dbd46c5d6975 100644 --- a/trunk/drivers/media/video/ivtv/ivtv-irq.c +++ b/trunk/drivers/media/video/ivtv/ivtv-irq.c @@ -752,7 +752,7 @@ static void ivtv_irq_vsync(struct ivtv *itv) * to determine the line being displayed and ensure we handle * one vsync per frame. */ - unsigned int frame = read_reg(0x28c0) & 1; + unsigned int frame = read_reg(IVTV_REG_DEC_LINE_FIELD) & 1; struct yuv_playback_info *yi = &itv->yuv_info; int last_dma_frame = atomic_read(&yi->next_dma_frame); struct yuv_frame_info *f = &yi->new_frame_info[last_dma_frame]; @@ -852,9 +852,11 @@ irqreturn_t ivtv_irq_handler(int irq, void *dev_id) */ if (~itv->irqmask & IVTV_IRQ_DEC_VSYNC) { /* vsync is enabled, see if we're in a new field */ - if ((itv->last_vsync_field & 1) != (read_reg(0x28c0) & 1)) { + if ((itv->last_vsync_field & 1) != + (read_reg(IVTV_REG_DEC_LINE_FIELD) & 1)) { /* New field, looks like we missed it */ - IVTV_DEBUG_YUV("VSync interrupt missed %d\n",read_reg(0x28c0)>>16); + IVTV_DEBUG_YUV("VSync interrupt missed %d\n", + read_reg(IVTV_REG_DEC_LINE_FIELD) >> 16); vsync_force = 1; } } diff --git a/trunk/drivers/media/video/ivtv/ivtvfb.c b/trunk/drivers/media/video/ivtv/ivtvfb.c index de2ff1c6ac34..49e1a283ed36 100644 --- a/trunk/drivers/media/video/ivtv/ivtvfb.c +++ b/trunk/drivers/media/video/ivtv/ivtvfb.c @@ -460,7 +460,7 @@ static int ivtvfb_ioctl(struct fb_info *info, unsigned int cmd, unsigned long ar vblank.flags = FB_VBLANK_HAVE_COUNT |FB_VBLANK_HAVE_VCOUNT | FB_VBLANK_HAVE_VSYNC; - trace = read_reg(0x028c0) >> 16; + trace = read_reg(IVTV_REG_DEC_LINE_FIELD) >> 16; if (itv->is_50hz && trace > 312) trace -= 312; else if (itv->is_60hz && trace > 262)