diff options
-rw-r--r-- | configure.ac | 8 | ||||
-rw-r--r-- | src/Makefile.am | 1 | ||||
-rw-r--r-- | src/compat-api.h | 70 | ||||
-rw-r--r-- | src/drmmode_display.c | 55 | ||||
-rw-r--r-- | src/evergreen_exa.c | 2 | ||||
-rw-r--r-- | src/r600_exa.c | 2 | ||||
-rw-r--r-- | src/radeon.h | 14 | ||||
-rw-r--r-- | src/radeon_bo_helper.c | 13 | ||||
-rw-r--r-- | src/radeon_dri2.c | 50 | ||||
-rw-r--r-- | src/radeon_drm_queue.c | 3 | ||||
-rw-r--r-- | src/radeon_exa.c | 2 | ||||
-rw-r--r-- | src/radeon_exa_funcs.c | 2 | ||||
-rw-r--r-- | src/radeon_glamor.c | 6 | ||||
-rw-r--r-- | src/radeon_glamor.h | 4 | ||||
-rw-r--r-- | src/radeon_glamor_wrappers.c | 4 | ||||
-rw-r--r-- | src/radeon_kms.c | 71 | ||||
-rw-r--r-- | src/radeon_list.h | 47 | ||||
-rw-r--r-- | src/radeon_probe.h | 16 |
18 files changed, 59 insertions, 311 deletions
diff --git a/configure.ac b/configure.ac index 170f42ef..9c595f8b 100644 --- a/configure.ac +++ b/configure.ac @@ -74,7 +74,7 @@ PKG_CHECK_MODULES(LIBDRM, [libdrm >= 2.4.78]) PKG_CHECK_MODULES(LIBDRM_RADEON, [libdrm_radeon]) # Obtain compiler/linker options for the driver dependencies -PKG_CHECK_MODULES(XORG, [xorg-server >= 1.10 xproto fontsproto xf86driproto $REQUIRED_MODULES]) +PKG_CHECK_MODULES(XORG, [xorg-server >= 1.13 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") @@ -172,12 +172,6 @@ AC_CHECK_DECL(xf86CursorResetCursor, [#include <xorg-server.h> #include <xf86Cursor.h>]) -AC_CHECK_DECL(xorg_list_init, - [AC_DEFINE(HAVE_XORG_LIST, 1, [Have xorg_list API])], [], - [#include <X11/Xdefs.h> - #include "xorg-server.h" - #include "list.h"]) - AC_CHECK_HEADERS([misyncshm.h], [], [], [#include <X11/Xdefs.h> #include <X11/Xfuncproto.h> diff --git a/src/Makefile.am b/src/Makefile.am index 8f39e213..ed1bfa9e 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -96,7 +96,6 @@ EXTRA_DIST = \ radeon_exa_shared.h \ radeon_glamor.h \ radeon.h \ - radeon_list.h \ radeon_probe.h \ radeon_reg.h \ radeon_version.h \ diff --git a/src/compat-api.h b/src/compat-api.h index 80a3ac46..f4e7524f 100644 --- a/src/compat-api.h +++ b/src/compat-api.h @@ -23,77 +23,15 @@ * Author: Dave Airlie <airlied@redhat.com> */ -/* this file provides API compat between server post 1.13 and pre it, - it should be reused inside as many drivers as possible */ #ifndef COMPAT_API_H #define COMPAT_API_H -#ifndef GLYPH_HAS_GLYPH_PICTURE_ACCESSOR -#define GetGlyphPicture(g, s) GlyphPicture((g))[(s)->myNum] -#define SetGlyphPicture(g, s, p) GlyphPicture((g))[(s)->myNum] = p -#endif - -#ifndef XF86_HAS_SCRN_CONV -#define xf86ScreenToScrn(s) xf86Screens[(s)->myNum] -#define xf86ScrnToScreen(s) screenInfo.screens[(s)->scrnIndex] -#endif - -#ifndef XF86_SCRN_INTERFACE - -#define SCRN_ARG_TYPE int -#define SCRN_INFO_PTR(arg1) ScrnInfoPtr pScrn = xf86Screens[(arg1)] - -#define SCREEN_ARG_TYPE int -#define SCREEN_PTR(arg1) ScreenPtr pScreen = screenInfo.screens[(arg1)] - -#define SCREEN_INIT_ARGS_DECL int i, ScreenPtr pScreen, int argc, char **argv - -#define BLOCKHANDLER_ARGS_DECL int arg, pointer blockData, pointer pTimeout, pointer pReadmask -#define BLOCKHANDLER_ARGS arg, blockData, pTimeout, pReadmask - -#define CLOSE_SCREEN_ARGS_DECL int scrnIndex, ScreenPtr pScreen -#define CLOSE_SCREEN_ARGS scrnIndex, pScreen - -#define ADJUST_FRAME_ARGS_DECL int arg, int x, int y, int flags - -#define SWITCH_MODE_ARGS_DECL int arg, DisplayModePtr mode, int flags - -#define FREE_SCREEN_ARGS_DECL int arg, int flags - -#define VT_FUNC_ARGS_DECL int arg, int flags -#define VT_FUNC_ARGS(flags) pScrn->scrnIndex, (flags) - -#define XF86_ENABLEDISABLEFB_ARG(x) ((x)->scrnIndex) -#else -#define SCRN_ARG_TYPE ScrnInfoPtr -#define SCRN_INFO_PTR(arg1) ScrnInfoPtr pScrn = (arg1) - -#define SCREEN_ARG_TYPE ScreenPtr -#define SCREEN_PTR(arg1) ScreenPtr pScreen = (arg1) - -#define SCREEN_INIT_ARGS_DECL ScreenPtr pScreen, int argc, char **argv - #if ABI_VIDEODRV_VERSION >= SET_ABI_VERSION(23, 0) -#define BLOCKHANDLER_ARGS_DECL ScreenPtr arg, pointer pTimeout -#define BLOCKHANDLER_ARGS arg, pTimeout +#define BLOCKHANDLER_ARGS_DECL ScreenPtr pScreen, pointer pTimeout +#define BLOCKHANDLER_ARGS pScreen, pTimeout #else -#define BLOCKHANDLER_ARGS_DECL ScreenPtr arg, pointer pTimeout, pointer pReadmask -#define BLOCKHANDLER_ARGS arg, pTimeout, pReadmask -#endif - -#define CLOSE_SCREEN_ARGS_DECL ScreenPtr pScreen -#define CLOSE_SCREEN_ARGS pScreen - -#define ADJUST_FRAME_ARGS_DECL ScrnInfoPtr arg, int x, int y -#define SWITCH_MODE_ARGS_DECL ScrnInfoPtr arg, DisplayModePtr mode - -#define FREE_SCREEN_ARGS_DECL ScrnInfoPtr arg - -#define VT_FUNC_ARGS_DECL ScrnInfoPtr arg -#define VT_FUNC_ARGS(flags) pScrn - -#define XF86_ENABLEDISABLEFB_ARG(x) (x) - +#define BLOCKHANDLER_ARGS_DECL ScreenPtr pScreen, pointer pTimeout, pointer pReadmask +#define BLOCKHANDLER_ARGS pScreen, pTimeout, pReadmask #endif #endif diff --git a/src/drmmode_display.c b/src/drmmode_display.c index afb44241..369c1efc 100644 --- a/src/drmmode_display.c +++ b/src/drmmode_display.c @@ -34,18 +34,16 @@ #include <time.h> #include "cursorstr.h" #include "damagestr.h" +#include "list.h" #include "micmap.h" #include "xf86cmap.h" #include "xf86Priv.h" #include "radeon.h" #include "radeon_bo_helper.h" #include "radeon_glamor.h" -#include "radeon_list.h" #include "radeon_reg.h" -#ifdef RADEON_PIXMAP_SHARING #include <dri.h> -#endif #include "drmmode_display.h" @@ -637,7 +635,7 @@ drmmode_can_use_hw_cursor(xf86CrtcPtr crtc) if (crtc->transformPresent) return FALSE; -#if XF86_CRTC_VERSION >= 4 && XF86_CRTC_VERSION < 7 +#if XF86_CRTC_VERSION < 7 /* Xorg doesn't correctly handle cursor position transform in the * rotation case */ @@ -646,12 +644,10 @@ drmmode_can_use_hw_cursor(xf86CrtcPtr crtc) return FALSE; #endif -#if defined(RADEON_PIXMAP_SHARING) /* HW cursor not supported with RandR 1.4 multihead up to 1.18.99.901 */ if (xorgGetVersion() <= XORG_VERSION_NUMERIC(1,18,99,901,0) && !xorg_list_is_empty(&crtc->scrn->pScreen->pixmap_dirty_list)) return FALSE; -#endif return TRUE; } @@ -675,7 +671,7 @@ drmmode_crtc_update_tear_free(xf86CrtcPtr crtc) if (drmmode_output->tear_free == 1 || (drmmode_output->tear_free == 2 && - (radeon_is_gpu_screen(crtc->scrn->pScreen) || + (crtc->scrn->pScreen->isGPU || info->shadow_primary || crtc->transformPresent || crtc->rotation != RR_Rotate_0))) { drmmode_crtc->tear_free = TRUE; @@ -684,8 +680,6 @@ drmmode_crtc_update_tear_free(xf86CrtcPtr crtc) } } -#if XF86_CRTC_VERSION >= 4 - #if XF86_CRTC_VERSION < 7 #define XF86DriverTransformOutput TRUE #define XF86DriverTransformNone FALSE @@ -714,17 +708,6 @@ drmmode_handle_transform(xf86CrtcPtr crtc) return ret; } -#else - -static Bool -drmmode_handle_transform(xf86CrtcPtr crtc) -{ - return xf86CrtcRotate(crtc); -} - -#endif - -#ifdef RADEON_PIXMAP_SHARING static void drmmode_crtc_prime_scanout_update(xf86CrtcPtr crtc, DisplayModePtr mode, @@ -784,7 +767,6 @@ drmmode_crtc_prime_scanout_update(xf86CrtcPtr crtc, DisplayModePtr mode, drmmode_crtc->scanout_id = scanout_id; } -#endif /* RADEON_PIXMAP_SHARING */ static void drmmode_crtc_scanout_update(xf86CrtcPtr crtc, DisplayModePtr mode, @@ -942,21 +924,16 @@ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode, drmmode_crtc_gamma_do_set(crtc, crtc->gamma_red, crtc->gamma_green, crtc->gamma_blue, crtc->gamma_size); -#ifdef RADEON_PIXMAP_SHARING if (drmmode_crtc->prime_scanout_pixmap) { drmmode_crtc_prime_scanout_update(crtc, mode, scanout_id, &fb, &x, &y); - } else -#endif - if (drmmode_crtc->rotate.pixmap) { + } else if (drmmode_crtc->rotate.pixmap) { fb = radeon_pixmap_get_fb(drmmode_crtc->rotate.pixmap); x = y = 0; - } else if (!radeon_is_gpu_screen(pScreen) && + } else if (!pScreen->isGPU && (drmmode_crtc->tear_free || -#if XF86_CRTC_VERSION >= 4 crtc->driverIsPerformingTransform || -#endif info->shadow_primary)) { drmmode_crtc_scanout_update(crtc, mode, scanout_id, &fb, &x, &y); @@ -1055,7 +1032,7 @@ drmmode_set_cursor_position (xf86CrtcPtr crtc, int x, int y) drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; RADEONEntPtr pRADEONEnt = RADEONEntPriv(crtc->scrn); -#if XF86_CRTC_VERSION >= 4 && XF86_CRTC_VERSION < 7 +#if XF86_CRTC_VERSION < 7 if (crtc->driverIsPerformingTransform) { x += crtc->x; y += crtc->y; @@ -1066,7 +1043,7 @@ drmmode_set_cursor_position (xf86CrtcPtr crtc, int x, int y) drmModeMoveCursor(pRADEONEnt->fd, drmmode_crtc->mode_crtc->crtc_id, x, y); } -#if XF86_CRTC_VERSION >= 4 && XF86_CRTC_VERSION < 7 +#if XF86_CRTC_VERSION < 7 static int drmmode_cursor_src_offset(Rotation rotation, int width, int height, @@ -1137,7 +1114,7 @@ drmmode_load_cursor_argb (xf86CrtcPtr crtc, CARD32 *image) /* cursor should be mapped already */ ptr = (uint32_t *)(drmmode_crtc->cursor_bo->ptr); -#if XF86_CRTC_VERSION >= 4 && XF86_CRTC_VERSION < 7 +#if XF86_CRTC_VERSION < 7 if (crtc->driverIsPerformingTransform) { uint32_t cursor_w = info->cursor_w, cursor_h = info->cursor_h; int dstx, dsty; @@ -1313,7 +1290,6 @@ drmmode_crtc_gamma_set(xf86CrtcPtr crtc, uint16_t *red, uint16_t *green, #endif } -#ifdef RADEON_PIXMAP_SHARING static Bool drmmode_set_scanout_pixmap(xf86CrtcPtr crtc, PixmapPtr ppix) { @@ -1365,7 +1341,6 @@ drmmode_set_scanout_pixmap(xf86CrtcPtr crtc, PixmapPtr ppix) #endif return TRUE; } -#endif static xf86CrtcFuncsRec drmmode_crtc_funcs = { .dpms = drmmode_crtc_dpms, @@ -1384,9 +1359,7 @@ static xf86CrtcFuncsRec drmmode_crtc_funcs = { .shadow_allocate = drmmode_crtc_shadow_allocate, .shadow_destroy = drmmode_crtc_shadow_destroy, .destroy = NULL, /* XXX */ -#ifdef RADEON_PIXMAP_SHARING .set_scanout_pixmap = drmmode_set_scanout_pixmap, -#endif }; int drmmode_get_crtc_id(xf86CrtcPtr crtc) @@ -1873,16 +1846,14 @@ drmmode_create_name(ScrnInfoPtr pScrn, drmModeConnectorPtr koutput, char *name, if (output) { snprintf(name, 32, "%s-%s", output->name, extra_path); } else { - if (koutput->connector_type >= NUM_OUTPUT_NAMES) + if (koutput->connector_type >= NUM_OUTPUT_NAMES) { snprintf(name, 32, "Unknown%d-%d", koutput->connector_type, koutput->connector_type_id - 1); -#ifdef RADEON_PIXMAP_SHARING - else if (pScrn->is_gpu) + } else if (pScrn->is_gpu) { snprintf(name, 32, "%s-%d-%d", output_names[koutput->connector_type], pScrn->scrnIndex - GPU_SCREEN_OFFSET + 1, koutput->connector_type_id - 1); -#endif - else { + } else { /* need to do smart conversion here for compat with non-kms ATI driver */ if (koutput->connector_type_id == 1) { switch(koutput->connector_type) { @@ -2542,9 +2513,7 @@ Bool drmmode_pre_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int cpp) int i, num_dvi = 0, num_hdmi = 0; drmModeResPtr mode_res; unsigned int crtcs_needed = 0; -#ifdef RADEON_PIXMAP_SHARING char *bus_id_string, *provider_name; -#endif xf86CrtcConfigInit(pScrn, &drmmode_xf86crtc_config_funcs); @@ -2585,13 +2554,11 @@ Bool drmmode_pre_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int cpp) /* workout clones */ drmmode_clones_init(pScrn, drmmode, mode_res); -#ifdef RADEON_PIXMAP_SHARING bus_id_string = DRICreatePCIBusID(info->PciInfo); XNFasprintf(&provider_name, "%s @ %s", pScrn->chipset, bus_id_string); free(bus_id_string); xf86ProviderSetup(pScrn, NULL, provider_name); free(provider_name); -#endif xf86InitialConfiguration(pScrn, TRUE); diff --git a/src/evergreen_exa.c b/src/evergreen_exa.c index d788bfc7..90c9b6d9 100644 --- a/src/evergreen_exa.c +++ b/src/evergreen_exa.c @@ -2055,10 +2055,8 @@ EVERGREENDrawInit(ScreenPtr pScreen) info->accel_state->exa->UploadToScreen = EVERGREENUploadToScreen; info->accel_state->exa->DownloadFromScreen = EVERGREENDownloadFromScreen; 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 info->accel_state->exa->flags = EXA_OFFSCREEN_PIXMAPS | EXA_SUPPORTS_PREPARE_AUX | EXA_HANDLES_PIXMAPS | EXA_MIXED_PIXMAPS; info->accel_state->exa->pixmapOffsetAlign = 256; diff --git a/src/r600_exa.c b/src/r600_exa.c index e9ac721d..22d4b316 100644 --- a/src/r600_exa.c +++ b/src/r600_exa.c @@ -2034,10 +2034,8 @@ R600DrawInit(ScreenPtr pScreen) info->accel_state->exa->UploadToScreen = R600UploadToScreenCS; info->accel_state->exa->DownloadFromScreen = R600DownloadFromScreenCS; 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 info->accel_state->exa->flags = EXA_OFFSCREEN_PIXMAPS | EXA_SUPPORTS_PREPARE_AUX | EXA_HANDLES_PIXMAPS | EXA_MIXED_PIXMAPS; info->accel_state->exa->pixmapOffsetAlign = 256; diff --git a/src/radeon.h b/src/radeon.h index 319565a1..81b04ae2 100644 --- a/src/radeon.h +++ b/src/radeon.h @@ -180,11 +180,6 @@ typedef enum { } RADEONOpts; -#if XF86_CRTC_VERSION >= 5 -#define RADEON_PIXMAP_SHARING 1 -#define radeon_is_gpu_screen(screen) (screen)->isGPU -#define radeon_is_gpu_scrn(scrn) (scrn)->is_gpu - static inline ScreenPtr radeon_master_screen(ScreenPtr screen) { @@ -216,10 +211,6 @@ radeon_dirty_src_equals(PixmapDirtyUpdatePtr dirty, PixmapPtr pixmap) #endif } -#else -#define radeon_is_gpu_screen(screen) 0 -#define radeon_is_gpu_scrn(scrn) 0 -#endif #define RADEON_VSYNC_TIMEOUT 20000 /* Maximum wait for VSYNC (in usecs) */ @@ -236,7 +227,6 @@ radeon_dirty_src_equals(PixmapDirtyUpdatePtr dirty, PixmapPtr pixmap) #define MAKE_ATOM(a) MakeAtom(a, sizeof(a) - 1, TRUE) /* Other macros */ -#define RADEON_ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0])) #define RADEON_ALIGN(x,bytes) (((x) + ((bytes) - 1)) & ~((bytes) - 1)) #define RADEONPTR(pScrn) ((RADEONInfoPtr)(pScrn)->driverPrivate) @@ -516,7 +506,7 @@ typedef struct { int Chipset; RADEONChipFamily ChipFamily; - Bool (*CloseScreen)(CLOSE_SCREEN_ARGS_DECL); + Bool (*CloseScreen)(ScreenPtr pScreen); void (*BlockHandler)(BLOCKHANDLER_ARGS_DECL); @@ -628,10 +618,8 @@ typedef struct { AddTrapsProcPtr SavedAddTraps; UnrealizeGlyphProcPtr SavedUnrealizeGlyph; #endif -#ifdef RADEON_PIXMAP_SHARING SharePixmapBackingProcPtr SavedSharePixmapBacking; SetSharedPixmapBackingProcPtr SavedSetSharedPixmapBacking; -#endif } glamor; #endif /* USE_GLAMOR */ } RADEONInfoRec, *RADEONInfoPtr; diff --git a/src/radeon_bo_helper.c b/src/radeon_bo_helper.c index 01b9e3df..0366f613 100644 --- a/src/radeon_bo_helper.c +++ b/src/radeon_bo_helper.c @@ -26,10 +26,7 @@ #include "radeon.h" #include "radeon_glamor.h" - -#ifdef RADEON_PIXMAP_SHARING #include "radeon_bo_gem.h" -#endif static const unsigned MicroBlockTable[5][3][2] = { /*linear tiled square-tiled */ @@ -89,11 +86,8 @@ radeon_alloc_pixmap_bo(ScrnInfoPtr pScrn, int width, int height, int depth, tiling |= RADEON_TILING_MACRO | RADEON_TILING_MICRO; if ((usage_hint == CREATE_PIXMAP_USAGE_BACKING_PIXMAP && - info->shadow_primary) -#ifdef CREATE_PIXMAP_USAGE_SHARED - || (usage_hint & 0xffff) == CREATE_PIXMAP_USAGE_SHARED -#endif - ) { + info->shadow_primary) || + (usage_hint & 0xffff) == CREATE_PIXMAP_USAGE_SHARED) { tiling = 0; domain = RADEON_GEM_DOMAIN_GTT; } @@ -299,7 +293,6 @@ uint32_t radeon_get_pixmap_tiling_flags(PixmapPtr pPix) } } -#ifdef RADEON_PIXMAP_SHARING Bool radeon_share_pixmap_backing(struct radeon_bo *bo, void **handle_p) { @@ -406,5 +399,3 @@ Bool radeon_set_shared_pixmap_backing(PixmapPtr ppix, void *fd_handle, radeon_bo_unref(bo); return ret; } - -#endif /* RADEON_PIXMAP_SHARING */ diff --git a/src/radeon_dri2.c b/src/radeon_dri2.c index 73adbe91..b569bb4f 100644 --- a/src/radeon_dri2.c +++ b/src/radeon_dri2.c @@ -42,17 +42,13 @@ #include "radeon_bo_helper.h" #include "radeon_version.h" -#include "radeon_list.h" #include "radeon_bo_gem.h" +#include <list.h> #include <xf86Priv.h> #include <X11/extensions/dpmsconst.h> -#if DRI2INFOREC_VERSION >= 9 -#define USE_DRI2_PRIME -#endif - #define FALLBACK_SWAP_DELAY 16 #include "radeon_glamor.h" @@ -283,14 +279,6 @@ error: return NULL; } -DRI2BufferPtr -radeon_dri2_create_buffer(DrawablePtr pDraw, unsigned int attachment, - unsigned int format) -{ - return radeon_dri2_create_buffer2(pDraw->pScreen, pDraw, - attachment, format); -} - static void radeon_dri2_destroy_buffer2(ScreenPtr pScreen, DrawablePtr drawable, BufferPtr buffers) @@ -321,12 +309,6 @@ radeon_dri2_destroy_buffer2(ScreenPtr pScreen, } } -void -radeon_dri2_destroy_buffer(DrawablePtr pDraw, DRI2BufferPtr buf) -{ - radeon_dri2_destroy_buffer2(pDraw->pScreen, pDraw, buf); -} - static inline PixmapPtr GetDrawablePixmap(DrawablePtr drawable) { @@ -362,17 +344,14 @@ radeon_dri2_copy_region2(ScreenPtr pScreen, dst_drawable = &dst_private->pixmap->drawable; if (src_private->attachment == DRI2BufferFrontLeft) { -#ifdef USE_DRI2_PRIME if (drawable->pScreen != pScreen) { src_drawable = DRI2UpdatePrime(drawable, src_buffer); if (!src_drawable) return; } else -#endif src_drawable = drawable; } if (dst_private->attachment == DRI2BufferFrontLeft) { -#ifdef USE_DRI2_PRIME if (drawable->pScreen != pScreen) { dst_drawable = DRI2UpdatePrime(drawable, dest_buffer); if (!dst_drawable) @@ -381,7 +360,6 @@ radeon_dri2_copy_region2(ScreenPtr pScreen, if (dst_drawable != drawable) translate = TRUE; } else -#endif dst_drawable = drawable; } @@ -435,14 +413,6 @@ radeon_dri2_copy_region2(ScreenPtr pScreen, FreeScratchGC(gc); } -void -radeon_dri2_copy_region(DrawablePtr pDraw, RegionPtr pRegion, - DRI2BufferPtr pDstBuffer, DRI2BufferPtr pSrcBuffer) -{ - return radeon_dri2_copy_region2(pDraw->pScreen, pDraw, pRegion, - pDstBuffer, pSrcBuffer); -} - enum DRI2FrameEventType { DRI2_SWAP, DRI2_FLIP, @@ -479,7 +449,9 @@ radeon_dri2_unref_buffer(BufferPtr buffer) { if (buffer) { struct dri2_buffer_priv *private = buffer->driverPrivate; - radeon_dri2_destroy_buffer(&(private->pixmap->drawable), buffer); + DrawablePtr draw = &private->pixmap->drawable; + + radeon_dri2_destroy_buffer2(draw->pScreen, draw, buffer); } } @@ -863,7 +835,8 @@ static void radeon_dri2_frame_event_handler(xf86CrtcPtr crtc, uint32_t seq, box.x2 = drawable->width; box.y2 = drawable->height; REGION_INIT(pScreen, ®ion, &box, 0); - radeon_dri2_copy_region(drawable, ®ion, event->front, event->back); + radeon_dri2_copy_region2(drawable->pScreen, drawable, ®ion, + event->front, event->back); swap_type = DRI2_BLIT_COMPLETE; } @@ -1394,7 +1367,7 @@ blit_fallback: box.y2 = draw->height; REGION_INIT(pScreen, ®ion, &box, 0); - radeon_dri2_copy_region(draw, ®ion, front, back); + radeon_dri2_copy_region2(draw->pScreen, draw, ®ion, front, back); DRI2SwapComplete(client, draw, 0, 0, 0, DRI2_BLIT_COMPLETE, func, data); @@ -1435,10 +1408,6 @@ radeon_dri2_screen_init(ScreenPtr pScreen) } dri2_info.fd = pRADEONEnt->fd; dri2_info.deviceName = info->dri2.device_name; - dri2_info.version = DRI2INFOREC_VERSION; - dri2_info.CreateBuffer = radeon_dri2_create_buffer; - dri2_info.DestroyBuffer = radeon_dri2_destroy_buffer; - dri2_info.CopyRegion = radeon_dri2_copy_region; if (info->dri2.pKernelDRMVersion->version_minor < 4) { xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "You need a newer kernel for " @@ -1467,11 +1436,10 @@ radeon_dri2_screen_init(ScreenPtr pScreen) } if (scheduling_works) { - dri2_info.version = 4; dri2_info.ScheduleSwap = radeon_dri2_schedule_swap; dri2_info.GetMSC = radeon_dri2_get_msc; dri2_info.ScheduleWaitMSC = radeon_dri2_schedule_wait_msc; - dri2_info.numDrivers = RADEON_ARRAY_SIZE(driverNames); + dri2_info.numDrivers = ARRAY_SIZE(driverNames); dri2_info.driverNames = driverNames; driverNames[0] = dri2_info.driverName; @@ -1495,12 +1463,10 @@ radeon_dri2_screen_init(ScreenPtr pScreen) DRI2InfoCnt++; } -#if DRI2INFOREC_VERSION >= 9 dri2_info.version = 9; dri2_info.CreateBuffer2 = radeon_dri2_create_buffer2; dri2_info.DestroyBuffer2 = radeon_dri2_destroy_buffer2; dri2_info.CopyRegion2 = radeon_dri2_copy_region2; -#endif info->dri2.enabled = DRI2ScreenInit(pScreen, &dri2_info); return info->dri2.enabled; diff --git a/src/radeon_drm_queue.c b/src/radeon_drm_queue.c index 37fdafeb..869f95c3 100644 --- a/src/radeon_drm_queue.c +++ b/src/radeon_drm_queue.c @@ -31,10 +31,11 @@ #endif #include <xorg-server.h> +#include <X11/Xdefs.h> +#include <list.h> #include "radeon.h" #include "radeon_drm_queue.h" -#include "radeon_list.h" struct radeon_drm_queue_entry { diff --git a/src/radeon_exa.c b/src/radeon_exa.c index d362e5d9..9106d5c6 100644 --- a/src/radeon_exa.c +++ b/src/radeon_exa.c @@ -312,7 +312,6 @@ void RADEONEXADestroyPixmap(ScreenPtr pScreen, void *driverPriv) free(driverPriv); } -#ifdef RADEON_PIXMAP_SHARING Bool RADEONEXASharePixmapBacking(PixmapPtr ppix, ScreenPtr slave, void **fd_handle) { struct radeon_exa_pixmap_priv *driver_priv = exaGetPixmapDriverPrivate(ppix); @@ -334,7 +333,6 @@ Bool RADEONEXASetSharedPixmapBacking(PixmapPtr ppix, void *fd_handle) driver_priv->shared = TRUE; return TRUE; } -#endif uint32_t radeon_get_pixmap_tiling(PixmapPtr pPix) { diff --git a/src/radeon_exa_funcs.c b/src/radeon_exa_funcs.c index d9013057..da0524ed 100644 --- a/src/radeon_exa_funcs.c +++ b/src/radeon_exa_funcs.c @@ -644,10 +644,8 @@ Bool RADEONDrawInit(ScreenPtr pScreen) info->accel_state->exa->PrepareAccess = RADEONPrepareAccess_CS; info->accel_state->exa->FinishAccess = RADEONFinishAccess_CS; 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 info->accel_state->exa->maxPitchBytes = 16320; diff --git a/src/radeon_glamor.c b/src/radeon_glamor.c index 01ff5609..5f378743 100644 --- a/src/radeon_glamor.c +++ b/src/radeon_glamor.c @@ -337,7 +337,6 @@ radeon_glamor_set_pixmap_bo(DrawablePtr drawable, PixmapPtr pixmap) return old; } -#ifdef RADEON_PIXMAP_SHARING static Bool radeon_glamor_share_pixmap_backing(PixmapPtr pixmap, ScreenPtr slave, @@ -404,7 +403,6 @@ radeon_glamor_set_shared_pixmap_backing(PixmapPtr pixmap, void *handle) return TRUE; } -#endif /* RADEON_PIXMAP_SHARING */ Bool radeon_glamor_init(ScreenPtr screen) @@ -463,12 +461,10 @@ radeon_glamor_init(ScreenPtr screen) screen->CreatePixmap = radeon_glamor_create_pixmap; info->glamor.SavedDestroyPixmap = screen->DestroyPixmap; screen->DestroyPixmap = radeon_glamor_destroy_pixmap; -#ifdef RADEON_PIXMAP_SHARING info->glamor.SavedSharePixmapBacking = screen->SharePixmapBacking; screen->SharePixmapBacking = radeon_glamor_share_pixmap_backing; info->glamor.SavedSetSharedPixmapBacking = screen->SetSharedPixmapBacking; screen->SetSharedPixmapBacking = radeon_glamor_set_shared_pixmap_backing; -#endif xf86DrvMsg(scrn->scrnIndex, X_INFO, "Use GLAMOR acceleration.\n"); @@ -485,10 +481,8 @@ radeon_glamor_fini(ScreenPtr screen) screen->CreatePixmap = info->glamor.SavedCreatePixmap; screen->DestroyPixmap = info->glamor.SavedDestroyPixmap; -#ifdef RADEON_PIXMAP_SHARING screen->SharePixmapBacking = info->glamor.SavedSharePixmapBacking; screen->SetSharedPixmapBacking = info->glamor.SavedSetSharedPixmapBacking; -#endif } XF86VideoAdaptorPtr radeon_glamor_xv_init(ScreenPtr pScreen, int num_adapt) diff --git a/src/radeon_glamor.h b/src/radeon_glamor.h index fdc4e577..ec42df1f 100644 --- a/src/radeon_glamor.h +++ b/src/radeon_glamor.h @@ -38,10 +38,6 @@ struct radeon_pixmap; #include "radeon_surface.h" -#ifndef CREATE_PIXMAP_USAGE_SHARED -#define CREATE_PIXMAP_USAGE_SHARED RADEON_CREATE_PIXMAP_DRI2 -#endif - #define RADEON_CREATE_PIXMAP_SHARED(usage) \ (((usage) & ~RADEON_CREATE_PIXMAP_TILING_FLAGS) == RADEON_CREATE_PIXMAP_DRI2 || \ (usage) == CREATE_PIXMAP_USAGE_SHARED) diff --git a/src/radeon_glamor_wrappers.c b/src/radeon_glamor_wrappers.c index 5f165ebe..d7374252 100644 --- a/src/radeon_glamor_wrappers.c +++ b/src/radeon_glamor_wrappers.c @@ -889,7 +889,7 @@ radeon_glamor_triangles(CARD8 op, PicturePtr src, PicturePtr dst, * down our screen private, before calling down to the next CloseScreen. */ static Bool -radeon_glamor_close_screen(CLOSE_SCREEN_ARGS_DECL) +radeon_glamor_close_screen(ScreenPtr pScreen) { RADEONInfoPtr info = RADEONPTR(xf86ScreenToScrn(pScreen)); #ifdef RENDER @@ -917,7 +917,7 @@ radeon_glamor_close_screen(CLOSE_SCREEN_ARGS_DECL) } #endif - return (*pScreen->CloseScreen) (CLOSE_SCREEN_ARGS); + return pScreen->CloseScreen(pScreen); } /** diff --git a/src/radeon_kms.c b/src/radeon_kms.c index 01594c6c..351af995 100644 --- a/src/radeon_kms.c +++ b/src/radeon_kms.c @@ -325,9 +325,7 @@ static Bool RADEONCreateScreenResources_KMS(ScreenPtr pScreen) if (dixPrivateKeyRegistered(rrPrivKey)) { rrScrPrivPtr rrScrPriv = rrGetScrPriv(pScreen); - if (!radeon_is_gpu_screen(pScreen) && - !rrScrPriv->primaryOutput) - { + if (!pScreen->isGPU && !rrScrPriv->primaryOutput) { xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn); rrScrPriv->primaryOutput = xf86_config->output[0]->randr_output; @@ -336,8 +334,7 @@ static Bool RADEONCreateScreenResources_KMS(ScreenPtr pScreen) } } - if (!drmmode_set_desired_modes(pScrn, &info->drmmode, - radeon_is_gpu_screen(pScreen))) + if (!drmmode_set_desired_modes(pScrn, &info->drmmode, pScreen->isGPU)) return FALSE; drmmode_uevent_init(pScrn, &info->drmmode); @@ -366,8 +363,7 @@ static Bool RADEONCreateScreenResources_KMS(ScreenPtr pScreen) radeon_glamor_create_screen_resources(pScreen); info->callback_event_type = -1; - if (!radeon_is_gpu_screen(pScreen) && - (damage_ext = CheckExtension("DAMAGE"))) { + if (!pScreen->isGPU && (damage_ext = CheckExtension("DAMAGE"))) { info->callback_event_type = damage_ext->eventBase + XDamageNotify; if (!AddCallback(&FlushCallback, radeon_flush_callback, pScrn)) @@ -392,15 +388,12 @@ static Bool RADEONCreateScreenResources_KMS(ScreenPtr pScreen) static Bool radeon_scanout_extents_intersect(xf86CrtcPtr xf86_crtc, BoxPtr extents) { -#ifdef RADEON_PIXMAP_SHARING if (xf86_crtc->scrn->is_gpu) { extents->x1 -= xf86_crtc->x; extents->y1 -= xf86_crtc->y; extents->x2 -= xf86_crtc->x; extents->y2 -= xf86_crtc->y; - } else -#endif - { + } else { extents->x1 -= xf86_crtc->filter_width >> 1; extents->x2 += xf86_crtc->filter_width >> 1; extents->y1 -= xf86_crtc->filter_height >> 1; @@ -416,8 +409,6 @@ radeon_scanout_extents_intersect(xf86CrtcPtr xf86_crtc, BoxPtr extents) return (extents->x1 < extents->x2 && extents->y1 < extents->y2); } -#if XF86_CRTC_VERSION >= 4 - static RegionPtr transform_region(RegionPtr region, struct pict_f_transform *transform, int w, int h) @@ -456,8 +447,6 @@ transform_region(RegionPtr region, struct pict_f_transform *transform, return transformed; } -#endif - static void radeon_sync_scanout_pixmaps(xf86CrtcPtr xf86_crtc, RegionPtr new_region, int scanout_id) @@ -487,14 +476,11 @@ radeon_sync_scanout_pixmaps(xf86CrtcPtr xf86_crtc, RegionPtr new_region, if (!radeon_scanout_extents_intersect(xf86_crtc, &extents)) goto uninit; -#if XF86_CRTC_VERSION >= 4 if (xf86_crtc->driverIsPerformingTransform) { sync_region = transform_region(&remaining, &xf86_crtc->f_framebuffer_to_crtc, dst->width, dst->height); - } else -#endif /* XF86_CRTC_VERSION >= 4 */ - { + } else { sync_region = RegionDuplicate(&remaining); RegionTranslate(sync_region, -xf86_crtc->x, -xf86_crtc->y); } @@ -551,7 +537,6 @@ radeon_scanout_flip_handler(xf86CrtcPtr crtc, uint32_t msc, uint64_t usec, #endif } -#ifdef RADEON_PIXMAP_SHARING static RegionPtr dirty_region(PixmapDirtyUpdatePtr dirty) @@ -901,7 +886,7 @@ radeon_dirty_update(ScrnInfoPtr scrn) } } } -#endif + Bool radeon_scanout_do_update(xf86CrtcPtr xf86_crtc, int scanout_id, @@ -932,7 +917,6 @@ radeon_scanout_do_update(xf86CrtcPtr xf86_crtc, int scanout_id, force = info->accel_state->force; info->accel_state->force = TRUE; -#if XF86_CRTC_VERSION >= 4 if (xf86_crtc->driverIsPerformingTransform) { SourceValidateProcPtr SourceValidate = pScreen->SourceValidate; PictFormatPtr format = PictureWindowFormat(pScreen->root); @@ -979,7 +963,6 @@ radeon_scanout_do_update(xf86CrtcPtr xf86_crtc, int scanout_id, FreePicture(src, None); } else out: -#endif /* XF86_CRTC_VERSION >= 4 */ { GCPtr gc = GetScratchGC(pDraw->depth, pScreen); @@ -1148,7 +1131,6 @@ radeon_scanout_flip(ScreenPtr pScreen, RADEONInfoPtr info, static void RADEONBlockHandler_KMS(BLOCKHANDLER_ARGS_DECL) { - SCREEN_PTR(arg); ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); RADEONInfoPtr info = RADEONPTR(pScrn); xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn); @@ -1161,7 +1143,7 @@ static void RADEONBlockHandler_KMS(BLOCKHANDLER_ARGS_DECL) if (!xf86ScreenToScrn(radeon_master_screen(pScreen))->vtSema) return; - if (!radeon_is_gpu_screen(pScreen)) + if (!pScreen->isGPU) { for (c = 0; c < xf86_config->num_crtc; c++) { xf86CrtcPtr crtc = xf86_config->crtc[c]; @@ -1176,9 +1158,7 @@ static void RADEONBlockHandler_KMS(BLOCKHANDLER_ARGS_DECL) radeon_cs_flush_indirect(pScrn); -#ifdef RADEON_PIXMAP_SHARING radeon_dirty_update(pScrn); -#endif } static Bool RADEONIsFastFBWorking(ScrnInfoPtr pScrn) @@ -1618,7 +1598,6 @@ static Bool r600_get_tile_config(ScrnInfoPtr pScrn) static void RADEONSetupCapabilities(ScrnInfoPtr pScrn) { -#ifdef RADEON_PIXMAP_SHARING RADEONEntPtr pRADEONEnt = RADEONEntPriv(pScrn); RADEONInfoPtr info = RADEONPTR(pScrn); uint64_t value; @@ -1640,7 +1619,6 @@ static void RADEONSetupCapabilities(ScrnInfoPtr pScrn) pScrn->capabilities |= RR_Capability_SinkOutput; } } -#endif } /* When the root window is created, initialize the screen contents from @@ -1853,7 +1831,7 @@ Bool RADEONPreInit_KMS(ScrnInfoPtr pScrn, int flags) info->tear_free == 2 ? "auto" : (info->tear_free ? "on" : "off")); } - if (!radeon_is_gpu_scrn(pScrn)) { + if (!pScrn->is_gpu) { if (info->dri2.pKernelDRMVersion->version_minor >= 8) { Bool sw_cursor = xf86ReturnOptValBool(info->Options, OPTION_SW_CURSOR, FALSE); @@ -2106,7 +2084,7 @@ static void radeon_drop_drm_master(ScrnInfoPtr pScrn) * text mode, unmap video memory, and unwrap and call the saved * CloseScreen function. */ -static Bool RADEONCloseScreen_KMS(CLOSE_SCREEN_ARGS_DECL) +static Bool RADEONCloseScreen_KMS(ScreenPtr pScreen) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); RADEONInfoPtr info = RADEONPTR(pScrn); @@ -2150,13 +2128,12 @@ static Bool RADEONCloseScreen_KMS(CLOSE_SCREEN_ARGS_DECL) xf86ClearPrimInitDone(info->pEnt->index); pScreen->BlockHandler = info->BlockHandler; pScreen->CloseScreen = info->CloseScreen; - return (*pScreen->CloseScreen)(CLOSE_SCREEN_ARGS); + return pScreen->CloseScreen(pScreen); } -void RADEONFreeScreen_KMS(FREE_SCREEN_ARGS_DECL) +void RADEONFreeScreen_KMS(ScrnInfoPtr pScrn) { - SCRN_INFO_PTR(arg); RADEONInfoPtr info = RADEONPTR(pScrn); xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, RADEON_LOGLEVEL_DEBUG, @@ -2168,7 +2145,7 @@ void RADEONFreeScreen_KMS(FREE_SCREEN_ARGS_DECL) RADEONFreeRec(pScrn); } -Bool RADEONScreenInit_KMS(SCREEN_INIT_ARGS_DECL) +Bool RADEONScreenInit_KMS(ScreenPtr pScreen, int argc, char **argv) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); RADEONEntPtr pRADEONEnt = RADEONEntPriv(pScrn); @@ -2287,7 +2264,7 @@ Bool RADEONScreenInit_KMS(SCREEN_INIT_ARGS_DECL) } #endif - if (!radeon_is_gpu_screen(pScreen)) { + if (!pScreen->isGPU) { if (xorgGetVersion() >= XORG_VERSION_NUMERIC(1,18,3,0,0)) value = info->use_glamor; else @@ -2370,8 +2347,7 @@ Bool RADEONScreenInit_KMS(SCREEN_INIT_ARGS_DECL) */ /* xf86DiDGAInit(pScreen, info->LinearAddr + pScrn->fbOffset); */ #endif - if (info->r600_shadow_fb == FALSE && - !radeon_is_gpu_screen(pScreen)) { + if (info->r600_shadow_fb == FALSE && !pScreen->isGPU) { /* Init Xv */ xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, RADEON_LOGLEVEL_DEBUG, "Initializing Xv\n"); @@ -2387,7 +2363,7 @@ Bool RADEONScreenInit_KMS(SCREEN_INIT_ARGS_DECL) } pScrn->pScreen = pScreen; - if (!radeon_is_gpu_screen(pScreen)) { + if (!pScreen->isGPU) { if (serverGeneration == 1 && bgNoneRoot && info->accelOn) { info->CreateWindow = pScreen->CreateWindow; pScreen->CreateWindow = RADEONCreateWindow_oneshot; @@ -2407,13 +2383,11 @@ Bool RADEONScreenInit_KMS(SCREEN_INIT_ARGS_DECL) info->CreateScreenResources = pScreen->CreateScreenResources; pScreen->CreateScreenResources = RADEONCreateScreenResources_KMS; -#ifdef RADEON_PIXMAP_SHARING pScreen->StartPixmapTracking = PixmapStartDirtyTracking; pScreen->StopPixmapTracking = PixmapStopDirtyTracking; #if HAS_SYNC_SHARED_PIXMAP pScreen->SyncSharedPixmap = radeon_sync_shared_pixmap; #endif -#endif if (!xf86CrtcScreenInit (pScreen)) return FALSE; @@ -2440,9 +2414,8 @@ Bool RADEONScreenInit_KMS(SCREEN_INIT_ARGS_DECL) return TRUE; } -Bool RADEONEnterVT_KMS(VT_FUNC_ARGS_DECL) +Bool RADEONEnterVT_KMS(ScrnInfoPtr pScrn) { - SCRN_INFO_PTR(arg); RADEONInfoPtr info = RADEONPTR(pScrn); xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, RADEON_LOGLEVEL_DEBUG, @@ -2497,9 +2470,8 @@ pixmap_unref_fb(void *value, XID id, void *cdata) drmmode_fb_reference(pRADEONEnt->fd, fb_ptr, NULL); } -void RADEONLeaveVT_KMS(VT_FUNC_ARGS_DECL) +void RADEONLeaveVT_KMS(ScrnInfoPtr pScrn) { - SCRN_INFO_PTR(arg); RADEONInfoPtr info = RADEONPTR(pScrn); RADEONEntPtr pRADEONEnt = RADEONEntPriv(pScrn); ScreenPtr pScreen = pScrn->pScreen; @@ -2595,18 +2567,16 @@ void RADEONLeaveVT_KMS(VT_FUNC_ARGS_DECL) } -Bool RADEONSwitchMode_KMS(SWITCH_MODE_ARGS_DECL) +Bool RADEONSwitchMode_KMS(ScrnInfoPtr pScrn, DisplayModePtr mode) { - SCRN_INFO_PTR(arg); Bool ret; ret = xf86SetSingleMode (pScrn, mode, RR_Rotate_0); return ret; } -void RADEONAdjustFrame_KMS(ADJUST_FRAME_ARGS_DECL) +void RADEONAdjustFrame_KMS(ScrnInfoPtr pScrn, int x, int y) { - SCRN_INFO_PTR(arg); RADEONInfoPtr info = RADEONPTR(pScrn); drmmode_adjust_frame(pScrn, &info->drmmode, x, y); return; @@ -2799,10 +2769,9 @@ void radeon_kms_update_vram_limit(ScrnInfoPtr pScrn, uint32_t new_fb_size) } /* Used to disallow modes that are not supported by the hardware */ -ModeStatus RADEONValidMode(SCRN_ARG_TYPE arg, DisplayModePtr mode, +ModeStatus RADEONValidMode(ScrnInfoPtr pScrn, DisplayModePtr mode, Bool verbose, int flag) { - SCRN_INFO_PTR(arg); RADEONInfoPtr info = RADEONPTR(pScrn); RADEONEntPtr pRADEONEnt = RADEONEntPriv(pScrn); diff --git a/src/radeon_list.h b/src/radeon_list.h deleted file mode 100644 index f9e4ff73..00000000 --- a/src/radeon_list.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright © 2015 Advanced Micro Devices, Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#ifndef _RADEON_LIST_H_ -#define _RADEON_LIST_H_ - -#include <xorg-server.h> -#include <list.h> - -#if !HAVE_XORG_LIST -#define xorg_list list -#define xorg_list_init list_init -#define xorg_list_is_empty list_is_empty -#define xorg_list_add list_add -#define xorg_list_del list_del -#define xorg_list_for_each_entry list_for_each_entry -#define xorg_list_for_each_entry_safe list_for_each_entry_safe - -static inline void -xorg_list_append(struct list *entry, struct list *head) -{ - __list_add(entry, head->prev, head); -} - -#endif - -#endif /* _RADEON_LIST_H_ */ diff --git a/src/radeon_probe.h b/src/radeon_probe.h index 9e50c811..be82f9ae 100644 --- a/src/radeon_probe.h +++ b/src/radeon_probe.h @@ -151,13 +151,13 @@ typedef struct extern const OptionInfoRec *RADEONOptionsWeak(void); extern Bool RADEONPreInit_KMS(ScrnInfoPtr, int); -extern Bool RADEONScreenInit_KMS(SCREEN_INIT_ARGS_DECL); -extern Bool RADEONSwitchMode_KMS(SWITCH_MODE_ARGS_DECL); -extern void RADEONAdjustFrame_KMS(ADJUST_FRAME_ARGS_DECL); -extern Bool RADEONEnterVT_KMS(VT_FUNC_ARGS_DECL); -extern void RADEONLeaveVT_KMS(VT_FUNC_ARGS_DECL); -extern void RADEONFreeScreen_KMS(FREE_SCREEN_ARGS_DECL); +extern Bool RADEONScreenInit_KMS(ScreenPtr pScreen, int argc, char **argv); +extern Bool RADEONSwitchMode_KMS(ScrnInfoPtr pScrn, DisplayModePtr mode); +extern void RADEONAdjustFrame_KMS(ScrnInfoPtr pScrn, int x, int y); +extern Bool RADEONEnterVT_KMS(ScrnInfoPtr pScrn); +extern void RADEONLeaveVT_KMS(ScrnInfoPtr pScrn); +extern void RADEONFreeScreen_KMS(ScrnInfoPtr pScrn); -extern ModeStatus RADEONValidMode(SCRN_ARG_TYPE arg, DisplayModePtr mode, - Bool verbose, int flag); +extern ModeStatus RADEONValidMode(ScrnInfoPtr pScrn, DisplayModePtr mode, + Bool verbose, int flag); #endif /* _RADEON_PROBE_H_ */ |