summaryrefslogtreecommitdiff
path: root/hw/xfree86/vgahw
diff options
context:
space:
mode:
authorDave Airlie <airlied@gmail.com>2012-04-10 15:47:33 +0100
committerDave Airlie <airlied@redhat.com>2012-05-21 12:59:08 +0100
commit41151f88a62f01b00c1912822b8b430df1eb307e (patch)
tree05e6e63e1d5ece45b5a37c3dc049d6d82351acb5 /hw/xfree86/vgahw
parent53932b3803fa2c02949fd7d4d0e433ea58fa89f1 (diff)
xf86: migrate to using xf86ScreenToScrn wrapper (v2)
migrate to new helper API. This just wraps all the obvious uses of xf86Screens[pScreen->myNum], and should be fairly simple to review. v2: remove commented out lines. Reviewed-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'hw/xfree86/vgahw')
-rw-r--r--hw/xfree86/vgahw/vgaCmap.c2
-rw-r--r--hw/xfree86/vgahw/vgaHW.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/hw/xfree86/vgahw/vgaCmap.c b/hw/xfree86/vgahw/vgaCmap.c
index 0cfabc5d6..25d406ebd 100644
--- a/hw/xfree86/vgahw/vgaCmap.c
+++ b/hw/xfree86/vgahw/vgaCmap.c
@@ -85,7 +85,7 @@ xColorItem *pdefs;
/* This can get called before the ScrnInfoRec is installed so we
can't rely on getting it with XF86SCRNINFO() */
int scrnIndex = pmap->pScreen->myNum;
- ScrnInfoPtr scrninfp = xf86Screens[scrnIndex];
+ ScrnInfoPtr scrninfp = xf86ScreenToScrn(pmap->pScreen);
vgaHWPtr hwp = VGAHWPTR(scrninfp);
unsigned char overscan = hwp->ModeReg.Attribute[OVERSCAN];
diff --git a/hw/xfree86/vgahw/vgaHW.c b/hw/xfree86/vgahw/vgaHW.c
index e044682c7..a64f4f85d 100644
--- a/hw/xfree86/vgahw/vgaHW.c
+++ b/hw/xfree86/vgahw/vgaHW.c
@@ -651,7 +651,7 @@ vgaHWSaveScreen(ScreenPtr pScreen, int mode)
Bool on;
if (pScreen != NULL)
- pScrn = xf86Screens[pScreen->myNum];
+ pScrn = xf86ScreenToScrn(pScreen);
on = xf86IsUnblank(mode);
@@ -1873,7 +1873,7 @@ vgaHWSetOverscan(ScrnInfoPtr pScrn, int overscan)
Bool
vgaHWHandleColormaps(ScreenPtr pScreen)
{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
if (pScrn->depth > 1 && pScrn->depth <= 8) {
return xf86HandleColormaps(pScreen, 1 << pScrn->depth,