diff options
author | Dave Airlie <airlied@redhat.com> | 2012-06-05 17:09:38 +0100 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2012-07-06 10:35:13 +0100 |
commit | 9d179818293b466ec6f1777f0b792e1fbbeb318c (patch) | |
tree | b89b6f76f3097a5408e6281f0671537de41c9ece /include | |
parent | 3478af3374abffa0c226ee077fda1fcfc0751e74 (diff) |
dix: introduce gpu screens. (v5)
This patch introduces gpu screens into screenInfo. It adds interfaces
for adding and removing gpu screens, along with adding private fixup,
block handler support, and scratch pixmap init.
GPU screens have a myNum that is offset by GPU_SCREEN_OFFSET (256),
this is used for logging etc.
RemoveGPUScreen isn't used until "xfree86: add platform bus hotplug support".
v2: no glyph pictures for GPU screens for now.
v3: introduce MAXGPUSCREENS, fix return value check
v4: fixup myNum when renumbering screens (ajax)
v5: drop cursor privates for now.
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/misc.h | 4 | ||||
-rw-r--r-- | include/screenint.h | 9 | ||||
-rw-r--r-- | include/scrnintstr.h | 4 |
3 files changed, 17 insertions, 0 deletions
diff --git a/include/misc.h b/include/misc.h index aa62f6a3a..6bea82f33 100644 --- a/include/misc.h +++ b/include/misc.h @@ -83,10 +83,14 @@ OF THIS SOFTWARE. #ifndef MAXSCREENS #define MAXSCREENS 16 #endif +#ifndef MAXGPUSCREENS +#define MAXGPUSCREENS 16 +#endif #define MAXCLIENTS 256 #define MAXEXTENSIONS 128 #define MAXFORMATS 8 #define MAXDEVICES 40 /* input devices */ +#define GPU_SCREEN_OFFSET 256 /* 128 event opcodes for core + extension events, excluding GE */ #define MAXEVENTS 128 diff --git a/include/screenint.h b/include/screenint.h index 6b0cc70ee..8205f6363 100644 --- a/include/screenint.h +++ b/include/screenint.h @@ -62,6 +62,15 @@ extern _X_EXPORT int AddScreen(Bool (* /*pfnInit */ )( int /*argc */ , char ** /*argv */ ); + +extern _X_EXPORT int AddGPUScreen(Bool (*pfnInit) (ScreenPtr /*pScreen */ , + int /*argc */ , + char ** /*argv */ + ), + int argc, char **argv); + +extern _X_EXPORT void RemoveGPUScreen(ScreenPtr pScreen); + typedef struct _ColormapRec *ColormapPtr; #endif /* SCREENINT_H */ diff --git a/include/scrnintstr.h b/include/scrnintstr.h index 7af2bf53f..bcac47558 100644 --- a/include/scrnintstr.h +++ b/include/scrnintstr.h @@ -477,6 +477,8 @@ typedef struct _Screen { * malicious users to steal framebuffer's content if that would be the * default */ Bool canDoBGNoneRoot; + + Bool isGPU; } ScreenRec; static inline RegionPtr @@ -494,6 +496,8 @@ typedef struct _ScreenInfo { PixmapFormatRec formats[MAXFORMATS]; int numScreens; ScreenPtr screens[MAXSCREENS]; + int numGPUScreens; + ScreenPtr gpuscreens[MAXGPUSCREENS]; int x; /* origin */ int y; /* origin */ int width; /* total width of all screens together */ |