Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(298)

Side by Side Diff: ui/ozone/platform/drm/common/drm_util.cc

Issue 1151583002: Generate display product id with EDID manufacturer product code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
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, &params.display_id, 230 if (!GetDisplayIdFromEDID(edid, display_index, &params.display_id,
231 &params.product_id)) 231 &params.product_id))
232 params.display_id = display_index; 232 params.display_id = display_index;
233 233
234 ParseOutputDeviceData(edid, nullptr, &params.display_name, nullptr, 234 ParseOutputDeviceData(edid, nullptr, nullptr, &params.display_name, nullptr,
235 nullptr); 235 nullptr);
236 ParseOutputOverscanFlag(edid, &params.has_overscan); 236 ParseOutputOverscanFlag(edid, &params.has_overscan);
237 } else { 237 } else {
238 VLOG(1) << "Failed to get EDID blob for connector " 238 VLOG(1) << "Failed to get EDID blob for connector "
239 << info->connector()->connector_id; 239 << info->connector()->connector_id;
240 } 240 }
241 241
242 for (int i = 0; i < info->connector()->count_modes; ++i) { 242 for (int i = 0; i < info->connector()->count_modes; ++i) {
243 const drmModeModeInfo& mode = info->connector()->modes[i]; 243 const drmModeModeInfo& mode = info->connector()->modes[i];
244 params.modes.push_back(CreateDisplayModeParams(mode)); 244 params.modes.push_back(CreateDisplayModeParams(mode));
(...skipping 13 matching lines...) Expand all
258 // since it should be the best mode. 258 // since it should be the best mode.
259 if (!params.has_native_mode && !params.modes.empty()) { 259 if (!params.has_native_mode && !params.modes.empty()) {
260 params.has_native_mode = true; 260 params.has_native_mode = true;
261 params.native_mode = params.modes.front(); 261 params.native_mode = params.modes.front();
262 } 262 }
263 263
264 return params; 264 return params;
265 } 265 }
266 266
267 } // namespace ui 267 } // namespace ui
OLDNEW
« ui/display/util/edid_parser.cc ('K') | « ui/display/util/x11/edid_parser_x11.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698