Search
lxdream.org :: lxdream/src/pvr2/pvr2.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/pvr2/pvr2.c
changeset 269:e41f9b1490d1
prev265:5daf59b7f31b
next274:4e8f1e988d80
author nkeynes
date Thu Jan 11 06:50:11 2007 +0000 (13 years ago)
permissions -rw-r--r--
last change Double hsync width (as per hw)
Add temporary debug statements on the YUV registers
Fix sync status on the back porch
file annotate diff log raw
1.1 --- a/src/pvr2/pvr2.c Sat Jan 06 04:06:36 2007 +0000
1.2 +++ b/src/pvr2/pvr2.c Thu Jan 11 06:50:11 2007 +0000
1.3 @@ -1,5 +1,5 @@
1.4 /**
1.5 - * $Id: pvr2.c,v 1.35 2007-01-06 04:06:36 nkeynes Exp $
1.6 + * $Id: pvr2.c,v 1.36 2007-01-11 06:50:11 nkeynes Exp $
1.7 *
1.8 * PVR2 (Video) Core module implementation and MMIO registers.
1.9 *
1.10 @@ -417,7 +417,7 @@
1.11 break;
1.12 case DISP_SYNCTIME:
1.13 pvr2_state.vsync_lines = (val >> 8) & 0x0F;
1.14 - pvr2_state.hsync_width_ns = ((val & 0x7F) + 1) * 1000000 / pvr2_state.dot_clock;
1.15 + pvr2_state.hsync_width_ns = ((val & 0x7F) + 1) * 2000000 / pvr2_state.dot_clock;
1.16 MMIO_WRITE( PVR2, reg, val&0xFFFFFF7F );
1.17 break;
1.18 case DISP_CFG2:
1.19 @@ -461,6 +461,12 @@
1.20 break;
1.21 /**************** Scaler registers? ****************/
1.22 case SCALERCFG:
1.23 + /* KOS suggests bits as follows:
1.24 + * 0: enable vertical scaling
1.25 + * 10: ???
1.26 + * 16: enable FSAA
1.27 + */
1.28 + DEBUG( "Scaler config set to %08X", val );
1.29 MMIO_WRITE( PVR2, reg, val&0x0007FFFF );
1.30 break;
1.31
1.32 @@ -468,6 +474,7 @@
1.33 MMIO_WRITE( PVR2, reg, val&0x00FFFFF8 );
1.34 break;
1.35 case YUV_CFG:
1.36 + DEBUG( "YUV config set to %08X", val );
1.37 MMIO_WRITE( PVR2, reg, val&0x01013F3F );
1.38 break;
1.39
1.40 @@ -526,14 +533,16 @@
1.41 }
1.42 }
1.43 } else {
1.44 - if( pvr2_state.line_remainder < (pvr2_state.line_time_ns - pvr2_state.back_porch_ns) &&
1.45 - pvr2_state.line_count >= pvr2_state.vsync_lines ) {
1.46 - result |= 0x3800; /* Display active */
1.47 + if( pvr2_state.line_count >= pvr2_state.vsync_lines ) {
1.48 + if( pvr2_state.line_remainder < (pvr2_state.line_time_ns - pvr2_state.back_porch_ns)) {
1.49 + result |= 0x3800; /* Display active */
1.50 + } else {
1.51 + result |= 0x3000;
1.52 + }
1.53 } else {
1.54 result |= 0x1000; /* Back porch */
1.55 }
1.56 }
1.57 -
1.58 return result;
1.59 }
1.60
.