diff options
author | Tudor Florea <tudor.florea@enea.com> | 2015-10-08 22:51:41 +0200 |
---|---|---|
committer | Tudor Florea <tudor.florea@enea.com> | 2015-10-08 22:51:41 +0200 |
commit | 1219bf8a90a7bf8cd3a5363551ef635d51e8fc8e (patch) | |
tree | a21a5fc103bb3bd65ecd85ed22be5228fc54e447 /meta-oe/recipes-graphics/xorg-driver | |
download | meta-openembedded-1219bf8a90a7bf8cd3a5363551ef635d51e8fc8e.tar.gz |
initial commit for Enea Linux 5.0 arm
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'meta-oe/recipes-graphics/xorg-driver')
19 files changed, 1015 insertions, 0 deletions
diff --git a/meta-oe/recipes-graphics/xorg-driver/xf86-input-mtev/fix-it.patch b/meta-oe/recipes-graphics/xorg-driver/xf86-input-mtev/fix-it.patch new file mode 100644 index 000000000..771a2a8e1 --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-driver/xf86-input-mtev/fix-it.patch | |||
@@ -0,0 +1,153 @@ | |||
1 | diff --git a/src/multitouch.c b/src/multitouch.c | ||
2 | index c55d742..4a8192d 100644 | ||
3 | --- a/src/multitouch.c | ||
4 | +++ b/src/multitouch.c | ||
5 | @@ -114,7 +114,7 @@ static int init_properties(DeviceIntPtr dev) | ||
6 | return Success; | ||
7 | } | ||
8 | |||
9 | -static int device_init(DeviceIntPtr dev, LocalDevicePtr local) | ||
10 | +static int device_init(DeviceIntPtr dev, InputInfoPtr local) | ||
11 | { | ||
12 | struct mtev_mtouch *mt = local->private; | ||
13 | Atom atom; | ||
14 | @@ -222,7 +222,7 @@ static int device_init(DeviceIntPtr dev, LocalDevicePtr local) | ||
15 | xf86InitValuatorAxisStruct(dev, val, axes_labels[val], | ||
16 | min, | ||
17 | max, | ||
18 | - 1, 0, 1); | ||
19 | + 1, 0, 1,Absolute); | ||
20 | xf86InitValuatorDefaults(dev, val); | ||
21 | } | ||
22 | } | ||
23 | @@ -232,7 +232,7 @@ static int device_init(DeviceIntPtr dev, LocalDevicePtr local) | ||
24 | return Success; | ||
25 | } | ||
26 | |||
27 | -static int device_on(LocalDevicePtr local) | ||
28 | +static int device_on(InputInfoPtr local) | ||
29 | { | ||
30 | struct mtev_mtouch *mt = local->private; | ||
31 | local->fd = xf86OpenSerial(local->options); | ||
32 | @@ -248,7 +248,7 @@ static int device_on(LocalDevicePtr local) | ||
33 | return Success; | ||
34 | } | ||
35 | |||
36 | -static int device_off(LocalDevicePtr local) | ||
37 | +static int device_off(InputInfoPtr local) | ||
38 | { | ||
39 | struct mtev_mtouch *mt = local->private; | ||
40 | xf86RemoveEnabledDevice(local); | ||
41 | @@ -259,12 +259,12 @@ static int device_off(LocalDevicePtr local) | ||
42 | return Success; | ||
43 | } | ||
44 | |||
45 | -static int device_close(LocalDevicePtr local) | ||
46 | +static int device_close(InputInfoPtr local) | ||
47 | { | ||
48 | return Success; | ||
49 | } | ||
50 | |||
51 | -static void process_state(LocalDevicePtr local, | ||
52 | +static void process_state(InputInfoPtr local, | ||
53 | const struct mtev_mtouch *mt) | ||
54 | { | ||
55 | |||
56 | @@ -321,22 +321,22 @@ static void process_state(LocalDevicePtr local, | ||
57 | } | ||
58 | |||
59 | /* Some x-clients assume they get motion events before button down */ | ||
60 | + xf86Msg(X_INFO,"down %d|pdown %d\n", down, pdown); | ||
61 | if (down) | ||
62 | xf86PostMotionEventP(local->dev, TRUE, | ||
63 | 0, down * MT_AXIS_PER_FINGER, valuators); | ||
64 | - | ||
65 | if(down && pdown == 0) | ||
66 | xf86PostButtonEventP(local->dev, TRUE, | ||
67 | 1, 1, | ||
68 | 0, down * MT_AXIS_PER_FINGER, valuators); | ||
69 | - else if (down == 0 && pdown) | ||
70 | - xf86PostButtonEvent(local->dev, TRUE, 1, 0, 0, 0); | ||
71 | - | ||
72 | + else if (down == 0 && pdown){ | ||
73 | + xf86PostButtonEvent(local->dev, TRUE, 1, 1, 0, 0); | ||
74 | + } | ||
75 | pdown = !!down; | ||
76 | } | ||
77 | |||
78 | /* called for each full received packet from the touchpad */ | ||
79 | -static void read_input(LocalDevicePtr local) | ||
80 | +static void read_input(InputInfoPtr local) | ||
81 | { | ||
82 | struct mtev_mtouch *mt = local->private; | ||
83 | while (mtouch_read_synchronized_event(mt, local->fd)) { | ||
84 | @@ -346,7 +346,7 @@ static void read_input(LocalDevicePtr local) | ||
85 | |||
86 | static Bool device_control(DeviceIntPtr dev, int mode) | ||
87 | { | ||
88 | - LocalDevicePtr local = dev->public.devicePrivate; | ||
89 | + InputInfoPtr local = dev->public.devicePrivate; | ||
90 | switch (mode) { | ||
91 | case DEVICE_INIT: | ||
92 | xf86Msg(X_INFO, "device control: init\n"); | ||
93 | @@ -366,39 +366,29 @@ static Bool device_control(DeviceIntPtr dev, int mode) | ||
94 | } | ||
95 | } | ||
96 | |||
97 | -static InputInfoPtr preinit(InputDriverPtr drv, IDevPtr dev, int flags) | ||
98 | +static InputInfoPtr preinit(InputDriverPtr drv, InputInfoPtr pInfo, int flags) | ||
99 | { | ||
100 | struct mtev_mtouch *mt; | ||
101 | - InputInfoPtr local = xf86AllocateInput(drv, 0); | ||
102 | - if (!local) | ||
103 | - goto error; | ||
104 | + int rc; | ||
105 | + | ||
106 | mt = calloc(1, sizeof(struct mtev_mtouch)); | ||
107 | + | ||
108 | if (!mt) | ||
109 | goto error; | ||
110 | |||
111 | - local->name = dev->identifier; | ||
112 | - local->type_name = XI_TOUCHSCREEN; | ||
113 | - local->device_control = device_control; | ||
114 | - local->read_input = read_input; | ||
115 | - local->private = mt; | ||
116 | - local->flags = XI86_POINTER_CAPABLE | | ||
117 | - XI86_SEND_DRAG_EVENTS; | ||
118 | - | ||
119 | - local->conf_idev = dev; | ||
120 | - | ||
121 | - xf86CollectInputOptions(local, NULL, NULL); | ||
122 | - //xf86OptionListReport(local->options); | ||
123 | - xf86ProcessCommonOptions(local, local->options); | ||
124 | + pInfo->private = mt; | ||
125 | + pInfo->type_name = "UNKNOWN"; | ||
126 | + pInfo->device_control = device_control; | ||
127 | + pInfo->read_input = read_input; | ||
128 | |||
129 | + mt->swap_xy = xf86SetBoolOption(pInfo->options, "SwapAxes", FALSE); | ||
130 | + mt->invert_x = xf86SetBoolOption(pInfo->options, "InvertX", FALSE); | ||
131 | + mt->invert_y = xf86SetBoolOption(pInfo->options, "InvertY", FALSE); | ||
132 | |||
133 | - mt->swap_xy = xf86SetBoolOption(local->options, "SwapAxes", FALSE); | ||
134 | - mt->invert_x = xf86SetBoolOption(local->options, "InvertX", FALSE); | ||
135 | - mt->invert_y = xf86SetBoolOption(local->options, "InvertY", FALSE); | ||
136 | - | ||
137 | - local->flags |= XI86_CONFIGURED; | ||
138 | + return Success; | ||
139 | |||
140 | error: | ||
141 | - return local; | ||
142 | + return !Success; | ||
143 | } | ||
144 | |||
145 | static void uninit(InputDriverPtr drv, InputInfoPtr local, int flags) | ||
146 | @@ -415,7 +405,6 @@ static InputDriverRec MTEV = { | ||
147 | .PreInit = preinit, | ||
148 | .UnInit = uninit, | ||
149 | .module = NULL, | ||
150 | - .refCount = 0 | ||
151 | }; | ||
152 | |||
153 | static XF86ModuleVersionInfo VERSION = { | ||
diff --git a/meta-oe/recipes-graphics/xorg-driver/xf86-input-mtev_git.bb b/meta-oe/recipes-graphics/xorg-driver/xf86-input-mtev_git.bb new file mode 100644 index 000000000..547ec86c1 --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-driver/xf86-input-mtev_git.bb | |||
@@ -0,0 +1,22 @@ | |||
1 | require recipes-graphics/xorg-driver/xorg-driver-input.inc | ||
2 | SUMMARY = "X.Org X server -- multitouch input driver" | ||
3 | LICENSE = "GPLv2+" | ||
4 | LIC_FILES_CHKSUM = "file://COPYING;md5=8a71d0475d08eee76d8b6d0c6dbec543" | ||
5 | |||
6 | DEPENDS += "pixman" | ||
7 | |||
8 | PNBLACKLIST[xf86-input-mtev] ?= "BROKEN: doesn't build with B!=S (Makefile without ${S} in sed call)" | ||
9 | |||
10 | SRC_URI = "git://gitorious.org/xorg/xf86-input-mtev.git file://fix-it.patch" | ||
11 | SRCREV = "1eb469166ffc095c5801475f057f911f97a6e641" | ||
12 | S = "${WORKDIR}/git" | ||
13 | PV = "1.0.0+gitr${SRCPV}" | ||
14 | PR = "${INC_PR}.0" | ||
15 | |||
16 | EXTRA_OEMAKE = "'INCLUDE=-I${STAGING_INCDIR}/xorg -I${STAGING_INCDIR}/pixman-1'" | ||
17 | |||
18 | #skip xorg-driver-common.inc AC_CHECK_FILE mangling | ||
19 | do_configure_prepend () { | ||
20 | sed 's#gcc#${CC}#g' -i Makefile | ||
21 | return | ||
22 | } | ||
diff --git a/meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib/10-x11-input-tslib.fdi b/meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib/10-x11-input-tslib.fdi new file mode 100644 index 000000000..906043947 --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib/10-x11-input-tslib.fdi | |||
@@ -0,0 +1,11 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <deviceinfo version="0.2"> | ||
3 | <device> | ||
4 | <match key="info.capabilities" contains="input.touchpad"> | ||
5 | <merge key="input.x11_driver" type="string">tslib</merge> | ||
6 | </match> | ||
7 | <match key="info.capabilities" contains="input.touchscreen"> | ||
8 | <merge key="input.x11_driver" type="string">tslib</merge> | ||
9 | </match> | ||
10 | </device> | ||
11 | </deviceinfo> | ||
diff --git a/meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib/99-xf86-input-tslib.rules b/meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib/99-xf86-input-tslib.rules new file mode 100644 index 000000000..ec130c257 --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib/99-xf86-input-tslib.rules | |||
@@ -0,0 +1,5 @@ | |||
1 | # create /dev/input/touchscreenX symlink, tag xf86-input-tslib as driver | ||
2 | SUBSYSTEM=="input", KERNEL=="event[0-9]*", ATTRS{modalias}=="input:*-e0*,3,*a0,1,*18,*", SYMLINK+="input/touchscreen%n", ENV{x11_driver}="tslib" | ||
3 | SUBSYSTEM=="input", KERNEL=="event[0-9]*", ATTRS{modalias}=="ads7846", SYMLINK+="input/touchscreen%n", ENV{x11_driver}="tslib" | ||
4 | |||
5 | |||
diff --git a/meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib/double-free-crash.patch b/meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib/double-free-crash.patch new file mode 100644 index 000000000..07754731d --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib/double-free-crash.patch | |||
@@ -0,0 +1,20 @@ | |||
1 | xorg-server-1.7.3/hw/xfree86/common/xf86Helper.c contains this code | ||
2 | causing a double free crash on chvt or exit: | ||
3 | |||
4 | /* This should *really* be handled in drv->UnInit(dev) call instead, but | ||
5 | * if the driver forgets about it make sure we free it or at least crash | ||
6 | * with flying colors */ | ||
7 | if (pInp->private) | ||
8 | xfree(pInp->private); | ||
9 | Index: xf86-input-tslib-0.0.6/src/tslib.c | ||
10 | =================================================================== | ||
11 | --- xf86-input-tslib-0.0.6.orig/src/tslib.c | ||
12 | +++ xf86-input-tslib-0.0.6/src/tslib.c | ||
13 | @@ -435,6 +435,7 @@ xf86TslibUninit(InputDriverPtr drv, Inpu | ||
14 | xf86TslibControlProc(pInfo->dev, DEVICE_OFF); | ||
15 | ts_close(priv->ts); | ||
16 | xfree(pInfo->private); | ||
17 | + pInfo->private = NULL; | ||
18 | xf86DeleteInput(pInfo, 0); | ||
19 | } | ||
20 | |||
diff --git a/meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib/xf86-input-tslib-0.0.6-xf86XInputSetScreen.patch b/meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib/xf86-input-tslib-0.0.6-xf86XInputSetScreen.patch new file mode 100644 index 000000000..d16b4a53c --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib/xf86-input-tslib-0.0.6-xf86XInputSetScreen.patch | |||
@@ -0,0 +1,31 @@ | |||
1 | Fixes crash when a touchscreen event is received with xserver 1.12 and later: | ||
2 | X: symbol lookup error: /usr/lib/xorg/modules/input/tslib_drv.so: undefined symbol: xf86XInputSetScreen | ||
3 | |||
4 | Upstream-Status: Pending | ||
5 | |||
6 | Taken from Gentoo: | ||
7 | https://bugs.gentoo.org/show_bug.cgi?id=446432 | ||
8 | |||
9 | diff -ur xf86-input-tslib-0.0.6.orig/src/tslib.c xf86-input-tslib-0.0.6/src/tslib.c | ||
10 | --- xf86-input-tslib-0.0.6.orig/src/tslib.c 2012-12-05 01:12:16.286597071 +0100 | ||
11 | +++ xf86-input-tslib-0.0.6/src/tslib.c 2012-12-05 01:11:02.686598595 +0100 | ||
12 | @@ -75,6 +75,19 @@ | ||
13 | #define COLLECT_INPUT_OPTIONS(pInfo, options) xf86CollectInputOptions((pInfo), (options)) | ||
14 | #endif | ||
15 | |||
16 | +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) > 13 | ||
17 | +static void | ||
18 | +xf86XInputSetScreen(InputInfoPtr pInfo, | ||
19 | + int screen_number, | ||
20 | + int x, | ||
21 | + int y) | ||
22 | +{ | ||
23 | + if (miPointerGetScreen(pInfo->dev) != | ||
24 | + screenInfo.screens[screen_number]) { | ||
25 | + miPointerSetScreen(pInfo->dev, screen_number, x, y); | ||
26 | + } | ||
27 | +} | ||
28 | +#endif | ||
29 | |||
30 | enum { TSLIB_ROTATE_NONE=0, TSLIB_ROTATE_CW=270, TSLIB_ROTATE_UD=180, TSLIB_ROTATE_CCW=90 }; | ||
31 | |||
diff --git a/meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib/xf86-input-tslib-port-ABI-12-r48.patch b/meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib/xf86-input-tslib-port-ABI-12-r48.patch new file mode 100644 index 000000000..6a6d5b92c --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib/xf86-input-tslib-port-ABI-12-r48.patch | |||
@@ -0,0 +1,196 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | Taken from debian: | ||
4 | http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=627075 | ||
5 | |||
6 | Index: xf86-input-tslib-trunk/src/tslib.c | ||
7 | =================================================================== | ||
8 | --- xf86-input-tslib-trunk/src/tslib.c (revision 48) | ||
9 | +++ xf86-input-tslib-trunk/src/tslib.c (working copy) | ||
10 | @@ -69,6 +69,13 @@ | ||
11 | #define DEFAULT_HEIGHT 240 | ||
12 | #define DEFAULT_WIDTH 320 | ||
13 | |||
14 | +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12 | ||
15 | +#define COLLECT_INPUT_OPTIONS(pInfo, options) xf86CollectInputOptions((pInfo), (options), NULL) | ||
16 | +#else | ||
17 | +#define COLLECT_INPUT_OPTIONS(pInfo, options) xf86CollectInputOptions((pInfo), (options)) | ||
18 | +#endif | ||
19 | + | ||
20 | + | ||
21 | enum { TSLIB_ROTATE_NONE=0, TSLIB_ROTATE_CW=270, TSLIB_ROTATE_UD=180, TSLIB_ROTATE_CCW=90 }; | ||
22 | |||
23 | enum button_state { BUTTON_NOT_PRESSED = 0, BUTTON_1_PRESSED = 1, BUTTON_3_CLICK = 3, BUTTON_3_CLICKED=4, BUTTON_EMULATION_OFF=-1 }; | ||
24 | @@ -106,7 +113,7 @@ | ||
25 | } | ||
26 | |||
27 | static Bool | ||
28 | -ConvertProc( LocalDevicePtr local, | ||
29 | +ConvertProc( InputInfoPtr local, | ||
30 | int first, | ||
31 | int num, | ||
32 | int v0, | ||
33 | @@ -135,7 +142,7 @@ | ||
34 | return t; | ||
35 | } | ||
36 | |||
37 | -static void ReadInput (LocalDevicePtr local) | ||
38 | +static void ReadInput (InputInfoPtr local) | ||
39 | { | ||
40 | struct ts_priv *priv = (struct ts_priv *) (local->private); | ||
41 | struct ts_sample samp; | ||
42 | @@ -382,7 +389,11 @@ | ||
43 | axiswidth - 1, /* max val */ | ||
44 | axiswidth, /* resolution */ | ||
45 | 0, /* min_res */ | ||
46 | - axiswidth); /* max_res */ | ||
47 | + axiswidth /* max_res */ | ||
48 | +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12 | ||
49 | + ,Absolute | ||
50 | +#endif | ||
51 | + ); | ||
52 | |||
53 | InitValuatorAxisStruct(device, 1, | ||
54 | #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 | ||
55 | @@ -392,7 +403,11 @@ | ||
56 | axisheight - 1, /* max val */ | ||
57 | axisheight, /* resolution */ | ||
58 | 0, /* min_res */ | ||
59 | - axisheight); /* max_res */ | ||
60 | + axisheight /* max_res */ | ||
61 | +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12 | ||
62 | + ,Absolute | ||
63 | +#endif | ||
64 | + ); | ||
65 | |||
66 | if (InitProximityClassDeviceStruct (device) == FALSE) { | ||
67 | ErrorF ("Unable to allocate EVTouch touchscreen ProximityClassDeviceStruct\n"); | ||
68 | @@ -434,7 +449,7 @@ | ||
69 | ErrorF("%s\n", __FUNCTION__); | ||
70 | xf86TslibControlProc(pInfo->dev, DEVICE_OFF); | ||
71 | ts_close(priv->ts); | ||
72 | - xfree(pInfo->private); | ||
73 | + free(pInfo->private); | ||
74 | pInfo->private = NULL; | ||
75 | xf86DeleteInput(pInfo, 0); | ||
76 | } | ||
77 | @@ -444,47 +459,57 @@ | ||
78 | * | ||
79 | * called when the module subsection is found in XF86Config | ||
80 | */ | ||
81 | +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12 | ||
82 | +static int | ||
83 | +xf86TslibInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags) | ||
84 | +#else | ||
85 | static InputInfoPtr | ||
86 | xf86TslibInit(InputDriverPtr drv, IDevPtr dev, int flags) | ||
87 | +#endif | ||
88 | { | ||
89 | struct ts_priv *priv; | ||
90 | char *s; | ||
91 | +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12 | ||
92 | InputInfoPtr pInfo; | ||
93 | +#endif | ||
94 | |||
95 | - priv = xcalloc (1, sizeof (struct ts_priv)); | ||
96 | + priv = calloc (1, sizeof (struct ts_priv)); | ||
97 | if (!priv) | ||
98 | - return NULL; | ||
99 | + return BadValue; | ||
100 | |||
101 | +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12 | ||
102 | if (!(pInfo = xf86AllocateInput(drv, 0))) { | ||
103 | - xfree(priv); | ||
104 | - return NULL; | ||
105 | + free(priv); | ||
106 | + return BadValue; | ||
107 | } | ||
108 | |||
109 | /* Initialise the InputInfoRec. */ | ||
110 | pInfo->name = dev->identifier; | ||
111 | - pInfo->type_name = XI_TOUCHSCREEN; | ||
112 | pInfo->flags = | ||
113 | XI86_KEYBOARD_CAPABLE | XI86_POINTER_CAPABLE | | ||
114 | XI86_SEND_DRAG_EVENTS; | ||
115 | - pInfo->device_control = xf86TslibControlProc; | ||
116 | - pInfo->read_input = ReadInput; | ||
117 | #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) == 0 | ||
118 | pInfo->motion_history_proc = xf86GetMotionEvents; | ||
119 | pInfo->history_size = 0; | ||
120 | #endif | ||
121 | - pInfo->control_proc = NULL; | ||
122 | + pInfo->conf_idev = dev; | ||
123 | pInfo->close_proc = NULL; | ||
124 | - pInfo->switch_mode = NULL; | ||
125 | pInfo->conversion_proc = ConvertProc; | ||
126 | pInfo->reverse_conversion_proc = NULL; | ||
127 | - pInfo->dev = NULL; | ||
128 | pInfo->private_flags = 0; | ||
129 | pInfo->always_core_feedback = 0; | ||
130 | - pInfo->conf_idev = dev; | ||
131 | +#endif | ||
132 | + | ||
133 | + pInfo->type_name = XI_TOUCHSCREEN; | ||
134 | + pInfo->control_proc = NULL; | ||
135 | + pInfo->read_input = ReadInput; | ||
136 | + pInfo->device_control = xf86TslibControlProc; | ||
137 | + pInfo->switch_mode = NULL; | ||
138 | pInfo->private = priv; | ||
139 | + pInfo->dev = NULL; | ||
140 | |||
141 | /* Collect the options, and process the common options. */ | ||
142 | - xf86CollectInputOptions(pInfo, NULL, NULL); | ||
143 | + COLLECT_INPUT_OPTIONS(pInfo, NULL); | ||
144 | xf86ProcessCommonOptions(pInfo, pInfo->options); | ||
145 | |||
146 | priv->screen_num = xf86SetIntOption(pInfo->options, "ScreenNumber", 0 ); | ||
147 | @@ -510,23 +535,31 @@ | ||
148 | priv->rotate = TSLIB_ROTATE_NONE; | ||
149 | } | ||
150 | |||
151 | +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12 | ||
152 | s = xf86CheckStrOption(dev->commonOptions, "path", NULL); | ||
153 | +#else | ||
154 | + s = xf86CheckStrOption(pInfo->options, "path", NULL); | ||
155 | +#endif | ||
156 | if (!s) | ||
157 | +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12 | ||
158 | s = xf86CheckStrOption(dev->commonOptions, "Device", NULL); | ||
159 | +#else | ||
160 | + s = xf86CheckStrOption(pInfo->options, "Device", NULL); | ||
161 | +#endif | ||
162 | |||
163 | priv->ts = ts_open(s, 1); | ||
164 | - xfree(s); | ||
165 | + free(s); | ||
166 | |||
167 | if (!priv->ts) { | ||
168 | ErrorF("ts_open failed (device=%s)\n",s); | ||
169 | xf86DeleteInput(pInfo, 0); | ||
170 | - return NULL; | ||
171 | + return BadValue; | ||
172 | } | ||
173 | |||
174 | if (ts_config(priv->ts)) { | ||
175 | ErrorF("ts_config failed\n"); | ||
176 | xf86DeleteInput(pInfo, 0); | ||
177 | - return NULL; | ||
178 | + return BadValue; | ||
179 | } | ||
180 | |||
181 | pInfo->fd = ts_fd(priv->ts); | ||
182 | @@ -536,11 +569,13 @@ | ||
183 | priv->state = BUTTON_EMULATION_OFF; | ||
184 | } | ||
185 | |||
186 | +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12 | ||
187 | /* Mark the device configured */ | ||
188 | pInfo->flags |= XI86_CONFIGURED; | ||
189 | +#endif | ||
190 | |||
191 | /* Return the configured device */ | ||
192 | - return (pInfo); | ||
193 | + return Success; | ||
194 | } | ||
195 | |||
196 | _X_EXPORT InputDriverRec TSLIB = { | ||
diff --git a/meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib/xserver-174-XGetPointerControl.patch b/meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib/xserver-174-XGetPointerControl.patch new file mode 100644 index 000000000..a1f6ba8f9 --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib/xserver-174-XGetPointerControl.patch | |||
@@ -0,0 +1,34 @@ | |||
1 | From Grazvydas Ignotas | ||
2 | |||
3 | At least xserver 1.7.4 crashes on XGetPointerControl request because of xf86-input-tslib: | ||
4 | |||
5 | Program received signal SIGSEGV, Segmentation fault. | ||
6 | #0 0x000355e0 in ProcGetPointerControl (client=0x4a2e58) at devices.c:2122 | ||
7 | #1 0x00062fa8 in Dispatch () at dispatch.c:439 | ||
8 | #2 0x00022444 in main (argc=4, argv=0xbeebedc4, envp=0xbeebedd8) at main.c:285 | ||
9 | |||
10 | This happens because ptrfeed field is not set in device structure from tslib. | ||
11 | To fix this, call InitPtrFeedbackClassDeviceStruct() during DEVICE_INIT to get necessary setup done (as done in other input drivers). | ||
12 | |||
13 | --- | ||
14 | diff -ur xf86-input-tslib-0.0.6/src/tslib.c xf86-input-tslib-0.0.6_/src/tslib.c | ||
15 | --- xf86-input-tslib-0.0.6/src/tslib.c 2010-02-09 12:23:22.000000000 +0200 | ||
16 | +++ xf86-input-tslib-0.0.6_/src/tslib.c 2010-02-09 12:37:33.000000000 +0200 | ||
17 | @@ -103,8 +103,6 @@ | ||
18 | static void | ||
19 | PointerControlProc(DeviceIntPtr dev, PtrCtrl * ctrl) | ||
20 | { | ||
21 | - ErrorF("%s\n", __FUNCTION__); | ||
22 | - return; | ||
23 | } | ||
24 | |||
25 | static Bool | ||
26 | @@ -406,6 +404,8 @@ | ||
27 | xf86MotionHistoryAllocate(pInfo); | ||
28 | #endif | ||
29 | |||
30 | + if (!InitPtrFeedbackClassDeviceStruct(device, PointerControlProc)) | ||
31 | + return !Success; | ||
32 | break; | ||
33 | |||
34 | case DEVICE_ON: | ||
diff --git a/meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib_0.0.6.bb b/meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib_0.0.6.bb new file mode 100644 index 000000000..082c77113 --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-driver/xf86-input-tslib_0.0.6.bb | |||
@@ -0,0 +1,35 @@ | |||
1 | require recipes-graphics/xorg-driver/xorg-driver-input.inc | ||
2 | SUMMARY = "X.Org X server -- tslib input driver" | ||
3 | DEPENDS += "tslib" | ||
4 | RRECOMMENDS_${PN} += "tslib-calibrate" | ||
5 | RSUGGESTS_${PN} += "hal" | ||
6 | |||
7 | # derived from xf86-input-void, that's why I kept MIT-X, but it's not clear, see COPYING | ||
8 | LIC_FILES_CHKSUM = "file://src/tslib.c;endline=28;md5=bd62eaef222dcf5cd59e490a12bd795e \ | ||
9 | file://COPYING;md5=4641deddaa80fe7ca88e944e1fd94a94" | ||
10 | |||
11 | PR = "${INC_PR}.1" | ||
12 | |||
13 | SRC_URI = "http://www.pengutronix.de/software/xf86-input-tslib/download/xf86-input-tslib-${PV}.tar.bz2 \ | ||
14 | file://double-free-crash.patch \ | ||
15 | file://10-x11-input-tslib.fdi \ | ||
16 | file://xserver-174-XGetPointerControl.patch \ | ||
17 | file://99-xf86-input-tslib.rules \ | ||
18 | file://xf86-input-tslib-port-ABI-12-r48.patch \ | ||
19 | file://xf86-input-tslib-0.0.6-xf86XInputSetScreen.patch \ | ||
20 | " | ||
21 | |||
22 | SRC_URI[md5sum] = "b7a4d2f11637ee3fcf432e044b1d017f" | ||
23 | SRC_URI[sha256sum] = "5f46fdef095a6e44a69e0f0b57c7d665224b26d990d006611236d8332e85b105" | ||
24 | |||
25 | do_configure_prepend() { | ||
26 | rm -rf ${S}/m4/ || true | ||
27 | } | ||
28 | do_install_append() { | ||
29 | install -d ${D}/${datadir}/hal/fdi/policy/20thirdparty | ||
30 | install -m 0644 ${WORKDIR}/10-x11-input-tslib.fdi ${D}/${datadir}/hal/fdi/policy/20thirdparty | ||
31 | install -d ${D}/lib/udev/rules.d | ||
32 | install -m 0644 ${WORKDIR}/99-xf86-input-tslib.rules ${D}/lib/udev/rules.d/ | ||
33 | } | ||
34 | |||
35 | FILES_${PN} += "${datadir}/hal /lib/udev" | ||
diff --git a/meta-oe/recipes-graphics/xorg-driver/xf86-input-void_1.4.0.bb b/meta-oe/recipes-graphics/xorg-driver/xf86-input-void_1.4.0.bb new file mode 100644 index 000000000..fec64cb0b --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-driver/xf86-input-void_1.4.0.bb | |||
@@ -0,0 +1,8 @@ | |||
1 | require recipes-graphics/xorg-driver/xorg-driver-input.inc | ||
2 | SUMMARY = "X.Org X server -- void input driver" | ||
3 | PR = "${INC_PR}.0" | ||
4 | |||
5 | LIC_FILES_CHKSUM = "file://COPYING;md5=4be6a915bfbf111cd88706fc6a6f141b" | ||
6 | |||
7 | SRC_URI[md5sum] = "93821f21e807260b05431c62437a8b32" | ||
8 | SRC_URI[sha256sum] = "2ab95865252c64cc88050fa0089a74e063c357b71907bf9be7886047c4987505" | ||
diff --git a/meta-oe/recipes-graphics/xorg-driver/xf86-video-ati_7.2.0.bb b/meta-oe/recipes-graphics/xorg-driver/xf86-video-ati_7.2.0.bb new file mode 100644 index 000000000..d4d9591a3 --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-driver/xf86-video-ati_7.2.0.bb | |||
@@ -0,0 +1,17 @@ | |||
1 | require recipes-graphics/xorg-driver/xorg-driver-video.inc | ||
2 | |||
3 | LIC_FILES_CHKSUM = "file://COPYING;md5=aabff1606551f9461ccf567739af63dc" | ||
4 | |||
5 | SUMMARY = "X.Org X server -- ATI Radeon video driver" | ||
6 | |||
7 | DESCRIPTION = "Open-source X.org graphics driver for ATI Radeon graphics" | ||
8 | |||
9 | DEPENDS += "virtual/libx11 libxvmc drm xf86driproto glproto \ | ||
10 | virtual/libgl xineramaproto libpciaccess" | ||
11 | RDEPENDS_${PN} += "xserver-xorg-module-exa" | ||
12 | RRECOMMENDS_${PN} += "linux-firmware" | ||
13 | |||
14 | COMPATIBLE_HOST = '(i.86|x86_64).*-linux' | ||
15 | |||
16 | SRC_URI[md5sum] = "5ab9a826699e5c86ef89fca43ebb3821" | ||
17 | SRC_URI[sha256sum] = "f30f5efdc8d7d18d06eda7ef2f91a8b7290f1cfbf6ff26362cd47ab8969daec4" | ||
diff --git a/meta-oe/recipes-graphics/xorg-driver/xf86-video-geode/0001-Add-config.h-include-to-src-lx_memory.c.patch b/meta-oe/recipes-graphics/xorg-driver/xf86-video-geode/0001-Add-config.h-include-to-src-lx_memory.c.patch new file mode 100644 index 000000000..fcd2f684b --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-driver/xf86-video-geode/0001-Add-config.h-include-to-src-lx_memory.c.patch | |||
@@ -0,0 +1,41 @@ | |||
1 | From 621d946e56efac2c779b83b1a5c6b645169c4ebd Mon Sep 17 00:00:00 2001 | ||
2 | From: "Brian A. Lloyd" <brian.lloyd@familyhonor.net> | ||
3 | Date: Wed, 1 Oct 2014 12:35:18 +0300 | ||
4 | Subject: [PATCH] Add config.h include to src/lx_memory.c | ||
5 | |||
6 | The src/lx_memory.c file uses the xf86.h header file. This file must have | ||
7 | HAVE_STRNDUP defined before calling it when the building platform has a strndup | ||
8 | function. When using config.h, this file doesn't have that define and so fails | ||
9 | to compile. | ||
10 | |||
11 | The attached patch adds the conditional config.h to this file so it may compile | ||
12 | on the affected platforms. | ||
13 | |||
14 | The patch is trivial and may be included and used under whatever licensing | ||
15 | desired. | ||
16 | |||
17 | Closes: Free Desktop Bug #84541 | ||
18 | |||
19 | Signed-off-by: Brian A. Lloyd <brian.lloyd@familyhonor.net> | ||
20 | Upstream-Status: Backport | ||
21 | --- | ||
22 | src/lx_memory.c | 3 +++ | ||
23 | 1 file changed, 3 insertions(+) | ||
24 | |||
25 | diff --git a/src/lx_memory.c b/src/lx_memory.c | ||
26 | index f26d280..992446f 100644 | ||
27 | --- a/src/lx_memory.c | ||
28 | +++ b/src/lx_memory.c | ||
29 | @@ -22,6 +22,9 @@ | ||
30 | * contributors may be used to endorse or promote products derived from this | ||
31 | * software without specific prior written permission. | ||
32 | */ | ||
33 | +#if HAVE_CONFIG_H | ||
34 | +#include "config.h" | ||
35 | +#endif | ||
36 | |||
37 | #include "xf86.h" | ||
38 | #include "geode.h" | ||
39 | -- | ||
40 | 2.1.1 | ||
41 | |||
diff --git a/meta-oe/recipes-graphics/xorg-driver/xf86-video-geode_2.11.16.bb b/meta-oe/recipes-graphics/xorg-driver/xf86-video-geode_2.11.16.bb new file mode 100644 index 000000000..478d08805 --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-driver/xf86-video-geode_2.11.16.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | require recipes-graphics/xorg-driver/xorg-driver-video.inc | ||
2 | LIC_FILES_CHKSUM = "file://COPYING;md5=e7f3e39474aeea5af381a8e103dafc36" | ||
3 | |||
4 | SUMMARY = "X.org server -- Geode GX2/LX display driver" | ||
5 | PR = "${INC_PR}.0" | ||
6 | |||
7 | SRC_URI += "file://0001-Add-config.h-include-to-src-lx_memory.c.patch" | ||
8 | SRC_URI[md5sum] = "35fa387f6a33f6b22a56ce4bda424392" | ||
9 | SRC_URI[sha256sum] = "38fc1f55e29fb7985b90c9021a4b7e5295d42888bd669174f42f3b7f681fc1a7" | ||
10 | |||
11 | COMPATIBLE_HOST = "i.86.*-linux" | ||
12 | |||
13 | RDEPENDS_${PN} += "xserver-xorg-module-exa" | ||
diff --git a/meta-oe/recipes-graphics/xorg-driver/xf86-video-glamo/0001-fix-build-with-KMS-disabled.patch b/meta-oe/recipes-graphics/xorg-driver/xf86-video-glamo/0001-fix-build-with-KMS-disabled.patch new file mode 100644 index 000000000..25e83209d --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-driver/xf86-video-glamo/0001-fix-build-with-KMS-disabled.patch | |||
@@ -0,0 +1,29 @@ | |||
1 | From f485e878bc8bb0e381a38a30009308c82fa8d672 Mon Sep 17 00:00:00 2001 | ||
2 | From: Martin Jansa <Martin.Jansa@gmail.com> | ||
3 | Date: Thu, 16 Aug 2012 08:18:56 +0200 | ||
4 | Subject: [PATCH] fix build with KMS disabled | ||
5 | |||
6 | Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> | ||
7 | --- | ||
8 | src/glamo.h | 3 +++ | ||
9 | 1 files changed, 3 insertions(+), 0 deletions(-) | ||
10 | |||
11 | diff --git a/src/glamo.h b/src/glamo.h | ||
12 | index d4a2f19..5fd5c04 100644 | ||
13 | --- a/src/glamo.h | ||
14 | +++ b/src/glamo.h | ||
15 | @@ -37,8 +37,11 @@ | ||
16 | #include "xf86.h" | ||
17 | #include "exa.h" | ||
18 | #include <linux/fb.h> | ||
19 | + | ||
20 | +#ifdef HAVE_KMS | ||
21 | #include <libdrm/drm.h> | ||
22 | #include <libdrm/glamo_bo.h> | ||
23 | +#endif | ||
24 | |||
25 | #define GLAMO_REG_BASE(c) ((c)->attr.address[0]) | ||
26 | #define GLAMO_REG_SIZE(c) (0x2400) | ||
27 | -- | ||
28 | 1.7.8.6 | ||
29 | |||
diff --git a/meta-oe/recipes-graphics/xorg-driver/xf86-video-glamo/0001-glamo-driver-remove-references-to-mibstore.patch b/meta-oe/recipes-graphics/xorg-driver/xf86-video-glamo/0001-glamo-driver-remove-references-to-mibstore.patch new file mode 100644 index 000000000..fab0b238f --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-driver/xf86-video-glamo/0001-glamo-driver-remove-references-to-mibstore.patch | |||
@@ -0,0 +1,48 @@ | |||
1 | From 040ade8bb86a771fa4e71b41d2080254830ca9f3 Mon Sep 17 00:00:00 2001 | ||
2 | From: Martin Jansa <Martin.Jansa@gmail.com> | ||
3 | Date: Sat, 16 Mar 2013 17:44:37 +0100 | ||
4 | Subject: [PATCH] glamo*driver: remove references to mibstore | ||
5 | |||
6 | * fix build with xserver-1.14 | ||
7 | |||
8 | Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> | ||
9 | --- | ||
10 | src/glamo-driver.c | 2 -- | ||
11 | src/glamo-kms-driver.c | 1 - | ||
12 | 2 files changed, 3 deletions(-) | ||
13 | |||
14 | diff --git a/src/glamo-driver.c b/src/glamo-driver.c | ||
15 | index 10b7762..22f57d7 100644 | ||
16 | --- a/src/glamo-driver.c | ||
17 | +++ b/src/glamo-driver.c | ||
18 | @@ -14,7 +14,6 @@ | ||
19 | #include "xf86_OSproc.h" | ||
20 | |||
21 | #include "mipointer.h" | ||
22 | -#include "mibstore.h" | ||
23 | #include "micmap.h" | ||
24 | #include "colormapst.h" | ||
25 | #include "xf86cmap.h" | ||
26 | @@ -612,7 +611,6 @@ GlamoScreenInit(SCREEN_INIT_ARGS_DECL) | ||
27 | } | ||
28 | |||
29 | xf86SetBlackWhitePixels(pScreen); | ||
30 | - miInitializeBackingStore(pScreen); | ||
31 | xf86SetBackingStore(pScreen); | ||
32 | |||
33 | /* software cursor */ | ||
34 | diff --git a/src/glamo-kms-driver.c b/src/glamo-kms-driver.c | ||
35 | index c5c7a00..f192398 100644 | ||
36 | --- a/src/glamo-kms-driver.c | ||
37 | +++ b/src/glamo-kms-driver.c | ||
38 | @@ -415,7 +415,6 @@ Bool GlamoKMSScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, | ||
39 | |||
40 | GlamoKMSExaInit(pScrn); | ||
41 | |||
42 | - miInitializeBackingStore(pScreen); | ||
43 | xf86SetBackingStore(pScreen); | ||
44 | xf86SetSilkenMouse(pScreen); | ||
45 | miDCInitialize(pScreen, xf86GetPointerScreenFuncs()); | ||
46 | -- | ||
47 | 1.8.1.5 | ||
48 | |||
diff --git a/meta-oe/recipes-graphics/xorg-driver/xf86-video-glamo/0001-glamo-kms-driver-drop-unused-xf86_config.patch b/meta-oe/recipes-graphics/xorg-driver/xf86-video-glamo/0001-glamo-kms-driver-drop-unused-xf86_config.patch new file mode 100644 index 000000000..0d6374363 --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-driver/xf86-video-glamo/0001-glamo-kms-driver-drop-unused-xf86_config.patch | |||
@@ -0,0 +1,35 @@ | |||
1 | From 963c221aa01be2ea99d39578d91e4aa08ec3ab0a Mon Sep 17 00:00:00 2001 | ||
2 | From: Martin Jansa <Martin.Jansa@gmail.com> | ||
3 | Date: Mon, 23 May 2011 14:29:38 +0200 | ||
4 | Subject: [PATCH] glamo-kms-driver: drop unused xf86_config | ||
5 | |||
6 | * gcc-4.6 doesn't like unused variables which are only set and never read | ||
7 | |||
8 | Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> | ||
9 | --- | ||
10 | src/glamo-kms-driver.c | 2 -- | ||
11 | 1 files changed, 0 insertions(+), 2 deletions(-) | ||
12 | |||
13 | diff --git a/src/glamo-kms-driver.c b/src/glamo-kms-driver.c | ||
14 | index ce87caa..c5c7a00 100644 | ||
15 | --- a/src/glamo-kms-driver.c | ||
16 | +++ b/src/glamo-kms-driver.c | ||
17 | @@ -208,7 +208,6 @@ static const xf86CrtcConfigFuncsRec crtc_config_funcs = { | ||
18 | |||
19 | Bool GlamoKMSPreInit(ScrnInfoPtr pScrn, int flags) | ||
20 | { | ||
21 | - xf86CrtcConfigPtr xf86_config; | ||
22 | GlamoPtr pGlamo; | ||
23 | rgb defaultWeight = { 0, 0, 0 }; | ||
24 | int max_width, max_height; | ||
25 | @@ -254,7 +253,6 @@ Bool GlamoKMSPreInit(ScrnInfoPtr pScrn, int flags) | ||
26 | |||
27 | /* Allocate an xf86CrtcConfig */ | ||
28 | xf86CrtcConfigInit(pScrn, &crtc_config_funcs); | ||
29 | - xf86_config = XF86_CRTC_CONFIG_PTR(pScrn); | ||
30 | |||
31 | max_width = 480; | ||
32 | max_height = 640; | ||
33 | -- | ||
34 | 1.7.5.rc3 | ||
35 | |||
diff --git a/meta-oe/recipes-graphics/xorg-driver/xf86-video-glamo/0003-glamo-driver-adapt-to-xserver-0.13-video-API.patch b/meta-oe/recipes-graphics/xorg-driver/xf86-video-glamo/0003-glamo-driver-adapt-to-xserver-0.13-video-API.patch new file mode 100644 index 000000000..cbdc6e762 --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-driver/xf86-video-glamo/0003-glamo-driver-adapt-to-xserver-0.13-video-API.patch | |||
@@ -0,0 +1,279 @@ | |||
1 | From 57e8944e3cced03b9526bd075649d74d97c24899 Mon Sep 17 00:00:00 2001 | ||
2 | From: Martin Jansa <Martin.Jansa@gmail.com> | ||
3 | Date: Tue, 20 Nov 2012 22:18:23 +0100 | ||
4 | Subject: [PATCH 3/3] glamo-driver: adapt to xserver-0.13 video API | ||
5 | |||
6 | Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> | ||
7 | --- | ||
8 | src/compat-api.h | 96 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ | ||
9 | src/glamo-driver.c | 43 ++++++++++++------------ | ||
10 | 2 files changed, 118 insertions(+), 21 deletions(-) | ||
11 | create mode 100644 src/compat-api.h | ||
12 | |||
13 | diff --git a/src/compat-api.h b/src/compat-api.h | ||
14 | new file mode 100644 | ||
15 | index 0000000..b1591b1 | ||
16 | --- /dev/null | ||
17 | +++ b/src/compat-api.h | ||
18 | @@ -0,0 +1,96 @@ | ||
19 | +/* | ||
20 | + * Copyright 2012 Red Hat, Inc. | ||
21 | + * | ||
22 | + * Permission is hereby granted, free of charge, to any person obtaining a | ||
23 | + * copy of this software and associated documentation files (the "Software"), | ||
24 | + * to deal in the Software without restriction, including without limitation | ||
25 | + * the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
26 | + * and/or sell copies of the Software, and to permit persons to whom the | ||
27 | + * Software is furnished to do so, subject to the following conditions: | ||
28 | + * | ||
29 | + * The above copyright notice and this permission notice (including the next | ||
30 | + * paragraph) shall be included in all copies or substantial portions of the | ||
31 | + * Software. | ||
32 | + * | ||
33 | + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
34 | + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
35 | + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
36 | + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
37 | + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
38 | + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | ||
39 | + * DEALINGS IN THE SOFTWARE. | ||
40 | + * | ||
41 | + * Author: Dave Airlie <airlied@redhat.com> | ||
42 | + */ | ||
43 | + | ||
44 | +/* this file provides API compat between server post 1.13 and pre it, | ||
45 | + it should be reused inside as many drivers as possible */ | ||
46 | +#ifndef COMPAT_API_H | ||
47 | +#define COMPAT_API_H | ||
48 | + | ||
49 | +#ifndef GLYPH_HAS_GLYPH_PICTURE_ACCESSOR | ||
50 | +#define GetGlyphPicture(g, s) GlyphPicture((g))[(s)->myNum] | ||
51 | +#define SetGlyphPicture(g, s, p) GlyphPicture((g))[(s)->myNum] = p | ||
52 | +#endif | ||
53 | + | ||
54 | +#ifndef XF86_HAS_SCRN_CONV | ||
55 | +#define xf86ScreenToScrn(s) xf86Screens[(s)->myNum] | ||
56 | +#define xf86ScrnToScreen(s) screenInfo.screens[(s)->scrnIndex] | ||
57 | +#endif | ||
58 | + | ||
59 | +#ifndef XF86_SCRN_INTERFACE | ||
60 | + | ||
61 | +#define SCRN_ARG_TYPE int | ||
62 | +#define SCRN_INFO_PTR(arg1) ScrnInfoPtr pScrn = xf86Screens[(arg1)] | ||
63 | + | ||
64 | +#define SCREEN_ARG_TYPE int | ||
65 | +#define SCREEN_PTR(arg1) ScreenPtr pScreen = screenInfo.screens[(arg1)] | ||
66 | + | ||
67 | +#define SCREEN_INIT_ARGS_DECL int index, ScreenPtr pScreen, int argc, char **argv | ||
68 | + | ||
69 | +#define BLOCKHANDLER_ARGS_DECL int arg, pointer blockData, pointer pTimeout, pointer pReadmask | ||
70 | +#define BLOCKHANDLER_ARGS arg, blockData, pTimeout, pReadmask | ||
71 | + | ||
72 | +#define CLOSE_SCREEN_ARGS_DECL int scrnIndex, ScreenPtr pScreen | ||
73 | +#define CLOSE_SCREEN_ARGS scrnIndex, pScreen | ||
74 | + | ||
75 | +#define ADJUST_FRAME_ARGS_DECL int arg, int x, int y, int flags | ||
76 | + | ||
77 | +#define SWITCH_MODE_ARGS_DECL int arg, DisplayModePtr mode, int flags | ||
78 | + | ||
79 | +#define FREE_SCREEN_ARGS_DECL int arg, int flags | ||
80 | +#define FREE_SCREEN_ARGS(x) (x)->scrnIndex, 0 | ||
81 | + | ||
82 | +#define VT_FUNC_ARGS_DECL int arg, int flags | ||
83 | +#define VT_FUNC_ARGS(flags) pScrn->scrnIndex, (flags) | ||
84 | + | ||
85 | +#define XF86_ENABLEDISABLEFB_ARG(x) ((x)->scrnIndex) | ||
86 | +#else | ||
87 | +#define SCRN_ARG_TYPE ScrnInfoPtr | ||
88 | +#define SCRN_INFO_PTR(arg1) ScrnInfoPtr pScrn = (arg1) | ||
89 | + | ||
90 | +#define SCREEN_ARG_TYPE ScreenPtr | ||
91 | +#define SCREEN_PTR(arg1) ScreenPtr pScreen = (arg1) | ||
92 | + | ||
93 | +#define SCREEN_INIT_ARGS_DECL ScreenPtr pScreen, int argc, char **argv | ||
94 | + | ||
95 | +#define BLOCKHANDLER_ARGS_DECL ScreenPtr arg, pointer pTimeout, pointer pReadmask | ||
96 | +#define BLOCKHANDLER_ARGS arg, pTimeout, pReadmask | ||
97 | + | ||
98 | +#define CLOSE_SCREEN_ARGS_DECL ScreenPtr pScreen | ||
99 | +#define CLOSE_SCREEN_ARGS pScreen | ||
100 | + | ||
101 | +#define ADJUST_FRAME_ARGS_DECL ScrnInfoPtr arg, int x, int y | ||
102 | +#define SWITCH_MODE_ARGS_DECL ScrnInfoPtr arg, DisplayModePtr mode | ||
103 | + | ||
104 | +#define FREE_SCREEN_ARGS_DECL ScrnInfoPtr arg | ||
105 | +#define FREE_SCREEN_ARGS(x) (x) | ||
106 | + | ||
107 | +#define VT_FUNC_ARGS_DECL ScrnInfoPtr arg | ||
108 | +#define VT_FUNC_ARGS(flags) pScrn | ||
109 | + | ||
110 | +#define XF86_ENABLEDISABLEFB_ARG(x) (x) | ||
111 | + | ||
112 | +#endif | ||
113 | + | ||
114 | +#endif | ||
115 | diff --git a/src/glamo-driver.c b/src/glamo-driver.c | ||
116 | index b13caae..10b7762 100644 | ||
117 | --- a/src/glamo-driver.c | ||
118 | +++ b/src/glamo-driver.c | ||
119 | @@ -43,6 +43,7 @@ | ||
120 | |||
121 | #include <sys/mman.h> | ||
122 | |||
123 | +#include "compat-api.h" | ||
124 | |||
125 | static Bool debug = 0; | ||
126 | |||
127 | @@ -68,10 +69,10 @@ static Bool | ||
128 | GlamoPreInit(ScrnInfoPtr pScrn, int flags); | ||
129 | |||
130 | static Bool | ||
131 | -GlamoScreenInit(int Index, ScreenPtr pScreen, int argc, char **argv); | ||
132 | +GlamoScreenInit(SCREEN_INIT_ARGS_DECL); | ||
133 | |||
134 | static Bool | ||
135 | -GlamoCloseScreen(int scrnIndex, ScreenPtr pScreen); | ||
136 | +GlamoCloseScreen(CLOSE_SCREEN_ARGS_DECL); | ||
137 | |||
138 | static Bool | ||
139 | GlamoCrtcResize(ScrnInfoPtr scrn, int width, int height); | ||
140 | @@ -86,10 +87,10 @@ static void | ||
141 | GlamoRestoreHW(ScrnInfoPtr pScren); | ||
142 | |||
143 | static Bool | ||
144 | -GlamoEnterVT(int scrnIndex, int flags); | ||
145 | +GlamoEnterVT(VT_FUNC_ARGS_DECL); | ||
146 | |||
147 | static void | ||
148 | -GlamoLeaveVT(int scrnIndex, int flags); | ||
149 | +GlamoLeaveVT(VT_FUNC_ARGS_DECL); | ||
150 | |||
151 | static void | ||
152 | GlamoLoadColormap(ScrnInfoPtr pScrn, int numColors, int *indices, | ||
153 | @@ -248,8 +249,8 @@ GlamoUnmapMMIO(ScrnInfoPtr pScrn) { | ||
154 | } | ||
155 | |||
156 | static Bool | ||
157 | -GlamoSwitchMode(int scrnIndex, DisplayModePtr mode, int flags) { | ||
158 | - ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; | ||
159 | +GlamoSwitchMode(SWITCH_MODE_ARGS_DECL) { | ||
160 | + SCRN_INFO_PTR(arg); | ||
161 | xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR (pScrn); | ||
162 | xf86OutputPtr output = config->output[config->compat_output]; | ||
163 | Rotation rotation; | ||
164 | @@ -286,7 +287,7 @@ GlamoFbdevProbe(DriverPtr drv, GDevPtr *devSections, int numDevSections) | ||
165 | |||
166 | for (i = 0; i < numDevSections; i++) { | ||
167 | |||
168 | - dev = xf86FindOptionValue(devSections[i]->options, "Device"); | ||
169 | + dev = (char *) xf86FindOptionValue(devSections[i]->options, "Device"); | ||
170 | if (fbdevHWProbe(NULL, dev, NULL)) { | ||
171 | int entity; | ||
172 | pScrn = NULL; | ||
173 | @@ -430,7 +431,7 @@ GlamoPreInit(ScrnInfoPtr pScrn, int flags) | ||
174 | |||
175 | pGlamo->pEnt = xf86GetEntityInfo(pScrn->entityList[0]); | ||
176 | |||
177 | - fb_device = xf86FindOptionValue(pGlamo->pEnt->device->options, "Device"); | ||
178 | + fb_device = (char *) xf86FindOptionValue(pGlamo->pEnt->device->options, "Device"); | ||
179 | |||
180 | /* open device */ | ||
181 | if (!fbdevHWInit(pScrn, NULL, fb_device)) | ||
182 | @@ -523,7 +524,7 @@ GlamoPreInit(ScrnInfoPtr pScrn, int flags) | ||
183 | |||
184 | |||
185 | static Bool | ||
186 | -GlamoScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) | ||
187 | +GlamoScreenInit(SCREEN_INIT_ARGS_DECL) | ||
188 | { | ||
189 | ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; | ||
190 | GlamoPtr pGlamo = GlamoPTR(pScrn); | ||
191 | @@ -545,7 +546,7 @@ GlamoScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) | ||
192 | #endif | ||
193 | |||
194 | if (NULL == (pGlamo->fbmem = fbdevHWMapVidmem(pScrn))) { | ||
195 | - xf86DrvMsg(scrnIndex, X_ERROR, "mapping of video memory failed\n"); | ||
196 | + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "mapping of video memory failed\n"); | ||
197 | return FALSE; | ||
198 | } | ||
199 | |||
200 | @@ -556,13 +557,13 @@ GlamoScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) | ||
201 | /* mi layer */ | ||
202 | miClearVisualTypes(); | ||
203 | if (!miSetVisualTypes(pScrn->depth, TrueColorMask, pScrn->rgbBits, TrueColor)) { | ||
204 | - xf86DrvMsg(scrnIndex, X_ERROR, | ||
205 | + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, | ||
206 | "visual type setup failed for %d bits per pixel [1]\n", | ||
207 | pScrn->bitsPerPixel); | ||
208 | return FALSE; | ||
209 | } | ||
210 | if (!miSetPixmapDepths()) { | ||
211 | - xf86DrvMsg(scrnIndex, X_ERROR, "pixmap depth setup failed\n"); | ||
212 | + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "pixmap depth setup failed\n"); | ||
213 | return FALSE; | ||
214 | } | ||
215 | |||
216 | @@ -617,7 +618,7 @@ GlamoScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) | ||
217 | /* software cursor */ | ||
218 | miDCInitialize(pScreen, xf86GetPointerScreenFuncs()); | ||
219 | |||
220 | - GlamoEnterVT(scrnIndex, 0); | ||
221 | + GlamoEnterVT(VT_FUNC_ARGS(0)); | ||
222 | |||
223 | xf86CrtcScreenInit(pScreen); | ||
224 | #if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,5,0,0,0) | ||
225 | @@ -627,7 +628,7 @@ GlamoScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) | ||
226 | /* colormap */ | ||
227 | pGlamo->colormap = NULL; | ||
228 | if (!miCreateDefColormap(pScreen)) { | ||
229 | - xf86DrvMsg(scrnIndex, X_ERROR, | ||
230 | + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, | ||
231 | "internal error: miCreateDefColormap failed " | ||
232 | "in GlamoScreenInit()\n"); | ||
233 | return FALSE; | ||
234 | @@ -652,9 +653,9 @@ GlamoScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) | ||
235 | } | ||
236 | |||
237 | static Bool | ||
238 | -GlamoCloseScreen(int scrnIndex, ScreenPtr pScreen) | ||
239 | +GlamoCloseScreen(CLOSE_SCREEN_ARGS_DECL) | ||
240 | { | ||
241 | - ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; | ||
242 | + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); | ||
243 | GlamoPtr pGlamo = GlamoPTR(pScrn); | ||
244 | |||
245 | if (pGlamo->accel) | ||
246 | @@ -675,7 +676,7 @@ GlamoCloseScreen(int scrnIndex, ScreenPtr pScreen) | ||
247 | |||
248 | pScreen->CreateScreenResources = pGlamo->CreateScreenResources; | ||
249 | pScreen->CloseScreen = pGlamo->CloseScreen; | ||
250 | - return (*pScreen->CloseScreen)(scrnIndex, pScreen); | ||
251 | + return (*pScreen->CloseScreen)(CLOSE_SCREEN_ARGS); | ||
252 | } | ||
253 | |||
254 | static Bool | ||
255 | @@ -826,8 +827,8 @@ GlamoRestoreHW(ScrnInfoPtr pScrn) { | ||
256 | } | ||
257 | |||
258 | static Bool | ||
259 | -GlamoEnterVT(int scrnIndex, int flags) { | ||
260 | - ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; | ||
261 | +GlamoEnterVT(VT_FUNC_ARGS_DECL) { | ||
262 | + SCRN_INFO_PTR(arg); | ||
263 | GlamoPtr pGlamo = GlamoPTR(pScrn); | ||
264 | |||
265 | GlamoSaveHW(pScrn); | ||
266 | @@ -842,8 +843,8 @@ GlamoEnterVT(int scrnIndex, int flags) { | ||
267 | } | ||
268 | |||
269 | static void | ||
270 | -GlamoLeaveVT(int scrnIndex, int flags) { | ||
271 | - ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; | ||
272 | +GlamoLeaveVT(VT_FUNC_ARGS_DECL) { | ||
273 | + SCRN_INFO_PTR(arg); | ||
274 | GlamoPtr pGlamo = GlamoPTR(pScrn); | ||
275 | |||
276 | if (pGlamo->accel) | ||
277 | -- | ||
278 | 1.8.0 | ||
279 | |||
diff --git a/meta-oe/recipes-graphics/xorg-driver/xf86-video-glamo_git.bb b/meta-oe/recipes-graphics/xorg-driver/xf86-video-glamo_git.bb new file mode 100644 index 000000000..38c12f321 --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-driver/xf86-video-glamo_git.bb | |||
@@ -0,0 +1,22 @@ | |||
1 | require recipes-graphics/xorg-driver/xorg-driver-video.inc | ||
2 | SUMMARY = "X.Org X server -- Glamo display driver with KMS support" | ||
3 | DEPENDS += "libdrm" | ||
4 | RDEPENDS_${PN} += "xserver-xorg-module-exa" | ||
5 | |||
6 | LIC_FILES_CHKSUM = "file://COPYING;md5=d8cbd99fff773f92e844948f74ef0df8" | ||
7 | |||
8 | PE = "2" | ||
9 | PV = "1.0.0+gitr${SRCPV}" | ||
10 | PR = "${INC_PR}.4" | ||
11 | |||
12 | SRC_URI = "git://git.openmoko.org/git/xf86-video-glamo.git;branch=master \ | ||
13 | file://0001-glamo-kms-driver-drop-unused-xf86_config.patch \ | ||
14 | file://0001-fix-build-with-KMS-disabled.patch \ | ||
15 | file://0003-glamo-driver-adapt-to-xserver-0.13-video-API.patch \ | ||
16 | file://0001-glamo-driver-remove-references-to-mibstore.patch \ | ||
17 | " | ||
18 | |||
19 | S = "${WORKDIR}/git" | ||
20 | SRCREV = "cb9ed17035a79e49dde26a1e7e2bc5f10fd8144b" | ||
21 | |||
22 | EXTRA_OECONF = " --disable-kms " | ||
diff --git a/meta-oe/recipes-graphics/xorg-driver/xf86-video-nouveau_1.0.9.bb b/meta-oe/recipes-graphics/xorg-driver/xf86-video-nouveau_1.0.9.bb new file mode 100644 index 000000000..7b52de066 --- /dev/null +++ b/meta-oe/recipes-graphics/xorg-driver/xf86-video-nouveau_1.0.9.bb | |||
@@ -0,0 +1,16 @@ | |||
1 | require recipes-graphics/xorg-driver/xorg-driver-video.inc | ||
2 | |||
3 | LIC_FILES_CHKSUM = "file://COPYING;md5=4641deddaa80fe7ca88e944e1fd94a94" | ||
4 | |||
5 | SUMMARY = "X.Org X server -- nouveau video driver" | ||
6 | |||
7 | DESCRIPTION = "Open-source X.org graphics driver for NVIDIA graphics" | ||
8 | |||
9 | DEPENDS += "virtual/libx11 libxvmc drm xf86driproto glproto \ | ||
10 | virtual/libgl xineramaproto libpciaccess" | ||
11 | RDEPENDS_${PN} += "xserver-xorg-module-exa" | ||
12 | |||
13 | COMPATIBLE_HOST = '(i.86|x86_64).*-linux' | ||
14 | |||
15 | SRC_URI[md5sum] = "8b2c0df5de3929597ade8c5ddb489a44" | ||
16 | SRC_URI[sha256sum] = "b247c800e532fad1c80a5666d8ca0d4e5712064b6d7a3b030b32206a8de04482" | ||