On Mon, 1 Jul 2002, James Ralston wrote:
> On 2 Jul 2002, Michel D�nzer wrote:
>
> > On Tue, 2002-07-02 at 00:17, James Ralston wrote:
> >
> > > On 1 Jul 2002, Michel D�nzer wrote:
> > >
> > > > Well, I wouldn't measure the non-triviality in lines of
> > > > code. :) It's mostly due to Kevin's cleanups of the
> > > > formatting, isn't it?
> > >
> > > Alas, it probably isn't: the Radeon X-Video patch which Keith
> > > committed on 2002-06-27 changed many parts of radeon_accel.c and
> > > radeon.h. :(
> >
> > Didn't even touch radeon_accel.c.
> >
> > > Trying to apply your patch to current CVS yields:
> > >
> > > 21 out of 36 hunks FAILED -- saving rejects to file
> > > radeon_accel.c.rej
> >
> > Kevin E. Martin cleaned the driver up a while ago. Look at the
> > rejects and you see that they are only due to formatting changes.
>
> You're correct; I was confusing radeon_accel.c and radeon_video.c.
> My bad. I'll integrate your patch into current CVS, test it, and
> make the revised version available.
Unfortunately, not all of the changes were cosmetic. :(
I've attached the hunks which I couldn't reconcile. There's only one
hunk which I think is still important, and it's this one:
***************
*** 1496,1501 ****
ADVANCE_RING();
}
--- 1518,1524 ----
ADVANCE_RING();
+ info->trans_color = -1;
}
Michel, what function was this hunk trying to append to? (I suspect
it was RADEONCPSetupForSolidLine(), but it's now impossible to tell
for certain).
--
James Ralston, Information Technology
Software Engineering Institute
Carnegie Mellon University, Pittsburgh, PA, USA
***************
*** 865,871 ****
#else
RADEONWaitForFifo(pScrn, 5);
OUTREG(RADEON_RBBM_GUICNTL, RADEON_HOST_DATA_SWAP_NONE);
- OUTREG(RADEON_DP_GUI_MASTER_CNTL, (info->dp_gui_master_cntl
| RADEON_GMC_DST_CLIPPING
| RADEON_GMC_BRUSH_NONE
| (bg == -1
--- 890,897 ----
#else
RADEONWaitForFifo(pScrn, 5);
OUTREG(RADEON_RBBM_GUICNTL, RADEON_HOST_DATA_SWAP_NONE);
+ OUTREG(RADEON_DP_GUI_MASTER_CNTL, info->dp_gui_master_cntl_cache =
+ (info->dp_gui_master_cntl
| RADEON_GMC_DST_CLIPPING
| RADEON_GMC_BRUSH_NONE
| (bg == -1
***************
*** 1331,1348 ****
ADVANCE_RING();
#endif
- if (trans_color != -1) {
- /* Set up for transparency */
- BEGIN_RING( 6 );
- OUT_RING_REG(RADEON_CLR_CMP_CLR_SRC, trans_color);
- OUT_RING_REG(RADEON_CLR_CMP_MASK, RADEON_CLR_CMP_MSK);
- /* Mmmm, Seems as though the transparency compare is opposite to r128
- * It should only draw when source != trans_color,
- * this is the opposite of that. */
- OUT_RING_REG(RADEON_CLR_CMP_CNTL, (RADEON_SRC_CMP_EQ_COLOR
- | RADEON_CLR_CMP_SRC_SOURCE));
- ADVANCE_RING();
- }
info->scanline_bpp = bpp;
info->scanline_dp_gui_master_cntl = info->dp_gui_master_cntl
--- 1363,1370 ----
ADVANCE_RING();
#endif
+ info->trans_color = trans_color;
+ RADEONCPSetTransparency( pScrn );
info->scanline_bpp = bpp;
info->scanline_dp_gui_master_cntl = info->dp_gui_master_cntl
***************
*** 1366,1372 ****
BEGIN_RING( chunk_words+9 );
OUT_RING( CP_PACKET3( RADEON_CP_PACKET3_CNTL_HOSTDATA_BLT, chunk_words+9-2 ) );
- OUT_RING( info->scanline_dp_gui_master_cntl );
OUT_RING( (info->scanline_y << 16) | (info->scanline_x1clip & 0xffff) );
OUT_RING( ((info->scanline_y+info->scanline_hpass) << 16) |
(info->scanline_x2clip & 0xffff) );
OUT_RING( info->scanline_fg );
--- 1388,1394 ----
BEGIN_RING( chunk_words+9 );
OUT_RING( CP_PACKET3( RADEON_CP_PACKET3_CNTL_HOSTDATA_BLT, chunk_words+9-2 ) );
+ OUT_RING( info->dp_gui_master_cntl_cache = info->scanline_dp_gui_master_cntl );
OUT_RING( (info->scanline_y << 16) | (info->scanline_x1clip & 0xffff) );
OUT_RING( ((info->scanline_y+info->scanline_hpass) << 16) |
(info->scanline_x2clip & 0xffff) );
OUT_RING( info->scanline_fg );
***************
*** 1487,1493 ****
RING_LOCALS;
BEGIN_RING( 6 );
- OUT_RING_REG(RADEON_DP_GUI_MASTER_CNTL, (info->dp_gui_master_cntl
|
RADEON_GMC_BRUSH_SOLID_COLOR
|
RADEON_GMC_SRC_DATATYPE_COLOR
|
RADEON_ROP[rop].pattern));
--- 1509,1515 ----
RING_LOCALS;
BEGIN_RING( 6 );
+ OUT_RING_REG(RADEON_DP_GUI_MASTER_CNTL, info->dp_gui_master_cntl_cache =
+(info->dp_gui_master_cntl
|
RADEON_GMC_BRUSH_SOLID_COLOR
|
RADEON_GMC_SRC_DATATYPE_COLOR
|
RADEON_ROP[rop].pattern));
***************
*** 1496,1501 ****
ADVANCE_RING();
}
--- 1518,1524 ----
ADVANCE_RING();
+ info->trans_color = -1;
}
***************
*** 1669,1677 ****
RADEONInfoPtr info = RADEONPTR(pScrn);
/* unsigned char *RADEONMMIO = info->MMIO;*/
RING_LOCALS;
- BEGIN_RING( 3 );
OUT_RING_REG(RADEON_DP_GUI_MASTER_CNTL,
- (info->dp_gui_master_cntl &
~(CARD32)(RADEON_GMC_DST_CLIPPING)));
OUT_RING_REG(RADEON_SC_TOP_LEFT, 0);
OUT_RING_REG(RADEON_SC_BOTTOM_RIGHT, (RADEON_DEFAULT_SC_RIGHT_MAX
| RADEON_DEFAULT_SC_BOTTOM_MAX));
--- 1692,1700 ----
RADEONInfoPtr info = RADEONPTR(pScrn);
/* unsigned char *RADEONMMIO = info->MMIO;*/
RING_LOCALS;
+ BEGIN_RING( 6 );
OUT_RING_REG(RADEON_DP_GUI_MASTER_CNTL,
+ (info->dp_gui_master_cntl_cache &
+~(CARD32)(RADEON_GMC_DST_CLIPPING)));
OUT_RING_REG(RADEON_SC_TOP_LEFT, 0);
OUT_RING_REG(RADEON_SC_BOTTOM_RIGHT, (RADEON_DEFAULT_SC_RIGHT_MAX
| RADEON_DEFAULT_SC_BOTTOM_MAX));