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

Proposed by Nick Andrik
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
Timo Aaltonen Pending
Dimitri John Ledkov (ex-credativ) Pending
Ubuntu branches 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

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

Revision history for this message
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
Revision history for this message
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

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

Revision history for this message
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

Revision history for this message
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
Revision history for this message
Nick Andrik (andrikos) wrote :

Added him, thanks!

Revision history for this message
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

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

176. By Nick Andrik

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

175. By Nick Andrik

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

174. By Nick Andrik

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

Subscribers

People subscribed via source and target branches

to all changes: