コード例 #1
0
static void
Neo2097SubsequentScanlineCPUToScreenColorExpandFill(ScrnInfoPtr pScrn,
        int x, int y,
        int w, int h,
        int skipleft)
{
    NEOPtr nPtr = NEOPTR(pScrn);
    NEOACLPtr nAcl = NEOACLPTR(pScrn);

#ifdef NEO_DO_CLIPPING
    w = (w + 31) & ~31;
#else
    nAcl->CPUToScreenColorExpandFill_x = x;
    nAcl->CPUToScreenColorExpandFill_y = y;
    nAcl->CPUToScreenColorExpandFill_w = w;
    nAcl->CPUToScreenColorExpandFill_h = h;
#endif
    WAIT_ENGINE_IDLE();
#ifdef NEO_DO_CLIPPING
    OUTREG(NEOREG_CLIPLT, (y << 16) | (x + skipleft));
    OUTREG(NEOREG_CLIPRB, ((y + h) << 16) | (x + w));
    WAIT_ENGINE_IDLE();
#endif
    OUTREG(NEOREG_SRCSTARTOFF, 0);
    OUTREG(NEOREG_DSTSTARTOFF, (y<<16) | (x & 0xffff));
#ifdef NEO_DO_CLIPPING
    OUTREG(NEOREG_XYEXT, (h<<16) | (w & 0xffff));
#else
    OUTREG(NEOREG_XYEXT, (1<<16) | (w & 0xffff));
#endif
}
コード例 #2
0
static void
Neo2097SubsequentScreenToScreenCopy(ScrnInfoPtr pScrn,
                                    int srcX, int srcY,
                                    int dstX, int dstY,
                                    int w, int h)
{
    NEOPtr nPtr = NEOPTR(pScrn);
    NEOACLPtr nAcl = NEOACLPTR(pScrn);

    if ((dstY < srcY) || ((dstY == srcY) && (dstX < srcX))) {
        /* start with upper left corner */
        WAIT_ENGINE_IDLE();
        OUTREG(NEOREG_BLTCNTL, nAcl->tmpBltCntlFlags);
        OUTREG(NEOREG_SRCSTARTOFF, (srcY<<16) | (srcX & 0xffff));
        OUTREG(NEOREG_DSTSTARTOFF, (dstY<<16) | (dstX & 0xffff));
        OUTREG(NEOREG_XYEXT, (h<<16) | (w & 0xffff));
    }
    else {
        /* start with lower right corner */
        WAIT_ENGINE_IDLE();
        OUTREG(NEOREG_BLTCNTL, (nAcl->tmpBltCntlFlags | NEO_BC0_X_DEC
                                | NEO_BC0_DST_Y_DEC
                                | NEO_BC0_SRC_Y_DEC));
        OUTREG(NEOREG_SRCSTARTOFF, ((srcY+h-1)<<16) | ((srcX+w-1) & 0xffff));
        OUTREG(NEOREG_DSTSTARTOFF, ((dstY+h-1)<<16) | ((dstX+w-1) & 0xffff));
        OUTREG(NEOREG_XYEXT, (h<<16) | (w & 0xffff));
    }
}
コード例 #3
0
static void
Neo2097SetupScanlineForCPUToScreenColorExpandFill(ScrnInfoPtr pScrn,
        int fg, int bg,
        int rop,
        unsigned int planemask)
{
    NEOPtr nPtr = NEOPTR(pScrn);
    NEOACLPtr nAcl = NEOACLPTR(pScrn);

    if (bg == -1) {
        /* transparent setup */
        WAIT_ENGINE_IDLE();
#ifdef NEO_DO_CLIPPING
        OUTREG(NEOREG_BLTCNTL, nAcl->BltCntlFlags  |
               NEO_BC0_SYS_TO_VID   |
               NEO_BC0_SRC_MONO     |
               NEO_BC0_SRC_TRANS    |
               NEO_BC3_SKIP_MAPPING |
               NEO_BC3_CLIP_ON      |
               NEO_BC3_DST_XY_ADDR  | neo2097Rop[rop]);
#else
        OUTREG(NEOREG_BLTCNTL, nAcl->BltCntlFlags  |
               NEO_BC0_SYS_TO_VID   |
               NEO_BC0_SRC_MONO     |
               NEO_BC0_SRC_TRANS    |
               NEO_BC3_SKIP_MAPPING |
               NEO_BC3_DST_XY_ADDR  | neo2097Rop[rop]);
#endif

        OUTREG(NEOREG_FGCOLOR, fg |= (fg << nAcl->ColorShiftAmt));
    }
    else {
        /* opaque setup */
        WAIT_ENGINE_IDLE();
#ifdef NEO_DO_CLIPPING
        OUTREG(NEOREG_BLTCNTL, nAcl->BltCntlFlags  |
               NEO_BC0_SYS_TO_VID   |
               NEO_BC0_SRC_MONO     |
               NEO_BC3_SKIP_MAPPING |
               NEO_BC3_CLIP_ON      |
               NEO_BC3_DST_XY_ADDR  | neo2097Rop[rop]);
#else
        OUTREG(NEOREG_BLTCNTL, nAcl->BltCntlFlags  |
               NEO_BC0_SYS_TO_VID   |
               NEO_BC0_SRC_MONO     |
               NEO_BC3_SKIP_MAPPING |
               NEO_BC3_DST_XY_ADDR  | neo2097Rop[rop]);
#endif

        OUTREG(NEOREG_FGCOLOR, fg |= (fg << nAcl->ColorShiftAmt));
        OUTREG(NEOREG_BGCOLOR, bg |= (bg << nAcl->ColorShiftAmt));
    }
}
コード例 #4
0
ファイル: neo_2070.c プロジェクト: gvsurenderreddy/theqvd
static void
Neo2070SetupForSolidFillRect(ScrnInfoPtr pScrn, int color, int rop,
			     unsigned int planemask)
{
    NEOPtr nPtr = NEOPTR(pScrn);
    NEOACLPtr nAcl = NEOACLPTR(pScrn);

    planemask &= nAcl->PlaneMask;
    if (!rop) color=0;

    WAIT_ENGINE_IDLE();

    OUTREG(NEO2070_BLTCNTL, nAcl->BltCntlFlags  |
                            NEO_BC0_SRC_IS_FG    | neo2070Rop[3]);
    OUTREG(NEO2070_PLANEMASK, planemask |= (planemask << nAcl->ColorShiftAmt));
    if (pScrn->bitsPerPixel == 8) 
	OUTREG(NEO2070_FGCOLOR, color |= (color << 8));
    else
	/* swap bytes in color */
	OUTREG(NEO2070_FGCOLOR, ((color&0xff00) >> 8) | (color << 8));
    OUTREG(NEO2070_SRCPITCH, nAcl->Pitch);
    OUTREG(NEO2070_DSTPITCH, nAcl->Pitch);
    OUTREG(NEO2070_SRCBITOFF, 0);
    OUTREG(NEO2070_DSTBITOFF, 0);
}
コード例 #5
0
static void
Neo2097Sync(ScrnInfoPtr pScrn)
{
    NEOPtr nPtr = NEOPTR(pScrn);

    WAIT_ENGINE_IDLE();
}
コード例 #6
0
static void
Neo2097SubsequentSolidFillRect(ScrnInfoPtr pScrn, int x, int y, int w, int h)
{
    NEOPtr nPtr = NEOPTR(pScrn);

    WAIT_ENGINE_IDLE();
    OUTREG(NEOREG_DSTSTARTOFF, (y<<16) | (x & 0xffff));
    OUTREG(NEOREG_XYEXT, (h<<16) | (w & 0xffff));
}
コード例 #7
0
ファイル: neo_2070.c プロジェクト: gvsurenderreddy/theqvd
static void
Neo2070SubsequentSolidFillRect(ScrnInfoPtr pScrn, int x, int y, int w, int h)
{
    NEOPtr nPtr = NEOPTR(pScrn);
    NEOACLPtr nAcl = NEOACLPTR(pScrn);

    WAIT_ENGINE_IDLE();
    OUTREG(NEO2070_XYEXT, ((h-1)<<16) | ((w-1) & 0xffff));
    OUTREG(NEO2070_DSTSTART, (y * nAcl->Pitch) + (x * nAcl->PixelWidth));
}
コード例 #8
0
static void
Neo2097SetupForMono8x8PatternFill(ScrnInfoPtr pScrn,
                                  int patternx,
                                  int patterny,
                                  int fg, int bg,
                                  int rop, unsigned int planemask)
{
    NEOPtr nPtr = NEOPTR(pScrn);
    NEOACLPtr nAcl = NEOACLPTR(pScrn);

    if (bg == -1) {
        /* transparent setup */
        nAcl->tmpBltCntlFlags = ( nAcl->BltCntlFlags    |
                                  NEO_BC0_SRC_MONO     |
                                  NEO_BC0_FILL_PAT     |
                                  NEO_BC0_SRC_TRANS    |
                                  NEO_BC3_SKIP_MAPPING |
                                  NEO_BC3_SRC_XY_ADDR  |
                                  NEO_BC3_DST_XY_ADDR  | neo2097Rop[rop]);

        WAIT_ENGINE_IDLE();
        OUTREG(NEOREG_FGCOLOR, fg |= (fg << nAcl->ColorShiftAmt));
        OUTREG(NEOREG_SRCSTARTOFF, (patterny << 16) | patternx);
    }
    else {
        /* opaque setup */
        nAcl->tmpBltCntlFlags = ( nAcl->BltCntlFlags    |
                                  NEO_BC0_SRC_MONO     |
                                  NEO_BC0_FILL_PAT     |
                                  NEO_BC3_SKIP_MAPPING |
                                  NEO_BC3_SRC_XY_ADDR  |
                                  NEO_BC3_DST_XY_ADDR  | neo2097Rop[rop]);

        WAIT_ENGINE_IDLE();
        OUTREG(NEOREG_FGCOLOR, fg |= (fg << nAcl->ColorShiftAmt));
        OUTREG(NEOREG_BGCOLOR, bg |= (bg << nAcl->ColorShiftAmt));
        OUTREG(NEOREG_SRCSTARTOFF, (patterny << 16) | patternx);
    }
}
コード例 #9
0
static void
Neo2097SubsequentScanlineImageWriteRect(
    ScrnInfoPtr pScrn,
    int x, int y, int w, int h,
    int skipleft
) {
    NEOPtr nPtr = NEOPTR(pScrn);
    NEOACLPtr nAcl = NEOACLPTR(pScrn);

    WAIT_ENGINE_IDLE();
    OUTREG(NEOREG_BLTCNTL, nAcl->tmpBltCntlFlags);
    OUTREG(NEOREG_SRCSTARTOFF, 0);
    OUTREG(NEOREG_DSTSTARTOFF, (y << 16) | (x & 0xffff));
    OUTREG(NEOREG_XYEXT, (h << 16) | w);
}
コード例 #10
0
static void
Neo2097SubsequentMono8x8PatternFill(ScrnInfoPtr pScrn,
                                    int patternx,
                                    int patterny,
                                    int x, int y,
                                    int w, int h)
{
    NEOPtr nPtr = NEOPTR(pScrn);
    NEOACLPtr nAcl = NEOACLPTR(pScrn);

    patterny &= 0x7;

    WAIT_ENGINE_IDLE();
    OUTREG(NEOREG_BLTCNTL, nAcl->tmpBltCntlFlags | (patterny << 20));
    /*   OUTREG(NEOREG_SRCBITOFF, patternx);  Bad Register */
    OUTREG(NEOREG_DSTSTARTOFF, (y<<16) | (x & 0xffff));
    OUTREG(NEOREG_XYEXT, (h<<16) | (w & 0xffff));
}
コード例 #11
0
ファイル: neo_2070.c プロジェクト: gvsurenderreddy/theqvd
static void
Neo2070SetupForScreenToScreenCopy(ScrnInfoPtr pScrn, int xdir, int ydir,
				  int rop,
				  unsigned int planemask,
				  int trans_color)
{
    NEOPtr nPtr = NEOPTR(pScrn);
    NEOACLPtr nAcl = NEOACLPTR(pScrn);

    /* set blt control */
    WAIT_ENGINE_IDLE();
    OUTREG(NEO2070_BLTCNTL, nAcl->tmpBltCntlFlags);
    OUTREG(NEO2070_PLANEMASK, planemask |= (planemask << nAcl->ColorShiftAmt));
    OUTREG(NEO2070_SRCPITCH, nAcl->Pitch);
    OUTREG(NEO2070_DSTPITCH, nAcl->Pitch);
    OUTREG(NEO2070_SRCBITOFF, 0);
    OUTREG(NEO2070_DSTBITOFF, 0);
}
コード例 #12
0
static void
Neo2097SetupForSolidFillRect(ScrnInfoPtr pScrn, int color, int rop,
                             unsigned int planemask)
{
    NEOPtr nPtr = NEOPTR(pScrn);
    NEOACLPtr nAcl = NEOACLPTR(pScrn);

    WAIT_ENGINE_IDLE();

    /* set blt control */
    OUTREG(NEOREG_BLTCNTL, nAcl->BltCntlFlags  |
           NEO_BC0_SRC_IS_FG    |
           NEO_BC3_SKIP_MAPPING |
           NEO_BC3_DST_XY_ADDR  |
           NEO_BC3_SRC_XY_ADDR  | neo2097Rop[rop]);

    /* set foreground color */
    OUTREG(NEOREG_FGCOLOR, color |= (color << nAcl->ColorShiftAmt));
}
コード例 #13
0
static void
Neo2097SubsequentColorExpandScanline(ScrnInfoPtr pScrn,	int bufno)
{
#ifdef NEO_DO_CLIPPING
    /* Should I be waiting for fifo slots to prevent retries ?
       How do I do that on this engine ? */
#else
    NEOPtr nPtr = NEOPTR(pScrn);
    NEOACLPtr nAcl = NEOACLPTR(pScrn);

    if (!(--nAcl->CPUToScreenColorExpandFill_h))
        return;

    WAIT_ENGINE_IDLE();
    OUTREG(NEOREG_SRCSTARTOFF, 0);
    OUTREG(NEOREG_DSTSTARTOFF, ((++nAcl->CPUToScreenColorExpandFill_y)<<16)
           | (nAcl->CPUToScreenColorExpandFill_x & 0xffff));
    OUTREG(NEOREG_XYEXT, (1<<16)
           | (nAcl->CPUToScreenColorExpandFill_w & 0xffff));
#endif
}
コード例 #14
0
ファイル: i740_accel.c プロジェクト: rickgaiser/xfree86-ps2
static void
I740Sync() {
    WAIT_ENGINE_IDLE();
}
コード例 #15
0
ファイル: neo_2097.c プロジェクト: rickgaiser/xfree86-ps2
void
Neo2097Sync()
{
    WAIT_ENGINE_IDLE();
}
コード例 #16
0
ファイル: EngineManagment.c プロジェクト: DonCN/haiku
status_t
SYNC_TO_TOKEN(sync_token * st)
{
	WAIT_ENGINE_IDLE();
	return B_OK;
}