Merge lp:~andrikos/ubuntu/quantal/xserver-xorg-video-intel/fix-ati-hybrid into lp:ubuntu/quantal/xserver-xorg-video-intel

Proposed by Nick Andrik on 2012-12-19
Status: Work in progress
Proposed branch: lp:~andrikos/ubuntu/quantal/xserver-xorg-video-intel/fix-ati-hybrid
Merge into: lp:ubuntu/quantal/xserver-xorg-video-intel
Diff against target: 180 lines (+162/-0)
3 files modified
debian/changelog (+6/-0)
debian/patches/fix-ati-hybrid.patch (+155/-0)
debian/patches/series (+1/-0)
To merge this branch: bzr merge lp:~andrikos/ubuntu/quantal/xserver-xorg-video-intel/fix-ati-hybrid
Reviewer Review Type Date Requested Status
Dimitri John Ledkov Needs Information on 2013-01-04
Timo Aaltonen 2013-01-04 Pending
Dimitri John Ledkov (ex-credativ) 2013-01-04 Pending
Ubuntu branches 2012-12-19 Pending
Review via email: mp+140578@code.launchpad.net

Description of the change

The patch proposed is practically the only way to get hybrid fglrx/intel systems working using intel driver of 2.20.2 and above. It affects all ubuntu versions from Quantal and on.

What it does is reverting a commit from upstream intel driver that causes the incompatibility (X server crashing with segmentation fault) with the fglrx driver.

Upstream developer has already commented that this is a safe commit to revert:
https://bugs.freedesktop.org/show_bug.cgi?id=56494#c6

To post a comment you must log in.
176. By Nick Andrik on 2012-12-19

