Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Dec 1995 17:25:53 -0600 (CST)
From:      Mark Tinguely <tinguely@plains.nodak.edu>
To:        james@miller.cs.uwm.edu, luigi@labinfo.iet.unipi.it
Cc:        hackers@freebsd.org
Subject:   Re:  meteor driver bug
Message-ID:  <199512182325.RAA29819@plains.nodak.edu>

next in thread | raw e-mail | index | archive | help
>  > BUG: around line 1072 of the driver, the following code:
>  > 
>  >                 *p++ = buf;     /* even y or even RGB */
>  >                                 /* set end of buffer location */
>  >                 *(p+36)  = *(p+35) = buf + mtr->alloc_pages * PAGE_SIZE;
>  > 
>  >     the last line should read 
>  > 
>  >                 *(p+34)  = *(p+35) = buf + mtr->alloc_pages * PAGE_SIZE;
>  > 
>  >     as the pointer (p) has been already incremented. Due to this
>  >     bug, we are going to write past the end of the 7116 registers,
>  >     with unknown effects.
>  
>  Hmmm... By my count there are 38 4 byte registers and we want to offset to
>  dma end (even) and dma end (odd), which would be +36 & +37.  Since we 
>  increment, then we want 35 & 36...  I will count again, but I think this
>  code is correct.
>  > 

I think Luigi is correct, the DMA is at offset 0x8c and 0x90 (35 and 36
4 byte words), I combined the auto-increment of p and the (p+35), (p+36)
from two seperate setting of buf variable and didn't look too close.
The code does not let a person hit the end of the DMA buffer, but it
is good to be safe.

>  > 
>  > /* 01 */        0x30,   /* 7:0  Horizontal Sync Begin for 50hz */
>  > /* 02 */        0x00,   /* 7:0  Horizontal Sync Stop for 50hz */
>  > /* 03 */        0xe8,   /* 7:0  Horizontal Sync Clamp Start for 50hz */
>  > /* 04 */        0xb6,   /* 7:0  Horizontal Sync Clamp Stop for 50hz */
>  > /* 05 */        0xf4,   /* 7:0  Horizontal Sync Start after PH1 for 50hz */

Luigi has the 50 Hz video, I  trust what you say works good for 50 Hz.

--mark.



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