OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/common/drm_util.h" | 5 #include "ui/ozone/platform/drm/common/drm_util.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 #include <stdlib.h> | 8 #include <stdlib.h> |
9 #include <sys/mman.h> | 9 #include <sys/mman.h> |
10 #include <xf86drmMode.h> | 10 #include <xf86drmMode.h> |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 IsAspectPreserving(fd, info->connector()); | 220 IsAspectPreserving(fd, info->connector()); |
221 | 221 |
222 ScopedDrmPropertyBlobPtr edid_blob( | 222 ScopedDrmPropertyBlobPtr edid_blob( |
223 GetDrmPropertyBlob(fd, info->connector(), "EDID")); | 223 GetDrmPropertyBlob(fd, info->connector(), "EDID")); |
224 | 224 |
225 if (edid_blob) { | 225 if (edid_blob) { |
226 std::vector<uint8_t> edid( | 226 std::vector<uint8_t> edid( |
227 static_cast<uint8_t*>(edid_blob->data), | 227 static_cast<uint8_t*>(edid_blob->data), |
228 static_cast<uint8_t*>(edid_blob->data) + edid_blob->length); | 228 static_cast<uint8_t*>(edid_blob->data) + edid_blob->length); |
229 | 229 |
230 if (!GetDisplayIdFromEDID(edid, display_index, ¶ms.display_id)) | 230 if (!GetDisplayIdFromEDID(edid, display_index, ¶ms.display_id, |
| 231 ¶ms.product_id)) |
231 params.display_id = display_index; | 232 params.display_id = display_index; |
232 | 233 |
233 ParseOutputDeviceData(edid, nullptr, ¶ms.display_name, nullptr, | 234 ParseOutputDeviceData(edid, nullptr, ¶ms.display_name, nullptr, |
234 nullptr); | 235 nullptr); |
235 ParseOutputOverscanFlag(edid, ¶ms.has_overscan); | 236 ParseOutputOverscanFlag(edid, ¶ms.has_overscan); |
236 } else { | 237 } else { |
237 VLOG(1) << "Failed to get EDID blob for connector " | 238 VLOG(1) << "Failed to get EDID blob for connector " |
238 << info->connector()->connector_id; | 239 << info->connector()->connector_id; |
239 } | 240 } |
240 | 241 |
(...skipping 16 matching lines...) Expand all Loading... |
257 // since it should be the best mode. | 258 // since it should be the best mode. |
258 if (!params.has_native_mode && !params.modes.empty()) { | 259 if (!params.has_native_mode && !params.modes.empty()) { |
259 params.has_native_mode = true; | 260 params.has_native_mode = true; |
260 params.native_mode = params.modes.front(); | 261 params.native_mode = params.modes.front(); |
261 } | 262 } |
262 | 263 |
263 return params; | 264 return params; |
264 } | 265 } |
265 | 266 |
266 } // namespace ui | 267 } // namespace ui |
OLD | NEW |