Added (LP: #1068404) in the list of the bugs fixed by this patch

Dimitri John Ledkov (xnox) wrote :

has this been already fixed in raring?
For SRU the version number is not appropriate.
There is no need to mention bugs that are now duplicates (bug #1068661)
The bug description should be updated as per SRU template.
https://wiki.ubuntu.com/StableReleaseUpdates#SRU_Bug_Template

review: Needs Information
Nick Andrik (andrikos) wrote :

No, it's not fixed in raring.
The initial branch was against the quantal version, if needed I can update it against raring.

The bugs were mentioned before one of them was marked as duplicate (it was not clear at that time), I can remove it from the changelog.

The detail description as how the bug is fixed is included in the patch description. Having this along the bug number should be ok, no?

In nay case, please let me know of the things needed and I will update the branch.

This patch should also be included in quantal, since the hybrid fglrx/intel systems there are broken without this fix.

Thanks

177. By Nick Andrik on 2013-01-04

- Updated package version to mark NMU for SRU
- Removed reference to (LP: #1068661) since it is now a confirmed duplicate

Nick Andrik (andrikos) wrote :

LP: #1068404

[Impact]

 * Hybrid systems with ATI/intel GPUs using fglrx get a segmentation fault in X when using 12.10. In 12.04 these systems were working fine.

 * This bug represents a severe regression from precise to quantal, since is crashing on startup

 * It reverts the following upstream commit which has "hidden" some global symbols of the intel driver:
http://cgit.freedesktop.org/xorg/driver/xf86-video-intel/commit/?id=05dcc5f1699ba90fc14c50882e8d4be89bc4a4f9

[Test Case]

 * Get an hybrid ATI/intel system.
   Install quantal: The system should boot fine
   Install the proprietary fglrx package and reboot: The X server crashes on startup

[Regression Potential]

 * Upstream has stated that reverting this patch should be safe enough for SRU (mainly Comment 7):
https://bugs.freedesktop.org/show_bug.cgi?id=56494#c6

 * This patch has enabled many users to have their hybrid systems working. No reported regressions so far

[Other Info]

 * To the best of my knowledge this patch is currently the only known way to get fglrx/intel hybrid systems to work in quantal. It has been tested by many users in the bug report and this change fixed their systems

Dimitri John Ledkov (xnox) wrote :

I have asked tjaalton to look into this bug report/merge proposal again.
Please, wait on him to review it.

review: Needs Information
Nick Andrik (andrikos) wrote :

Added him, thanks!

Nick Andrik (andrikos) wrote :

There has been a regression found if radeon/intel system is used (without fglrx), where the X crashes when using this patch.
Since this is an X crash on the default configuration, this branch is not suitable for SRU yet

Unmerged revisions

177. By Nick Andrik on 2013-01-04

- Updated package version to mark NMU for SRU
- Removed reference to (LP: #1068661) since it is now a confirmed duplicate

176. By Nick Andrik on 2012-12-19

Added (LP: #1068404) in the list of the bugs fixed by this patch

175. By Nick Andrik on 2012-11-05

Removing reference to (LP: #1068661) since it is not a confirmed duplicate

174. By Nick Andrik on 2012-11-05

Add fix-ati-hybrid.patch to fix ATI/Intel hybrid setups
(LP: #1068404, #1068661)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2012-10-01 15:39:54 +0000
3+++ debian/changelog 2013-01-04 01:46:21 +0000
4@@ -1,3 +1,9 @@
5+xserver-xorg-video-intel (2:2.20.9-0ubuntu2.1) quantal; urgency=low
6+
7+ * Add fix-ati-hybrid.patch to fix ATI/Intel hybrid setups (LP: #1068404)
8+
9+ -- Nick Andrik <nick.andrik@gmail.com> Fri, 04 Jan 2013 03:35:08 +0200
10+
11 xserver-xorg-video-intel (2:2.20.9-0ubuntu2) quantal; urgency=low
12
13 [ Maarten Lankhorst ]
14
15=== added file 'debian/patches/fix-ati-hybrid.patch'
16--- debian/patches/fix-ati-hybrid.patch 1970-01-01 00:00:00 +0000
17+++ debian/patches/fix-ati-hybrid.patch 2013-01-04 01:46:21 +0000
18@@ -0,0 +1,155 @@
19+Fixes regression for ati/intel hybrid systems
20+by reverting some commits of xf86-video-intel:
21+
22+ commit 05dcc5f1699ba90fc14c50882e8d4be89bc4a4f9
23+ Author: Chris Wilson <chris@chris-wilson.co.uk>
24+ Date: Fri Aug 3 15:08:45 2012 +0100
25+
26+ Pass the chipset info through driverPrivate rather than a global pointer
27+
28+
29+Nick Andrik <nick.andrik@gmail.com>
30+Index: xserver-xorg-video-intel-2.20.9/src/intel_driver.c
31+===================================================================
32+--- xserver-xorg-video-intel-2.20.9.orig/src/intel_driver.c 2012-10-30 02:54:05.456713161 +0100
33++++ xserver-xorg-video-intel-2.20.9/src/intel_driver.c 2012-10-30 02:54:16.186075606 +0100
34+@@ -185,7 +185,7 @@
35+ static void intel_check_chipset_option(ScrnInfoPtr scrn)
36+ {
37+ intel_screen_private *intel = intel_get_screen_private(scrn);
38+- intel_detect_chipset(scrn, intel->pEnt, intel->PciInfo);
39++ intel->info = intel_detect_chipset(scrn, intel->pEnt, intel->PciInfo);
40+ }
41+
42+ static Bool I830GetEarlyOptions(ScrnInfoPtr scrn)
43+@@ -491,15 +491,14 @@
44+ if (flags & PROBE_DETECT)
45+ return TRUE;
46+
47+- if (((uintptr_t)scrn->driverPrivate) & 1) {
48+- intel = xnfcalloc(sizeof(*intel), 1);
49++ intel = intel_get_screen_private(scrn);
50++ if (intel == NULL) {
51++ intel = xnfcalloc(sizeof(intel_screen_private), 1);
52+ if (intel == NULL)
53+ return FALSE;
54+
55+- intel->info = (void *)((uintptr_t)scrn->driverPrivate & ~1);
56+ scrn->driverPrivate = intel;
57+ }
58+- intel = intel_get_screen_private(scrn);
59+ intel->scrn = scrn;
60+ intel->pEnt = pEnt;
61+
62+Index: xserver-xorg-video-intel-2.20.9/src/intel_driver.h
63+===================================================================
64+--- xserver-xorg-video-intel-2.20.9.orig/src/intel_driver.h 2012-10-30 02:54:05.456713161 +0100
65++++ xserver-xorg-video-intel-2.20.9/src/intel_driver.h 2012-10-30 02:54:16.186075606 +0100
66+@@ -277,9 +277,9 @@
67+ int gen;
68+ };
69+
70+-void intel_detect_chipset(ScrnInfoPtr scrn,
71+- EntityInfoPtr ent,
72+- struct pci_device *pci);
73++const struct intel_device_info *
74++intel_detect_chipset(ScrnInfoPtr scrn,
75++ EntityInfoPtr ent, struct pci_device *pci);
76+
77+
78+ #endif /* INTEL_DRIVER_H */
79+Index: xserver-xorg-video-intel-2.20.9/src/intel_module.c
80+===================================================================
81+--- xserver-xorg-video-intel-2.20.9.orig/src/intel_module.c 2012-10-30 02:54:05.456713161 +0100
82++++ xserver-xorg-video-intel-2.20.9/src/intel_module.c 2012-10-30 02:54:16.186075606 +0100
83+@@ -51,6 +51,8 @@
84+ #include <xf86platformBus.h>
85+ #endif
86+
87++static struct intel_device_info *chipset_info;
88++
89+ static const struct intel_device_info intel_generic_info = {
90+ .gen = -1,
91+ };
92+@@ -315,10 +317,9 @@
93+ { 0, 0, 0 },
94+ };
95+
96+-void
97++const struct intel_device_info *
98+ intel_detect_chipset(ScrnInfoPtr scrn,
99+- EntityInfoPtr ent,
100+- struct pci_device *pci)
101++ EntityInfoPtr ent, struct pci_device *pci)
102+ {
103+ MessageType from = X_PROBED;
104+ const char *name = NULL;
105+@@ -347,6 +348,7 @@
106+ }
107+
108+ scrn->chipset = name;
109++ return chipset_info;
110+ }
111+
112+ /*
113+@@ -481,6 +483,8 @@
114+ PciChipsets intel_pci_chipsets[NUM_CHIPSETS];
115+ unsigned i;
116+
117++ chipset_info = (void *)match_data;
118++
119+ if (!has_kernel_mode_setting(device)) {
120+ #if KMS_ONLY
121+ return FALSE;
122+@@ -515,7 +519,6 @@
123+ scrn->driverVersion = INTEL_VERSION;
124+ scrn->driverName = INTEL_DRIVER_NAME;
125+ scrn->name = INTEL_NAME;
126+- scrn->driverPrivate = (void *)(match_data | 1);
127+ scrn->Probe = NULL;
128+
129+ #if !KMS_ONLY
130+Index: xserver-xorg-video-intel-2.20.9/src/legacy/i810/i810_driver.c
131+===================================================================
132+--- xserver-xorg-video-intel-2.20.9.orig/src/legacy/i810/i810_driver.c 2012-10-30 02:54:05.456713161 +0100
133++++ xserver-xorg-video-intel-2.20.9/src/legacy/i810/i810_driver.c 2012-10-30 02:54:16.186075606 +0100
134+@@ -151,7 +151,7 @@
135+ static Bool
136+ I810GetRec(ScrnInfoPtr scrn)
137+ {
138+- if (((uintptr_t)scrn->driverPrivate & 1) == 0)
139++ if (scrn->driverPrivate)
140+ return TRUE;
141+
142+ scrn->driverPrivate = xnfcalloc(sizeof(I810Rec), 1);
143+Index: xserver-xorg-video-intel-2.20.9/src/sna/sna_driver.c
144+===================================================================
145+--- xserver-xorg-video-intel-2.20.9.orig/src/sna/sna_driver.c 2012-10-30 02:54:05.456713161 +0100
146++++ xserver-xorg-video-intel-2.20.9/src/sna/sna_driver.c 2012-10-30 02:54:16.190077605 +0100
147+@@ -407,15 +407,14 @@
148+
149+ sna_selftest();
150+
151+- if (((uintptr_t)scrn->driverPrivate) & 1) {
152++ sna = to_sna(scrn);
153++ if (sna == NULL) {
154+ sna = xnfcalloc(sizeof(struct sna), 1);
155+ if (sna == NULL)
156+ return FALSE;
157+
158+- sna->info = (void *)((uintptr_t)scrn->driverPrivate & ~1);
159+ scrn->driverPrivate = sna;
160+ }
161+- sna = to_sna(scrn);
162+ sna->scrn = scrn;
163+ sna->pEnt = pEnt;
164+
165+@@ -465,7 +464,7 @@
166+
167+ sna_setup_capabilities(scrn, fd);
168+
169+- intel_detect_chipset(scrn, sna->pEnt, sna->PciInfo);
170++ sna->info = intel_detect_chipset(scrn, sna->pEnt, sna->PciInfo);
171+
172+ kgem_init(&sna->kgem, fd, sna->PciInfo, sna->info->gen);
173+ if (xf86ReturnOptValBool(sna->Options, OPTION_ACCEL_DISABLE, FALSE)) {
174
175=== modified file 'debian/patches/series'
176--- debian/patches/series 2012-10-01 15:39:54 +0000
177+++ debian/patches/series 2013-01-04 01:46:21 +0000
178@@ -1,1 +1,2 @@
179 fix-glamor-check.diff
180+fix-ati-hybrid.patch

Subscribers

People subscribed via source and target branches

to all changes: