OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ui/ozone/platform/drm/gpu/drm_device_manager.h" | 5 #include "ui/ozone/platform/drm/gpu/drm_device_manager.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/file_descriptor_posix.h" | 9 #include "base/file_descriptor_posix.h" |
10 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 auto it = | 43 auto it = |
44 std::find_if(devices_.begin(), devices_.end(), FindByDevicePath(path)); | 44 std::find_if(devices_.begin(), devices_.end(), FindByDevicePath(path)); |
45 if (it != devices_.end()) { | 45 if (it != devices_.end()) { |
46 VLOG(2) << "Got request to add existing device: " << path.value(); | 46 VLOG(2) << "Got request to add existing device: " << path.value(); |
47 return false; | 47 return false; |
48 } | 48 } |
49 | 49 |
50 scoped_refptr<DrmDevice> device = drm_device_generator_->CreateDevice( | 50 scoped_refptr<DrmDevice> device = drm_device_generator_->CreateDevice( |
51 path, std::move(file), !primary_device_); | 51 path, std::move(file), !primary_device_); |
52 if (!device) { | 52 if (!device) { |
53 LOG(WARNING) << "Could not initialize DRM device for " << path.value(); | 53 // This is expected for non-modesetting devices like VGEM. |
| 54 VLOG(1) << "Could not initialize DRM device for " << path.value(); |
54 return false; | 55 return false; |
55 } | 56 } |
56 | 57 |
57 if (!primary_device_) | 58 if (!primary_device_) |
58 primary_device_ = device; | 59 primary_device_ = device; |
59 | 60 |
60 devices_.push_back(device); | 61 devices_.push_back(device); |
61 return true; | 62 return true; |
62 } | 63 } |
63 | 64 |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 | 104 |
104 scoped_refptr<DrmDevice> DrmDeviceManager::GetPrimaryDrmDevice() { | 105 scoped_refptr<DrmDevice> DrmDeviceManager::GetPrimaryDrmDevice() { |
105 return primary_device_; | 106 return primary_device_; |
106 } | 107 } |
107 | 108 |
108 const DrmDeviceVector& DrmDeviceManager::GetDrmDevices() const { | 109 const DrmDeviceVector& DrmDeviceManager::GetDrmDevices() const { |
109 return devices_; | 110 return devices_; |
110 } | 111 } |
111 | 112 |
112 } // namespace ui | 113 } // namespace ui |
OLD | NEW |