[Mplayer-cvslog] CVS: main/drivers mga_vid.c,1.38,1.39

Arpi of Ize arpi at mplayer.dev.hu
Sun Mar 10 04:35:42 CET 2002


Update of /cvsroot/mplayer/main/drivers
In directory mplayer:/var/tmp.root/cvs-serv13053

Modified Files:
	mga_vid.c 
Log Message:
min() moved out of #if, applied brightness/contrast patch by Brian J. Murrell

Index: mga_vid.c
===================================================================
RCS file: /cvsroot/mplayer/main/drivers/mga_vid.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -r1.38 -r1.39
--- mga_vid.c	16 Feb 2002 19:58:39 -0000	1.38
+++ mga_vid.c	10 Mar 2002 03:35:27 -0000	1.39
@@ -97,11 +97,11 @@
 static uint32_t mga_param_buff_size=0;
 static uint32_t mga_param_buff_len=0;
 
+#define min(x,y) (((x)<(y))?(x):(y))
+
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0)
 #include <linux/ctype.h>
 
-#define min(x,y) (((x)<(y))?(x):(y))
-
 unsigned long simple_strtoul(const char *cp,char **endp,unsigned int base)
 {
         unsigned long result = 0,value;
@@ -1141,6 +1141,8 @@
 static int mga_vid_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg)
 {
 	int frame;
+	uint32_t tmp;
+
 
 	switch(cmd) 
 	{
@@ -1231,6 +1233,22 @@
 			mga_vid_frame_sel(frame);
 		break;
 
+		case MGA_VID_GET_LUMA:
+			tmp = regs.beslumactl - 0x80;
+			if (copy_to_user((uint32_t *) arg, &tmp, sizeof(uint32_t)))
+			{
+				printk(KERN_ERR "mga_vid: failed copy %p to userspace %p\n",
+					   &tmp, (uint32_t *) arg);
+				return(-EFAULT);
+			}
+		break;
+			
+		case MGA_VID_SET_LUMA:
+			tmp = arg;
+			regs.beslumactl = tmp + 0x80;
+			mga_vid_write_regs(0);
+		break;
+			
 	        default:
 			printk(KERN_ERR "mga_vid: Invalid ioctl\n");
 			return (-EINVAL);




More information about the MPlayer-cvslog mailing list