⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 radeon_mergedfb.c

📁 x.org上有关ati系列显卡最新驱动
💻 C
📖 第 1 页 / 共 5 页
字号:
	     w1 = info->MBXNR1XMAX = info->maxCRT1_X1;	     info->NonRectDead.x0 = x1 + w1;	     info->NonRectDead.x1 = pScrn1->virtualX - 1;	     info->NonRectDead.y0 = y1;	     info->NonRectDead.y1 = y1 + h1 - 1;	     info->HaveNonRect = TRUE;	  }	  x2 = info->CRT2XOffs;	  y2 = 0;	  w2 = realvirtX;	  h2 = max(info->maxCRT2_Y2, pScrn1->virtualY - info->maxCRT2_Y1);	  if(h2 > pScrn1->virtualY) h2 = pScrn1->virtualY;	  if((usenonrect) && (info->maxCRT2_X2 != realvirtX)) {	     w2 = info->MBXNR2XMAX = info->maxCRT2_X2;	     info->NonRectDead.x0 = x2 + w2;	     info->NonRectDead.x1 = pScrn1->virtualX - 1;	     info->NonRectDead.y0 = y2;	     info->NonRectDead.y1 = y2 + h2 - 1;	     info->HaveNonRect = TRUE;	  }	  break;       case radeonBelow:	  x1 = info->CRT1XOffs;	  y1 = 0;	  w1 = realvirtX;	  h1 = max(info->maxCRT1_Y1, pScrn1->virtualY - info->maxCRT1_Y2);	  if(h1 > pScrn1->virtualY) h1 = pScrn1->virtualY;	  if((usenonrect) && (info->maxCRT1_X1 != realvirtX)) {	     w1 = info->MBXNR1XMAX = info->maxCRT1_X1;	     info->NonRectDead.x0 = x1 + w1;	     info->NonRectDead.x1 = pScrn1->virtualX - 1;	     info->NonRectDead.y0 = y1;	     info->NonRectDead.y1 = y1 + h1 - 1;	     info->HaveNonRect = TRUE;	  }	  x2 = info->CRT2XOffs;	  y2 = min(info->maxCRT2_Y1, pScrn1->virtualY - info->maxCRT2_Y2);	  if(y2 < 0) y2 = 0;	  w2 = realvirtX;	  h2 = pScrn1->virtualY - y2;	  if((usenonrect) && (info->maxCRT2_X2 != realvirtX)) {	     w2 = info->MBXNR2XMAX = info->maxCRT2_X2;	     info->NonRectDead.x0 = x2 + w2;	     info->NonRectDead.x1 = pScrn1->virtualX - 1;	     info->NonRectDead.y0 = y2;	     info->NonRectDead.y1 = y2 + h2 - 1;	     info->HaveNonRect = TRUE;	  }       default:	  break;       }       switch(info->CRT2Position) {       case radeonLeftOf:       case radeonRightOf:	  if(info->CRT1YOffs) {	     info->OffDead1.x0 = x1;	     info->OffDead1.x1 = x1 + w1 - 1;	     info->OffDead1.y0 = 0;	     info->OffDead1.y1 = y1 - 1;	     info->OffDead2.x0 = x2;	     info->OffDead2.x1 = x2 + w2 - 1;	     info->OffDead2.y0 = y2 + h2;	     info->OffDead2.y1 = pScrn1->virtualY - 1;	     info->HaveOffsRegions = TRUE;	  } else if(info->CRT2YOffs) {	     info->OffDead1.x0 = x2;	     info->OffDead1.x1 = x2 + w2 - 1;	     info->OffDead1.y0 = 0;	     info->OffDead1.y1 = y2 - 1;	     info->OffDead2.x0 = x1;	     info->OffDead2.x1 = x1 + w1 - 1;	     info->OffDead2.y0 = y1 + h1;	     info->OffDead2.y1 = pScrn1->virtualY - 1;	     info->HaveOffsRegions = TRUE;	  }	  break;       case radeonAbove:       case radeonBelow:	  if(info->CRT1XOffs) {	     info->OffDead1.x0 = x2 + w2;	     info->OffDead1.x1 = pScrn1->virtualX - 1;	     info->OffDead1.y0 = y2;	     info->OffDead1.y1 = y2 + h2 - 1;	     info->OffDead2.x0 = 0;	     info->OffDead2.x1 = x1 - 1;	     info->OffDead2.y0 = y1;	     info->OffDead2.y1 = y1 + h1 - 1;	     info->HaveOffsRegions = TRUE;	  } else if(info->CRT2XOffs) {	     info->OffDead1.x0 = x1 + w1;	     info->OffDead1.x1 = pScrn1->virtualX - 1;	     info->OffDead1.y0 = y1;	     info->OffDead1.y1 = y1 + h1 - 1;	     info->OffDead2.x0 = 0;	     info->OffDead2.x1 = x2 - 1;	     info->OffDead2.y0 = y2;	     info->OffDead2.y1 = y2 + h2 - 1;	     info->HaveOffsRegions = TRUE;	  }       default:	  break;       }    } else {	/* Only clone-modes left */       x1 = x2 = 0;       y1 = y2 = 0;       w1 = w2 = max(info->maxClone_X1, info->maxClone_X2);       h1 = h2 = max(info->maxClone_Y1, info->maxClone_Y2);    }    RADEONXineramadataPtr[crt1scrnnum].x = x1;    RADEONXineramadataPtr[crt1scrnnum].y = y1;    RADEONXineramadataPtr[crt1scrnnum].width = w1;    RADEONXineramadataPtr[crt1scrnnum].height = h1;    RADEONXineramadataPtr[crt2scrnnum].x = x2;    RADEONXineramadataPtr[crt2scrnnum].y = y2;    RADEONXineramadataPtr[crt2scrnnum].width = w2;    RADEONXineramadataPtr[crt2scrnnum].height = h2;    if(infochanged) {       xf86DrvMsg(pScrn1->scrnIndex, X_INFO,	  "Pseudo-Xinerama: CRT1 (Screen %d) (%d,%d)-(%d,%d)\n",	  crt1scrnnum, x1, y1, w1+x1-1, h1+y1-1);       xf86DrvMsg(pScrn1->scrnIndex, X_INFO,	  "Pseudo-Xinerama: CRT2 (Screen %d) (%d,%d)-(%d,%d)\n",	  crt2scrnnum, x2, y2, w2+x2-1, h2+y2-1);       if(info->HaveNonRect) {	  xf86DrvMsg(pScrn1->scrnIndex, X_INFO,		"Pseudo-Xinerama: Inaccessible area (%d,%d)-(%d,%d)\n",		info->NonRectDead.x0, info->NonRectDead.y0,		info->NonRectDead.x1, info->NonRectDead.y1);       }       if(info->HaveOffsRegions) {	  xf86DrvMsg(pScrn1->scrnIndex, X_INFO,		"Pseudo-Xinerama: Inaccessible offset area (%d,%d)-(%d,%d)\n",		info->OffDead1.x0, info->OffDead1.y0,		info->OffDead1.x1, info->OffDead1.y1);	  xf86DrvMsg(pScrn1->scrnIndex, X_INFO,		"Pseudo-Xinerama: Inaccessible offset area (%d,%d)-(%d,%d)\n",		info->OffDead2.x0, info->OffDead2.y0,		info->OffDead2.x1, info->OffDead2.y1);       }       if(info->HaveNonRect || info->HaveOffsRegions) {	  xf86DrvMsg(pScrn1->scrnIndex, X_INFO,		"Mouse restriction for inaccessible areas is %s\n",		info->MouseRestrictions ? "enabled" : "disabled");       }    }}/* Proc */intRADEONProcXineramaQueryVersion(ClientPtr client){    xPanoramiXQueryVersionReply	  rep;    register int		  n;    REQUEST_SIZE_MATCH(xPanoramiXQueryVersionReq);    rep.type = X_Reply;    rep.length = 0;    rep.sequenceNumber = client->sequence;    rep.majorVersion = RADEON_XINERAMA_MAJOR_VERSION;    rep.minorVersion = RADEON_XINERAMA_MINOR_VERSION;    if(client->swapped) {        swaps(&rep.sequenceNumber, n);        swapl(&rep.length, n);        swaps(&rep.majorVersion, n);        swaps(&rep.minorVersion, n);    }    WriteToClient(client, sizeof(xPanoramiXQueryVersionReply), (char *)&rep);    return (client->noClientException);}intRADEONProcXineramaGetState(ClientPtr client){    REQUEST(xPanoramiXGetStateReq);    WindowPtr			pWin;    xPanoramiXGetStateReply	rep;    register int		n;    REQUEST_SIZE_MATCH(xPanoramiXGetStateReq);    pWin = LookupWindow(stuff->window, client);    if(!pWin) return BadWindow;    rep.type = X_Reply;    rep.length = 0;    rep.sequenceNumber = client->sequence;    rep.state = !RADEONnoPanoramiXExtension;    if(client->swapped) {       swaps (&rep.sequenceNumber, n);       swapl (&rep.length, n);       swaps (&rep.state, n);    }    WriteToClient(client, sizeof(xPanoramiXGetStateReply), (char *)&rep);    return client->noClientException;}intRADEONProcXineramaGetScreenCount(ClientPtr client){    REQUEST(xPanoramiXGetScreenCountReq);    WindowPtr				pWin;    xPanoramiXGetScreenCountReply	rep;    register int			n;    REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq);    pWin = LookupWindow(stuff->window, client);    if(!pWin) return BadWindow;    rep.type = X_Reply;    rep.length = 0;    rep.sequenceNumber = client->sequence;    rep.ScreenCount = RADEONXineramaNumScreens;    if(client->swapped) {       swaps(&rep.sequenceNumber, n);       swapl(&rep.length, n);       swaps(&rep.ScreenCount, n);    }    WriteToClient(client, sizeof(xPanoramiXGetScreenCountReply), (char *)&rep);    return client->noClientException;}intRADEONProcXineramaGetScreenSize(ClientPtr client){    REQUEST(xPanoramiXGetScreenSizeReq);    WindowPtr				pWin;    xPanoramiXGetScreenSizeReply	rep;    register int			n;    REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);    pWin = LookupWindow (stuff->window, client);    if(!pWin)  return BadWindow;    rep.type = X_Reply;    rep.length = 0;    rep.sequenceNumber = client->sequence;    rep.width  = RADEONXineramadataPtr[stuff->screen].width;    rep.height = RADEONXineramadataPtr[stuff->screen].height;    if(client->swapped) {       swaps(&rep.sequenceNumber, n);       swapl(&rep.length, n);       swaps(&rep.width, n);       swaps(&rep.height, n);    }    WriteToClient(client, sizeof(xPanoramiXGetScreenSizeReply), (char *)&rep);    return client->noClientException;}intRADEONProcXineramaIsActive(ClientPtr client){    xXineramaIsActiveReply	rep;    REQUEST_SIZE_MATCH(xXineramaIsActiveReq);    rep.type = X_Reply;    rep.length = 0;    rep.sequenceNumber = client->sequence;    rep.state = !RADEONnoPanoramiXExtension;    if(client->swapped) {	register int n;	swaps(&rep.sequenceNumber, n);	swapl(&rep.length, n);	swapl(&rep.state, n);    }    WriteToClient(client, sizeof(xXineramaIsActiveReply), (char *) &rep);    return client->noClientException;}intRADEONProcXineramaQueryScreens(ClientPtr client){    xXineramaQueryScreensReply	rep;    REQUEST_SIZE_MATCH(xXineramaQueryScreensReq);    rep.type = X_Reply;    rep.sequenceNumber = client->sequence;    rep.number = (RADEONnoPanoramiXExtension) ? 0 : RADEONXineramaNumScreens;    rep.length = rep.number * sz_XineramaScreenInfo >> 2;    if(client->swapped) {       register int n;       swaps(&rep.sequenceNumber, n);       swapl(&rep.length, n);       swapl(&rep.number, n);    }    WriteToClient(client, sizeof(xXineramaQueryScreensReply), (char *)&rep);    if(!RADEONnoPanoramiXExtension) {       xXineramaScreenInfo scratch;       int i;       for(i = 0; i < RADEONXineramaNumScreens; i++) {	  scratch.x_org  = RADEONXineramadataPtr[i].x;	  scratch.y_org  = RADEONXineramadataPtr[i].y;	  scratch.width  = RADEONXineramadataPtr[i].width;	  scratch.height = RADEONXineramadataPtr[i].height;	  if(client->swapped) {	     register int n;	     swaps(&scratch.x_org, n);	     swaps(&scratch.y_org, n);	     swaps(&scratch.width, n);    	     swaps(&scratch.height, n);	  }	  WriteToClient(client, sz_XineramaScreenInfo, (char *)&scratch);       }    }    return client->noClientException;}static intRADEONProcXineramaDispatch(ClientPtr client){    REQUEST(xReq);    switch (stuff->data)    {	case X_PanoramiXQueryVersion:	     return RADEONProcXineramaQueryVersion(client);	case X_PanoramiXGetState:	     return RADEONProcXineramaGetState(client);	case X_PanoramiXGetScreenCount:	     return RADEONProcXineramaGetScreenCount(client);	case X_PanoramiXGetScreenSize:	     return RADEONProcXineramaGetScreenSize(client);	case X_XineramaIsActive:	     return RADEONProcXineramaIsActive(client);	case X_XineramaQueryScreens:	     return RADEONProcXineramaQueryScreens(client);    }    return BadRequest;}/* SProc */static intRADEONSProcXineramaQueryVersion (ClientPtr client){	REQUEST(xPanoramiXQueryVersionReq);	register int n;	swaps(&stuff->length,n);	REQUEST_SIZE_MATCH (xPanoramiXQueryVersionReq);	return RADEONProcXineramaQueryVersion(client);}static intRADEONSProcXineramaGetState(ClientPtr client){	REQUEST(xPanoramiXGetStateReq);	register int n; 	swaps (&stuff->length, n);	REQUEST_SIZE_MATCH(xPanoramiXGetStateReq);	return RADEONProcXineramaGetState(client);}static intRADEONSProcXineramaGetScreenCount(ClientPtr client){	REQUEST(xPanoramiXGetScreenCountReq);	register int n;	swaps (&stuff->length, n);	REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq);	return RADEONProcXineramaGetScreenCount(client);}static intRADEONSProcXineramaGetScreenSize(ClientPtr client){	REQUEST(xPanoramiXGetScreenSizeReq);	register int n;	swaps (&stuff->length, n);	REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);	return RADEONProcXineramaGetScreenSize(client);}static intRADEONSProcXineramaIsActive(ClientPtr client){	REQUEST(xXineramaIsActiveReq);	register int n;	swaps (&stuff->length, n);	REQUEST_SIZE_MATCH(xXineramaIsActiveReq);	return RADEONProcXineramaIsActive(client);}static intRADEONSProcXineramaQueryScreens(ClientPtr client){	REQUEST(xXineramaQueryScreensReq);	register int n;	swaps (&stuff->length, n);	REQUEST_SIZE_MATCH(xXineramaQueryScreensReq);	return RADEONProcXineramaQueryScreens(client);}intRADEONSProcXineramaDispatch(ClientPtr client){    REQUEST(xReq);    switch (stuff->data) {	case X_PanoramiXQueryVersion:	     return RADEONSProcXineramaQueryVersion(client);	case X_PanoramiXGetState:	     return RADEONSProcXineramaGetState(client);	case X_PanoramiXGetScreenCount:	     return RADEONSProcXineramaGetScreenCount(client);	case X_PanoramiXGetScreenSize:	     return RADEONSProcXineramaGetScreenSize(client);	case X_XineramaIsActive:	     return RADEONSProcXineramaIsActive(client);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -