summaryrefslogtreecommitdiffstats
path: root/gpu
diff options
context:
space:
mode:
authorzmo@chromium.org <zmo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-15 20:44:39 +0000
committerzmo@chromium.org <zmo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-15 20:44:39 +0000
commitfb6061ef0a7c8ef2ea3acdf6ffd8ee120bed7a29 (patch)
treed74460def5cedd729063dd4dd672301706094044 /gpu
parentc9af6469e65edbce324b68a0358ed73636481187 (diff)
downloadchromium_src-fb6061ef0a7c8ef2ea3acdf6ffd8ee120bed7a29.zip
chromium_src-fb6061ef0a7c8ef2ea3acdf6ffd8ee120bed7a29.tar.gz
chromium_src-fb6061ef0a7c8ef2ea3acdf6ffd8ee120bed7a29.tar.bz2
Be more strict with detecting Optimus on Linux.
I don't really this is the root cause of r371851, but anyway, tighten up the logic seems reasonable. BUG=371851 TEST= R=kbr@chromium.org Review URL: https://codereview.chromium.org/283823002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@270806 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu')
-rw-r--r--gpu/config/gpu_info_collector_x11.cc17
1 files changed, 11 insertions, 6 deletions
diff --git a/gpu/config/gpu_info_collector_x11.cc b/gpu/config/gpu_info_collector_x11.cc
index d4288b7..19232c6 100644
--- a/gpu/config/gpu_info_collector_x11.cc
+++ b/gpu/config/gpu_info_collector_x11.cc
@@ -237,13 +237,18 @@ CollectInfoResult CollectBasicGraphicsInfo(GPUInfo* gpu_info) {
case kVendorIDIntel:
// In dual-GPU cases, sometimes PCI scan only gives us the
// integrated GPU (i.e., the Intel one).
- driver_version = CollectDriverVersionNVidia();
- if (!driver_version.empty()) {
- gpu_info->driver_vendor = "NVIDIA";
- gpu_info->driver_version = driver_version;
- // Machines with more than two GPUs are not handled.
- if (gpu_info->secondary_gpus.size() <= 1)
+ if (gpu_info->secondary_gpus.size() == 0) {
+ driver_version = CollectDriverVersionNVidia();
+ if (!driver_version.empty()) {
+ gpu_info->driver_vendor = "NVIDIA";
+ gpu_info->driver_version = driver_version;
gpu_info->optimus = true;
+ // Put Intel to the secondary GPU list.
+ gpu_info->secondary_gpus.push_back(gpu_info->gpu);
+ // Put NVIDIA as the primary GPU.
+ gpu_info->gpu.vendor_id = kVendorIDNVidia;
+ gpu_info->gpu.device_id = 0; // Unknown Device.
+ }
}
break;
}