Lines Matching refs:pScrn

162     ScrnInfoPtr pScrn;  in xf86AllocateScreen()  local
171 pScrn = xf86GPUScreens[i]; in xf86AllocateScreen()
172 pScrn->scrnIndex = i + GPU_SCREEN_OFFSET; /* Changes when a screen is removed */ in xf86AllocateScreen()
173 pScrn->is_gpu = TRUE; in xf86AllocateScreen()
182 pScrn = xf86Screens[i]; in xf86AllocateScreen()
184 pScrn->scrnIndex = i; /* Changes when a screen is removed */ in xf86AllocateScreen()
187 pScrn->origIndex = pScrn->scrnIndex; /* This never changes */ in xf86AllocateScreen()
188 pScrn->privates = xnfcalloc(sizeof(DevUnion), xf86ScrnInfoPrivateCount); in xf86AllocateScreen()
194 pScrn->drv = drv; in xf86AllocateScreen()
196 pScrn->module = DuplicateModule(drv->module, NULL); in xf86AllocateScreen()
198 pScrn->DriverFunc = drv->driverFunc; in xf86AllocateScreen()
200 return pScrn; in xf86AllocateScreen()
209 xf86DeleteScreen(ScrnInfoPtr pScrn) in xf86DeleteScreen() argument
215 if (!pScrn) in xf86DeleteScreen()
218 if (pScrn->is_gpu) { in xf86DeleteScreen()
229 scrnIndex = pScrn->scrnIndex; in xf86DeleteScreen()
231 if (pScrn->FreeScreen != NULL) in xf86DeleteScreen()
232 pScrn->FreeScreen(pScrn); in xf86DeleteScreen()
234 while (pScrn->modes) in xf86DeleteScreen()
235 xf86DeleteMode(&pScrn->modes, pScrn->modes); in xf86DeleteScreen()
237 while (pScrn->modePool) in xf86DeleteScreen()
238 xf86DeleteMode(&pScrn->modePool, pScrn->modePool); in xf86DeleteScreen()
240 xf86OptionListFree(pScrn->options); in xf86DeleteScreen()
242 if (pScrn->module) in xf86DeleteScreen()
243 UnloadModule(pScrn->module); in xf86DeleteScreen()
245 if (pScrn->drv) in xf86DeleteScreen()
246 pScrn->drv->refCount--; in xf86DeleteScreen()
248 free(pScrn->privates); in xf86DeleteScreen()
250 xf86ClearEntityListForScreen(pScrn); in xf86DeleteScreen()
252 free(pScrn); in xf86DeleteScreen()
308 xf86AddPixFormat(ScrnInfoPtr pScrn, int depth, int bpp, int pad) in xf86AddPixFormat() argument
312 if (pScrn->numFormats >= MAXFORMATS) in xf86AddPixFormat()
330 i = pScrn->numFormats++; in xf86AddPixFormat()
331 pScrn->formats[i].depth = depth; in xf86AddPixFormat()
332 pScrn->formats[i].bitsPerPixel = bpp; in xf86AddPixFormat()
333 pScrn->formats[i].scanlinePad = pad; in xf86AddPixFormat()
856 xf86SetDpi(ScrnInfoPtr pScrn, int x, int y) in xf86SetDpi() argument
859 xf86MonPtr DDC = (xf86MonPtr) (pScrn->monitor->DDC); in xf86SetDpi()
864 pScrn->widthmm = pScrn->monitor->widthmm; in xf86SetDpi()
865 pScrn->heightmm = pScrn->monitor->heightmm; in xf86SetDpi()
879 pScrn->xDpi = monitorResolution; in xf86SetDpi()
880 pScrn->yDpi = monitorResolution; in xf86SetDpi()
883 else if (pScrn->widthmm > 0 || pScrn->heightmm > 0) { in xf86SetDpi()
885 if (pScrn->widthmm > 0) { in xf86SetDpi()
886 pScrn->xDpi = in xf86SetDpi()
887 (int) ((double) pScrn->virtualX * MMPERINCH / pScrn->widthmm); in xf86SetDpi()
889 if (pScrn->heightmm > 0) { in xf86SetDpi()
890 pScrn->yDpi = in xf86SetDpi()
891 (int) ((double) pScrn->virtualY * MMPERINCH / pScrn->heightmm); in xf86SetDpi()
893 if (pScrn->xDpi > 0 && pScrn->yDpi <= 0) in xf86SetDpi()
894 pScrn->yDpi = pScrn->xDpi; in xf86SetDpi()
895 if (pScrn->yDpi > 0 && pScrn->xDpi <= 0) in xf86SetDpi()
896 pScrn->xDpi = pScrn->yDpi; in xf86SetDpi()
897 xf86DrvMsg(pScrn->scrnIndex, from, "Display dimensions: (%d, %d) mm\n", in xf86SetDpi()
898 pScrn->widthmm, pScrn->heightmm); in xf86SetDpi()
902 if (pScrn->widthmm > 0) { in xf86SetDpi()
903 widthErr = abs(ddcWidthmm - pScrn->widthmm); in xf86SetDpi()
908 if (pScrn->heightmm > 0) { in xf86SetDpi()
909 heightErr = abs(ddcHeightmm - pScrn->heightmm); in xf86SetDpi()
916 xf86DrvMsg(pScrn->scrnIndex, X_WARNING, in xf86SetDpi()
918 ddcWidthmm, ddcHeightmm, pScrn->widthmm, in xf86SetDpi()
919 pScrn->heightmm); in xf86SetDpi()
925 xf86DrvMsg(pScrn->scrnIndex, from, "Display dimensions: (%d, %d) mm\n", in xf86SetDpi()
927 pScrn->widthmm = ddcWidthmm; in xf86SetDpi()
928 pScrn->heightmm = ddcHeightmm; in xf86SetDpi()
929 if (pScrn->widthmm > 0) { in xf86SetDpi()
930 pScrn->xDpi = in xf86SetDpi()
931 (int) ((double) pScrn->virtualX * MMPERINCH / pScrn->widthmm); in xf86SetDpi()
933 if (pScrn->heightmm > 0) { in xf86SetDpi()
934 pScrn->yDpi = in xf86SetDpi()
935 (int) ((double) pScrn->virtualY * MMPERINCH / pScrn->heightmm); in xf86SetDpi()
937 if (pScrn->xDpi > 0 && pScrn->yDpi <= 0) in xf86SetDpi()
938 pScrn->yDpi = pScrn->xDpi; in xf86SetDpi()
939 if (pScrn->yDpi > 0 && pScrn->xDpi <= 0) in xf86SetDpi()
940 pScrn->xDpi = pScrn->yDpi; in xf86SetDpi()
944 pScrn->xDpi = x; in xf86SetDpi()
946 pScrn->xDpi = DEFAULT_DPI; in xf86SetDpi()
948 pScrn->yDpi = y; in xf86SetDpi()
950 pScrn->yDpi = DEFAULT_DPI; in xf86SetDpi()
952 xf86DrvMsg(pScrn->scrnIndex, from, "DPI set to (%d, %d)\n", in xf86SetDpi()
953 pScrn->xDpi, pScrn->yDpi); in xf86SetDpi()
1489 xf86LoadSubModule(ScrnInfoPtr pScrn, const char *name) in xf86LoadSubModule() argument
1494 ret = LoadSubModule(pScrn->module, name, NULL, NULL, NULL, NULL, in xf86LoadSubModule()
1497 LoaderErrorMsg(pScrn->name, name, errmaj, errmin); in xf86LoadSubModule()
1558 ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); in xf86SetBackingStore() local
1563 xf86ProcessOptions(pScrn->scrnIndex, pScrn->options, options); in xf86SetBackingStore()
1604 ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); in xf86SetSilkenMouse() local
1609 xf86ProcessOptions(pScrn->scrnIndex, pScrn->options, options); in xf86SetSilkenMouse()
1626 pScrn->silkenMouse = useSM && InputThreadEnable; in xf86SetSilkenMouse()
1629 pScrn->silkenMouse ? "enabled" : "disabled"); in xf86SetSilkenMouse()
1635 xf86FindXvOptions(ScrnInfoPtr pScrn, int adaptor_index, const char *port_name, in xf86FindXvOptions() argument
1641 if (adaptor_index >= pScrn->confScreen->numxvadaptors) { in xf86FindXvOptions()
1649 adaptor = &pScrn->confScreen->xvadaptors[adaptor_index]; in xf86FindXvOptions()
1666 ScrnInfoPtr pScrn; in xf86ConfigFbEntityInactive() local
1668 if ((pScrn = xf86FindScreenForEntity(pEnt->index))) in xf86ConfigFbEntityInactive()
1669 xf86RemoveEntityFromScreen(pScrn, pEnt->index); in xf86ConfigFbEntityInactive()
1673 xf86ConfigFbEntity(ScrnInfoPtr pScrn, int scrnFlag, int entityIndex, in xf86ConfigFbEntity() argument
1683 return pScrn; in xf86ConfigFbEntity()
1687 return pScrn; in xf86ConfigFbEntity()
1693 return pScrn; in xf86ConfigFbEntity()
1696 if (!pScrn) in xf86ConfigFbEntity()
1697 pScrn = xf86AllocateScreen(pEnt->driver, scrnFlag); in xf86ConfigFbEntity()
1698 xf86AddEntityToScreen(pScrn, entityIndex); in xf86ConfigFbEntity()
1701 return pScrn; in xf86ConfigFbEntity()
1705 xf86IsScreenPrimary(ScrnInfoPtr pScrn) in xf86IsScreenPrimary() argument
1709 for (i = 0; i < pScrn->numEntities; i++) { in xf86IsScreenPrimary()
1751 xf86ScrnToScreen(ScrnInfoPtr pScrn) in xf86ScrnToScreen() argument
1753 if (pScrn->is_gpu) { in xf86ScrnToScreen()
1754 assert(pScrn->scrnIndex - GPU_SCREEN_OFFSET < screenInfo.numGPUScreens); in xf86ScrnToScreen()
1755 return screenInfo.gpuscreens[pScrn->scrnIndex - GPU_SCREEN_OFFSET]; in xf86ScrnToScreen()
1757 assert(pScrn->scrnIndex < screenInfo.numScreens); in xf86ScrnToScreen()
1758 return screenInfo.screens[pScrn->scrnIndex]; in xf86ScrnToScreen()