summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac39
-rw-r--r--src/Makefile.am8
-rw-r--r--src/ati.c49
-rw-r--r--src/atipcirename.h47
-rw-r--r--src/drmmode_display.c8
-rw-r--r--src/evergreen_exa.c29
-rw-r--r--src/r600_exa.c32
-rw-r--r--src/radeon.h8
-rw-r--r--src/radeon_dri2.c203
-rw-r--r--src/radeon_dri2.h2
-rw-r--r--src/radeon_driver.c4
-rw-r--r--src/radeon_exa.c27
-rw-r--r--src/radeon_exa_funcs.c27
-rw-r--r--src/radeon_exa_render.c6
-rw-r--r--src/radeon_kms.c33
-rw-r--r--src/radeon_probe.c68
-rw-r--r--src/radeon_video.c80
17 files changed, 19 insertions, 651 deletions
diff --git a/configure.ac b/configure.ac
index 0e30e4f3..d7d5c723 100644
--- a/configure.ac
+++ b/configure.ac
@@ -75,7 +75,7 @@ PKG_CHECK_MODULES(LIBDRM, [libdrm >= 2.4.36])
PKG_CHECK_MODULES(LIBDRM_RADEON, [libdrm_radeon])
# Obtain compiler/linker options for the driver dependencies
-PKG_CHECK_MODULES(XORG, [xorg-server >= 1.6.2 xproto fontsproto xf86driproto $REQUIRED_MODULES])
+PKG_CHECK_MODULES(XORG, [xorg-server >= 1.7 xproto fontsproto xf86driproto $REQUIRED_MODULES])
PKG_CHECK_MODULES(XEXT, [xextproto >= 7.0.99.1],
HAVE_XEXTPROTO_71="yes"; AC_DEFINE(HAVE_XEXTPROTO_71, 1, [xextproto 7.1 available]),
HAVE_XEXTPROTO_71="no")
@@ -112,36 +112,6 @@ if test "x$GLAMOR" != "xno"; then
AC_DEFINE(USE_GLAMOR, 1, [Enable glamor acceleration])
fi
-AC_CHECK_DECL(xf86ModeBandwidth,
- [AC_DEFINE(HAVE_XF86MODEBANDWIDTH, 1, [Have xf86ModeBandwidth prototype])],
- [],
- [#include "xorg-server.h"
- #include "xf86Modes.h"])
-
-AC_CHECK_DECL(xf86_crtc_clip_video_helper,
- [AC_DEFINE(HAVE_XF86CRTCCLIPVIDEOHELPER, 1, [Have xf86_crtc_clip_video_helper prototype])],
- [],
- [#include <X11/Xmd.h>
- #include "xorg-server.h"
- #include "xf86i2c.h"
- #include "xf86Crtc.h"])
-
-AC_CHECK_DECL(xf86RotateFreeShadow,
- [AC_DEFINE(HAVE_FREE_SHADOW, 1, [have new FreeShadow API])],
- [],
- [#include <xorg-server.h>
- #include <windowstr.h>
- #include <xf86Crtc.h>])
-
-AC_CHECK_DECL(pci_device_enable,
- [AC_DEFINE(HAVE_PCI_DEVICE_ENABLE, 1, [Have pci_device_enable prototype])],
- [],
- [#include <pciaccess.h>])
-
-AC_CHECK_DECL(XSERVER_LIBPCIACCESS,
- [XSERVER_LIBPCIACCESS=yes],[XSERVER_LIBPCIACCESS=no],
- [#include "xorg-server.h"])
-
AC_CHECK_HEADERS([list.h],
[have_list_h="yes"], [have_list_h="no"],
[#include <X11/Xdefs.h>
@@ -157,11 +127,8 @@ fi
CPPFLAGS="$SAVE_CPPFLAGS"
-if test "x$XSERVER_LIBPCIACCESS" = xyes; then
- PKG_CHECK_MODULES([PCIACCESS], [pciaccess >= 0.8.0])
- XORG_CFLAGS="$XORG_CFLAGS $PCIACCESS_CFLAGS"
-fi
-AM_CONDITIONAL(XSERVER_LIBPCIACCESS, test "x$XSERVER_LIBPCIACCESS" = xyes)
+PKG_CHECK_MODULES([PCIACCESS], [pciaccess >= 0.8.0])
+XORG_CFLAGS="$XORG_CFLAGS $PCIACCESS_CFLAGS"
# Checks for headers/macros for byte swapping
# Known variants:
diff --git a/src/Makefile.am b/src/Makefile.am
index da94927f..6b7171ee 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -26,7 +26,8 @@
# _ladir passes a dummy rpath to libtool so the thing will actually link
# TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a, etc.
-radeon_drv_la_LIBADD = $(LIBDRM_RADEON_LIBS)
+ati_drv_la_LIBADD = $(PCIACCESS_LIBS)
+radeon_drv_la_LIBADD = $(LIBDRM_RADEON_LIBS) $(PCIACCESS_LIBS)
RADEON_KMS_SRCS=radeon_dri2.c radeon_kms.c drmmode_display.c radeon_vbo.c \
radeon_bo_helper.c
@@ -39,11 +40,6 @@ AM_CFLAGS = \
@XORG_CFLAGS@ \
@LIBUDEV_CFLAGS@
-if XSERVER_LIBPCIACCESS
-ati_drv_la_LIBADD = $(PCIACCESS_LIBS)
-radeon_drv_la_LIBADD += $(PCIACCESS_LIBS)
-endif
-
if LIBUDEV
radeon_drv_la_LIBADD += $(LIBUDEV_LIBS)
endif
diff --git a/src/ati.c b/src/ati.c
index 256fbd8c..227665e7 100644
--- a/src/ati.c
+++ b/src/ati.c
@@ -57,9 +57,7 @@
#include "config.h"
#endif
-#ifdef XSERVER_LIBPCIACCESS
#include <pciaccess.h>
-#endif
#include "atipcirename.h"
#include "ati.h"
@@ -81,8 +79,6 @@ enum
static int ATIChipID(const uint16_t);
-#ifdef XSERVER_LIBPCIACCESS
-
/* domain defines (stolen from xserver) */
#if (defined(__alpha__) || defined(__ia64__)) && defined (linux)
# define PCI_DOM_MASK 0x01fful
@@ -141,51 +137,6 @@ ati_device_get_indexed(int index)
}
#endif
-#else /* XSERVER_LIBPCIACCESS */
-
-static pciVideoPtr
-ati_device_get_from_busid(int bus, int dev, int func)
-{
- pciVideoPtr pVideo = NULL;
- pciVideoPtr *xf86PciVideoInfo;
-
- xf86PciVideoInfo = xf86GetPciVideoInfo();
-
- if (xf86PciVideoInfo == NULL)
- return NULL;
-
- while ((pVideo = *xf86PciVideoInfo++) != NULL)
- {
- if ((pVideo->bus == bus) && (pVideo->device == dev) &&
- (pVideo->func == func))
- break;
- }
-
- return pVideo;
-}
-
-static pciVideoPtr
-ati_device_get_primary()
-{
- pciVideoPtr pVideo = NULL;
- pciVideoPtr *xf86PciVideoInfo;
-
- xf86PciVideoInfo = xf86GetPciVideoInfo();
-
- if (xf86PciVideoInfo == NULL)
- return NULL;
-
- while ((pVideo = *xf86PciVideoInfo++) != NULL)
- {
- if (xf86IsPrimaryPci(pVideo))
- break;
- }
-
- return pVideo;
-}
-
-#endif /* XSERVER_LIBPCIACCESS */
-
void
ati_gdev_subdriver(pointer options)
{
diff --git a/src/atipcirename.h b/src/atipcirename.h
index de8f0a39..fa0f9ae9 100644
--- a/src/atipcirename.h
+++ b/src/atipcirename.h
@@ -34,51 +34,6 @@ enum region_type {
REGION_IO
};
-#ifndef XSERVER_LIBPCIACCESS
-
-/* pciVideoPtr */
-#define PCI_DEV_VENDOR_ID(_pcidev) ((_pcidev)->vendor)
-#define PCI_DEV_DEVICE_ID(_pcidev) ((_pcidev)->chipType)
-#define PCI_DEV_REVISION(_pcidev) ((_pcidev)->chipRev)
-
-#define PCI_SUB_VENDOR_ID(_pcidev) ((_pcidev)->subsysVendor)
-#define PCI_SUB_DEVICE_ID(_pcidev) ((_pcidev)->subsysCard)
-
-#define PCI_DEV_TAG(_pcidev) pciTag((_pcidev)->bus, \
- (_pcidev)->device, \
- (_pcidev)->func)
-#define PCI_DEV_BUS(_pcidev) ((_pcidev)->bus)
-#define PCI_DEV_DEV(_pcidev) ((_pcidev)->device)
-#define PCI_DEV_FUNC(_pcidev) ((_pcidev)->func)
-
-/* pciConfigPtr */
-#define PCI_CFG_TAG(_pcidev) (((pciConfigPtr)(_pcidev)->thisCard)->tag)
-#define PCI_CFG_BUS(_pcidev) (((pciConfigPtr)(_pcidev)->thisCard)->busnum)
-#define PCI_CFG_DEV(_pcidev) (((pciConfigPtr)(_pcidev)->thisCard)->devnum)
-#define PCI_CFG_FUNC(_pcidev) (((pciConfigPtr)(_pcidev)->thisCard)->funcnum)
-
-/* region addr: xfree86 uses different fields for memory regions and I/O ports */
-#define PCI_REGION_BASE(_pcidev, _b, _type) \
- (((_type) == REGION_MEM) ? (_pcidev)->memBase[(_b)] \
- : (_pcidev)->ioBase[(_b)])
-
-/* region size: xfree86 uses the log2 of the region size,
- * but with zero meaning no region, not size of one XXX */
-#define PCI_REGION_SIZE(_pcidev, _b) \
- (((_pcidev)->size[(_b)] > 0) ? (1 << (_pcidev)->size[(_b)]) : 0)
-
-/* read/write PCI configuration space */
-#define PCI_READ_BYTE(_pcidev, _value_ptr, _offset) \
- *(_value_ptr) = pciReadByte(PCI_CFG_TAG(_pcidev), (_offset))
-
-#define PCI_READ_LONG(_pcidev, _value_ptr, _offset) \
- *(_value_ptr) = pciReadLong(PCI_CFG_TAG(_pcidev), (_offset))
-
-#define PCI_WRITE_LONG(_pcidev, _value, _offset) \
- pciWriteLong(PCI_CFG_TAG(_pcidev), (_offset), (_value))
-
-#else /* XSERVER_LIBPCIACCESS */
-
typedef struct pci_device *pciVideoPtr;
#define PCI_DEV_VENDOR_ID(_pcidev) ((_pcidev)->vendor_id)
@@ -120,6 +75,4 @@ typedef struct pci_device *pciVideoPtr;
#define ATI_DEVICE_MATCH(d, i) \
{ PCI_VENDOR_ATI, (d), PCI_MATCH_ANY, PCI_MATCH_ANY, 0, 0, (i) }
-#endif /* XSERVER_LIBPCIACCESS */
-
#endif /* ATIPCIRENAME_H */
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index db106ea4..aade98f3 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -412,9 +412,7 @@ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode,
crtc->x = x;
crtc->y = y;
crtc->rotation = rotation;
-#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,5,99,0,0)
crtc->transformPresent = FALSE;
-#endif
}
output_ids = calloc(sizeof(uint32_t), xf86_config->num_output);
@@ -439,10 +437,8 @@ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode,
if (!xf86CrtcRotate(crtc)) {
goto done;
}
-#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,7,0,0,0)
crtc->funcs->gamma_set(crtc, crtc->gamma_red, crtc->gamma_green,
crtc->gamma_blue, crtc->gamma_size);
-#endif
drmmode_ConvertToKMode(crtc->scrn, &kmode, mode);
@@ -976,10 +972,8 @@ drmmode_output_get_property(xf86OutputPtr output, Atom property)
static const xf86OutputFuncsRec drmmode_output_funcs = {
.dpms = drmmode_output_dpms,
.create_resources = drmmode_output_create_resources,
-#ifdef RANDR_12_INTERFACE
.set_property = drmmode_output_set_property,
.get_property = drmmode_output_get_property,
-#endif
#if 0
.save = drmmode_crt_save,
@@ -1724,11 +1718,9 @@ static void drmmode_load_palette(ScrnInfoPtr pScrn, int numColors,
}
/* Make the change through RandR */
-#ifdef RANDR_12_INTERFACE
if (crtc->randr_crtc)
RRCrtcGammaSet(crtc->randr_crtc, lut_r, lut_g, lut_b);
else
-#endif
crtc->funcs->gamma_set(crtc, lut_r, lut_g, lut_b, 256);
}
}
diff --git a/src/evergreen_exa.c b/src/evergreen_exa.c
index 883fa5ce..bd571356 100644
--- a/src/evergreen_exa.c
+++ b/src/evergreen_exa.c
@@ -664,10 +664,8 @@ static struct formatinfo EVERGREENTexFormats[] = {
{PICT_x8r8g8b8, FMT_8_8_8_8},
{PICT_a8b8g8r8, FMT_8_8_8_8},
{PICT_x8b8g8r8, FMT_8_8_8_8},
-#ifdef PICT_TYPE_BGRA
{PICT_b8g8r8a8, FMT_8_8_8_8},
{PICT_b8g8r8x8, FMT_8_8_8_8},
-#endif
{PICT_r5g6b5, FMT_5_6_5},
{PICT_a1r5g5b5, FMT_1_5_5_5},
{PICT_x1r5g5b5, FMT_1_5_5_5},
@@ -713,10 +711,8 @@ static Bool EVERGREENGetDestFormat(PicturePtr pDstPicture, uint32_t *dst_format)
case PICT_x8r8g8b8:
case PICT_a8b8g8r8:
case PICT_x8b8g8r8:
-#ifdef PICT_TYPE_BGRA
case PICT_b8g8r8a8:
case PICT_b8g8r8x8:
-#endif
*dst_format = COLOR_8_8_8_8;
break;
case PICT_r5g6b5:
@@ -899,7 +895,6 @@ static Bool EVERGREENTextureSetup(PicturePtr pPict, PixmapPtr pPix,
pix_b = SQ_SEL_Z; /* B */
pix_a = SQ_SEL_1; /* A */
break;
-#ifdef PICT_TYPE_BGRA
case PICT_b8g8r8a8:
pix_r = SQ_SEL_Y; /* R */
pix_g = SQ_SEL_Z; /* G */
@@ -912,7 +907,6 @@ static Bool EVERGREENTextureSetup(PicturePtr pPict, PixmapPtr pPix,
pix_b = SQ_SEL_W; /* B */
pix_a = SQ_SEL_1; /* A */
break;
-#endif
case PICT_x1r5g5b5:
case PICT_x8r8g8b8:
case PICT_r5g6b5:
@@ -1299,12 +1293,10 @@ static Bool EVERGREENPrepareComposite(int op, PicturePtr pSrcPicture,
case PICT_x8b8g8r8:
cb_conf.comp_swap = 0; /* ABGR */
break;
-#ifdef PICT_TYPE_BGRA
case PICT_b8g8r8a8:
case PICT_b8g8r8x8:
cb_conf.comp_swap = 3; /* BGRA */
break;
-#endif
case PICT_r5g6b5:
cb_conf.comp_swap = 2; /* RGB */
break;
@@ -1905,24 +1897,13 @@ EVERGREENDrawInit(ScreenPtr pScreen)
info->accel_state->exa->FinishAccess = RADEONFinishAccess_CS;
info->accel_state->exa->UploadToScreen = EVERGREENUploadToScreen;
info->accel_state->exa->DownloadFromScreen = EVERGREENDownloadFromScreen;
-#if (EXA_VERSION_MAJOR == 2 && EXA_VERSION_MINOR >= 5)
info->accel_state->exa->CreatePixmap2 = RADEONEXACreatePixmap2;
-#endif
#if (EXA_VERSION_MAJOR == 2 && EXA_VERSION_MINOR >= 6)
info->accel_state->exa->SharePixmapBacking = RADEONEXASharePixmapBacking;
info->accel_state->exa->SetSharedPixmapBacking = RADEONEXASetSharedPixmapBacking;
#endif
- info->accel_state->exa->flags = EXA_OFFSCREEN_PIXMAPS;
-#ifdef EXA_SUPPORTS_PREPARE_AUX
- info->accel_state->exa->flags |= EXA_SUPPORTS_PREPARE_AUX;
-#endif
-
-#ifdef EXA_HANDLES_PIXMAPS
- info->accel_state->exa->flags |= EXA_HANDLES_PIXMAPS;
-#ifdef EXA_MIXED_PIXMAPS
- info->accel_state->exa->flags |= EXA_MIXED_PIXMAPS;
-#endif
-#endif
+ info->accel_state->exa->flags = EXA_OFFSCREEN_PIXMAPS | EXA_SUPPORTS_PREPARE_AUX |
+ EXA_HANDLES_PIXMAPS | EXA_MIXED_PIXMAPS;
info->accel_state->exa->pixmapOffsetAlign = 256;
info->accel_state->exa->pixmapPitchAlign = 256;
@@ -1931,14 +1912,8 @@ EVERGREENDrawInit(ScreenPtr pScreen)
info->accel_state->exa->Composite = EVERGREENComposite;
info->accel_state->exa->DoneComposite = EVERGREENDoneComposite;
-#if EXA_VERSION_MAJOR > 2 || (EXA_VERSION_MAJOR == 2 && EXA_VERSION_MINOR >= 3)
- xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Setting EXA maxPitchBytes\n");
-
info->accel_state->exa->maxPitchBytes = 32768;
info->accel_state->exa->maxX = 8192;
-#else
- info->accel_state->exa->maxX = 8192;
-#endif
info->accel_state->exa->maxY = 8192;
/* not supported yet */
diff --git a/src/r600_exa.c b/src/r600_exa.c
index 21df084d..6c0a46d5 100644
--- a/src/r600_exa.c
+++ b/src/r600_exa.c
@@ -726,10 +726,8 @@ static struct formatinfo R600TexFormats[] = {
{PICT_x8r8g8b8, FMT_8_8_8_8},
{PICT_a8b8g8r8, FMT_8_8_8_8},
{PICT_x8b8g8r8, FMT_8_8_8_8},
-#ifdef PICT_TYPE_BGRA
{PICT_b8g8r8a8, FMT_8_8_8_8},
{PICT_b8g8r8x8, FMT_8_8_8_8},
-#endif
{PICT_r5g6b5, FMT_5_6_5},
{PICT_a1r5g5b5, FMT_1_5_5_5},
{PICT_x1r5g5b5, FMT_1_5_5_5},
@@ -775,10 +773,8 @@ static Bool R600GetDestFormat(PicturePtr pDstPicture, uint32_t *dst_format)
case PICT_x8r8g8b8:
case PICT_a8b8g8r8:
case PICT_x8b8g8r8:
-#ifdef PICT_TYPE_BGRA
case PICT_b8g8r8a8:
case PICT_b8g8r8x8:
-#endif
*dst_format = COLOR_8_8_8_8;
break;
case PICT_r5g6b5:
@@ -916,7 +912,6 @@ static Bool R600TextureSetup(PicturePtr pPict, PixmapPtr pPix,
pix_b = SQ_SEL_Z; /* B */
pix_a = SQ_SEL_1; /* A */
break;
-#ifdef PICT_TYPE_BGRA
case PICT_b8g8r8a8:
pix_r = SQ_SEL_Y; /* R */
pix_g = SQ_SEL_Z; /* G */
@@ -929,7 +924,6 @@ static Bool R600TextureSetup(PicturePtr pPict, PixmapPtr pPix,
pix_b = SQ_SEL_W; /* B */
pix_a = SQ_SEL_1; /* A */
break;
-#endif
case PICT_x1r5g5b5:
case PICT_x8r8g8b8:
case PICT_r5g6b5:
@@ -1344,12 +1338,10 @@ static Bool R600PrepareComposite(int op, PicturePtr pSrcPicture,
case PICT_x8b8g8r8:
cb_conf.comp_swap = 0; /* ABGR */
break;
-#ifdef PICT_TYPE_BGRA
case PICT_b8g8r8a8:
case PICT_b8g8r8x8:
cb_conf.comp_swap = 3; /* BGRA */
break;
-#endif
case PICT_r5g6b5:
cb_conf.comp_swap = 2; /* RGB */
break;
@@ -1878,7 +1870,6 @@ R600DrawInit(ScreenPtr pScreen)
info->accel_state->exa->MarkSync = R600MarkSync;
info->accel_state->exa->WaitMarker = R600Sync;
-#if (EXA_VERSION_MAJOR == 2 && EXA_VERSION_MINOR >= 4)
info->accel_state->exa->CreatePixmap = RADEONEXACreatePixmap;
info->accel_state->exa->DestroyPixmap = RADEONEXADestroyPixmap;
info->accel_state->exa->PixmapIsOffscreen = RADEONEXAPixmapIsOffscreen;
@@ -1886,26 +1877,13 @@ R600DrawInit(ScreenPtr pScreen)
info->accel_state->exa->FinishAccess = RADEONFinishAccess_CS;
info->accel_state->exa->UploadToScreen = R600UploadToScreenCS;
info->accel_state->exa->DownloadFromScreen = R600DownloadFromScreenCS;
-#if (EXA_VERSION_MAJOR == 2 && EXA_VERSION_MINOR >= 5)
info->accel_state->exa->CreatePixmap2 = RADEONEXACreatePixmap2;
#if (EXA_VERSION_MAJOR == 2 && EXA_VERSION_MINOR >= 6)
info->accel_state->exa->SharePixmapBacking = RADEONEXASharePixmapBacking;
info->accel_state->exa->SetSharedPixmapBacking = RADEONEXASetSharedPixmapBacking;
#endif
-#endif
-#endif
-
- info->accel_state->exa->flags = EXA_OFFSCREEN_PIXMAPS;
-#ifdef EXA_SUPPORTS_PREPARE_AUX
- info->accel_state->exa->flags |= EXA_SUPPORTS_PREPARE_AUX;
-#endif
-
-#ifdef EXA_HANDLES_PIXMAPS
- info->accel_state->exa->flags |= EXA_HANDLES_PIXMAPS;
-#ifdef EXA_MIXED_PIXMAPS
- info->accel_state->exa->flags |= EXA_MIXED_PIXMAPS;
-#endif
-#endif
+ info->accel_state->exa->flags = EXA_OFFSCREEN_PIXMAPS | EXA_SUPPORTS_PREPARE_AUX |
+ EXA_HANDLES_PIXMAPS | EXA_MIXED_PIXMAPS;
info->accel_state->exa->pixmapOffsetAlign = 256;
info->accel_state->exa->pixmapPitchAlign = 256;
@@ -1914,14 +1892,8 @@ R600DrawInit(ScreenPtr pScreen)
info->accel_state->exa->Composite = R600Composite;
info->accel_state->exa->DoneComposite = R600DoneComposite;
-#if EXA_VERSION_MAJOR > 2 || (EXA_VERSION_MAJOR == 2 && EXA_VERSION_MINOR >= 3)
- xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Setting EXA maxPitchBytes\n");
-
info->accel_state->exa->maxPitchBytes = 32768;
info->accel_state->exa->maxX = 8192;
-#else
- info->accel_state->exa->maxX = 8192;
-#endif
info->accel_state->exa->maxY = 8192;
/* not supported yet */
diff --git a/src/radeon.h b/src/radeon.h
index 0ae3d1e5..ad50d5db 100644
--- a/src/radeon.h
+++ b/src/radeon.h
@@ -134,11 +134,6 @@
# define __FUNCTION__ __func__ /* C99 */
#endif
-#ifndef HAVE_XF86MODEBANDWIDTH
-extern unsigned int xf86ModeBandwidth(DisplayModePtr mode, int depth);
-#define MODE_BANDWIDTH MODE_BAD
-#endif
-
typedef enum {
OPTION_NOACCEL,
OPTION_SW_CURSOR,
@@ -404,9 +399,6 @@ struct radeon_accel_state {
typedef struct {
EntityInfoPtr pEnt;
pciVideoPtr PciInfo;
-#ifndef XSERVER_LIBPCIACCESS
- PCITAG PciTag;
-#endif
int Chipset;
RADEONChipFamily ChipFamily;
diff --git a/src/radeon_dri2.c b/src/radeon_dri2.c
index 27b04e3e..f0c5c012 100644
--- a/src/radeon_dri2.c
+++ b/src/radeon_dri2.c
@@ -56,10 +56,6 @@
#include "radeon_bo_gem.h"
-#if DRI2INFOREC_VERSION >= 1
-#define USE_DRI2_1_1_0
-#endif
-
#if DRI2INFOREC_VERSION >= 4 && HAVE_LIST_H
#define USE_DRI2_SCHEDULING
#endif
@@ -70,11 +66,7 @@
#define FALLBACK_SWAP_DELAY 16
-#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,6,99,0, 0)
typedef DRI2BufferPtr BufferPtr;
-#else
-typedef DRI2Buffer2Ptr BufferPtr;
-#endif
struct dri2_buffer_priv {
PixmapPtr pixmap;
@@ -154,173 +146,6 @@ static PixmapPtr fixup_glamor(DrawablePtr drawable, PixmapPtr pixmap)
}
-#ifndef USE_DRI2_1_1_0
-static BufferPtr
-radeon_dri2_create_buffers(DrawablePtr drawable,
- unsigned int *attachments,
- int count)
-{
- ScreenPtr pScreen = drawable->pScreen;
- ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
- RADEONInfoPtr info = RADEONPTR(pScrn);
- BufferPtr buffers;
- struct dri2_buffer_priv *privates;
- PixmapPtr pixmap, depth_pixmap;
- struct radeon_bo *bo;
- int i, r, need_enlarge = 0;
- int flags = 0;
- unsigned front_width;
- uint32_t tiling = 0;
-
- pixmap = pScreen->GetScreenPixmap(pScreen);
- front_width = pixmap->drawable.width;
-
- buffers = calloc(count, sizeof *buffers);
- if (buffers == NULL) {
- return NULL;
- }
- privates = calloc(count, sizeof(struct dri2_buffer_priv));
- if (privates == NULL) {
- free(buffers);
- return NULL;
- }
-
- depth_pixmap = NULL;
- for (i = 0; i < count; i++) {
- Bool is_glamor_pixmap = FALSE;
- unsigned aligned_width = drawable->width;
- unsigned aligned_height = drawable->height;
-
- if (attachments[i] == DRI2BufferFrontLeft) {
- pixmap = get_drawable_pixmap(drawable);
- if (info->use_glamor && !radeon_get_pixmap_bo(pixmap)) {
- is_glamor_pixmap = TRUE;
- aligned_width = pixmap->drawable.width;
- aligned_height = pixmap->drawable.height;
- pixmap = NULL;
- } else
- pixmap->refcnt++;
- } else if (attachments[i] == DRI2BufferStencil && depth_pixmap) {
- pixmap = depth_pixmap;
- pixmap->refcnt++;
- }
-
- if (!pixmap) {
- /* tile the back buffer */
- switch(attachments[i]) {
- case DRI2BufferDepth:
- if (info->ChipFamily >= CHIP_FAMILY_R600)
- /* macro is the preferred setting, but the 2D detiling for software
- * fallbacks in mesa still has issues on some configurations
- */
- flags = RADEON_CREATE_PIXMAP_TILING_MICRO;
- else
- flags = RADEON_CREATE_PIXMAP_TILING_MACRO | RADEON_CREATE_PIXMAP_TILING_MICRO;
- if (IS_R200_3D || info->ChipFamily == CHIP_FAMILY_RV200 || info->ChipFamily == CHIP_FAMILY_RADEON)
- flags |= RADEON_CREATE_PIXMAP_DEPTH;
- break;
- case DRI2BufferDepthStencil:
- if (info->ChipFamily >= CHIP_FAMILY_R600) {
- /* macro is the preferred setting, but the 2D detiling for software
- * fallbacks in mesa still has issues on some configurations
- */
- flags = RADEON_CREATE_PIXMAP_TILING_MICRO;
- if (info->ChipFamily >= CHIP_FAMILY_CEDAR)
- need_enlarge = 1;
- } else
- flags = RADEON_CREATE_PIXMAP_TILING_MACRO | RADEON_CREATE_PIXMAP_TILING_MICRO;
- if (IS_R200_3D || info->ChipFamily == CHIP_FAMILY_RV200 || info->ChipFamily == CHIP_FAMILY_RADEON)
- flags |= RADEON_CREATE_PIXMAP_DEPTH;
- break;
- case DRI2BufferBackLeft:
- case DRI2BufferBackRight:
- case DRI2BufferFrontLeft:
- case DRI2BufferFrontRight:
- case DRI2BufferFakeFrontLeft:
- case DRI2BufferFakeFrontRight:
- if (info->ChipFamily >= CHIP_FAMILY_R600)
- /* macro is the preferred setting, but the 2D detiling for software
- * fallbacks in mesa still has issues on some configurations
- */
- flags = RADEON_CREATE_PIXMAP_TILING_MICRO;
- else
- flags = RADEON_CREATE_PIXMAP_TILING_MACRO;
- break;
- default:
- flags = 0;
- }
-
- if (flags & RADEON_CREATE_PIXMAP_TILING_MICRO)
- tiling |= RADEON_TILING_MICRO;
- if (flags & RADEON_CREATE_PIXMAP_TILING_MACRO)
- tiling |= RADEON_TILING_MACRO;
-
- if (aligned_width == front_width)
- aligned_width = pScrn->virtualX;
-
- if (need_enlarge) {
- /* evergreen uses separate allocations for depth and stencil
- * so we make an extra large depth buffer to cover stencil
- * as well.
- */
- unsigned width_align = drmmode_get_pitch_align(pScrn, drawable->depth / 8, tiling);
- unsigned height_align = drmmode_get_height_align(pScrn, tiling);
- unsigned base_align = drmmode_get_base_align(pScrn, drawable->depth / 8, tiling);
- unsigned pitch_bytes;
- unsigned size;
-
- if (aligned_width == front_width)
- aligned_width = pScrn->virtualX;
- aligned_width = RADEON_ALIGN(aligned_width, width_align);
- pitch_bytes = aligned_width * (drawable->depth / 8);
- aligned_height = RADEON_ALIGN(aligned_height, height_align);
- size = pitch_bytes * aligned_height;
- size = RADEON_ALIGN(size, base_align);
- /* add additional size for stencil */
- size += aligned_width * aligned_height;
- aligned_height = RADEON_ALIGN(size / pitch_bytes, height_align);
- }
-
- pixmap = (*pScreen->CreatePixmap)(pScreen,
- aligned_width,
- aligned_height,
- drawable->depth,
- flags | RADEON_CREATE_PIXMAP_DRI2);
- }
-
- if (attachments[i] == DRI2BufferDepth) {
- depth_pixmap = pixmap;
- }
- if (!info->use_glamor) {
- info->exa_force_create = TRUE;
- exaMoveInPixmap(pixmap);
- info->exa_force_create = FALSE;
- }
- if (is_glamor_pixmap)
- pixmap = fixup_glamor(drawable, pixmap);
- bo = radeon_get_pixmap_bo(pixmap);
- if (!bo || radeon_gem_get_kernel_name(bo, &buffers[i].name) != 0) {
- int j;
-
- for (j = 0; j < i; j++)
- (*pScreen->DestroyPixmap)(privates[j].pixmap);
- (*pScreen->DestroyPixmap)(pixmap);
- free(privates);
- free(buffers);
- return NULL;
- }
-
- buffers[i].attachment = attachments[i];
- buffers[i].pitch = pixmap->devKind;
- buffers[i].cpp = pixmap->drawable.bitsPerPixel / 8;
- buffers[i].driverPrivate = &privates[i];
- buffers[i].flags = 0;
- privates[i].pixmap = pixmap;
- privates[i].attachment = attachments[i];
- }
- return buffers;
-}
-#else
static BufferPtr
radeon_dri2_create_buffer2(ScreenPtr pScreen,
DrawablePtr drawable,
@@ -492,28 +317,7 @@ radeon_dri2_create_buffer(DrawablePtr pDraw, unsigned int attachment,
return radeon_dri2_create_buffer2(pDraw->pScreen, pDraw,
attachment, format);
}
-#endif
-
-#ifndef USE_DRI2_1_1_0
-static void
-radeon_dri2_destroy_buffers(DrawablePtr drawable,
- BufferPtr buffers,
- int count)
-{
- ScreenPtr pScreen = drawable->pScreen;
- struct dri2_buffer_priv *private;
- int i;
- for (i = 0; i < count; i++) {
- private = buffers[i].driverPrivate;
- (*pScreen->DestroyPixmap)(private->pixmap);
- }
- if (buffers) {
- free(buffers[0].driverPrivate);
- free(buffers);
- }
-}
-#else
static void
radeon_dri2_destroy_buffer2(ScreenPtr pScreen,
DrawablePtr drawable, BufferPtr buffers)
@@ -549,7 +353,6 @@ radeon_dri2_destroy_buffer(DrawablePtr pDraw, DRI2BufferPtr buf)
{
radeon_dri2_destroy_buffer2(pDraw->pScreen, pDraw, buf);
}
-#endif
static inline PixmapPtr GetDrawablePixmap(DrawablePtr drawable)
@@ -1536,15 +1339,9 @@ radeon_dri2_screen_init(ScreenPtr pScreen)
}
dri2_info.fd = info->dri2.drm_fd;
dri2_info.deviceName = info->dri2.device_name;
-#ifndef USE_DRI2_1_1_0
- dri2_info.version = 1;
- dri2_info.CreateBuffers = radeon_dri2_create_buffers;
- dri2_info.DestroyBuffers = radeon_dri2_destroy_buffers;
-#else
dri2_info.version = DRI2INFOREC_VERSION;
dri2_info.CreateBuffer = radeon_dri2_create_buffer;
dri2_info.DestroyBuffer = radeon_dri2_destroy_buffer;
-#endif
dri2_info.CopyRegion = radeon_dri2_copy_region;
#ifdef USE_DRI2_SCHEDULING
diff --git a/src/radeon_dri2.h b/src/radeon_dri2.h
index aaad0ca9..37d46f3d 100644
--- a/src/radeon_dri2.h
+++ b/src/radeon_dri2.h
@@ -44,8 +44,6 @@ Bool radeon_dri2_screen_init(ScreenPtr pScreen);
void radeon_dri2_close_screen(ScreenPtr pScreen);
int drmmode_get_crtc_id(xf86CrtcPtr crtc);
-xf86CrtcPtr radeon_covering_crtc(ScrnInfoPtr pScrn, BoxPtr box,
- xf86CrtcPtr desired, BoxPtr crtc_box_ret);
void radeon_dri2_frame_event_handler(unsigned int frame, unsigned int tv_sec,
unsigned int tv_usec, void *event_data);
void radeon_dri2_flip_event_handler(unsigned int frame, unsigned int tv_sec,
diff --git a/src/radeon_driver.c b/src/radeon_driver.c
index d7bb004d..2f085a81 100644
--- a/src/radeon_driver.c
+++ b/src/radeon_driver.c
@@ -84,10 +84,6 @@
#include "xf86.h"
#include "xf86_OSproc.h"
#include "xf86RandR12.h"
-#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 6
-#include "xf86RAC.h"
-#include "xf86Resources.h"
-#endif
#include "xf86cmap.h"
#include "shadow.h"
diff --git a/src/radeon_exa.c b/src/radeon_exa.c
index 0c427355..22e2cefb 100644
--- a/src/radeon_exa.c
+++ b/src/radeon_exa.c
@@ -166,13 +166,8 @@ Bool RADEONPrepareAccess_CS(PixmapPtr pPix, int index)
struct radeon_exa_pixmap_priv *driver_priv;
uint32_t possible_domains = ~0U;
uint32_t current_domain = 0;
-#ifdef EXA_MIXED_PIXMAPS
Bool can_fail = !(pPix->drawable.bitsPerPixel < 8) &&
- pPix != pScreen->GetScreenPixmap(pScreen) &&
- (info->accel_state->exa->flags & EXA_MIXED_PIXMAPS);
-#else
- Bool can_fail = FALSE;
-#endif
+ pPix != pScreen->GetScreenPixmap(pScreen);
Bool flush = FALSE;
int ret;
@@ -248,13 +243,9 @@ void *RADEONEXACreatePixmap(ScreenPtr pScreen, int size, int align)
RADEONInfoPtr info = RADEONPTR(pScrn);
struct radeon_exa_pixmap_priv *new_priv;
-#ifdef EXA_MIXED_PIXMAPS
- if (info->accel_state->exa->flags & EXA_MIXED_PIXMAPS) {
- if (size != 0 && !info->exa_force_create &&
- info->exa_pixmaps == FALSE)
- return NULL;
- }
-#endif
+ if (size != 0 && !info->exa_force_create &&
+ info->exa_pixmaps == FALSE)
+ return NULL;
new_priv = calloc(1, sizeof(struct radeon_exa_pixmap_priv));
if (!new_priv)
@@ -283,13 +274,9 @@ void *RADEONEXACreatePixmap2(ScreenPtr pScreen, int width, int height,
RADEONInfoPtr info = RADEONPTR(pScrn);
struct radeon_exa_pixmap_priv *new_priv;
-#ifdef EXA_MIXED_PIXMAPS
- if (info->accel_state->exa->flags & EXA_MIXED_PIXMAPS) {
- if (width != 0 && height != 0 && !info->exa_force_create &&
- info->exa_pixmaps == FALSE)
- return NULL;
- }
-#endif
+ if (width != 0 && height != 0 && !info->exa_force_create &&
+ info->exa_pixmaps == FALSE)
+ return NULL;
new_priv = calloc(1, sizeof(struct radeon_exa_pixmap_priv));
if (!new_priv) {
diff --git a/src/radeon_exa_funcs.c b/src/radeon_exa_funcs.c
index ce6186d9..7166cd56 100644
--- a/src/radeon_exa_funcs.c
+++ b/src/radeon_exa_funcs.c
@@ -599,24 +599,11 @@ Bool RADEONDrawInit(ScreenPtr pScreen)
info->accel_state->exa->UploadToScreen = &RADEONUploadToScreenCS;
info->accel_state->exa->DownloadFromScreen = &RADEONDownloadFromScreenCS;
- info->accel_state->exa->flags = EXA_OFFSCREEN_PIXMAPS;
-#ifdef EXA_SUPPORTS_PREPARE_AUX
- info->accel_state->exa->flags |= EXA_SUPPORTS_PREPARE_AUX;
-#endif
-#ifdef EXA_SUPPORTS_OFFSCREEN_OVERLAPS
- /* The 2D engine supports overlapping memory areas */
- info->accel_state->exa->flags |= EXA_SUPPORTS_OFFSCREEN_OVERLAPS;
-#endif
+ info->accel_state->exa->flags = EXA_OFFSCREEN_PIXMAPS | EXA_SUPPORTS_PREPARE_AUX |
+ EXA_SUPPORTS_OFFSCREEN_OVERLAPS | EXA_HANDLES_PIXMAPS | EXA_MIXED_PIXMAPS;
info->accel_state->exa->pixmapOffsetAlign = RADEON_GPU_PAGE_SIZE;
info->accel_state->exa->pixmapPitchAlign = 64;
-#ifdef EXA_HANDLES_PIXMAPS
- info->accel_state->exa->flags |= EXA_HANDLES_PIXMAPS;
-#ifdef EXA_MIXED_PIXMAPS
- info->accel_state->exa->flags |= EXA_MIXED_PIXMAPS;
-#endif
-#endif
-
#ifdef RENDER
if (info->RenderAccel) {
if (IS_R300_3D || IS_R500_3D) {
@@ -647,30 +634,20 @@ Bool RADEONDrawInit(ScreenPtr pScreen)
}
#endif
-#if (EXA_VERSION_MAJOR == 2 && EXA_VERSION_MINOR >= 4)
info->accel_state->exa->CreatePixmap = RADEONEXACreatePixmap;
info->accel_state->exa->DestroyPixmap = RADEONEXADestroyPixmap;
info->accel_state->exa->PixmapIsOffscreen = RADEONEXAPixmapIsOffscreen;
info->accel_state->exa->PrepareAccess = RADEONPrepareAccess_CS;
info->accel_state->exa->FinishAccess = RADEONFinishAccess_CS;
-#if (EXA_VERSION_MAJOR == 2 && EXA_VERSION_MINOR >= 5)
info->accel_state->exa->CreatePixmap2 = RADEONEXACreatePixmap2;
#if (EXA_VERSION_MAJOR == 2 && EXA_VERSION_MINOR >= 6)
info->accel_state->exa->SharePixmapBacking = RADEONEXASharePixmapBacking;
info->accel_state->exa->SetSharedPixmapBacking = RADEONEXASetSharedPixmapBacking;
#endif
-#endif
-#endif
-#if EXA_VERSION_MAJOR > 2 || (EXA_VERSION_MAJOR == 2 && EXA_VERSION_MINOR >= 3)
- xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Setting EXA maxPitchBytes\n");
-
info->accel_state->exa->maxPitchBytes = 16320;
info->accel_state->exa->maxX = 8191;
-#else
- info->accel_state->exa->maxX = 16320 / 4;
-#endif
info->accel_state->exa->maxY = 8191;
if (xf86ReturnOptValBool(info->Options, OPTION_EXA_VSYNC, FALSE)) {
diff --git a/src/radeon_exa_render.c b/src/radeon_exa_render.c
index 1a357422..263a2b46 100644
--- a/src/radeon_exa_render.c
+++ b/src/radeon_exa_render.c
@@ -98,10 +98,8 @@ static struct formatinfo R300TexFormats[] = {
{PICT_x8r8g8b8, R300_EASY_TX_FORMAT(X, Y, Z, ONE, W8Z8Y8X8)},
{PICT_a8b8g8r8, R300_EASY_TX_FORMAT(Z, Y, X, W, W8Z8Y8X8)},
{PICT_x8b8g8r8, R300_EASY_TX_FORMAT(Z, Y, X, ONE, W8Z8Y8X8)},
-#ifdef PICT_TYPE_BGRA
{PICT_b8g8r8a8, R300_EASY_TX_FORMAT(W, Z, Y, X, W8Z8Y8X8)},
{PICT_b8g8r8x8, R300_EASY_TX_FORMAT(W, Z, Y, ONE, W8Z8Y8X8)},
-#endif
{PICT_r5g6b5, R300_EASY_TX_FORMAT(X, Y, Z, ONE, Z5Y6X5)},
{PICT_a1r5g5b5, R300_EASY_TX_FORMAT(X, Y, Z, W, W1Z5Y5X5)},
{PICT_x1r5g5b5, R300_EASY_TX_FORMAT(X, Y, Z, ONE, W1Z5Y5X5)},
@@ -142,10 +140,8 @@ static Bool R300GetDestFormat(PicturePtr pDstPicture, uint32_t *dst_format)
case PICT_x8r8g8b8:
case PICT_a8b8g8r8:
case PICT_x8b8g8r8:
-#ifdef PICT_TYPE_BGRA
case PICT_b8g8r8a8:
case PICT_b8g8r8x8:
-#endif
*dst_format = R300_COLORFORMAT_ARGB8888;
break;
case PICT_r5g6b5:
@@ -1615,7 +1611,6 @@ static Bool R300PrepareComposite(int op, PicturePtr pSrcPicture,
R300_OUT_FMT_C2_SEL_BLUE |
R300_OUT_FMT_C3_SEL_ALPHA);
break;
-#ifdef PICT_TYPE_BGRA
case PICT_b8g8r8a8:
case PICT_b8g8r8x8:
output_fmt = (R300_OUT_FMT_C4_8 |
@@ -1624,7 +1619,6 @@ static Bool R300PrepareComposite(int op, PicturePtr pSrcPicture,
R300_OUT_FMT_C2_SEL_GREEN |
R300_OUT_FMT_C3_SEL_BLUE);
break;
-#endif
case PICT_a8:
output_fmt = (R300_OUT_FMT_C4_8 |
R300_OUT_FMT_C0_SEL_ALPHA);
diff --git a/src/radeon_kms.c b/src/radeon_kms.c
index 2265b17a..0dc577be 100644
--- a/src/radeon_kms.c
+++ b/src/radeon_kms.c
@@ -599,8 +599,6 @@ static Bool radeon_open_drm_master(ScrnInfoPtr pScrn)
return TRUE;
}
-#ifdef EXA_MIXED_PIXMAPS
-
static Bool r600_get_tile_config(ScrnInfoPtr pScrn)
{
RADEONInfoPtr info = RADEONPTR(pScrn);
@@ -712,8 +710,6 @@ static Bool r600_get_tile_config(ScrnInfoPtr pScrn)
return TRUE;
}
-#endif /* EXA_MIXED_PIXMAPS */
-
static void RADEONSetupCapabilities(ScrnInfoPtr pScrn)
{
#ifdef RADEON_PIXMAP_SHARING
@@ -815,7 +811,7 @@ Bool RADEONPreInit_KMS(ScrnInfoPtr pScrn, int flags)
info->allowColorTiling2D = FALSE;
RADEONSetupCapabilities(pScrn);
-#ifdef EXA_MIXED_PIXMAPS
+
/* don't enable tiling if accel is not enabled */
if (!info->r600_shadow_fb) {
Bool colorTilingDefault =
@@ -850,10 +846,6 @@ Bool RADEONPreInit_KMS(ScrnInfoPtr pScrn, int flags)
info->allowColorTiling = xf86ReturnOptValBool(info->Options,
OPTION_COLOR_TILING, colorTilingDefault);
} else
-#else
- xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "KMS Color Tiling requires xserver which supports EXA_MIXED_PIXMAPS\n");
-#endif
info->allowColorTiling = FALSE;
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
@@ -1362,9 +1354,7 @@ void RADEONLeaveVT_KMS(VT_FUNC_ARGS_DECL)
drmDropMaster(info->dri2.drm_fd);
-#ifdef HAVE_FREE_SHADOW
xf86RotateFreeShadow(pScrn);
-#endif
xf86_hide_cursors (pScrn);
info->accel_state->XInited3D = FALSE;
@@ -1589,24 +1579,3 @@ ModeStatus RADEONValidMode(SCRN_ARG_TYPE arg, DisplayModePtr mode,
}
return MODE_OK;
}
-
-#ifndef HAVE_XF86MODEBANDWIDTH
-/** Calculates the memory bandwidth (in MiB/sec) of a mode. */
-_X_HIDDEN unsigned int
-xf86ModeBandwidth(DisplayModePtr mode, int depth)
-{
- float a_active, a_total, active_percent, pixels_per_second;
- int bytes_per_pixel = (depth + 7) / 8;
-
- if (!mode->HTotal || !mode->VTotal || !mode->Clock)
- return 0;
-
- a_active = mode->HDisplay * mode->VDisplay;
- a_total = mode->HTotal * mode->VTotal;
- active_percent = a_active / a_total;
- pixels_per_second = active_percent * mode->Clock * 1000.0;
-
- return (unsigned int)(pixels_per_second * bytes_per_pixel / (1024 * 1024));
-}
-#endif
-
diff --git a/src/radeon_probe.c b/src/radeon_probe.c
index 5f372c77..baca574e 100644
--- a/src/radeon_probe.c
+++ b/src/radeon_probe.c
@@ -46,9 +46,6 @@
#include "atipcirename.h"
#include "xf86.h"
-#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 6
-#include "xf86Resources.h"
-#endif
#include "xf86drmMode.h"
#include "dri.h"
@@ -61,13 +58,7 @@
#include "radeon_pci_chipset_gen.h"
-#ifdef XSERVER_LIBPCIACCESS
#include "radeon_pci_device_match_gen.h"
-#endif
-
-#ifndef XSERVER_LIBPCIACCESS
-static Bool RADEONProbe(DriverPtr drv, int flags);
-#endif
_X_EXPORT int gRADEONEntityIndex = -1;
@@ -135,11 +126,7 @@ radeon_get_scrninfo(int entity_num, void *pci_dev)
pScrn->driverVersion = RADEON_VERSION_CURRENT;
pScrn->driverName = RADEON_DRIVER_NAME;
pScrn->name = RADEON_NAME;
-#ifdef XSERVER_LIBPCIACCESS
pScrn->Probe = NULL;
-#else
- pScrn->Probe = RADEONProbe;
-#endif
pScrn->PreInit = RADEONPreInit_KMS;
pScrn->ScreenInit = RADEONScreenInit_KMS;
@@ -184,53 +171,6 @@ radeon_get_scrninfo(int entity_num, void *pci_dev)
return TRUE;
}
-#ifndef XSERVER_LIBPCIACCESS
-
-/* Return TRUE if chipset is present; FALSE otherwise. */
-static Bool
-RADEONProbe(DriverPtr drv, int flags)
-{
- int numUsed;
- int numDevSections;
- int *usedChips;
- GDevPtr *devSections;
- Bool foundScreen = FALSE;
- int i;
-
- if (!xf86GetPciVideoInfo()) return FALSE;
-
- numDevSections = xf86MatchDevice(RADEON_NAME, &devSections);
-
- if (!numDevSections) return FALSE;
-
- numUsed = xf86MatchPciInstances(RADEON_NAME,
- PCI_VENDOR_ATI,
- RADEONChipsets,
- RADEONPciChipsets,
- devSections,
- numDevSections,
- drv,
- &usedChips);
-
- if (numUsed <= 0) return FALSE;
-
- if (flags & PROBE_DETECT) {
- foundScreen = TRUE;
- } else {
- for (i = 0; i < numUsed; i++) {
- if (radeon_get_scrninfo(usedChips[i], NULL))
- foundScreen = TRUE;
- }
- }
-
- free(usedChips);
- free(devSections);
-
- return foundScreen;
-}
-
-#else /* XSERVER_LIBPCIACCESS */
-
static Bool
radeon_pci_probe(
DriverPtr pDriver,
@@ -242,8 +182,6 @@ radeon_pci_probe(
return radeon_get_scrninfo(entity_num, (void *)device);
}
-#endif /* XSERVER_LIBPCIACCESS */
-
static Bool
RADEONDriverFunc(ScrnInfoPtr scrn, xorgDriverFuncOp op, void *data)
{
@@ -337,19 +275,13 @@ _X_EXPORT DriverRec RADEON =
RADEON_VERSION_CURRENT,
RADEON_DRIVER_NAME,
RADEONIdentify,
-#ifdef XSERVER_LIBPCIACCESS
NULL,
-#else
- RADEONProbe,
-#endif
RADEONAvailableOptions,
NULL,
0,
RADEONDriverFunc,
-#ifdef XSERVER_LIBPCIACCESS
radeon_device_match,
radeon_pci_probe,
-#endif
#ifdef XSERVER_PLATFORM_BUS
radeon_platform_probe
#endif
diff --git a/src/radeon_video.c b/src/radeon_video.c
index a0de4f60..c0505282 100644
--- a/src/radeon_video.c
+++ b/src/radeon_video.c
@@ -137,86 +137,6 @@ radeon_pick_best_crtc(ScrnInfoPtr pScrn, Bool consider_disabled,
return best_crtc;
}
-#ifndef HAVE_XF86CRTCCLIPVIDEOHELPER
-static xf86CrtcPtr
-radeon_covering_crtc(ScrnInfoPtr pScrn,
- BoxPtr box,
- xf86CrtcPtr desired,
- BoxPtr crtc_box_ret)
-{
- xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
- xf86CrtcPtr crtc, best_crtc;
- int coverage, best_coverage;
- int c;
- BoxRec crtc_box, cover_box;
-
- best_crtc = NULL;
- best_coverage = 0;
- crtc_box_ret->x1 = 0;
- crtc_box_ret->x2 = 0;
- crtc_box_ret->y1 = 0;
- crtc_box_ret->y2 = 0;
- for (c = 0; c < xf86_config->num_crtc; c++) {
- crtc = xf86_config->crtc[c];
- radeon_crtc_box(crtc, &crtc_box);
- radeon_box_intersect(&cover_box, &crtc_box, box);
- coverage = radeon_box_area(&cover_box);
- if (coverage && crtc == desired) {
- *crtc_box_ret = crtc_box;
- return crtc;
- } else if (coverage > best_coverage) {
- *crtc_box_ret = crtc_box;
- best_crtc = crtc;
- best_coverage = coverage;
- }
- }
- return best_crtc;
-}
-
-static Bool
-radeon_crtc_clip_video_helper(ScrnInfoPtr pScrn,
- xf86CrtcPtr *crtc_ret,
- xf86CrtcPtr desired_crtc,
- BoxPtr dst,
- INT32 *xa,
- INT32 *xb,
- INT32 *ya,
- INT32 *yb,
- RegionPtr reg,
- INT32 width,
- INT32 height)
-{
- Bool ret;
- RegionRec crtc_region_local;
- RegionPtr crtc_region = reg;
-
- /*
- * For overlay video, compute the relevant CRTC and
- * clip video to that
- */
- if (crtc_ret) {
- BoxRec crtc_box;
- xf86CrtcPtr crtc = radeon_covering_crtc(pScrn, dst,
- desired_crtc,
- &crtc_box);
-
- if (crtc) {
- REGION_INIT (pScreen, &crtc_region_local, &crtc_box, 1);
- crtc_region = &crtc_region_local;
- REGION_INTERSECT (pScreen, crtc_region, crtc_region, reg);
- }
- *crtc_ret = crtc;
- }
-
- ret = xf86XVClipVideoHelper(dst, xa, xb, ya, yb,
- crtc_region, width, height);
-
- if (crtc_region != reg)
- REGION_UNINIT (pScreen, &crtc_region_local);
-
- return ret;
-}
-#endif
void RADEONInitVideo(ScreenPtr pScreen)
{