Merge lp:~townsend/compiz/blacklist-nvidia-x11-sync into lp:compiz/0.9.12

Proposed by Christopher Townsend
Status: Merged
Approved by: Stephen M. Webb
Approved revision: 3927
Merged at revision: 3928
Proposed branch: lp:~townsend/compiz/blacklist-nvidia-x11-sync
Merge into: lp:compiz/0.9.12
Diff against target: 57 lines (+25/-2)
1 file modified
plugins/opengl/src/screen.cpp (+25/-2)
To merge this branch: bzr merge lp:~townsend/compiz/blacklist-nvidia-x11-sync
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Stephen M. Webb Approve
Review via email: mp+251147@code.launchpad.net

Commit message

Add a blacklist of Nvidia integrated GPU's affected by the Nvidia X11 Sync patch.

Description of the change

This is to make a blacklist of Nvidia integrated GPU's that are affected by the recent X11 Sync patch provided by Nvidia.

According to bug reports, it seems only integrated GPU's with AMD CPU's are affected. In as such, I made some guesses as to which GPU's are affected based on user feedback and this website: http://www.nvidia.com/object/mobo_gpu_tech_specs.html

Since I have no way to test this, I'm creating a PPA and asking users affected to test and report back.

To post a comment you must log in.
Revision history for this message
Stephen M. Webb (bregma) wrote :

Looks OK to me.

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/opengl/src/screen.cpp'
2--- plugins/opengl/src/screen.cpp 2014-12-10 19:45:03 +0000
3+++ plugins/opengl/src/screen.cpp 2015-02-26 19:10:51 +0000
4@@ -74,6 +74,15 @@
5 static const size_t NUM_X11_SYNCS = 16;
6
7 /**
8+ * The GPUs to blacklist for X11 sync
9+ */
10+static const char* BLACKLIST_X11_SYNC_GPUS[] = { "GeForce 6150LE",
11+ "GeForce 6150SE",
12+ "GeForce 7025",
13+ "GeForce 7050 PV" };
14+static const int BLACKLIST_SZ = sizeof(BLACKLIST_X11_SYNC_GPUS) / sizeof(BLACKLIST_X11_SYNC_GPUS[0]);
15+
16+/**
17 * The maximum time to wait for a sync object, in nanoseconds.
18 */
19 static const GLuint64 MAX_SYNC_WAIT_TIME = 1000000000ull; // One second
20@@ -564,6 +573,8 @@
21 DetectionWorkaround workaround;
22 #endif
23
24+ int i;
25+
26 #ifdef USE_GLES
27 Display *xdpy;
28 Window overlay;
29@@ -621,7 +632,7 @@
30 visualid = XVisualIDFromVisual (attr.visual);
31 config = configs[0];
32
33- for (int i = 0; i < count; ++i)
34+ for (i = 0; i < count; ++i)
35 {
36 eglGetConfigAttrib (dpy, configs[i], EGL_SAMPLE_BUFFERS, &val);
37 if (val > msaaBuffers)
38@@ -1101,7 +1112,19 @@
39 GL::importSync = (GL::GLImportSyncProc)
40 getProcAddress ("glImportSyncEXT");
41
42- if (GL::importSync)
43+ bool blacklist = false;
44+
45+ for (i = 0; i < BLACKLIST_SZ; ++i)
46+ {
47+ if (strstr (glVendor, "NVIDIA") &&
48+ strstr (glRenderer, BLACKLIST_X11_SYNC_GPUS[i]))
49+ {
50+ blacklist = true;
51+ break;
52+ }
53+ }
54+
55+ if (GL::importSync && !blacklist)
56 GL::xToGLSync = true;
57 }
58

Subscribers

People subscribed via source and target branches