Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Jun 2003 11:02:42 +0200
From:      Andre Albsmeier <andre.albsmeier@siemens.com>
To:        Max Khon <fjoe@freebsd.org>
Cc:        roger@freebsd.org
Subject:   Re: cvs commit: src/sys/dev/bktr bktr_core.c
Message-ID:  <20030618090242.GA23697@curry.mchp.siemens.de>
In-Reply-To: <200306171652.h5HGqmJ3050516@repoman.freebsd.org>
References:  <200306171652.h5HGqmJ3050516@repoman.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--mYCpIKhGyMATD0i+
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Tue, 17-Jun-2003 at 09:52:48 -0700, Max Khon wrote:
> fjoe        2003/06/17 09:52:48 PDT
> 
>   FreeBSD src repository
> 
>   Modified files:        (Branch: RELENG_4)
>     sys/dev/bktr         bktr_core.c 
>   Log:
>   MFC rev 1.124:
>   Fix a bug which caused signals on YUV images to fail.
>   
>   MFC rev 1.125:
>   Fix broken programming of VSCALE_HI registers in yuv422_prog().
>   
>   Revision   Changes    Path
>   1.103.2.5  +9 -10     src/sys/dev/bktr/bktr_core.c
> _______________________________________________

[CC'ed roger as well]

Thanks for this one!

However, there are also some style changes in this commit which
change the ugly 1 << ... expressions into a more readable form.
I would suggest to do this in the whole file -- please see the
attached patch (against v 1.103.2.5)

Thanks,

	-Andre

--mYCpIKhGyMATD0i+
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="bktr_core.c.diff"

--- bktr_core.c.ORI	Wed Jun 18 10:53:27 2003
+++ bktr_core.c	Wed Jun 18 10:56:02 2003
@@ -3198,7 +3198,7 @@
 	t1 = buffer;
 
 	/* contruct sync : for video packet format */
-	*dma_prog++ = OP_SYNC  | 1 << 15 |	BKTR_FM3; /*sync, mode indicator packed data*/
+	*dma_prog++ = OP_SYNC  | BKTR_RESYNC |	BKTR_FM3; /*sync, mode indicator packed data*/
 	*dma_prog++ = 0;  /* NULL WORD */
 
 	for (i = 0; i < (rows/interlace ) ; i++) {
@@ -3212,7 +3212,7 @@
 
 	switch (i_flag) {
 	case 1:
-		*dma_prog++ = OP_SYNC  | 1 << 24 | BKTR_VRE;  /*sync vre*/
+		*dma_prog++ = OP_SYNC  | BKTR_GEN_IRQ | BKTR_VRE;  /*sync vre*/
 		*dma_prog++ = 0;  /* NULL WORD */
 
 		*dma_prog++ = OP_JUMP ;
@@ -3220,7 +3220,7 @@
 		return;
 
 	case 2:
-		*dma_prog++ = OP_SYNC  | 1 << 24 | BKTR_VRO;  /*sync vre*/
+		*dma_prog++ = OP_SYNC  | BKTR_GEN_IRQ | BKTR_VRO;  /*sync vre*/
 		*dma_prog++ = 0;  /* NULL WORD */
 
 		*dma_prog++ = OP_JUMP;
@@ -3228,7 +3228,7 @@
 		return;
 
 	case 3:
-		*dma_prog++ = OP_SYNC	| 1 << 24 |  1 << 15 |   BKTR_VRO; 
+		*dma_prog++ = OP_SYNC	| BKTR_GEN_IRQ |  BKTR_RESYNC |   BKTR_VRO; 
 		*dma_prog++ = 0;  /* NULL WORD */
 
 		*dma_prog++ = OP_JUMP  ;
@@ -3242,7 +3242,7 @@
 
 		target_buffer  = (u_long) buffer + cols;
 		t1 = buffer + cols/2;
-		*dma_prog++ = OP_SYNC	|   1 << 15 | BKTR_FM3; 
+		*dma_prog++ = OP_SYNC	|   BKTR_RESYNC | BKTR_FM3; 
 		*dma_prog++ = 0;  /* NULL WORD */
 
 		for (i = 0; i < (rows/interlace )  ; i++) {
@@ -3255,7 +3255,7 @@
 		}
 	}
     
-	*dma_prog++ = OP_SYNC  | 1 << 24 | 1 << 15 |   BKTR_VRE; 
+	*dma_prog++ = OP_SYNC  | BKTR_GEN_IRQ | BKTR_RESYNC |   BKTR_VRE; 
 	*dma_prog++ = 0;  /* NULL WORD */
 	*dma_prog++ = OP_JUMP ;
 	*dma_prog++ = (u_long ) vtophys(bktr->dma_prog) ;
@@ -3297,7 +3297,7 @@
 	buffer = target_buffer;
  	t1 = buffer;
  
- 	*dma_prog++ = OP_SYNC  | 1 << 15 |	BKTR_FM3; /*sync, mode indicator packed data*/
+ 	*dma_prog++ = OP_SYNC  | BKTR_RESYNC |	BKTR_FM3; /*sync, mode indicator packed data*/
  	*dma_prog++ = 0;  /* NULL WORD */
  	       
  	for (i = 0; i < (rows/interlace )/2 ; i++) {
@@ -3316,7 +3316,7 @@
  
  	switch (i_flag) {
  	case 1:
- 		*dma_prog++ = OP_SYNC  | 1 << 24 | BKTR_VRE;  /*sync vre*/
+ 		*dma_prog++ = OP_SYNC  | BKTR_GEN_IRQ | BKTR_VRE;  /*sync vre*/
  		*dma_prog++ = 0;  /* NULL WORD */
 
 		*dma_prog++ = OP_JUMP;
@@ -3324,7 +3324,7 @@
  		return;
 
  	case 2:
- 		*dma_prog++ = OP_SYNC  | 1 << 24 | BKTR_VRO;  /*sync vro*/
+ 		*dma_prog++ = OP_SYNC  | BKTR_GEN_IRQ | BKTR_VRO;  /*sync vro*/
  		*dma_prog++ = 0;  /* NULL WORD */
 
 		*dma_prog++ = OP_JUMP;
@@ -3332,7 +3332,7 @@
  		return;
  
  	case 3:
- 		*dma_prog++ = OP_SYNC |  1 << 24 | 1 << 15 | BKTR_VRO;
+ 		*dma_prog++ = OP_SYNC |  BKTR_GEN_IRQ | BKTR_RESYNC | BKTR_VRO;
 		*dma_prog++ = 0;  /* NULL WORD */
 		*dma_prog++ = OP_JUMP ;
 		*dma_prog = (u_long ) vtophys(bktr->odd_dma_prog);
@@ -3345,7 +3345,7 @@
 
 		target_buffer  = (u_long) buffer + cols;
 		t1 = buffer + cols/2;
-		*dma_prog++ = OP_SYNC   | 1 << 15 | BKTR_FM3; 
+		*dma_prog++ = OP_SYNC   | BKTR_RESYNC | BKTR_FM3; 
 		*dma_prog++ = 0;  /* NULL WORD */
 
 		for (i = 0; i < ((rows/interlace )/2 ) ; i++) {
@@ -3365,7 +3365,7 @@
 	
 	}
     
-	*dma_prog++ = OP_SYNC |  1 << 24 | 1 << 15 | BKTR_VRE;
+	*dma_prog++ = OP_SYNC |  BKTR_GEN_IRQ | BKTR_RESYNC | BKTR_VRE;
 	*dma_prog++ = 0;  /* NULL WORD */
 	*dma_prog++ = OP_JUMP;
 	*dma_prog++ = (u_long ) vtophys(bktr->dma_prog);

--mYCpIKhGyMATD0i+--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030618090242.GA23697>