summaryrefslogtreecommitdiff
path: root/src/radeon_dri.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/radeon_dri.c')
-rw-r--r--src/radeon_dri.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/radeon_dri.c b/src/radeon_dri.c
index 81dc08b2..035556d6 100644
--- a/src/radeon_dri.c
+++ b/src/radeon_dri.c
@@ -91,7 +91,7 @@ static void RADEONDRIClipNotify(ScreenPtr pScreen, WindowPtr *ppWin, int num);
*/
static Bool RADEONInitVisualConfigs(ScreenPtr pScreen)
{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
int numConfigs = 0;
__GLXvisualConfig *pConfigs = 0;
@@ -317,7 +317,7 @@ static void RADEONDestroyContext(ScreenPtr pScreen, drm_context_t hwContext,
*/
static void RADEONEnterServer(ScreenPtr pScreen)
{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
drm_radeon_sarea_t *pSAREAPriv;
@@ -359,7 +359,7 @@ static void RADEONEnterServer(ScreenPtr pScreen)
*/
static void RADEONLeaveServer(ScreenPtr pScreen)
{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
RING_LOCALS;
@@ -490,7 +490,7 @@ static void RADEONDRIMoveBuffers(WindowPtr pParent, DDXPointRec ptOldOrg,
{
#ifdef USE_XAA
ScreenPtr pScreen = pParent->drawable.pScreen;
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
BoxPtr pboxTmp, pboxNext, pboxBase;
@@ -900,7 +900,7 @@ static Bool RADEONSetAgpMode(RADEONInfoPtr info, ScreenPtr pScreen)
/* Initialize Radeon's AGP registers */
static void RADEONSetAgpBase(RADEONInfoPtr info, ScreenPtr pScreen)
{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
unsigned char *RADEONMMIO = info->MMIO;
if (info->ChipFamily >= CHIP_FAMILY_R600)
@@ -1174,7 +1174,7 @@ static Bool RADEONDRIMapInit(RADEONInfoPtr info, ScreenPtr pScreen)
/* Initialize the kernel data structures */
static int RADEONDRIKernelInit(RADEONInfoPtr info, ScreenPtr pScreen)
{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
int cpp = info->CurrentLayout.pixel_bytes;
drm_radeon_init_t drmInfo;
@@ -1281,7 +1281,7 @@ static Bool RADEONDRIBufInit(RADEONInfoPtr info, ScreenPtr pScreen)
static void RADEONDRIIrqInit(RADEONInfoPtr info, ScreenPtr pScreen)
{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
if (!info->dri->irq) {
info->dri->irq = drmGetInterruptFromBusID(
@@ -1525,7 +1525,7 @@ Bool RADEONDRISetVBlankInterrupt(ScrnInfoPtr pScrn, Bool on)
*/
Bool RADEONDRIScreenInit(ScreenPtr pScreen)
{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
DRIInfoPtr pDRIInfo;
RADEONDRIPtr pRADEONDRI;
@@ -1718,7 +1718,7 @@ Bool RADEONDRIScreenInit(ScreenPtr pScreen)
static Bool RADEONDRIDoCloseScreen(int scrnIndex, ScreenPtr pScreen)
{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
RADEONDRICloseScreen(pScreen);
@@ -1733,7 +1733,7 @@ static Bool RADEONDRIDoCloseScreen(int scrnIndex, ScreenPtr pScreen)
*/
Bool RADEONDRIFinishScreenInit(ScreenPtr pScreen)
{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
drm_radeon_sarea_t *pSAREAPriv;
RADEONDRIPtr pRADEONDRI;
@@ -1831,7 +1831,7 @@ Bool RADEONDRIFinishScreenInit(ScreenPtr pScreen)
void RADEONDRIResume(ScreenPtr pScreen)
{
int _ret;
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
if (info->dri->pKernelDRMVersion->version_minor >= 9) {
@@ -1866,7 +1866,7 @@ void RADEONDRIResume(ScreenPtr pScreen)
void RADEONDRIStop(ScreenPtr pScreen)
{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
RING_LOCALS;
@@ -1889,7 +1889,7 @@ void RADEONDRIStop(ScreenPtr pScreen)
*/
void RADEONDRICloseScreen(ScreenPtr pScreen)
{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
drm_radeon_init_t drmInfo;
@@ -2093,7 +2093,7 @@ out:
static void RADEONEnablePageFlip(ScreenPtr pScreen)
{
#ifdef DAMAGE
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
if (info->dri->allowPageFlip) {
@@ -2133,7 +2133,7 @@ static void RADEONDRITransitionMultiToSingle3d(ScreenPtr pScreen)
static void RADEONDRITransitionTo3d(ScreenPtr pScreen)
{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
#ifdef USE_XAA
FBAreaPtr fbarea;
@@ -2221,7 +2221,7 @@ static void RADEONDRITransitionTo3d(ScreenPtr pScreen)
static void RADEONDRITransitionTo2d(ScreenPtr pScreen)
{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
drm_radeon_sarea_t *pSAREAPriv = DRIGetSAREAPrivate(pScreen);
@@ -2266,7 +2266,7 @@ static void RADEONDRITransitionTo2d(ScreenPtr pScreen)
static void
RADEONDRIClipNotify(ScreenPtr pScreen, WindowPtr *ppWin, int num)
{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
REGION_UNINIT(pScreen, &info->dri->driRegion);
@@ -2289,7 +2289,7 @@ RADEONDRIClipNotify(ScreenPtr pScreen, WindowPtr *ppWin, int num)
void RADEONDRIAllocatePCIGARTTable(ScreenPtr pScreen)
{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
if (info->cardType != CARD_PCIE ||