aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xfree86/modes
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-05-25 15:19:41 +0200
committermarha <marha@users.sourceforge.net>2012-05-25 15:19:41 +0200
commiteef864d36de97903007f04fad9fa43afe297745b (patch)
tree28dd3cae5f699b493e4d72e7e7d468a5a2cae7f4 /xorg-server/hw/xfree86/modes
parentf543ceaca6820260f15a4eff86938214cf43c7d2 (diff)
downloadvcxsrv-eef864d36de97903007f04fad9fa43afe297745b.tar.gz
vcxsrv-eef864d36de97903007f04fad9fa43afe297745b.tar.bz2
vcxsrv-eef864d36de97903007f04fad9fa43afe297745b.zip
fontconfig xserver xkeyboard-config pixman git update 2012
Diffstat (limited to 'xorg-server/hw/xfree86/modes')
-rw-r--r--xorg-server/hw/xfree86/modes/xf86Crtc.c16
-rw-r--r--xorg-server/hw/xfree86/modes/xf86Cursors.c10
-rw-r--r--xorg-server/hw/xfree86/modes/xf86DiDGA.c6
-rw-r--r--xorg-server/hw/xfree86/modes/xf86RandR12.c36
-rw-r--r--xorg-server/hw/xfree86/modes/xf86Rotate.c14
5 files changed, 40 insertions, 42 deletions
diff --git a/xorg-server/hw/xfree86/modes/xf86Crtc.c b/xorg-server/hw/xfree86/modes/xf86Crtc.c
index fee1ae774..ab6ed5e32 100644
--- a/xorg-server/hw/xfree86/modes/xf86Crtc.c
+++ b/xorg-server/hw/xfree86/modes/xf86Crtc.c
@@ -182,7 +182,7 @@ xf86CrtcSetScreenSubpixelOrder(ScreenPtr pScreen)
{
int subpixel_order = SubPixelUnknown;
Bool has_none = FALSE;
- ScrnInfoPtr scrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr scrn = xf86ScreenToScrn(pScreen);
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
int c, o;
@@ -698,7 +698,7 @@ xf86OutputDestroy(xf86OutputPtr output)
static Bool
xf86CrtcCreateScreenResources(ScreenPtr screen)
{
- ScrnInfoPtr scrn = xf86Screens[screen->myNum];
+ ScrnInfoPtr scrn = xf86ScreenToScrn(screen);
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn);
screen->CreateScreenResources = config->CreateScreenResources;
@@ -718,7 +718,7 @@ xf86CrtcCreateScreenResources(ScreenPtr screen)
static Bool
xf86CrtcCloseScreen(int index, ScreenPtr screen)
{
- ScrnInfoPtr scrn = xf86Screens[screen->myNum];
+ ScrnInfoPtr scrn = xf86ScreenToScrn(screen);
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn);
int o, c;
@@ -751,7 +751,7 @@ Bool
#endif
xf86CrtcScreenInit(ScreenPtr screen)
{
- ScrnInfoPtr scrn = xf86Screens[screen->myNum];
+ ScrnInfoPtr scrn = xf86ScreenToScrn(screen);
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn);
int c;
@@ -2823,7 +2823,7 @@ xf86DPMSSet(ScrnInfoPtr scrn, int mode, int flags)
Bool
xf86SaveScreen(ScreenPtr pScreen, int mode)
{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
if (xf86IsUnblank(mode))
xf86DPMSSet(pScrn, DPMSModeOn, 0);
@@ -3151,7 +3151,7 @@ xf86_crtc_notify_proc_ptr
xf86_wrap_crtc_notify(ScreenPtr screen, xf86_crtc_notify_proc_ptr new)
{
if (xf86CrtcConfigPrivateIndex != -1) {
- ScrnInfoPtr scrn = xf86Screens[screen->myNum];
+ ScrnInfoPtr scrn = xf86ScreenToScrn(screen);
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn);
xf86_crtc_notify_proc_ptr old;
@@ -3166,7 +3166,7 @@ void
xf86_unwrap_crtc_notify(ScreenPtr screen, xf86_crtc_notify_proc_ptr old)
{
if (xf86CrtcConfigPrivateIndex != -1) {
- ScrnInfoPtr scrn = xf86Screens[screen->myNum];
+ ScrnInfoPtr scrn = xf86ScreenToScrn(screen);
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn);
config->xf86_crtc_notify = old;
@@ -3176,7 +3176,7 @@ xf86_unwrap_crtc_notify(ScreenPtr screen, xf86_crtc_notify_proc_ptr old)
void
xf86_crtc_notify(ScreenPtr screen)
{
- ScrnInfoPtr scrn = xf86Screens[screen->myNum];
+ ScrnInfoPtr scrn = xf86ScreenToScrn(screen);
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn);
if (config->xf86_crtc_notify)
diff --git a/xorg-server/hw/xfree86/modes/xf86Cursors.c b/xorg-server/hw/xfree86/modes/xf86Cursors.c
index 95a78921d..634ee3fe0 100644
--- a/xorg-server/hw/xfree86/modes/xf86Cursors.c
+++ b/xorg-server/hw/xfree86/modes/xf86Cursors.c
@@ -477,7 +477,7 @@ xf86_load_cursor_image(ScrnInfoPtr scrn, unsigned char *src)
static Bool
xf86_use_hw_cursor(ScreenPtr screen, CursorPtr cursor)
{
- ScrnInfoPtr scrn = xf86Screens[screen->myNum];
+ ScrnInfoPtr scrn = xf86ScreenToScrn(screen);
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
xf86CursorInfoPtr cursor_info = xf86_config->cursor_info;
@@ -496,7 +496,7 @@ xf86_use_hw_cursor(ScreenPtr screen, CursorPtr cursor)
static Bool
xf86_use_hw_cursor_argb(ScreenPtr screen, CursorPtr cursor)
{
- ScrnInfoPtr scrn = xf86Screens[screen->myNum];
+ ScrnInfoPtr scrn = xf86ScreenToScrn(screen);
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
xf86CursorInfoPtr cursor_info = xf86_config->cursor_info;
@@ -564,7 +564,7 @@ xf86_load_cursor_argb(ScrnInfoPtr scrn, CursorPtr cursor)
Bool
xf86_cursors_init(ScreenPtr screen, int max_width, int max_height, int flags)
{
- ScrnInfoPtr scrn = xf86Screens[screen->myNum];
+ ScrnInfoPtr scrn = xf86ScreenToScrn(screen);
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
xf86CursorInfoPtr cursor_info;
@@ -631,7 +631,7 @@ xf86_reload_cursors(ScreenPtr screen)
if (!cursor_screen_priv || !cursor_screen_priv->isUp)
return;
- scrn = xf86Screens[screen->myNum];
+ scrn = xf86ScreenToScrn(screen);
xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
/* make sure the cursor code has been initialized */
@@ -667,7 +667,7 @@ xf86_reload_cursors(ScreenPtr screen)
void
xf86_cursors_fini(ScreenPtr screen)
{
- ScrnInfoPtr scrn = xf86Screens[screen->myNum];
+ ScrnInfoPtr scrn = xf86ScreenToScrn(screen);
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
if (xf86_config->cursor_info) {
diff --git a/xorg-server/hw/xfree86/modes/xf86DiDGA.c b/xorg-server/hw/xfree86/modes/xf86DiDGA.c
index fafd95aed..fdec6cb4b 100644
--- a/xorg-server/hw/xfree86/modes/xf86DiDGA.c
+++ b/xorg-server/hw/xfree86/modes/xf86DiDGA.c
@@ -41,7 +41,7 @@
static Bool
xf86_dga_get_modes(ScreenPtr pScreen)
{
- ScrnInfoPtr scrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr scrn = xf86ScreenToScrn(pScreen);
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
DGAModePtr modes, mode;
DisplayModePtr display_mode;
@@ -175,7 +175,7 @@ xf86DiDGAReInit(ScreenPtr pScreen)
Bool
_xf86_di_dga_reinit_internal(ScreenPtr pScreen)
{
- ScrnInfoPtr scrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr scrn = xf86ScreenToScrn(pScreen);
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
if (!DGAAvailable(pScreen->myNum))
@@ -197,7 +197,7 @@ xf86DiDGAInit(ScreenPtr pScreen, unsigned long dga_address)
Bool
_xf86_di_dga_init_internal(ScreenPtr pScreen)
{
- ScrnInfoPtr scrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr scrn = xf86ScreenToScrn(pScreen);
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
xf86_config->dga_flags = 0;
diff --git a/xorg-server/hw/xfree86/modes/xf86RandR12.c b/xorg-server/hw/xfree86/modes/xf86RandR12.c
index aca0734e0..e6b205223 100644
--- a/xorg-server/hw/xfree86/modes/xf86RandR12.c
+++ b/xorg-server/hw/xfree86/modes/xf86RandR12.c
@@ -447,7 +447,7 @@ static Bool
xf86RandR12GetInfo(ScreenPtr pScreen, Rotation * rotations)
{
RRScreenSizePtr pSize;
- ScrnInfoPtr scrp = XF86SCRNINFO(pScreen);
+ ScrnInfoPtr scrp = xf86ScreenToScrn(pScreen);
XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen);
DisplayModePtr mode;
int refresh0 = 60;
@@ -504,7 +504,7 @@ xf86RandR12SetMode(ScreenPtr pScreen,
DisplayModePtr mode,
Bool useVirtual, int mmWidth, int mmHeight)
{
- ScrnInfoPtr scrp = XF86SCRNINFO(pScreen);
+ ScrnInfoPtr scrp = xf86ScreenToScrn(pScreen);
XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen);
int oldWidth = pScreen->width;
int oldHeight = pScreen->height;
@@ -576,7 +576,7 @@ Bool
xf86RandR12SetConfig(ScreenPtr pScreen,
Rotation rotation, int rate, RRScreenSizePtr pSize)
{
- ScrnInfoPtr scrp = XF86SCRNINFO(pScreen);
+ ScrnInfoPtr scrp = xf86ScreenToScrn(pScreen);
XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen);
DisplayModePtr mode;
int pos[MAXDEVICES][2];
@@ -671,7 +671,7 @@ xf86RandR12ScreenSetSize(ScreenPtr pScreen,
CARD16 height, CARD32 mmWidth, CARD32 mmHeight)
{
XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen);
- ScrnInfoPtr pScrn = XF86SCRNINFO(pScreen);
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
WindowPtr pRoot = pScreen->root;
PixmapPtr pScrnPix;
@@ -743,7 +743,7 @@ xf86RandR12GetRotation(ScreenPtr pScreen)
Bool
xf86RandR12CreateScreenResources(ScreenPtr pScreen)
{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
xf86CrtcConfigPtr config;
XF86RandRInfoPtr randrp;
int c;
@@ -902,7 +902,7 @@ xf86RandR12CloseScreen(ScreenPtr pScreen)
randrp = XF86RANDRINFO(pScreen);
#if RANDR_12_INTERFACE
- xf86Screens[pScreen->myNum]->EnterVT = randrp->orig_EnterVT;
+ xf86ScreenToScrn(pScreen)->EnterVT = randrp->orig_EnterVT;
#endif
free(randrp);
@@ -914,7 +914,7 @@ xf86RandR12SetRotations(ScreenPtr pScreen, Rotation rotations)
XF86RandRInfoPtr randrp;
#if RANDR_12_INTERFACE
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
int c;
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
#endif
@@ -939,7 +939,7 @@ xf86RandR12SetTransformSupport(ScreenPtr pScreen, Bool transforms)
XF86RandRInfoPtr randrp;
#if RANDR_13_INTERFACE
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
int c;
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
#endif
@@ -960,7 +960,7 @@ xf86RandR12SetTransformSupport(ScreenPtr pScreen, Bool transforms)
void
xf86RandR12GetOriginalVirtualSize(ScrnInfoPtr pScrn, int *x, int *y)
{
- ScreenPtr pScreen = screenInfo.screens[pScrn->scrnIndex];
+ ScreenPtr pScreen = xf86ScrnToScreen(pScrn);
if (xf86RandR12Generation != serverGeneration ||
XF86RANDRINFO(pScreen)->virtualX == -1) {
@@ -1041,7 +1041,7 @@ static Bool
xf86RandR12CrtcNotify(RRCrtcPtr randr_crtc)
{
ScreenPtr pScreen = randr_crtc->pScreen;
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
RRModePtr randr_mode = NULL;
int x;
@@ -1136,7 +1136,7 @@ xf86RandR12CrtcSet(ScreenPtr pScreen,
int num_randr_outputs, RROutputPtr * randr_outputs)
{
XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen);
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
xf86CrtcPtr crtc = randr_crtc->devPrivate;
RRTransformPtr transform;
@@ -1349,7 +1349,7 @@ static Bool
xf86RandR12OutputValidateMode(ScreenPtr pScreen,
RROutputPtr randr_output, RRModePtr randr_mode)
{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
xf86OutputPtr output = randr_output->devPrivate;
DisplayModeRec mode;
@@ -1434,7 +1434,7 @@ xf86RROutputSetModes(RROutputPtr randr_output, DisplayModePtr modes)
static Bool
xf86RandR12SetInfo12(ScreenPtr pScreen)
{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
RROutputPtr *clones;
RRCrtcPtr *crtcs;
@@ -1510,7 +1510,7 @@ xf86RandR12SetInfo12(ScreenPtr pScreen)
static Bool
xf86RandR12GetInfo12(ScreenPtr pScreen, Rotation * rotations)
{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
if (!pScrn->vtSema)
return TRUE;
@@ -1522,7 +1522,7 @@ xf86RandR12GetInfo12(ScreenPtr pScreen, Rotation * rotations)
static Bool
xf86RandR12CreateObjects12(ScreenPtr pScreen)
{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
int c;
int o;
@@ -1559,7 +1559,7 @@ static Bool
xf86RandR12CreateScreenResources12(ScreenPtr pScreen)
{
int c;
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
if (xf86RandR12Key == NULL)
@@ -1581,7 +1581,7 @@ xf86RandR12CreateScreenResources12(ScreenPtr pScreen)
void
xf86RandR12TellChanged(ScreenPtr pScreen)
{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
int c;
@@ -1751,7 +1751,7 @@ xf86RandR12EnterVT(int screen_index, int flags)
static Bool
xf86RandR12Init12(ScreenPtr pScreen)
{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
rrScrPrivPtr rp = rrGetScrPriv(pScreen);
XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen);
int i;
diff --git a/xorg-server/hw/xfree86/modes/xf86Rotate.c b/xorg-server/hw/xfree86/modes/xf86Rotate.c
index cbc868735..26eefc8c0 100644
--- a/xorg-server/hw/xfree86/modes/xf86Rotate.c
+++ b/xorg-server/hw/xfree86/modes/xf86Rotate.c
@@ -144,7 +144,7 @@ xf86CrtcDamageShadow(xf86CrtcPtr crtc)
ScrnInfoPtr pScrn = crtc->scrn;
BoxRec damage_box;
RegionRec damage_region;
- ScreenPtr pScreen = pScrn->pScreen;
+ ScreenPtr pScreen = xf86ScrnToScreen(pScrn);
damage_box.x1 = 0;
damage_box.x2 = crtc->mode.HDisplay;
@@ -174,7 +174,7 @@ xf86CrtcDamageShadow(xf86CrtcPtr crtc)
static void
xf86RotatePrepare(ScreenPtr pScreen)
{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
int c;
@@ -204,7 +204,7 @@ xf86RotatePrepare(ScreenPtr pScreen)
static Bool
xf86RotateRedisplay(ScreenPtr pScreen)
{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
DamagePtr damage = xf86_config->rotation_damage;
RegionPtr region;
@@ -270,7 +270,7 @@ void
xf86RotateDestroy(xf86CrtcPtr crtc)
{
ScrnInfoPtr pScrn = crtc->scrn;
- ScreenPtr pScreen = pScrn->pScreen;
+ ScreenPtr pScreen = xf86ScrnToScreen(pScrn);
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
int c;
@@ -328,7 +328,7 @@ xf86RotateFreeShadow(ScrnInfoPtr pScrn)
void
xf86RotateCloseScreen(ScreenPtr screen)
{
- ScrnInfoPtr scrn = xf86Screens[screen->myNum];
+ ScrnInfoPtr scrn = xf86ScreenToScrn(screen);
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
int c;
@@ -370,9 +370,7 @@ xf86CrtcRotate(xf86CrtcPtr crtc)
{
ScrnInfoPtr pScrn = crtc->scrn;
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
-
- /* if this is called during ScreenInit() we don't have pScrn->pScreen yet */
- ScreenPtr pScreen = screenInfo.screens[pScrn->scrnIndex];
+ ScreenPtr pScreen = xf86ScrnToScreen(pScrn);
PictTransform crtc_to_fb;
struct pict_f_transform f_crtc_to_fb, f_fb_to_crtc;
xFixed *new_params = NULL;