intel_options.c revision 42542f5f
103b705cfSriastradh#ifdef HAVE_CONFIG_H
203b705cfSriastradh#include "config.h"
303b705cfSriastradh#endif
403b705cfSriastradh
503b705cfSriastradh#include "intel_options.h"
603b705cfSriastradh
703b705cfSriastradhconst OptionInfoRec intel_options[] = {
803b705cfSriastradh	{OPTION_ACCEL_DISABLE,	"NoAccel",	OPTV_BOOLEAN,	{0},	0},
903b705cfSriastradh	{OPTION_ACCEL_METHOD,	"AccelMethod",	OPTV_STRING,	{0},	0},
1003b705cfSriastradh	{OPTION_BACKLIGHT,	"Backlight",	OPTV_STRING,	{0},	0},
1103b705cfSriastradh	{OPTION_DRI,		"DRI",		OPTV_STRING,	{0},	0},
1242542f5fSchristos	{OPTION_PRESENT,	"Present",	OPTV_BOOLEAN,	{0},	1},
1303b705cfSriastradh	{OPTION_COLOR_KEY,	"ColorKey",	OPTV_INTEGER,	{0},	0},
1403b705cfSriastradh	{OPTION_VIDEO_KEY,	"VideoKey",	OPTV_INTEGER,	{0},	0},
1503b705cfSriastradh	{OPTION_TILING_2D,	"Tiling",	OPTV_BOOLEAN,	{0},	1},
1603b705cfSriastradh	{OPTION_TILING_FB,	"LinearFramebuffer",	OPTV_BOOLEAN,	{0},	0},
1742542f5fSchristos	{OPTION_VSYNC,		"VSync",	OPTV_BOOLEAN,	{0},	1},
1842542f5fSchristos	{OPTION_PAGEFLIP,	"PageFlip",	OPTV_BOOLEAN,	{0},	1},
1903b705cfSriastradh	{OPTION_SWAPBUFFERS_WAIT, "SwapbuffersWait", OPTV_BOOLEAN,	{0},	1},
2003b705cfSriastradh	{OPTION_TRIPLE_BUFFER,	"TripleBuffer", OPTV_BOOLEAN,	{0},	1},
2103b705cfSriastradh	{OPTION_PREFER_OVERLAY, "XvPreferOverlay", OPTV_BOOLEAN, {0}, 0},
2203b705cfSriastradh	{OPTION_HOTPLUG,	"HotPlug",	OPTV_BOOLEAN,	{0},	1},
2303b705cfSriastradh	{OPTION_REPROBE,	"ReprobeOutputs", OPTV_BOOLEAN,	{0},	0},
2442542f5fSchristos	{OPTION_DELETE_DP12,	"DeleteUnusedDP12Displays", OPTV_BOOLEAN,	{0},	0},
2503b705cfSriastradh#ifdef INTEL_XVMC
2642542f5fSchristos	{OPTION_XVMC,		"XvMC",		OPTV_BOOLEAN,	{0},	1},
2703b705cfSriastradh#endif
2803b705cfSriastradh#ifdef USE_SNA
2903b705cfSriastradh	{OPTION_ZAPHOD,		"ZaphodHeads",	OPTV_STRING,	{0},	0},
3042542f5fSchristos	{OPTION_VIRTUAL,	"VirtualHeads",	OPTV_INTEGER,	{0},	0},
3103b705cfSriastradh	{OPTION_TEAR_FREE,	"TearFree",	OPTV_BOOLEAN,	{0},	0},
3203b705cfSriastradh	{OPTION_CRTC_PIXMAPS,	"PerCrtcPixmaps", OPTV_BOOLEAN,	{0},	0},
3303b705cfSriastradh#endif
3403b705cfSriastradh#ifdef USE_UXA
3503b705cfSriastradh	{OPTION_FALLBACKDEBUG,	"FallbackDebug",OPTV_BOOLEAN,	{0},	0},
3603b705cfSriastradh	{OPTION_DEBUG_FLUSH_BATCHES, "DebugFlushBatches", OPTV_BOOLEAN, {0}, 0},
3703b705cfSriastradh	{OPTION_DEBUG_FLUSH_CACHES, "DebugFlushCaches", OPTV_BOOLEAN, {0}, 0},
3803b705cfSriastradh	{OPTION_DEBUG_WAIT, "DebugWait", OPTV_BOOLEAN, {0}, 0},
3903b705cfSriastradh	{OPTION_BUFFER_CACHE,	"BufferCache",	OPTV_BOOLEAN,   {0},    1},
4003b705cfSriastradh#endif
4103b705cfSriastradh	{-1,			NULL,		OPTV_NONE,	{0},	0}
4203b705cfSriastradh};
4303b705cfSriastradh
4403b705cfSriastradhOptionInfoPtr intel_options_get(ScrnInfoPtr scrn)
4503b705cfSriastradh{
4603b705cfSriastradh	OptionInfoPtr options;
4703b705cfSriastradh
4803b705cfSriastradh	xf86CollectOptions(scrn, NULL);
4903b705cfSriastradh	if (!(options = malloc(sizeof(intel_options))))
5003b705cfSriastradh		return NULL;
5103b705cfSriastradh
5203b705cfSriastradh	memcpy(options, intel_options, sizeof(intel_options));
5303b705cfSriastradh	xf86ProcessOptions(scrn->scrnIndex, scrn->options, options);
5403b705cfSriastradh
5503b705cfSriastradh	return options;
5603b705cfSriastradh}
57