diff options
author | Michel Dänzer <michel.daenzer@amd.com> | 2015-03-05 18:40:23 +0900 |
---|---|---|
committer | Michel Dänzer <michel@daenzer.net> | 2015-03-17 11:00:13 +0900 |
commit | 4b8adebb80158bcf81ada83bb88517febe931b12 (patch) | |
tree | 2284b053ed5a35850848fdf97ee3ae4c6140bcf8 /src | |
parent | 76c2923ac5c7230a8b2f9f8329c308d28b44d9c0 (diff) |
Move #include "radeon_glamor.h" from radeon.h to where it's needed
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/drmmode_display.c | 1 | ||||
-rw-r--r-- | src/radeon.h | 36 | ||||
-rw-r--r-- | src/radeon_accel.c | 1 | ||||
-rw-r--r-- | src/radeon_dri2.c | 4 | ||||
-rw-r--r-- | src/radeon_glamor.c | 3 | ||||
-rw-r--r-- | src/radeon_glamor.h | 31 | ||||
-rw-r--r-- | src/radeon_kms.c | 1 | ||||
-rw-r--r-- | src/radeon_video.c | 1 |
8 files changed, 43 insertions, 35 deletions
diff --git a/src/drmmode_display.c b/src/drmmode_display.c index bb3d9895..86bc446a 100644 --- a/src/drmmode_display.c +++ b/src/drmmode_display.c @@ -36,6 +36,7 @@ #include "micmap.h" #include "xf86cmap.h" #include "radeon.h" +#include "radeon_glamor.h" #include "radeon_reg.h" #include "drmmode_display.h" diff --git a/src/radeon.h b/src/radeon.h index 88a0bd50..e503cbb3 100644 --- a/src/radeon.h +++ b/src/radeon.h @@ -51,8 +51,6 @@ #include "exa.h" -#include "radeon_glamor.h" - /* Exa and Cursor Support */ #include "xf86Cursor.h" @@ -242,6 +240,40 @@ typedef enum { #define CURSOR_WIDTH_CIK 128 #define CURSOR_HEIGHT_CIK 128 + +#ifdef USE_GLAMOR + +struct radeon_pixmap { + struct radeon_surface surface; + struct radeon_bo *bo; + + uint32_t tiling_flags; + int stride; +}; + +#if HAS_DEVPRIVATEKEYREC +extern DevPrivateKeyRec glamor_pixmap_index; +#else +extern int glamor_pixmap_index; +#endif + +static inline struct radeon_pixmap *radeon_get_pixmap_private(PixmapPtr pixmap) +{ +#if HAS_DEVPRIVATEKEYREC + return dixGetPrivate(&pixmap->devPrivates, &glamor_pixmap_index); +#else + return dixLookupPrivate(&pixmap->devPrivates, &glamor_pixmap_index); +#endif +} + +static inline void radeon_set_pixmap_private(PixmapPtr pixmap, struct radeon_pixmap *priv) +{ + dixSetPrivate(&pixmap->devPrivates, &glamor_pixmap_index, priv); +} + +#endif /* USE_GLAMOR */ + + struct radeon_exa_pixmap_priv { struct radeon_bo *bo; uint32_t tiling_flags; diff --git a/src/radeon_accel.c b/src/radeon_accel.c index 8eff5c52..1def2a3f 100644 --- a/src/radeon_accel.c +++ b/src/radeon_accel.c @@ -78,6 +78,7 @@ #include <assert.h> /* Driver data structures */ #include "radeon.h" +#include "radeon_glamor.h" #include "radeon_reg.h" #include "r600_reg.h" #include "radeon_probe.h" diff --git a/src/radeon_dri2.c b/src/radeon_dri2.c index 0577d8fe..02e8e8f6 100644 --- a/src/radeon_dri2.c +++ b/src/radeon_dri2.c @@ -53,9 +53,7 @@ #define FALLBACK_SWAP_DELAY 16 -#ifdef USE_GLAMOR -#include <glamor.h> -#endif +#include "radeon_glamor.h" typedef DRI2BufferPtr BufferPtr; diff --git a/src/radeon_glamor.c b/src/radeon_glamor.c index 210ddcf2..950f8916 100644 --- a/src/radeon_glamor.c +++ b/src/radeon_glamor.c @@ -29,11 +29,10 @@ #endif #include <xf86.h> -#define GLAMOR_FOR_XORG 1 -#include <glamor.h> #include "radeon.h" #include "radeon_bo_helper.h" +#include "radeon_glamor.h" #if HAS_DEVPRIVATEKEYREC DevPrivateKeyRec glamor_pixmap_index; diff --git a/src/radeon_glamor.h b/src/radeon_glamor.h index 36addd70..548ea989 100644 --- a/src/radeon_glamor.h +++ b/src/radeon_glamor.h @@ -30,6 +30,9 @@ #include "xf86xv.h" #ifdef USE_GLAMOR +#define GLAMOR_FOR_XORG 1 +#include <glamor.h> + #include "radeon_surface.h" Bool radeon_glamor_pre_init(ScrnInfoPtr scrn); @@ -46,34 +49,6 @@ Bool radeon_glamor_pixmap_is_offscreen(PixmapPtr pixmap); XF86VideoAdaptorPtr radeon_glamor_xv_init(ScreenPtr pScreen, int num_adapt); -struct radeon_pixmap { - struct radeon_surface surface; - struct radeon_bo *bo; - - uint32_t tiling_flags; - int stride; -}; - -#if HAS_DEVPRIVATEKEYREC -extern DevPrivateKeyRec glamor_pixmap_index; -#else -extern int glamor_pixmap_index; -#endif - -static inline struct radeon_pixmap *radeon_get_pixmap_private(PixmapPtr pixmap) -{ -#if HAS_DEVPRIVATEKEYREC - return dixGetPrivate(&pixmap->devPrivates, &glamor_pixmap_index); -#else - return dixLookupPrivate(&pixmap->devPrivates, &glamor_pixmap_index); -#endif -} - -static inline void radeon_set_pixmap_private(PixmapPtr pixmap, struct radeon_pixmap *priv) -{ - dixSetPrivate(&pixmap->devPrivates, &glamor_pixmap_index, priv); -} - #else static inline Bool radeon_glamor_pre_init(ScrnInfoPtr scrn) { return FALSE; } diff --git a/src/radeon_kms.c b/src/radeon_kms.c index ced35947..23c06943 100644 --- a/src/radeon_kms.c +++ b/src/radeon_kms.c @@ -33,6 +33,7 @@ /* Driver data structures */ #include "radeon.h" #include "radeon_drm_queue.h" +#include "radeon_glamor.h" #include "radeon_reg.h" #include "radeon_probe.h" #include "micmap.h" diff --git a/src/radeon_video.c b/src/radeon_video.c index cbfd554b..f66ba559 100644 --- a/src/radeon_video.c +++ b/src/radeon_video.c @@ -9,6 +9,7 @@ #include <math.h> #include "radeon.h" +#include "radeon_glamor.h" #include "radeon_reg.h" #include "radeon_probe.h" #include "radeon_video.h" |