intel_options.c revision 03b705cf
1#ifdef HAVE_CONFIG_H
2#include "config.h"
3#endif
4
5#include "intel_options.h"
6
7const OptionInfoRec intel_options[] = {
8	{OPTION_ACCEL_DISABLE,	"NoAccel",	OPTV_BOOLEAN,	{0},	0},
9	{OPTION_ACCEL_METHOD,	"AccelMethod",	OPTV_STRING,	{0},	0},
10	{OPTION_BACKLIGHT,	"Backlight",	OPTV_STRING,	{0},	0},
11	{OPTION_DRI,		"DRI",		OPTV_STRING,	{0},	0},
12	{OPTION_COLOR_KEY,	"ColorKey",	OPTV_INTEGER,	{0},	0},
13	{OPTION_VIDEO_KEY,	"VideoKey",	OPTV_INTEGER,	{0},	0},
14	{OPTION_TILING_2D,	"Tiling",	OPTV_BOOLEAN,	{0},	1},
15	{OPTION_TILING_FB,	"LinearFramebuffer",	OPTV_BOOLEAN,	{0},	0},
16	{OPTION_SWAPBUFFERS_WAIT, "SwapbuffersWait", OPTV_BOOLEAN,	{0},	1},
17	{OPTION_TRIPLE_BUFFER,	"TripleBuffer", OPTV_BOOLEAN,	{0},	1},
18	{OPTION_PREFER_OVERLAY, "XvPreferOverlay", OPTV_BOOLEAN, {0}, 0},
19	{OPTION_HOTPLUG,	"HotPlug",	OPTV_BOOLEAN,	{0},	1},
20	{OPTION_REPROBE,	"ReprobeOutputs", OPTV_BOOLEAN,	{0},	0},
21#ifdef INTEL_XVMC
22	{OPTION_XVMC,	"XvMC",		OPTV_BOOLEAN,	{0},	1},
23#endif
24#ifdef USE_SNA
25	{OPTION_ZAPHOD,		"ZaphodHeads",	OPTV_STRING,	{0},	0},
26	{OPTION_TEAR_FREE,	"TearFree",	OPTV_BOOLEAN,	{0},	0},
27	{OPTION_CRTC_PIXMAPS,	"PerCrtcPixmaps", OPTV_BOOLEAN,	{0},	0},
28#endif
29#ifdef USE_UXA
30	{OPTION_FALLBACKDEBUG,	"FallbackDebug",OPTV_BOOLEAN,	{0},	0},
31	{OPTION_DEBUG_FLUSH_BATCHES, "DebugFlushBatches", OPTV_BOOLEAN, {0}, 0},
32	{OPTION_DEBUG_FLUSH_CACHES, "DebugFlushCaches", OPTV_BOOLEAN, {0}, 0},
33	{OPTION_DEBUG_WAIT, "DebugWait", OPTV_BOOLEAN, {0}, 0},
34	{OPTION_BUFFER_CACHE,	"BufferCache",	OPTV_BOOLEAN,   {0},    1},
35#endif
36	{-1,			NULL,		OPTV_NONE,	{0},	0}
37};
38
39OptionInfoPtr intel_options_get(ScrnInfoPtr scrn)
40{
41	OptionInfoPtr options;
42
43	xf86CollectOptions(scrn, NULL);
44	if (!(options = malloc(sizeof(intel_options))))
45		return NULL;
46
47	memcpy(options, intel_options, sizeof(intel_options));
48	xf86ProcessOptions(scrn->scrnIndex, scrn->options, options);
49
50	return options;
51}
52