Deleted Added
full compact
bktr_core.c (43099) bktr_core.c (43311)
1/* $Id: brooktree848.c,v 1.61 1998/12/14 06:32:54 dillon Exp $ */
1/* $Id: brooktree848.c,v 1.62 1999/01/23 11:32:06 roger Exp $ */
2/* BT848 Driver for Brooktree's Bt848 based cards.
3 The Brooktree BT848 Driver driver is based upon Mark Tinguely and
4 Jim Lowe's driver for the Matrox Meteor PCI card . The
5 Philips SAA 7116 and SAA 7196 are very different chipsets than
6 the BT848. For starters, the BT848 is a one chipset solution and
7 it incorporates a RISC engine to control the DMA transfers --
8 that is it the actual dma process is control by a program which
9 resides in the hosts memory also the register definitions between

--- 3169 unchanged lines hidden (view full) ---

3179 u_int skip, start_skip;
3180
3181 /* For RGB24, we need to align the component in FIFO Byte Lane 0 */
3182 /* to the 1st byte in the mem dword containing our start addr. */
3183 /* BTW, we know this pixfmt's 1st byte is Blue; thus the start addr */
3184 /* must be Blue. */
3185 start_skip = 0;
3186 if (( pf->type == METEOR_PIXTYPE_RGB ) && ( pf->Bpp == 3 ))
2/* BT848 Driver for Brooktree's Bt848 based cards.
3 The Brooktree BT848 Driver driver is based upon Mark Tinguely and
4 Jim Lowe's driver for the Matrox Meteor PCI card . The
5 Philips SAA 7116 and SAA 7196 are very different chipsets than
6 the BT848. For starters, the BT848 is a one chipset solution and
7 it incorporates a RISC engine to control the DMA transfers --
8 that is it the actual dma process is control by a program which
9 resides in the hosts memory also the register definitions between

--- 3169 unchanged lines hidden (view full) ---

3179 u_int skip, start_skip;
3180
3181 /* For RGB24, we need to align the component in FIFO Byte Lane 0 */
3182 /* to the 1st byte in the mem dword containing our start addr. */
3183 /* BTW, we know this pixfmt's 1st byte is Blue; thus the start addr */
3184 /* must be Blue. */
3185 start_skip = 0;
3186 if (( pf->type == METEOR_PIXTYPE_RGB ) && ( pf->Bpp == 3 ))
3187 switch ( ((uintptr_t) (void *) *target_buffer) % 4 ) {
3187 switch ( ((uintptr_t) (volatile void *) *target_buffer) % 4 ) {
3188 case 2 : start_skip = 4 ; break;
3189 case 1 : start_skip = 8 ; break;
3190 }
3191
3192 if ((width * pixel_width) < DMA_BT848_SPLIT ) {
3193 if ( width == cols) {
3194 flag = OP_SOL | OP_EOL;
3195 } else if (bktr->current_col == 0 ) {

--- 6 unchanged lines hidden (view full) ---

3202 if (( flag & OP_SOL ) && ( start_skip > 0 )) {
3203 *(*dma_prog)++ = OP_SKIP | OP_SOL | start_skip;
3204 flag &= ~OP_SOL;
3205 skip = start_skip;
3206 }
3207
3208 *(*dma_prog)++ = operation | flag | (width * pixel_width - skip);
3209 if (operation != OP_SKIP )
3188 case 2 : start_skip = 4 ; break;
3189 case 1 : start_skip = 8 ; break;
3190 }
3191
3192 if ((width * pixel_width) < DMA_BT848_SPLIT ) {
3193 if ( width == cols) {
3194 flag = OP_SOL | OP_EOL;
3195 } else if (bktr->current_col == 0 ) {

--- 6 unchanged lines hidden (view full) ---

3202 if (( flag & OP_SOL ) && ( start_skip > 0 )) {
3203 *(*dma_prog)++ = OP_SKIP | OP_SOL | start_skip;
3204 flag &= ~OP_SOL;
3205 skip = start_skip;
3206 }
3207
3208 *(*dma_prog)++ = operation | flag | (width * pixel_width - skip);
3209 if (operation != OP_SKIP )
3210 *(*dma_prog)++ = (uintptr_t) (void *) *target_buffer;
3210 *(*dma_prog)++ = (uintptr_t) (volatile void *) *target_buffer;
3211
3212 *target_buffer += width * pixel_width;
3213 bktr->current_col += width;
3214
3215 } else {
3216
3217 if (bktr->current_col == 0 && width == cols) {
3218 flag = OP_SOL ;

--- 14 unchanged lines hidden (view full) ---

3233 *(*dma_prog)++ = OP_SKIP | OP_SOL | start_skip;
3234 flag &= ~OP_SOL;
3235 skip = start_skip;
3236 }
3237
3238 *(*dma_prog)++ = operation | flag |
3239 (width * pixel_width / 2 - skip);
3240 if (operation != OP_SKIP )
3211
3212 *target_buffer += width * pixel_width;
3213 bktr->current_col += width;
3214
3215 } else {
3216
3217 if (bktr->current_col == 0 && width == cols) {
3218 flag = OP_SOL ;

--- 14 unchanged lines hidden (view full) ---

3233 *(*dma_prog)++ = OP_SKIP | OP_SOL | start_skip;
3234 flag &= ~OP_SOL;
3235 skip = start_skip;
3236 }
3237
3238 *(*dma_prog)++ = operation | flag |
3239 (width * pixel_width / 2 - skip);
3240 if (operation != OP_SKIP )
3241 *(*dma_prog)++ = (uintptr_t) (void *) *target_buffer ;
3241 *(*dma_prog)++ = (uintptr_t) (volatile void *) *target_buffer ;
3242 *target_buffer += (width * pixel_width / 2) ;
3243
3244 if ( operation == OP_WRITE )
3245 operation = OP_WRITEC;
3246 *(*dma_prog)++ = operation | flag2 |
3247 (width * pixel_width / 2);
3248 *target_buffer += (width * pixel_width / 2) ;
3249 bktr->current_col += width;

--- 2386 unchanged lines hidden ---
3242 *target_buffer += (width * pixel_width / 2) ;
3243
3244 if ( operation == OP_WRITE )
3245 operation = OP_WRITEC;
3246 *(*dma_prog)++ = operation | flag2 |
3247 (width * pixel_width / 2);
3248 *target_buffer += (width * pixel_width / 2) ;
3249 bktr->current_col += width;

--- 2386 unchanged lines hidden ---