[PATCH 1/4] xf86/modes: drop two uses of screenInfo

Dave Airlie airlied at gmail.com
Mon May 14 05:00:20 PDT 2012


Just use new macros to access scrn->screen.

Signed-off-by: Dave Airlie <airlied at redhat.com>
---
 hw/xfree86/modes/xf86RandR12.c |    2 +-
 hw/xfree86/modes/xf86Rotate.c  |    4 +---
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/hw/xfree86/modes/xf86RandR12.c b/hw/xfree86/modes/xf86RandR12.c
index 71467c3..49287d9 100644
--- a/hw/xfree86/modes/xf86RandR12.c
+++ b/hw/xfree86/modes/xf86RandR12.c
@@ -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) {
diff --git a/hw/xfree86/modes/xf86Rotate.c b/hw/xfree86/modes/xf86Rotate.c
index 9ac6e2c..7fdff91 100644
--- a/hw/xfree86/modes/xf86Rotate.c
+++ b/hw/xfree86/modes/xf86Rotate.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;
-- 
1.7.6



More information about the xorg-devel mailing list