diff options
author | zmo@chromium.org <zmo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-22 23:03:13 +0000 |
---|---|---|
committer | zmo@chromium.org <zmo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-22 23:03:13 +0000 |
commit | e98b9843df7437f81a7ee03de0a0191478514cd3 (patch) | |
tree | 7f140a09eeeb3de013e11d9f979a3742e1df9fdf /content | |
parent | 6594ccf5f60a029de3679b13726e0de8f522cb61 (diff) | |
download | chromium_src-e98b9843df7437f81a7ee03de0a0191478514cd3.zip chromium_src-e98b9843df7437f81a7ee03de0a0191478514cd3.tar.gz chromium_src-e98b9843df7437f81a7ee03de0a0191478514cd3.tar.bz2 |
Make optimus GPU detection more robust on Linux.
Sometimes PCI scan fails to identify both Intel/NVIDIA GPUs, but if we identify the Intel GPU, and the NVIDIA driver, then we can safely claim it's a Intel/NVIDIA dual-GPU situatio.
BUG=140022
TEST=
Review URL: https://chromiumcodereview.appspot.com/10876022
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@152863 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r-- | content/gpu/gpu_info_collector_linux.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/content/gpu/gpu_info_collector_linux.cc b/content/gpu/gpu_info_collector_linux.cc index cdad81b..ab5799f 100644 --- a/content/gpu/gpu_info_collector_linux.cc +++ b/content/gpu/gpu_info_collector_linux.cc @@ -247,6 +247,18 @@ bool CollectPreliminaryGraphicsInfo(content::GPUInfo* gpu_info) { gpu_info->driver_version = driver_version; } break; + 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) + gpu_info->optimus = true; + } + break; } return rt; |