예제 #1
0
파일: xmodule.c 프로젝트: suokko/vga_switch
static Bool vgaswitch_enter_vt(ScrnInfoPtr info)
{
	system("/sbin/vga_switch -g start");
	info->EnterVT = vgaswitch_fake_dev.savedEnterVT;
	Bool r = info->EnterVT(info);
	vgaswitch_fake_dev.savedEnterVT = info->EnterVT;
	info->EnterVT = vgaswitch_enter_vt;
	system("/sbin/vga_switch -g stop");
	return r;
}
예제 #2
0
static void
I810_SetViewport(ScrnInfoPtr pScrn, int x, int y, int flags)
{
   I810Ptr pI810 = I810PTR(pScrn);
   vgaHWPtr hwp = VGAHWPTR(pScrn);

   pScrn->AdjustFrame(ADJUST_FRAME_ARGS(pScrn, x, y));

   /* wait for retrace */
   while ((hwp->readST01(hwp) & 0x08)) ;
   while (!(hwp->readST01(hwp) & 0x08)) ;

   pI810->DGAViewportStatus = 0;
}
예제 #3
0
static Bool
I810_SetMode(ScrnInfoPtr pScrn, DGAModePtr pMode)
{
   int index = pScrn->pScreen->myNum;
   I810Ptr pI810 = I810PTR(pScrn);

   if (!pMode) {			/* restore the original mode */
      if (pI810->DGAactive) {
	 pScrn->currentMode = I810SavedDGAModes[index];
	 pScrn->SwitchMode(SWITCH_MODE_ARGS(pScrn, pScrn->currentMode));
	 pScrn->AdjustFrame(ADJUST_FRAME_ARGS(pScrn, 0, 0));
	 pI810->DGAactive = FALSE;
      }
   } else {
      if (!pI810->DGAactive) {
	 I810SavedDGAModes[index] = pScrn->currentMode;
	 pI810->DGAactive = TRUE;
      }
      pScrn->SwitchMode(SWITCH_MODE_ARGS(pScrn, pMode->mode));
   }

   return TRUE;
}
예제 #4
0
static void 
xf86PointerMoved(int scrnIndex, int x, int y)
{
  Bool          frameChanged = FALSE;
  ScrnInfoPtr   pScr = xf86Screens[scrnIndex];

  /*
   * check wether (x,y) belongs to the visual part of the screen
   * if not, change the base of the displayed frame accoring
   */
  if ( pScr->frameX0 > x) { 
    pScr->frameX0 = x;
    pScr->frameX1 = x + pScr->currentMode->HDisplay - 1;
    frameChanged = TRUE ;
  }
  
  if ( pScr->frameX1 < x) { 
    pScr->frameX1 = x + 1;
    pScr->frameX0 = x - pScr->currentMode->HDisplay + 1;
    frameChanged = TRUE ;
  }
  
  if ( pScr->frameY0 > y) { 
    pScr->frameY0 = y;
    pScr->frameY1 = y + pScr->currentMode->VDisplay - 1;
    frameChanged = TRUE;
  }
  
  if ( pScr->frameY1 < y) { 
    pScr->frameY1 = y;
    pScr->frameY0 = y - pScr->currentMode->VDisplay + 1;
    frameChanged = TRUE; 
  }
  
  if (frameChanged && pScr->AdjustFrame != NULL)
    pScr->AdjustFrame(pScr->scrnIndex, pScr->frameX0, pScr->frameY0, 0);
}
예제 #5
0
static void
I810_SetViewport(ScrnInfoPtr pScrn, int x, int y, int flags)
{
   I810Ptr pI810 = I810PTR(pScrn);
   vgaHWPtr hwp = VGAHWPTR(pScrn);

   MARKER();

   pScrn->AdjustFrame(pScrn->pScreen->myNum, x, y, flags);

   /* wait for retrace */
   while ((hwp->readST01(hwp) & 0x08)) ;
   while (!(hwp->readST01(hwp) & 0x08)) ;

   pI810->DGAViewportStatus = 0;
}
예제 #6
0
static void
glamor_egl_free_screen(ScrnInfoPtr scrn)
{
    struct glamor_egl_screen_private *glamor_egl;

    glamor_egl = glamor_egl_get_screen_private(scrn);
    if (glamor_egl != NULL) {

        eglMakeCurrent(glamor_egl->display,
                       EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
#ifdef GLAMOR_HAS_GBM
        if (glamor_egl->gbm)
            gbm_device_destroy(glamor_egl->gbm);
#endif
        scrn->FreeScreen = glamor_egl->saved_free_screen;
        free(glamor_egl);
        scrn->FreeScreen(scrn);
    }
}
예제 #7
0
static Bool
PSB_SetMode(ScrnInfoPtr pScrn, DGAModePtr pMode)
{
    if (!pMode) {
	if (saved) {
	    pScrn->AdjustFrame(pScrn->pScreen->myNum, 0, 0, 0);
	    xf86SwitchMode(pScrn->pScreen, saved);
	    pScrn->displayWidth = saved->HDisplay;
	    saved = NULL;
	}
    } else {
	if (!saved) {
	    saved = pScrn->currentMode;
	    xf86SwitchMode(pScrn->pScreen, pMode->mode);
	    pScrn->displayWidth = pMode->mode->HDisplay;
	    pMode->bytesPerScanline =
		pScrn->displayWidth * (pScrn->bitsPerPixel >> 3);
	    pMode->pixmapWidth = pScrn->displayWidth;
	}
    }
예제 #8
0
static void
xf86_dga_set_viewport(ScrnInfoPtr scrn, int x, int y, int flags)
{
    scrn->AdjustFrame(scrn->pScreen->myNum, x, y, flags);
}
예제 #9
0
파일: xf86DiDGA.c 프로젝트: Agnesa/xserver
static void
xf86_dga_set_viewport(ScrnInfoPtr scrn, int x, int y, int flags)
{
    scrn->AdjustFrame(scrn, x, y);
}