summaryrefslogtreecommitdiff
path: root/src/mga_video.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2012-06-06 09:23:31 +0100
committerDave Airlie <airlied@redhat.com>2012-06-06 09:24:12 +0100
commit7b6dcc4d5768cc8d17a1f664155ebdc8ca8c042e (patch)
tree574af706343180d0cf5cea108d44cf4948b2e533 /src/mga_video.c
parent0cb8ba6dc5e7bf4179174f9f17e211df7d89bd41 (diff)
mga: port to new compat API.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'src/mga_video.c')
-rw-r--r--src/mga_video.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/mga_video.c b/src/mga_video.c
index 2b755d7..00e026d 100644
--- a/src/mga_video.c
+++ b/src/mga_video.c
@@ -72,7 +72,7 @@ static Atom xvBrightness, xvContrast, xvColorKey, xvDoubleBuffer;
static void
MGAVideoSave(ScreenPtr pScreen, ExaOffscreenArea *area)
{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
MGAPtr pMga = MGAPTR(pScrn);
MGAPortPrivPtr pPriv = pMga->portPrivate;
@@ -83,7 +83,7 @@ MGAVideoSave(ScreenPtr pScreen, ExaOffscreenArea *area)
void MGAInitVideo(ScreenPtr pScreen)
{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
XF86VideoAdaptorPtr *adaptors, *newAdaptors = NULL;
XF86VideoAdaptorPtr newAdaptor = NULL;
MGAPtr pMga = MGAPTR(pScrn);
@@ -263,7 +263,7 @@ MGAAllocAdaptor(ScrnInfoPtr pScrn, Bool doublebuffer)
static XF86VideoAdaptorPtr
MGASetupImageVideoOverlay(ScreenPtr pScreen)
{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
MGAPtr pMga = MGAPTR(pScrn);
XF86VideoAdaptorPtr adapt;
@@ -312,7 +312,7 @@ MGASetupImageVideoOverlay(ScreenPtr pScreen)
static XF86VideoAdaptorPtr
MGASetupImageVideoTexture(ScreenPtr pScreen)
{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
XF86VideoAdaptorPtr adapt;
MGAPtr pMga = MGAPTR(pScrn);
@@ -567,7 +567,7 @@ MGAAllocateMemory(
int size
){
MGAPtr pMga = MGAPTR(pScrn);
- ScreenPtr pScreen = screenInfo.screens[pScrn->scrnIndex];
+ ScreenPtr pScreen = xf86ScrnToScreen(pScrn);
int offset = 0;
#ifdef USE_EXA
@@ -1227,7 +1227,7 @@ MGADisplaySurface(
static void
MGAInitOffscreenImages(ScreenPtr pScreen)
{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
MGAPtr pMga = MGAPTR(pScrn);
int num = (pMga->Chipset == PCI_CHIP_MGAG400 || pMga->Chipset == PCI_CHIP_MGAG550) ? 2 : 1;
XF86OffscreenImagePtr offscreenImages;
@@ -1296,7 +1296,7 @@ MGAInitOffscreenImages(ScreenPtr pScreen)
static XF86VideoAdaptorPtr
MGASetupImageVideoILOAD(ScreenPtr pScreen)
{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
XF86VideoAdaptorPtr adapt;
MGAPtr pMga = MGAPTR(pScrn);