patch-2.1.75 linux/drivers/char/bttv.c

Next file: linux/drivers/char/mem.c
Previous file: linux/drivers/char/apm_bios.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.74/linux/drivers/char/bttv.c linux/drivers/char/bttv.c
@@ -378,7 +378,7 @@
 		 */
 		case 1: 
 			btwrite(BT848_COLOR_FMT_RGB8, BT848_COLOR_FMT);
-			btand(~0x10, BT848_CAP_CTL); // Dithering looks much better in this mode
+			btand(~0x10, BT848_CAP_CTL);  /* Dithering looks much better in this mode */
 			break;
 		case 2: 
 			btwrite(BT848_COLOR_FMT_RGB16, BT848_COLOR_FMT);
@@ -721,7 +721,9 @@
  *	Cliprect -> risc table.
  *
  *	FIXME: This is generating wrong code when we have some kinds of
- *	rectangle lists. I don't currently understand why.
+ *	rectangle lists. If you generate overlapped rectangles then it
+ *	gets a bit confused. Since we add the frame buffer clip rectangles
+ *	we need to fix this. Better yet to rewrite this function.
  */
  
 static void write_risc_data(struct bttv *btv, struct video_clip *vp, int count)
@@ -818,6 +820,11 @@
 			while ((cur=cur->next));
 		}
 
+		/*
+		 *	Fixme - we have to handle overlapped rectangles
+		 *	here, but the overlap might be partial
+		 */
+		 
 		/* add rect to second (x-sorted) list if rect.y == y  */
 		if ((cur=first.next)) 
 		{
@@ -1068,7 +1075,7 @@
 			/* Only channel 0 has a tuner */
 			if(v.tuner!=0 || lastchan)
 				return -EINVAL;
-			if(v.mode!=VIDEO_MODE_PAL||v.mode!=VIDEO_MODE_NTSC)
+			if(v.mode!=VIDEO_MODE_PAL&&v.mode!=VIDEO_MODE_NTSC)
 				return -EOPNOTSUPP;
 			btv->win.norm = v.mode;
 			bt848_set_size(btv);
@@ -1262,6 +1269,9 @@
 			vp=btv->audio_dev;
 			vp.flags&=~(VIDEO_AUDIO_MUTE|VIDEO_AUDIO_MUTABLE);
 			vp.flags|=VIDEO_AUDIO_MUTABLE;
+			strcpy(vp.name,"TV");
+			if(copy_to_user(&v,arg,sizeof(v)))
+				return -EFAULT;
 			return 0;
 		}
 		case VIDIOCSAUDIO:

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov