aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-08-21 01:48:24 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-08-21 01:48:24 -0400
commit09d4b9aa90ab7a0ce7c266d2ea18153bf79bba33 (patch)
tree3cb012538b28eca465226f9164b0a4ebe281afa4
parentb5748643332bf75274e0b639926d57e86fb133cf (diff)
parent70cd685d4b161c9137020ba7ec551cb343cd6fbf (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb
* 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb: V4L/DVB (6028): Turn an unnecessary mdelay() into msleep(). V4L/DVB (6027): Get rid of an ill-behaved msleep in i2c write V4L/DVB (6026): Avoid powering up the camera on resume V4L/DVB (6016): get_dvb_firmware: update script for new location of tda10046 firmware V4L/DVB (5991): dvb-pll: Set minimum and maximum frequency properly V4L/DVB (5969): ivtv: report ivtv version in status log V4L/DVB (5967): ivtv: fix VIDIOC_S_FBUF:new OSD values where never set V4L/DVB (5968): videodev2.h: remove superfluous FBUF GLOBAL_INV_ALPHA support
-rw-r--r--Documentation/dvb/get_dvb_firmware24
-rw-r--r--drivers/media/dvb/frontends/dvb-pll.c2
-rw-r--r--drivers/media/video/cafe_ccic.c35
-rw-r--r--drivers/media/video/ivtv/ivtv-ioctl.c3
-rw-r--r--drivers/media/video/ov7670.c5
-rw-r--r--include/linux/videodev2.h2
6 files changed, 51 insertions, 20 deletions
diff --git a/Documentation/dvb/get_dvb_firmware b/Documentation/dvb/get_dvb_firmware
index b4d306ae9234..f2e908d7f90d 100644
--- a/Documentation/dvb/get_dvb_firmware
+++ b/Documentation/dvb/get_dvb_firmware
@@ -111,21 +111,21 @@ sub tda10045 {
111} 111}
112 112
113sub tda10046 { 113sub tda10046 {
114 my $sourcefile = "tt_budget_217g.zip"; 114 my $sourcefile = "TT_PCI_2.19h_28_11_2006.zip";
115 my $url = "http://www.technotrend.de/new/217g/$sourcefile"; 115 my $url = "http://technotrend-online.com/download/software/219/$sourcefile";
116 my $hash = "6a7e1e2f2644b162ff0502367553c72d"; 116 my $hash = "6a7e1e2f2644b162ff0502367553c72d";
117 my $outfile = "dvb-fe-tda10046.fw"; 117 my $outfile = "dvb-fe-tda10046.fw";
118 my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 1); 118 my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 1);
119 119
120 checkstandard(); 120 checkstandard();
121 121
122 wgetfile($sourcefile, $url); 122 wgetfile($sourcefile, $url);
123 unzip($sourcefile, $tmpdir); 123 unzip($sourcefile, $tmpdir);
124 extract("$tmpdir/software/OEM/PCI/App/ttlcdacc.dll", 0x3f731, 24478, "$tmpdir/fwtmp"); 124 extract("$tmpdir/TT_PCI_2.19h_28_11_2006/software/OEM/PCI/App/ttlcdacc.dll", 0x65389, 24478, "$tmpdir/fwtmp");
125 verify("$tmpdir/fwtmp", $hash); 125 verify("$tmpdir/fwtmp", $hash);
126 copy("$tmpdir/fwtmp", $outfile); 126 copy("$tmpdir/fwtmp", $outfile);
127 127
128 $outfile; 128 $outfile;
129} 129}
130 130
131sub tda10046lifeview { 131sub tda10046lifeview {
diff --git a/drivers/media/dvb/frontends/dvb-pll.c b/drivers/media/dvb/frontends/dvb-pll.c
index ca99e439c97c..11f7d5939bd9 100644
--- a/drivers/media/dvb/frontends/dvb-pll.c
+++ b/drivers/media/dvb/frontends/dvb-pll.c
@@ -784,7 +784,7 @@ struct dvb_frontend *dvb_pll_attach(struct dvb_frontend *fe, int pll_addr,
784 strncpy(fe->ops.tuner_ops.info.name, desc->name, 784 strncpy(fe->ops.tuner_ops.info.name, desc->name,
785 sizeof(fe->ops.tuner_ops.info.name)); 785 sizeof(fe->ops.tuner_ops.info.name));
786 fe->ops.tuner_ops.info.frequency_min = desc->min; 786 fe->ops.tuner_ops.info.frequency_min = desc->min;
787 fe->ops.tuner_ops.info.frequency_min = desc->max; 787 fe->ops.tuner_ops.info.frequency_max = desc->max;
788 if (!desc->initdata) 788 if (!desc->initdata)
789 fe->ops.tuner_ops.init = NULL; 789 fe->ops.tuner_ops.init = NULL;
790 if (!desc->sleepdata) 790 if (!desc->sleepdata)
diff --git a/drivers/media/video/cafe_ccic.c b/drivers/media/video/cafe_ccic.c
index c08f650df423..ef5361824f87 100644
--- a/drivers/media/video/cafe_ccic.c
+++ b/drivers/media/video/cafe_ccic.c
@@ -356,6 +356,7 @@ static int cafe_smbus_write_data(struct cafe_camera *cam,
356{ 356{
357 unsigned int rval; 357 unsigned int rval;
358 unsigned long flags; 358 unsigned long flags;
359 DEFINE_WAIT(the_wait);
359 360
360 spin_lock_irqsave(&cam->dev_lock, flags); 361 spin_lock_irqsave(&cam->dev_lock, flags);
361 rval = TWSIC0_EN | ((addr << TWSIC0_SID_SHIFT) & TWSIC0_SID); 362 rval = TWSIC0_EN | ((addr << TWSIC0_SID_SHIFT) & TWSIC0_SID);
@@ -369,10 +370,29 @@ static int cafe_smbus_write_data(struct cafe_camera *cam,
369 rval = value | ((command << TWSIC1_ADDR_SHIFT) & TWSIC1_ADDR); 370 rval = value | ((command << TWSIC1_ADDR_SHIFT) & TWSIC1_ADDR);
370 cafe_reg_write(cam, REG_TWSIC1, rval); 371 cafe_reg_write(cam, REG_TWSIC1, rval);
371 spin_unlock_irqrestore(&cam->dev_lock, flags); 372 spin_unlock_irqrestore(&cam->dev_lock, flags);
372 msleep(2); /* Required or things flake */
373 373
374 /*
375 * Time to wait for the write to complete. THIS IS A RACY
376 * WAY TO DO IT, but the sad fact is that reading the TWSIC1
377 * register too quickly after starting the operation sends
378 * the device into a place that may be kinder and better, but
379 * which is absolutely useless for controlling the sensor. In
380 * practice we have plenty of time to get into our sleep state
381 * before the interrupt hits, and the worst case is that we
382 * time out and then see that things completed, so this seems
383 * the best way for now.
384 */
385 do {
386 prepare_to_wait(&cam->smbus_wait, &the_wait,
387 TASK_UNINTERRUPTIBLE);
388 schedule_timeout(1); /* even 1 jiffy is too long */
389 finish_wait(&cam->smbus_wait, &the_wait);
390 } while (!cafe_smbus_write_done(cam));
391
392#ifdef IF_THE_CAFE_HARDWARE_WORKED_RIGHT
374 wait_event_timeout(cam->smbus_wait, cafe_smbus_write_done(cam), 393 wait_event_timeout(cam->smbus_wait, cafe_smbus_write_done(cam),
375 CAFE_SMBUS_TIMEOUT); 394 CAFE_SMBUS_TIMEOUT);
395#endif
376 spin_lock_irqsave(&cam->dev_lock, flags); 396 spin_lock_irqsave(&cam->dev_lock, flags);
377 rval = cafe_reg_read(cam, REG_TWSIC1); 397 rval = cafe_reg_read(cam, REG_TWSIC1);
378 spin_unlock_irqrestore(&cam->dev_lock, flags); 398 spin_unlock_irqrestore(&cam->dev_lock, flags);
@@ -710,7 +730,7 @@ static void cafe_ctlr_init(struct cafe_camera *cam)
710 * Here we must wait a bit for the controller to come around. 730 * Here we must wait a bit for the controller to come around.
711 */ 731 */
712 spin_unlock_irqrestore(&cam->dev_lock, flags); 732 spin_unlock_irqrestore(&cam->dev_lock, flags);
713 mdelay(5); /* FIXME revisit this */ 733 msleep(5);
714 spin_lock_irqsave(&cam->dev_lock, flags); 734 spin_lock_irqsave(&cam->dev_lock, flags);
715 735
716 cafe_reg_write(cam, REG_GL_CSR, GCSR_CCIC_EN|GCSR_SRC|GCSR_MRC); 736 cafe_reg_write(cam, REG_GL_CSR, GCSR_CCIC_EN|GCSR_SRC|GCSR_MRC);
@@ -2233,12 +2253,21 @@ static int cafe_pci_resume(struct pci_dev *pdev)
2233 if (ret) 2253 if (ret)
2234 return ret; 2254 return ret;
2235 ret = pci_enable_device(pdev); 2255 ret = pci_enable_device(pdev);
2256
2236 if (ret) { 2257 if (ret) {
2237 cam_warn(cam, "Unable to re-enable device on resume!\n"); 2258 cam_warn(cam, "Unable to re-enable device on resume!\n");
2238 return ret; 2259 return ret;
2239 } 2260 }
2240 cafe_ctlr_init(cam); 2261 cafe_ctlr_init(cam);
2241 cafe_ctlr_power_up(cam); 2262 cafe_ctlr_power_down(cam);
2263
2264 mutex_lock(&cam->s_mutex);
2265 if (cam->users > 0) {
2266 cafe_ctlr_power_up(cam);
2267 __cafe_cam_reset(cam);
2268 }
2269 mutex_unlock(&cam->s_mutex);
2270
2242 set_bit(CF_CONFIG_NEEDED, &cam->flags); 2271 set_bit(CF_CONFIG_NEEDED, &cam->flags);
2243 if (cam->state == S_SPECREAD) 2272 if (cam->state == S_SPECREAD)
2244 cam->state = S_IDLE; /* Don't bother restarting */ 2273 cam->state = S_IDLE; /* Don't bother restarting */
diff --git a/drivers/media/video/ivtv/ivtv-ioctl.c b/drivers/media/video/ivtv/ivtv-ioctl.c
index 047624b9e271..5977a79619c2 100644
--- a/drivers/media/video/ivtv/ivtv-ioctl.c
+++ b/drivers/media/video/ivtv/ivtv-ioctl.c
@@ -1190,6 +1190,7 @@ int ivtv_v4l2_ioctls(struct ivtv *itv, struct file *filp, unsigned int cmd, void
1190 itv->osd_global_alpha_state = (fb->flags & V4L2_FBUF_FLAG_GLOBAL_ALPHA) != 0; 1190 itv->osd_global_alpha_state = (fb->flags & V4L2_FBUF_FLAG_GLOBAL_ALPHA) != 0;
1191 itv->osd_local_alpha_state = (fb->flags & V4L2_FBUF_FLAG_LOCAL_ALPHA) != 0; 1191 itv->osd_local_alpha_state = (fb->flags & V4L2_FBUF_FLAG_LOCAL_ALPHA) != 0;
1192 itv->osd_color_key_state = (fb->flags & V4L2_FBUF_FLAG_CHROMAKEY) != 0; 1192 itv->osd_color_key_state = (fb->flags & V4L2_FBUF_FLAG_CHROMAKEY) != 0;
1193 ivtv_set_osd_alpha(itv);
1193 break; 1194 break;
1194 } 1195 }
1195 1196
@@ -1234,7 +1235,7 @@ int ivtv_v4l2_ioctls(struct ivtv *itv, struct file *filp, unsigned int cmd, void
1234 IVTV_INFO("Tuner: %s\n", 1235 IVTV_INFO("Tuner: %s\n",
1235 test_bit(IVTV_F_I_RADIO_USER, &itv->i_flags) ? "Radio" : "TV"); 1236 test_bit(IVTV_F_I_RADIO_USER, &itv->i_flags) ? "Radio" : "TV");
1236 cx2341x_log_status(&itv->params, itv->name); 1237 cx2341x_log_status(&itv->params, itv->name);
1237 IVTV_INFO("Status flags: 0x%08lx\n", itv->i_flags); 1238 IVTV_INFO("Version: %s Status flags: 0x%08lx\n", IVTV_VERSION, itv->i_flags);
1238 for (i = 0; i < IVTV_MAX_STREAMS; i++) { 1239 for (i = 0; i < IVTV_MAX_STREAMS; i++) {
1239 struct ivtv_stream *s = &itv->streams[i]; 1240 struct ivtv_stream *s = &itv->streams[i];
1240 1241
diff --git a/drivers/media/video/ov7670.c b/drivers/media/video/ov7670.c
index f8f21ddd9843..c4c5bd67f795 100644
--- a/drivers/media/video/ov7670.c
+++ b/drivers/media/video/ov7670.c
@@ -416,7 +416,10 @@ static int ov7670_read(struct i2c_client *c, unsigned char reg,
416static int ov7670_write(struct i2c_client *c, unsigned char reg, 416static int ov7670_write(struct i2c_client *c, unsigned char reg,
417 unsigned char value) 417 unsigned char value)
418{ 418{
419 return i2c_smbus_write_byte_data(c, reg, value); 419 int ret = i2c_smbus_write_byte_data(c, reg, value);
420 if (reg == REG_COM7 && (value & COM7_RESET))
421 msleep(2); /* Wait for reset to run */
422 return ret;
420} 423}
421 424
422 425
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
index c66c8a3410b9..ae9b24c12f6a 100644
--- a/include/linux/videodev2.h
+++ b/include/linux/videodev2.h
@@ -617,7 +617,6 @@ struct v4l2_framebuffer
617#define V4L2_FBUF_CAP_LOCAL_ALPHA 0x0010 617#define V4L2_FBUF_CAP_LOCAL_ALPHA 0x0010
618#define V4L2_FBUF_CAP_GLOBAL_ALPHA 0x0020 618#define V4L2_FBUF_CAP_GLOBAL_ALPHA 0x0020
619#define V4L2_FBUF_CAP_LOCAL_INV_ALPHA 0x0040 619#define V4L2_FBUF_CAP_LOCAL_INV_ALPHA 0x0040
620#define V4L2_FBUF_CAP_GLOBAL_INV_ALPHA 0x0080
621/* Flags for the 'flags' field. */ 620/* Flags for the 'flags' field. */
622#define V4L2_FBUF_FLAG_PRIMARY 0x0001 621#define V4L2_FBUF_FLAG_PRIMARY 0x0001
623#define V4L2_FBUF_FLAG_OVERLAY 0x0002 622#define V4L2_FBUF_FLAG_OVERLAY 0x0002
@@ -625,7 +624,6 @@ struct v4l2_framebuffer
625#define V4L2_FBUF_FLAG_LOCAL_ALPHA 0x0008 624#define V4L2_FBUF_FLAG_LOCAL_ALPHA 0x0008
626#define V4L2_FBUF_FLAG_GLOBAL_ALPHA 0x0010 625#define V4L2_FBUF_FLAG_GLOBAL_ALPHA 0x0010
627#define V4L2_FBUF_FLAG_LOCAL_INV_ALPHA 0x0020 626#define V4L2_FBUF_FLAG_LOCAL_INV_ALPHA 0x0020
628#define V4L2_FBUF_FLAG_GLOBAL_INV_ALPHA 0x0040
629 627
630struct v4l2_clip 628struct v4l2_clip
631{ 629{