summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2012-05-23 11:57:35 +0100
committerDave Airlie <airlied@redhat.com>2012-05-24 07:39:10 +0100
commit14122214edabd2a574b66577289a7c8732f4e953 (patch)
treedfd389a3a70afe92fe3eb38bffb4219de5a2ca86 /src
parent2101e485480e3ffd6a17ed12f5287b8b1e4e0223 (diff)
radeon/generic_bus: stop passing scrnIndex
Just pass a pointer to the screen, removes usage of xf86Screens lookup Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'src')
-rw-r--r--src/generic_bus.h2
-rw-r--r--src/radeon_vip.c16
-rw-r--r--src/radeon_xvmc.c2
-rw-r--r--src/theatre.c12
-rw-r--r--src/theatre200.c90
-rw-r--r--src/theatre_detect.c10
6 files changed, 66 insertions, 66 deletions
diff --git a/src/generic_bus.h b/src/generic_bus.h
index a04baa15..553d3f28 100644
--- a/src/generic_bus.h
+++ b/src/generic_bus.h
@@ -19,7 +19,7 @@
typedef struct _GENERIC_BUS_Rec *GENERIC_BUS_Ptr;
typedef struct _GENERIC_BUS_Rec{
- int scrnIndex;
+ ScrnInfoPtr pScrn;
DevUnion DriverPrivate;
Bool (*ioctl)(GENERIC_BUS_Ptr, long, long, char *);
Bool (*read)(GENERIC_BUS_Ptr, uint32_t, uint32_t, uint8_t *);
diff --git a/src/radeon_vip.c b/src/radeon_vip.c
index 84570789..eacfc803 100644
--- a/src/radeon_vip.c
+++ b/src/radeon_vip.c
@@ -48,7 +48,7 @@ static Bool RADEONVIP_ioctl(GENERIC_BUS_Ptr b, long ioctl, long arg1, char *arg2
static uint32_t RADEONVIP_idle(GENERIC_BUS_Ptr b)
{
- ScrnInfoPtr pScrn = xf86Screens[b->scrnIndex];
+ ScrnInfoPtr pScrn = b->pScrn;
RADEONInfoPtr info = RADEONPTR(pScrn);
unsigned char *RADEONMMIO = info->MMIO;
@@ -69,7 +69,7 @@ static uint32_t RADEONVIP_idle(GENERIC_BUS_Ptr b)
static uint32_t RADEONVIP_fifo_idle(GENERIC_BUS_Ptr b, uint8_t channel)
{
- ScrnInfoPtr pScrn = xf86Screens[b->scrnIndex];
+ ScrnInfoPtr pScrn = b->pScrn;
RADEONInfoPtr info = RADEONPTR(pScrn);
unsigned char *RADEONMMIO = info->MMIO;
@@ -79,7 +79,7 @@ static uint32_t RADEONVIP_fifo_idle(GENERIC_BUS_Ptr b, uint8_t channel)
timeout = INREG(VIPH_TIMEOUT_STAT);
if((timeout & 0x0000000f) & channel) /* lockup ?? */
{
- xf86DrvMsg(b->scrnIndex, X_INFO, "RADEON_fifo_idle\n");
+ xf86DrvMsg(b->pScrn->scrnIndex, X_INFO, "RADEON_fifo_idle\n");
RADEONWaitForFifo(pScrn, 2);
OUTREG(VIPH_TIMEOUT_STAT, (timeout & 0xfffffff0) | channel);
RADEONWaitForIdleMMIO(pScrn);
@@ -107,7 +107,7 @@ static uint32_t RADEONVIP_fifo_idle(GENERIC_BUS_Ptr b, uint8_t channel)
static Bool RADEONVIP_read(GENERIC_BUS_Ptr b, uint32_t address, uint32_t count, uint8_t *buffer)
{
- ScrnInfoPtr pScrn = xf86Screens[b->scrnIndex];
+ ScrnInfoPtr pScrn = b->pScrn;
RADEONInfoPtr info = RADEONPTR(pScrn);
unsigned char *RADEONMMIO = info->MMIO;
uint32_t status,tmp;
@@ -173,7 +173,7 @@ static Bool RADEONVIP_read(GENERIC_BUS_Ptr b, uint32_t address, uint32_t count,
static Bool RADEONVIP_fifo_read(GENERIC_BUS_Ptr b, uint32_t address, uint32_t count, uint8_t *buffer)
{
- ScrnInfoPtr pScrn = xf86Screens[b->scrnIndex];
+ ScrnInfoPtr pScrn = b->pScrn;
RADEONInfoPtr info = RADEONPTR(pScrn);
unsigned char *RADEONMMIO = info->MMIO;
uint32_t status,tmp;
@@ -247,7 +247,7 @@ static Bool RADEONVIP_fifo_read(GENERIC_BUS_Ptr b, uint32_t address, uint32_t co
static Bool RADEONVIP_write(GENERIC_BUS_Ptr b, uint32_t address, uint32_t count, uint8_t *buffer)
{
- ScrnInfoPtr pScrn = xf86Screens[b->scrnIndex];
+ ScrnInfoPtr pScrn = b->pScrn;
RADEONInfoPtr info = RADEONPTR(pScrn);
unsigned char *RADEONMMIO = info->MMIO;
@@ -280,7 +280,7 @@ static Bool RADEONVIP_write(GENERIC_BUS_Ptr b, uint32_t address, uint32_t count,
static Bool RADEONVIP_fifo_write(GENERIC_BUS_Ptr b, uint32_t address, uint32_t count, uint8_t *buffer)
{
- ScrnInfoPtr pScrn = xf86Screens[b->scrnIndex];
+ ScrnInfoPtr pScrn = b->pScrn;
RADEONInfoPtr info = RADEONPTR(pScrn);
unsigned char *RADEONMMIO = info->MMIO;
@@ -350,7 +350,7 @@ void RADEONVIP_reset(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv)
void RADEONVIP_init(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv)
{
pPriv->VIP=calloc(1,sizeof(GENERIC_BUS_Rec));
- pPriv->VIP->scrnIndex=pScrn->scrnIndex;
+ pPriv->VIP->pScrn=pScrn;
pPriv->VIP->DriverPrivate.ptr=pPriv;
pPriv->VIP->ioctl=RADEONVIP_ioctl;
pPriv->VIP->read=RADEONVIP_read;
diff --git a/src/radeon_xvmc.c b/src/radeon_xvmc.c
index 994891e9..12ce2d30 100644
--- a/src/radeon_xvmc.c
+++ b/src/radeon_xvmc.c
@@ -29,11 +29,11 @@
#include "config.h"
#endif
+#include <xf86.h>
#include "radeon_video.h"
#include <X11/extensions/Xv.h>
#include <X11/extensions/XvMC.h>
-#include <xf86.h>
#include "fourcc.h"
#define FOURCC_RGB 0x0000003
diff --git a/src/theatre.c b/src/theatre.c
index fc68f275..09640faf 100644
--- a/src/theatre.c
+++ b/src/theatre.c
@@ -1150,7 +1150,7 @@ _X_EXPORT void RT_SetStandard (TheatrePtr t, uint16_t wStandard)
uint16_t wFrameTotal = 0;
double dbSPPeriod = 4.70;
- xf86DrvMsg(t->VIP->scrnIndex,X_INFO,"Rage Theatre setting standard 0x%04x\n",
+ xf86DrvMsg(t->VIP->pScrn->scrnIndex,X_INFO,"Rage Theatre setting standard 0x%04x\n",
wStandard);
t->wStandard = wStandard;
@@ -1798,7 +1798,7 @@ void RT_SetConnector (TheatrePtr t, uint16_t wConnector, int tunerFlag)
counter++;
}
dwTempContrast = ReadRT_fld (fld_LP_CONTRAST);
- if(counter>=10000)xf86DrvMsg(t->VIP->scrnIndex, X_INFO,
+ if(counter>=10000)xf86DrvMsg(t->VIP->pScrn->scrnIndex, X_INFO,
"Rage Theatre: timeout waiting for line count (%u)\n",
(unsigned)ReadRT_fld (fld_VS_LINE_COUNT));
@@ -1848,14 +1848,14 @@ void RT_SetConnector (TheatrePtr t, uint16_t wConnector, int tunerFlag)
{
i--;
}
- if(i<0) xf86DrvMsg(t->VIP->scrnIndex, X_INFO, "Rage Theatre: waiting for fld_HS_GENLOCKED failed\n");
+ if(i<0) xf86DrvMsg(t->VIP->pScrn->scrnIndex, X_INFO, "Rage Theatre: waiting for fld_HS_GENLOCKED failed\n");
/* now we are waiting for a non-visible line.. and there is absolutely no point to wait too long */
counter = 0;
while (!((ReadRT_fld (fld_VS_LINE_COUNT)> 1) && (ReadRT_fld (fld_VS_LINE_COUNT)<20)) && (counter < 10000)){
counter++;
}
WriteRT_fld (fld_LP_CONTRAST, dwTempContrast);
- if(counter>=10000)xf86DrvMsg(t->VIP->scrnIndex, X_INFO,
+ if(counter>=10000)xf86DrvMsg(t->VIP->pScrn->scrnIndex, X_INFO,
"Rage Theatre: timeout waiting for line count (%u)\n",
(unsigned)ReadRT_fld (fld_VS_LINE_COUNT));
@@ -1948,7 +1948,7 @@ _X_EXPORT void DumpRageTheatreRegs(TheatrePtr t)
for(i=0;i<0x900;i+=4)
{
RT_regr(i, &data);
- xf86DrvMsg(t->VIP->scrnIndex, X_INFO,
+ xf86DrvMsg(t->VIP->pScrn->scrnIndex, X_INFO,
"register 0x%04x is equal to 0x%08x\n", i, (unsigned)data);
}
@@ -2154,7 +2154,7 @@ void DumpRageTheatreRegsByName(TheatrePtr t)
for(i=0; rt_reg_list[i].name!=NULL;i++){
RT_regr(rt_reg_list[i].addr, &data);
- xf86DrvMsg(t->VIP->scrnIndex, X_INFO,
+ xf86DrvMsg(t->VIP->pScrn->scrnIndex, X_INFO,
"register (0x%04lx) %s is equal to 0x%08x\n",
rt_reg_list[i].addr, rt_reg_list[i].name, (unsigned)data);
}
diff --git a/src/theatre200.c b/src/theatre200.c
index 1b2a46c6..9de9299c 100644
--- a/src/theatre200.c
+++ b/src/theatre200.c
@@ -346,7 +346,7 @@ static int dsp_init(TheatrePtr t, struct rt200_microc_data* microc_datap)
{
uint32_t data;
int i = 0;
- int screen = t->VIP->scrnIndex;
+ int screen = t->VIP->pScrn->scrnIndex;
/* Map FIFOD to DSP Port I/O port */
RT_regr(VIP_HOSTINTF_PORT_CNTL, &data);
@@ -375,7 +375,7 @@ static int dsp_load(TheatrePtr t, struct rt200_microc_data* microc_datap)
uint32_t tries = 0;
uint32_t result = 0;
uint32_t seg_id = 0;
- int screen = t->VIP->scrnIndex;
+ int screen = t->VIP->pScrn->scrnIndex;
DEBUG("Microcode: before everything: %x\n", data8);
@@ -615,7 +615,7 @@ static uint32_t dsp_set_video_input_connector(TheatrePtr t, uint32_t connector)
{
uint32_t fb_scratch0 = 0;
uint32_t result;
- int screen = t->VIP->scrnIndex;
+ int screen = t->VIP->pScrn->scrnIndex;
fb_scratch0 = ((connector << 8) & 0xff00) | (55 & 0xff);
@@ -631,7 +631,7 @@ static uint32_t dsp_reset(TheatrePtr t)
{
uint32_t fb_scratch0 = 0;
uint32_t result;
- int screen = t->VIP->scrnIndex;
+ int screen = t->VIP->pScrn->scrnIndex;
fb_scratch0 = ((2 << 8) & 0xff00) | (8 & 0xff);
@@ -647,7 +647,7 @@ static uint32_t dsp_set_lowpowerstate(TheatrePtr t, uint32_t pstate)
{
uint32_t fb_scratch0 = 0;
uint32_t result;
- int screen = t->VIP->scrnIndex;
+ int screen = t->VIP->pScrn->scrnIndex;
fb_scratch0 = ((pstate << 8) & 0xff00) | (82 & 0xff);
@@ -661,7 +661,7 @@ static uint32_t dsp_set_video_standard(TheatrePtr t, uint32_t standard)
{
uint32_t fb_scratch0 = 0;
uint32_t result;
- int screen = t->VIP->scrnIndex;
+ int screen = t->VIP->pScrn->scrnIndex;
fb_scratch0 = ((standard << 8) & 0xff00) | (52 & 0xff);
@@ -676,7 +676,7 @@ static uint32_t dsp_set_videostreamformat(TheatrePtr t, uint32_t format)
{
uint32_t fb_scratch0 = 0;
uint32_t result;
- int screen = t->VIP->scrnIndex;
+ int screen = t->VIP->pScrn->scrnIndex;
fb_scratch0 = ((format << 8) & 0xff00) | (65 & 0xff);
@@ -691,7 +691,7 @@ static uint32_t dsp_video_standard_detection(TheatrePtr t)
{
uint32_t fb_scratch0 = 0;
uint32_t result;
- int screen = t->VIP->scrnIndex;
+ int screen = t->VIP->pScrn->scrnIndex;
fb_scratch0 = 0 | (54 & 0xff);
@@ -708,7 +708,7 @@ static uint32_t dsp_get_signallockstatus(TheatrePtr t)
uint32_t fb_scratch1 = 0;
uint32_t fb_scratch0 = 0;
uint32_t result;
- int screen = t->VIP->scrnIndex;
+ int screen = t->VIP->pScrn->scrnIndex;
fb_scratch0 = 0 | (77 & 0xff);
@@ -725,7 +725,7 @@ static uint32_t dsp_get_signallinenumber(TheatrePtr t)
uint32_t fb_scratch1 = 0;
uint32_t fb_scratch0 = 0;
uint32_t result;
- int screen = t->VIP->scrnIndex;
+ int screen = t->VIP->pScrn->scrnIndex;
fb_scratch0 = 0 | (78 & 0xff);
@@ -743,7 +743,7 @@ static uint32_t dsp_set_brightness(TheatrePtr t, uint8_t brightness)
uint32_t fb_scratch1 = 0;
uint32_t fb_scratch0 = 0;
uint32_t result;
- int screen = t->VIP->scrnIndex;
+ int screen = t->VIP->pScrn->scrnIndex;
fb_scratch0 = ((brightness << 8) & 0xff00) | (67 & 0xff);
@@ -759,7 +759,7 @@ static uint32_t dsp_set_contrast(TheatrePtr t, uint8_t contrast)
uint32_t fb_scratch1 = 0;
uint32_t fb_scratch0 = 0;
uint32_t result;
- int screen = t->VIP->scrnIndex;
+ int screen = t->VIP->pScrn->scrnIndex;
fb_scratch0 = ((contrast << 8) & 0xff00) | (71 & 0xff);
@@ -776,7 +776,7 @@ static uint32_t dsp_set_sharpness(TheatrePtr t, int sharpness)
uint32_t fb_scratch1 = 0;
uint32_t fb_scratch0 = 0;
uint32_t result;
- int screen = t->VIP->scrnIndex;
+ int screen = t->VIP->pScrn->scrnIndex;
fb_scratch0 = 0 | (73 & 0xff);
@@ -793,7 +793,7 @@ static uint32_t dsp_set_tint(TheatrePtr t, uint8_t tint)
uint32_t fb_scratch1 = 0;
uint32_t fb_scratch0 = 0;
uint32_t result;
- int screen = t->VIP->scrnIndex;
+ int screen = t->VIP->pScrn->scrnIndex;
fb_scratch0 = ((tint << 8) & 0xff00) | (75 & 0xff);
@@ -809,7 +809,7 @@ static uint32_t dsp_set_saturation(TheatrePtr t, uint8_t saturation)
uint32_t fb_scratch1 = 0;
uint32_t fb_scratch0 = 0;
uint32_t result;
- int screen = t->VIP->scrnIndex;
+ int screen = t->VIP->pScrn->scrnIndex;
fb_scratch0 = ((saturation << 8) & 0xff00) | (69 & 0xff);
@@ -825,7 +825,7 @@ static uint32_t dsp_set_video_scaler_horizontal(TheatrePtr t, uint16_t output_wi
uint32_t fb_scratch1 = 0;
uint32_t fb_scratch0 = 0;
uint32_t result;
- int screen = t->VIP->scrnIndex;
+ int screen = t->VIP->pScrn->scrnIndex;
fb_scratch0 = ((output_width << 8) & 0x00ffff00) | (195 & 0xff);
fb_scratch1 = ((horz_end << 16) & 0xffff0000) | (horz_start & 0xffff);
@@ -842,7 +842,7 @@ static uint32_t dsp_set_video_scaler_vertical(TheatrePtr t, uint16_t output_heig
uint32_t fb_scratch1 = 0;
uint32_t fb_scratch0 = 0;
uint32_t result;
- int screen = t->VIP->scrnIndex;
+ int screen = t->VIP->pScrn->scrnIndex;
fb_scratch0 = ((output_height << 8) & 0x00ffff00) | (196 & 0xff);
fb_scratch1 = ((vert_end << 16) & 0xffff0000) | (vert_start & 0xffff);
@@ -859,7 +859,7 @@ static uint32_t dsp_audio_mute(TheatrePtr t, uint8_t left, uint8_t right)
uint32_t fb_scratch1 = 0;
uint32_t fb_scratch0 = 0;
uint32_t result;
- int screen = t->VIP->scrnIndex;
+ int screen = t->VIP->pScrn->scrnIndex;
fb_scratch0 = ((right << 16) & 0xff0000) | ((left << 8) & 0xff00) | (21 & 0xff);
@@ -875,7 +875,7 @@ static uint32_t dsp_set_audio_volume(TheatrePtr t, uint8_t left, uint8_t right,
uint32_t fb_scratch1 = 0;
uint32_t fb_scratch0 = 0;
uint32_t result;
- int screen = t->VIP->scrnIndex;
+ int screen = t->VIP->pScrn->scrnIndex;
fb_scratch0 = ((auto_mute << 24) & 0xff000000) | ((right << 16) & 0xff0000) | ((left << 8) & 0xff00) | (22 & 0xff);
@@ -892,7 +892,7 @@ static uint32_t dsp_audio_detection(TheatrePtr t, uint8_t option)
uint32_t fb_scratch1 = 0;
uint32_t fb_scratch0 = 0;
uint32_t result;
- int screen = t->VIP->scrnIndex;
+ int screen = t->VIP->pScrn->scrnIndex;
fb_scratch0 = ((option << 8) & 0xff00) | (16 & 0xff);
@@ -909,7 +909,7 @@ static uint32_t dsp_configure_i2s_port(TheatrePtr t, uint8_t tx_mode, uint8_t rx
uint32_t fb_scratch1 = 0;
uint32_t fb_scratch0 = 0;
uint32_t result;
- int screen = t->VIP->scrnIndex;
+ int screen = t->VIP->pScrn->scrnIndex;
fb_scratch0 = ((clk_mode << 24) & 0xff000000) | ((rx_mode << 16) & 0xff0000) | ((tx_mode << 8) & 0xff00) | (40 & 0xff);
@@ -925,7 +925,7 @@ static uint32_t dsp_configure_spdif_port(TheatrePtr t, uint8_t state)
uint32_t fb_scratch1 = 0;
uint32_t fb_scratch0 = 0;
uint32_t result;
- int screen = t->VIP->scrnIndex;
+ int screen = t->VIP->pScrn->scrnIndex;
fb_scratch0 = ((state << 8) & 0xff00) | (41 & 0xff);
@@ -1655,7 +1655,7 @@ _X_EXPORT void RT_SetInterlace (TheatrePtr t, uint8_t bInterlace)
****************************************************************************/
_X_EXPORT void RT_SetStandard (TheatrePtr t, uint16_t wStandard)
{
- xf86DrvMsg(t->VIP->scrnIndex,X_INFO,"Rage Theatre setting standard 0x%04x\n",
+ xf86DrvMsg(t->VIP->pScrn->scrnIndex,X_INFO,"Rage Theatre setting standard 0x%04x\n",
wStandard);
t->wStandard = wStandard;
@@ -1799,11 +1799,11 @@ _X_EXPORT void RT_SetConnector (TheatrePtr t, uint16_t wConnector, int tunerFlag
t->wConnector = wConnector;
theatre_read(t, VIP_GPIO_CNTL, &data);
- xf86DrvMsg(t->VIP->scrnIndex,X_INFO,"VIP_GPIO_CNTL: %x\n",
+ xf86DrvMsg(t->VIP->pScrn->scrnIndex,X_INFO,"VIP_GPIO_CNTL: %x\n",
(unsigned)data);
theatre_read(t, VIP_GPIO_INOUT, &data);
- xf86DrvMsg(t->VIP->scrnIndex,X_INFO,"VIP_GPIO_INOUT: %x\n",
+ xf86DrvMsg(t->VIP->pScrn->scrnIndex,X_INFO,"VIP_GPIO_INOUT: %x\n",
(unsigned)data);
switch (wConnector)
@@ -1853,11 +1853,11 @@ _X_EXPORT void RT_SetConnector (TheatrePtr t, uint16_t wConnector, int tunerFlag
}
theatre_read(t, VIP_GPIO_CNTL, &data);
- xf86DrvMsg(t->VIP->scrnIndex,X_INFO,"VIP_GPIO_CNTL: %x\n",
+ xf86DrvMsg(t->VIP->pScrn->scrnIndex,X_INFO,"VIP_GPIO_CNTL: %x\n",
(unsigned)data);
theatre_read(t, VIP_GPIO_INOUT, &data);
- xf86DrvMsg(t->VIP->scrnIndex,X_INFO,"VIP_GPIO_INOUT: %x\n",
+ xf86DrvMsg(t->VIP->pScrn->scrnIndex,X_INFO,"VIP_GPIO_INOUT: %x\n",
(unsigned)data);
@@ -1917,19 +1917,19 @@ _X_EXPORT void InitTheatre(TheatrePtr t)
if (t->microc_path == NULL)
{
t->microc_path = DEFAULT_MICROC_PATH;
- xf86DrvMsg(t->VIP->scrnIndex, X_INFO, "Microcode: Use default microcode path: %s\n", DEFAULT_MICROC_PATH);
+ xf86DrvMsg(t->VIP->pScrn->scrnIndex, X_INFO, "Microcode: Use default microcode path: %s\n", DEFAULT_MICROC_PATH);
}
else
- xf86DrvMsg(t->VIP->scrnIndex, X_INFO, "Microcode: Use microcode path: %s\n", t->microc_path);
+ xf86DrvMsg(t->VIP->pScrn->scrnIndex, X_INFO, "Microcode: Use microcode path: %s\n", t->microc_path);
if (t->microc_type == NULL)
{
t->microc_type = DEFAULT_MICROC_TYPE;
- xf86DrvMsg(t->VIP->scrnIndex, X_INFO, "Microcode: Use default microcode type: %s\n", DEFAULT_MICROC_TYPE);
+ xf86DrvMsg(t->VIP->pScrn->scrnIndex, X_INFO, "Microcode: Use default microcode type: %s\n", DEFAULT_MICROC_TYPE);
}
else
- xf86DrvMsg(t->VIP->scrnIndex, X_INFO, "Microcode: Use microcode type: %s\n", t->microc_type);
+ xf86DrvMsg(t->VIP->pScrn->scrnIndex, X_INFO, "Microcode: Use microcode type: %s\n", t->microc_type);
if (DownloadMicrocode(t) < 0)
{
@@ -1948,45 +1948,45 @@ static int DownloadMicrocode(TheatrePtr t)
struct rt200_microc_data microc_data;
microc_data.microc_seg_list = NULL;
- if (microc_load(t->microc_path, t->microc_type, &microc_data, t->VIP->scrnIndex) < 0)
+ if (microc_load(t->microc_path, t->microc_type, &microc_data, t->VIP->pScrn->scrnIndex) < 0)
{
- xf86DrvMsg(t->VIP->scrnIndex, X_ERROR, "Microcode: cannot load microcode\n");
+ xf86DrvMsg(t->VIP->pScrn->scrnIndex, X_ERROR, "Microcode: cannot load microcode\n");
goto err_exit;
}
else
{
- xf86DrvMsg(t->VIP->scrnIndex, X_INFO, "Microcode: device_id: %x\n", microc_data.microc_head.device_id);
- xf86DrvMsg(t->VIP->scrnIndex, X_INFO, "Microcode: vendor_id: %x\n", microc_data.microc_head.vendor_id);
- xf86DrvMsg(t->VIP->scrnIndex, X_INFO, "Microcode: rev_id: %x\n", microc_data.microc_head.revision_id);
- xf86DrvMsg(t->VIP->scrnIndex, X_INFO, "Microcode: num_seg: %x\n", microc_data.microc_head.num_seg);
+ xf86DrvMsg(t->VIP->pScrn->scrnIndex, X_INFO, "Microcode: device_id: %x\n", microc_data.microc_head.device_id);
+ xf86DrvMsg(t->VIP->pScrn->scrnIndex, X_INFO, "Microcode: vendor_id: %x\n", microc_data.microc_head.vendor_id);
+ xf86DrvMsg(t->VIP->pScrn->scrnIndex, X_INFO, "Microcode: rev_id: %x\n", microc_data.microc_head.revision_id);
+ xf86DrvMsg(t->VIP->pScrn->scrnIndex, X_INFO, "Microcode: num_seg: %x\n", microc_data.microc_head.num_seg);
}
if (dsp_init(t, &microc_data) < 0)
{
- xf86DrvMsg(t->VIP->scrnIndex, X_ERROR, "Microcode: dsp_init failed\n");
+ xf86DrvMsg(t->VIP->pScrn->scrnIndex, X_ERROR, "Microcode: dsp_init failed\n");
goto err_exit;
}
else
{
- xf86DrvMsg(t->VIP->scrnIndex, X_INFO, "Microcode: dsp_init OK\n");
+ xf86DrvMsg(t->VIP->pScrn->scrnIndex, X_INFO, "Microcode: dsp_init OK\n");
}
if (dsp_load(t, &microc_data) < 0)
{
- xf86DrvMsg(t->VIP->scrnIndex, X_ERROR, "Microcode: dsp_download failed\n");
+ xf86DrvMsg(t->VIP->pScrn->scrnIndex, X_ERROR, "Microcode: dsp_download failed\n");
goto err_exit;
}
else
{
- xf86DrvMsg(t->VIP->scrnIndex, X_INFO, "Microcode: dsp_download OK\n");
+ xf86DrvMsg(t->VIP->pScrn->scrnIndex, X_INFO, "Microcode: dsp_download OK\n");
}
- microc_clean(&microc_data, t->VIP->scrnIndex);
+ microc_clean(&microc_data, t->VIP->pScrn->scrnIndex);
return 0;
err_exit:
- microc_clean(&microc_data, t->VIP->scrnIndex);
+ microc_clean(&microc_data, t->VIP->pScrn->scrnIndex);
return -1;
}
@@ -2011,7 +2011,7 @@ _X_EXPORT void DumpRageTheatreRegs(TheatrePtr t)
for(i=0;i<0x900;i+=4)
{
RT_regr(i, &data);
- xf86DrvMsg(t->VIP->scrnIndex, X_INFO,
+ xf86DrvMsg(t->VIP->pScrn->scrnIndex, X_INFO,
"register 0x%04x is equal to 0x%08x\n", i, (unsigned)data);
}
@@ -2217,7 +2217,7 @@ void DumpRageTheatreRegsByName(TheatrePtr t)
for(i=0; rt_reg_list[i].name!=NULL;i++){
RT_regr(rt_reg_list[i].addr, &data);
- xf86DrvMsg(t->VIP->scrnIndex, X_INFO,
+ xf86DrvMsg(t->VIP->pScrn->scrnIndex, X_INFO,
"register (0x%04lx) %s is equal to 0x%08x\n",
rt_reg_list[i].addr, rt_reg_list[i].name, (unsigned)data);
}
diff --git a/src/theatre_detect.c b/src/theatre_detect.c
index 44cd9fa9..0d97cc8a 100644
--- a/src/theatre_detect.c
+++ b/src/theatre_detect.c
@@ -74,7 +74,7 @@ _X_EXPORT TheatrePtr DetectTheatre(GENERIC_BUS_Ptr b)
b->ioctl(b,GB_IOCTL_GET_TYPE,20,s);
if(strcmp(VIP_TYPE, s)){
- xf86DrvMsg(b->scrnIndex, X_ERROR, "DetectTheatre must be called with bus of type \"%s\", not \"%s\"\n",
+ xf86DrvMsg(b->pScrn->scrnIndex, X_ERROR, "DetectTheatre must be called with bus of type \"%s\", not \"%s\"\n",
VIP_TYPE, s);
return NULL;
}
@@ -89,7 +89,7 @@ _X_EXPORT TheatrePtr DetectTheatre(GENERIC_BUS_Ptr b)
{
if(b->read(b, ((i & 0x03)<<14) | VIP_VIP_VENDOR_DEVICE_ID, 4, (uint8_t *)&val))
{
- if(val)xf86DrvMsg(b->scrnIndex, X_INFO,
+ if(val)xf86DrvMsg(b->pScrn->scrnIndex, X_INFO,
"Device %d on VIP bus ids as 0x%08x\n", i,
(unsigned)val);
if(t->theatre_num>=0)continue; /* already found one instance */
@@ -104,10 +104,10 @@ _X_EXPORT TheatrePtr DetectTheatre(GENERIC_BUS_Ptr b)
break;
}
} else {
- xf86DrvMsg(b->scrnIndex, X_INFO, "No response from device %d on VIP bus\n",i);
+ xf86DrvMsg(b->pScrn->scrnIndex, X_INFO, "No response from device %d on VIP bus\n",i);
}
}
- if(t->theatre_num>=0)xf86DrvMsg(b->scrnIndex, X_INFO,
+ if(t->theatre_num>=0)xf86DrvMsg(b->pScrn->scrnIndex, X_INFO,
"Detected Rage Theatre as device %d on VIP bus with id 0x%08x\n",
t->theatre_num, (unsigned)t->theatre_id);
@@ -118,7 +118,7 @@ _X_EXPORT TheatrePtr DetectTheatre(GENERIC_BUS_Ptr b)
}
RT_regr(VIP_VIP_REVISION_ID, &val);
- xf86DrvMsg(b->scrnIndex, X_INFO, "Detected Rage Theatre revision %8.8X\n",
+ xf86DrvMsg(b->pScrn->scrnIndex, X_INFO, "Detected Rage Theatre revision %8.8X\n",
(unsigned)val);
#if 0