[Mplayer-cvslog] CVS: main/vidix/drivers Makefile,1.1,1.2 radeon_vid.c,1.5,1.6

Nick Kurshev nick at mplayer.dev.hu
Mon Jan 7 10:28:24 CET 2002


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

Modified Files:
	Makefile radeon_vid.c 
Log Message:
Embedding vidix

Index: Makefile
===================================================================
RCS file: /cvsroot/mplayer/main/vidix/drivers/Makefile,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Makefile	5 Jan 2002 18:18:19 -0000	1.1
+++ Makefile	7 Jan 2002 09:28:21 -0000	1.2
@@ -2,6 +2,8 @@
 
 include ../../config.mak
 
+BINDIR = $(prefix)/lib/mplayer/vidix
+
 
 RADEON_VID=radeon_vid.so
 RADEON_SRCS=radeon_vid.c
@@ -26,13 +28,13 @@
 	$(CC) -c $(RADEON_CFLAGS) -o $@ $<
 
 $(RADEON_VID):     $(RADEON_OBJS)
-	$(CC) $(RADEON_LIBS) -shared -o $(RADEON_VID) $(RADEON_OBJS)
+	$(LD) $(RADEON_LIBS) -shared -soname $(RADEON_VID) -o $(RADEON_VID) $(RADEON_OBJS)
 
 $(RAGE128_OBJS):    $(RAGE128_SRCS)
 	$(CC) -c $(RAGE128_CFLAGS) -o $@ $<
 
 $(RAGE128_VID):     $(RAGE128_OBJS)
-	$(CC) $(RAGE128_LIBS) -shared -o $(RAGE128_VID) $(RAGE128_OBJS)
+	$(LD) $(RAGE128_LIBS) -shared -soname $(RAGE128_VID) -o $(RAGE128_VID) $(RAGE128_OBJS)
 
 clean:
 	rm -f *.o *.so *~
@@ -46,7 +48,8 @@
 	$(CC) -MM $(CFLAGS) $(SRCS) 1>.depend
 
 install:
-
+	mkdir -p $(BINDIR)
+	cp *.so $(BINDIR)
 #
 # include dependency files if they exist
 #

Index: radeon_vid.c
===================================================================
RCS file: /cvsroot/mplayer/main/vidix/drivers/radeon_vid.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- radeon_vid.c	6 Jan 2002 19:23:14 -0000	1.5
+++ radeon_vid.c	7 Jan 2002 09:28:21 -0000	1.6
@@ -1,5 +1,8 @@
 /*
    radeon_vid - VIDIX based video driver for Radeon and Rage128 chips
+   Copyrights 2002 Nick Kurshev. This file is based on sources from
+   GATOS (gatos.sf.net) and X11 (www.xfree86.org)
+   Licence: GPL
 */
 
 #include <linux/pci_ids.h>
@@ -25,7 +28,7 @@
 #endif
 #endif
 
-#define DEBUG 1
+static int __verbose = 0;
 
 typedef struct bes_registers_s
 {
@@ -83,9 +86,7 @@
 
 typedef struct video_registers_s
 {
-#ifdef DEBUG
   const char * sname;
-#endif
   uint32_t name;
   uint32_t value;
 }video_registers_t;
@@ -94,12 +95,7 @@
 #ifndef RAGE128
 static int IsR200=0;
 #endif
-#ifdef DEBUG
 #define DECLARE_VREG(name) { #name, name, 0 }
-#else
-#define DECLARE_VREG(name) { name, 0 }
-#endif
-#ifdef DEBUG
 static video_registers_t vregs[] = 
 {
   DECLARE_VREG(VIDEOMUX_CNTL),
@@ -194,7 +190,7 @@
   DECLARE_VREG(IDCT_AUTH),
   DECLARE_VREG(IDCT_CONTROL)
 };
-#endif
+
 static void * radeon_mmio_base = 0;
 static void * radeon_mem_base = 0; 
 static int32_t radeon_overlay_off = 0;
@@ -629,6 +625,7 @@
   pciinfo_t lst[MAX_PCI_DEVICES];
   unsigned i,num_pci;
   int err;
+  __verbose = verbose;
   err = pci_scan(lst,&num_pci);
   if(err)
   {
@@ -724,7 +721,6 @@
     return ENOSYS;
 }
 
-#ifdef DEBUG
 static void radeon_vid_dump_regs( void )
 {
   size_t i;
@@ -738,7 +734,6 @@
 	printf(RADEON_MSG"%s = %08X\n",vregs[i].sname,INREG(vregs[i].name));
   printf(RADEON_MSG"*** End of OV0 registers dump ***\n");
 }
-#endif
 
 static void radeon_vid_stop_video( void )
 {
@@ -848,9 +843,7 @@
     }
     OUTREG(OV0_SCALE_CNTL,		bes_flags);
     OUTREG(OV0_REG_LOAD_CNTL,		0);
-#ifdef DEBUG
-    radeon_vid_dump_regs();
-#endif
+    if(__verbose > 1) radeon_vid_dump_regs();
 }
 
 static unsigned radeon_query_pitch(unsigned fourcc)
@@ -1050,9 +1043,7 @@
     OUTREG(OV0_VID_BUF1_BASE_ADRS,	off1);
     OUTREG(OV0_VID_BUF2_BASE_ADRS,	off2);
     OUTREG(OV0_REG_LOAD_CNTL,		0);
-#ifdef DEBUG
-    radeon_vid_dump_regs();
-#endif
+    if(__verbose > 1) radeon_vid_dump_regs();
     return 0;
 }
 




More information about the MPlayer-cvslog mailing list