Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 Nov 2002 11:15:46 -0500 (EST)
From:      Tommy Johnson <tjohnson@teryx.bobdbob.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   i386/45678: The bktr driver when capturing a full frame fails to generate signals
Message-ID:  <200211241615.gAOGFk9x016231@teryx.bobdbob.com>

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

>Number:         45678
>Category:       i386
>Synopsis:       The bktr driver when capturing a full frame fails to generate signals
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Nov 24 08:20:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Tommy Johnson
>Release:        FreeBSD 4.7-STABLE i386
>Organization:
bobDbob.com  (personal system)
>Environment:
System: FreeBSD teryx.bobdbob.com 4.7-STABLE FreeBSD 4.7-STABLE #0: Wed Oct 30 19:31:17 EST 2002 protius@teryx.bobdbob.com:/local/src/sys/compile/TERYX i386

bktr1: <BrookTree 878> mem 0xfebfc000-0xfebfcfff irq 14 at device 18.0 on pci0
iicbb1: <I2C bit-banging driver> on bti2c1
iicbus2: <Philips I2C bus> on iicbb1 master-only
iicbus3: <Philips I2C bus> on iicbb1 master-only
smbus2: <System Management Bus> on bti2c1
bktr1: Pinnacle/Miro TV, Philips NTSC tuner.
pci0: <unknown card> (vendor=0x109e, dev=0x0878) at 18.1 irq 14

>Description:

When one is attempting to capture full frames of video in YUV, continuous
mode, the device driver will never signal the userland program when it has
captured a frame.  Yet it works fine with single fields, or RGB.

The problem is that the DMA program for YUV mode is generating extra 
interupts, which makes the driver think it has missed fields, so it does
not deliver any frames.  The RGB DMA program does not generate the extra
interupts.


>How-To-Repeat:

>Fix:


http://www.bobdbob.com/~tjohnson/software/bktrdiff.txt  (in case the mail
system dammages the diff file)


*** bktr_core.c.orig	Sat Nov 23 17:39:20 2002
--- bktr_core.c	Sat Nov 23 21:22:59 2002
***************
*** 806,812 ****
  
  	}
  
- 
  	/*
  	 *  Register the completed field
  	 *    (For dual-field mode, require fields from the same frame)
--- 806,811 ----
***************
*** 3080,3086 ****
  
  	/* contruct sync : for video packet format */
  	/* sync, mode indicator packed data */
! 	*dma_prog++ = OP_SYNC | 1 << 15 | BKTR_FM1;
  	*dma_prog++ = 0;  /* NULL WORD */
  
  	b = cols;
--- 3079,3085 ----
  
  	/* contruct sync : for video packet format */
  	/* sync, mode indicator packed data */
! 	*dma_prog++ = OP_SYNC | BKTR_RESYNC | BKTR_FM1;
  	*dma_prog++ = 0;  /* NULL WORD */
  
  	b = cols;
***************
*** 3096,3102 ****
  	switch (i_flag) {
  	case 1:
  		/* sync vre */
! 		*dma_prog++ = OP_SYNC  | 1 << 24 | BKTR_VRE;
  		*dma_prog++ = 0;  /* NULL WORD */
  
  		*dma_prog++ = OP_JUMP;
--- 3095,3101 ----
  	switch (i_flag) {
  	case 1:
  		/* sync vre */
! 		*dma_prog++ = OP_SYNC  | BKTR_GEN_IRQ | BKTR_VRE;
  		*dma_prog++ = 0;  /* NULL WORD */
  
  		*dma_prog++ = OP_JUMP;
***************
*** 3105,3111 ****
  
  	case 2:
  		/* sync vro */
! 		*dma_prog++ = OP_SYNC  | 1 << 24 | BKTR_VRO;
  		*dma_prog++ = 0;  /* NULL WORD */
  		*dma_prog++ = OP_JUMP;
  		*dma_prog++ = (u_long ) vtophys(bktr->dma_prog);
--- 3104,3110 ----
  
  	case 2:
  		/* sync vro */
! 		*dma_prog++ = OP_SYNC  | BKTR_GEN_IRQ | BKTR_VRO;
  		*dma_prog++ = 0;  /* NULL WORD */
  		*dma_prog++ = OP_JUMP;
  		*dma_prog++ = (u_long ) vtophys(bktr->dma_prog);
***************
*** 3113,3119 ****
  
  	case 3:
  		/* sync vro */
! 		*dma_prog++ = OP_SYNC	 | 1 << 24 | 1 << 15 | BKTR_VRO;
  		*dma_prog++ = 0;  /* NULL WORD */
  		*dma_prog++ = OP_JUMP  ;
  		*dma_prog = (u_long ) vtophys(bktr->odd_dma_prog);
--- 3112,3118 ----
  
  	case 3:
  		/* sync 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);
***************
*** 3127,3133 ****
  		dma_prog = (u_long * ) bktr->odd_dma_prog;
  
  		/* sync vre */
! 		*dma_prog++ = OP_SYNC | 1 << 24 |  1 << 15 | BKTR_FM1;
  		*dma_prog++ = 0;  /* NULL WORD */
  
  		for (i = 0; i < (rows/interlace) ; i++) {
--- 3126,3132 ----
  		dma_prog = (u_long * ) bktr->odd_dma_prog;
  
  		/* sync vre */
! 		*dma_prog++ = OP_SYNC | BKTR_RESYNC | BKTR_FM1;
  		*dma_prog++ = 0;  /* NULL WORD */
  
  		for (i = 0; i < (rows/interlace) ; i++) {
***************
*** 3140,3146 ****
  	}
  
  	/* sync vro IRQ bit */
! 	*dma_prog++ = OP_SYNC   |  1 << 24  | 1 << 15 |  BKTR_VRE;
  	*dma_prog++ = 0;  /* NULL WORD */
  	*dma_prog++ = OP_JUMP ;
  	*dma_prog++ = (u_long ) vtophys(bktr->dma_prog);
--- 3139,3145 ----
  	}
  
  	/* sync vro IRQ bit */
! 	*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);
>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




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