summaryrefslogtreecommitdiff
path: root/hw/xfree86/int10
diff options
context:
space:
mode:
authorKeith Packard <keithp@neko.keithp.com>2006-11-04 17:46:26 -0800
committerKeith Packard <keithp@neko.keithp.com>2006-11-04 17:46:26 -0800
commit028bbdc0417173803695808ba9f48498519273a3 (patch)
tree1df4feed40b78d346f57a3b20163469137740f30 /hw/xfree86/int10
parent50504c68e1d407232cf83465981b235e542ef31f (diff)
parent8deaaa312ad7f9b492a2ae8ad17d74650112c25c (diff)
Merge master back to randr-1.2
Diffstat (limited to 'hw/xfree86/int10')
-rw-r--r--hw/xfree86/int10/Makefile.am11
-rw-r--r--hw/xfree86/int10/helper_exec.c13
2 files changed, 14 insertions, 10 deletions
diff --git a/hw/xfree86/int10/Makefile.am b/hw/xfree86/int10/Makefile.am
index 868954fd4..28e20d502 100644
--- a/hw/xfree86/int10/Makefile.am
+++ b/hw/xfree86/int10/Makefile.am
@@ -13,8 +13,12 @@ COMMON_SOURCES = \
xf86int10.c \
xf86int10module.c
+if I386_VIDEO
+I386_VIDEO_CFLAGS = -D_PC
+endif
+
if INT10_VM86
-AM_CFLAGS = -D_PC -D_VM86_LINUX $(DIX_CFLAGS) $(XORG_CFLAGS) $(EXTRA_CFLAGS)
+AM_CFLAGS = $(I386_VIDEO_CFLAGS) -D_VM86_LINUX $(DIX_CFLAGS) $(XORG_CFLAGS) $(EXTRA_CFLAGS)
INCLUDES = $(XORG_INCS)
libint10_la_SOURCES = \
$(COMMON_SOURCES) \
@@ -23,7 +27,8 @@ libint10_la_SOURCES = \
endif
if INT10_X86EMU
-AM_CFLAGS = -D_X86EMU -DNO_SYS_HEADERS -D_PC $(DIX_CFLAGS) $(XORG_CFLAGS) $(EXTRA_CFLAGS)
+AM_CFLAGS = $(I386_VIDEO_CFLAGS) -D_X86EMU -DNO_SYS_HEADERS \
+ $(XORG_CFLAGS) $(EXTRA_CFLAGS) $(DIX_CFLAGS)
INCLUDES = $(XORG_INCS) -I$(srcdir)/../x86emu
libint10_la_SOURCES = \
$(COMMON_SOURCES) \
@@ -33,7 +38,7 @@ libint10_la_SOURCES = \
endif
if INT10_STUB
-AM_CFLAGS = -D_PC -D_VM86_LINUX $(DIX_CFLAGS) $(XORG_CFLAGS) $(EXTRA_CFLAGS)
+AM_CFLAGS = $(I386_VIDEO_CFLAGS) -D_VM86_LINUX $(DIX_CFLAGS) $(XORG_CFLAGS) $(EXTRA_CFLAGS)
libint10_la_SOURCES = stub.c xf86int10module.c
endif
diff --git a/hw/xfree86/int10/helper_exec.c b/hw/xfree86/int10/helper_exec.c
index 734d84720..d80de89cc 100644
--- a/hw/xfree86/int10/helper_exec.c
+++ b/hw/xfree86/int10/helper_exec.c
@@ -469,7 +469,6 @@ Mem_wl(CARD32 addr, CARD32 val)
static CARD32 PciCfg1Addr = 0;
-#define TAG(Cfg1Addr) (Cfg1Addr & 0xffff00)
#define OFFSET(Cfg1Addr) (Cfg1Addr & 0xff)
static int
@@ -480,7 +479,7 @@ pciCfg1in(CARD16 addr, CARD32 *val)
return 1;
}
if (addr == 0xCFC) {
- *val = pciReadLong(TAG(PciCfg1Addr), OFFSET(PciCfg1Addr));
+ *val = pciReadLong(Int10Current->Tag, OFFSET(PciCfg1Addr));
return 1;
}
return 0;
@@ -494,7 +493,7 @@ pciCfg1out(CARD16 addr, CARD32 val)
return 1;
}
if (addr == 0xCFC) {
- pciWriteLong(TAG(PciCfg1Addr), OFFSET(PciCfg1Addr), val);
+ pciWriteLong(Int10Current->Tag, OFFSET(PciCfg1Addr), val);
return 1;
}
return 0;
@@ -512,7 +511,7 @@ pciCfg1inw(CARD16 addr, CARD16 *val)
}
if ((addr >= 0xCFC) && (addr <= 0xCFF)) {
offset = addr - 0xCFC;
- *val = pciReadWord(TAG(PciCfg1Addr), OFFSET(PciCfg1Addr) + offset);
+ *val = pciReadWord(Int10Current->Tag, OFFSET(PciCfg1Addr) + offset);
return 1;
}
return 0;
@@ -531,7 +530,7 @@ pciCfg1outw(CARD16 addr, CARD16 val)
}
if ((addr >= 0xCFC) && (addr <= 0xCFF)) {
offset = addr - 0xCFC;
- pciWriteWord(TAG(PciCfg1Addr), OFFSET(PciCfg1Addr) + offset, val);
+ pciWriteWord(Int10Current->Tag, OFFSET(PciCfg1Addr) + offset, val);
return 1;
}
return 0;
@@ -549,7 +548,7 @@ pciCfg1inb(CARD16 addr, CARD8 *val)
}
if ((addr >= 0xCFC) && (addr <= 0xCFF)) {
offset = addr - 0xCFC;
- *val = pciReadByte(TAG(PciCfg1Addr), OFFSET(PciCfg1Addr) + offset);
+ *val = pciReadByte(Int10Current->Tag, OFFSET(PciCfg1Addr) + offset);
return 1;
}
return 0;
@@ -568,7 +567,7 @@ pciCfg1outb(CARD16 addr, CARD8 val)
}
if ((addr >= 0xCFC) && (addr <= 0xCFF)) {
offset = addr - 0xCFC;
- pciWriteByte(TAG(PciCfg1Addr), OFFSET(PciCfg1Addr) + offset, val);
+ pciWriteByte(Int10Current->Tag, OFFSET(PciCfg1Addr) + offset, val);
return 1;
}
return 0;