// SPDX-License-Identifier: GPL-2.0-or-later /* * SiS 300/540/630[S]/730[S], * SiS 315[E|PRO]/550/[M]650/651/[M]661[F|M]X/740/[M]741[GX]/330/[M]760[GX], * XGI V3XT/V5/V8, Z7 * frame buffer driver for Linux kernels >= 2.4.14 and >=2.6.3 * * 2D acceleration part * * Based on the XFree86/X.org driver which is * Copyright (C) 2001-2005 by Thomas Winischhofer, Vienna, Austria * * Author: Thomas Winischhofer <thomas@winischhofer.net> * (see http://www.winischhofer.net/ * for more information and updates)
*/
staticvoid
SiS300SetupForScreenToScreenCopy(struct sis_video_info *ivideo, int xdir, int ydir, int rop, int trans_color)
{
SiS300SetupDSTColorDepth(ivideo->DstColor);
SiS300SetupSRCPitch(ivideo->video_linelength)
SiS300SetupDSTRect(ivideo->video_linelength, 0xffff)
staticvoid
SiS300SubsequentScreenToScreenCopy(struct sis_video_info *ivideo, int src_x, int src_y, int dst_x, int dst_y, int width, int height)
{
u32 srcbase = 0, dstbase = 0;
staticvoid
SiS310SetupForScreenToScreenCopy(struct sis_video_info *ivideo, int rop, int trans_color)
{
SiS310SetupDSTColorDepth(ivideo->DstColor);
SiS310SetupSRCPitch(ivideo->video_linelength)
SiS310SetupDSTRect(ivideo->video_linelength, 0x0fff) if(trans_color != -1) {
SiS310SetupROP(0x0A)
SiS310SetupSRCTrans(trans_color)
SiS310SetupCMDFlag(TRANSPARENT_BITBLT)
} else {
SiS310SetupROP(sisALUConv[rop]) /* Set command - not needed, both 0 */ /* SiSSetupCMDFlag(BITBLT | SRCVIDEO) */
}
SiS310SetupCMDFlag(ivideo->SiS310_AccelDepth) /* The chip is smart enough to know the direction */
}
staticvoid
SiS310SubsequentScreenToScreenCopy(struct sis_video_info *ivideo, int src_x, int src_y, int dst_x, int dst_y, int width, int height)
{
u32 srcbase = 0, dstbase = 0; int mymin = min(src_y, dst_y); int mymax = max(src_y, dst_y);
/* Although the chip knows the direction to use * if the source and destination areas overlap, * that logic fails if we fiddle with the bitmap * addresses. Therefore, we check if the source * and destination blitting areas overlap and * adapt the bitmap addresses synchronously * if the coordinates exceed the valid range. * The areas do not overlap, we do our * normal check.
*/ if((mymax - mymin) < height) { if((src_y >= 2048) || (dst_y >= 2048)) {
srcbase = ivideo->video_linelength * mymin;
dstbase = ivideo->video_linelength * mymin;
src_y -= mymin;
dst_y -= mymin;
}
} else { if(src_y >= 2048) {
srcbase = ivideo->video_linelength * src_y;
src_y = 0;
} if(dst_y >= 2048) {
dstbase = ivideo->video_linelength * dst_y;
dst_y = 0;
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.