blob: 25273ac499091136c8cb4b6882ec9f2a9c7d2b7e [file] [log] [blame]
Sean Paul6a55e9f2015-04-30 15:31:06 -04001/*
2 * Copyright (C) 2015 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
Alexandru Gheorghe0f5abd72018-05-01 14:37:10 +010017#define LOG_TAG "hwc-drm-device"
Sean Paul6a55e9f2015-04-30 15:31:06 -040018
19#include "drmconnector.h"
20#include "drmcrtc.h"
21#include "drmencoder.h"
Sean Paul047b9b22015-07-28 14:15:42 -040022#include "drmeventlistener.h"
Sean Paul6a55e9f2015-04-30 15:31:06 -040023#include "drmplane.h"
Alexandru Gheorghe0f5abd72018-05-01 14:37:10 +010024#include "drmdevice.h"
Sean Paul6a55e9f2015-04-30 15:31:06 -040025
Sean Paulf741c672016-05-11 13:49:38 -040026#include <cinttypes>
Sean Paul6a55e9f2015-04-30 15:31:06 -040027#include <errno.h>
28#include <fcntl.h>
29#include <stdint.h>
30#include <xf86drm.h>
31#include <xf86drmMode.h>
32
John Stultz9057a6f2018-04-26 12:05:55 -070033#include <log/log.h>
Sean Paul6a55e9f2015-04-30 15:31:06 -040034#include <cutils/properties.h>
35
36namespace android {
37
Alexandru Gheorghe0f5abd72018-05-01 14:37:10 +010038DrmDevice::DrmDevice() : event_listener_(this) {
Sean Paul047b9b22015-07-28 14:15:42 -040039}
40
Alexandru Gheorghe0f5abd72018-05-01 14:37:10 +010041DrmDevice::~DrmDevice() {
Sean Paul047b9b22015-07-28 14:15:42 -040042 event_listener_.Exit();
Sean Paul6a55e9f2015-04-30 15:31:06 -040043}
44
Alexandru Gheorghec5463582018-03-27 15:52:02 +010045std::tuple<int, int> DrmDevice::Init(const char *path, int num_displays) {
Sean Paul6a55e9f2015-04-30 15:31:06 -040046 /* TODO: Use drmOpenControl here instead */
Zach Reiznerff30b522015-10-28 19:08:45 -070047 fd_.Set(open(path, O_RDWR));
48 if (fd() < 0) {
Sean Paul6a55e9f2015-04-30 15:31:06 -040049 ALOGE("Failed to open dri- %s", strerror(-errno));
Alexandru Gheorghec5463582018-03-27 15:52:02 +010050 return std::make_tuple(-ENODEV, 0);
Sean Paul6a55e9f2015-04-30 15:31:06 -040051 }
52
Zach Reiznerff30b522015-10-28 19:08:45 -070053 int ret = drmSetClientCap(fd(), DRM_CLIENT_CAP_UNIVERSAL_PLANES, 1);
Sean Paul6a55e9f2015-04-30 15:31:06 -040054 if (ret) {
55 ALOGE("Failed to set universal plane cap %d", ret);
Alexandru Gheorghec5463582018-03-27 15:52:02 +010056 return std::make_tuple(ret, 0);
Sean Paul6a55e9f2015-04-30 15:31:06 -040057 }
58
Zach Reiznerff30b522015-10-28 19:08:45 -070059 ret = drmSetClientCap(fd(), DRM_CLIENT_CAP_ATOMIC, 1);
Sean Paul6a55e9f2015-04-30 15:31:06 -040060 if (ret) {
61 ALOGE("Failed to set atomic cap %d", ret);
Alexandru Gheorghec5463582018-03-27 15:52:02 +010062 return std::make_tuple(ret, 0);
Sean Paul6a55e9f2015-04-30 15:31:06 -040063 }
64
Zach Reiznerff30b522015-10-28 19:08:45 -070065 drmModeResPtr res = drmModeGetResources(fd());
Sean Paul6a55e9f2015-04-30 15:31:06 -040066 if (!res) {
Alexandru Gheorghe0f5abd72018-05-01 14:37:10 +010067 ALOGE("Failed to get DrmDevice resources");
Alexandru Gheorghec5463582018-03-27 15:52:02 +010068 return std::make_tuple(-ENODEV, 0);
Sean Paul6a55e9f2015-04-30 15:31:06 -040069 }
70
Sean Paul406dbfc2016-02-10 15:35:17 -080071 min_resolution_ =
72 std::pair<uint32_t, uint32_t>(res->min_width, res->min_height);
73 max_resolution_ =
74 std::pair<uint32_t, uint32_t>(res->max_width, res->max_height);
75
Alexandru Gheorghec5463582018-03-27 15:52:02 +010076 // Assumes that the primary display will always be in the first
77 // drm_device opened.
78 bool found_primary = num_displays != 0;
Sean Paul6a55e9f2015-04-30 15:31:06 -040079
80 for (int i = 0; !ret && i < res->count_crtcs; ++i) {
Zach Reiznerff30b522015-10-28 19:08:45 -070081 drmModeCrtcPtr c = drmModeGetCrtc(fd(), res->crtcs[i]);
Sean Paul6a55e9f2015-04-30 15:31:06 -040082 if (!c) {
83 ALOGE("Failed to get crtc %d", res->crtcs[i]);
84 ret = -ENODEV;
85 break;
86 }
87
Zach Reiznerff30b522015-10-28 19:08:45 -070088 std::unique_ptr<DrmCrtc> crtc(new DrmCrtc(this, c, i));
Sean Paul6a55e9f2015-04-30 15:31:06 -040089 drmModeFreeCrtc(c);
90
Sean Paul877be972015-06-03 14:08:27 -040091 ret = crtc->Init();
92 if (ret) {
93 ALOGE("Failed to initialize crtc %d", res->crtcs[i]);
Sean Paul877be972015-06-03 14:08:27 -040094 break;
95 }
Zach Reiznerff30b522015-10-28 19:08:45 -070096 crtcs_.emplace_back(std::move(crtc));
Sean Paul6a55e9f2015-04-30 15:31:06 -040097 }
98
Alexandru Gheorghee8b668c2018-03-22 11:31:29 +000099 std::vector<int> possible_clones;
Sean Paul6a55e9f2015-04-30 15:31:06 -0400100 for (int i = 0; !ret && i < res->count_encoders; ++i) {
Zach Reiznerff30b522015-10-28 19:08:45 -0700101 drmModeEncoderPtr e = drmModeGetEncoder(fd(), res->encoders[i]);
Sean Paul6a55e9f2015-04-30 15:31:06 -0400102 if (!e) {
103 ALOGE("Failed to get encoder %d", res->encoders[i]);
104 ret = -ENODEV;
105 break;
106 }
107
108 std::vector<DrmCrtc *> possible_crtcs;
109 DrmCrtc *current_crtc = NULL;
Zach Reiznerff30b522015-10-28 19:08:45 -0700110 for (auto &crtc : crtcs_) {
111 if ((1 << crtc->pipe()) & e->possible_crtcs)
112 possible_crtcs.push_back(crtc.get());
Sean Paul6a55e9f2015-04-30 15:31:06 -0400113
Zach Reiznerff30b522015-10-28 19:08:45 -0700114 if (crtc->id() == e->crtc_id)
115 current_crtc = crtc.get();
Sean Paul6a55e9f2015-04-30 15:31:06 -0400116 }
117
Zach Reiznerff30b522015-10-28 19:08:45 -0700118 std::unique_ptr<DrmEncoder> enc(
119 new DrmEncoder(e, current_crtc, possible_crtcs));
Alexandru Gheorghee8b668c2018-03-22 11:31:29 +0000120 possible_clones.push_back(e->possible_clones);
Sean Paul6a55e9f2015-04-30 15:31:06 -0400121 drmModeFreeEncoder(e);
122
Zach Reiznerff30b522015-10-28 19:08:45 -0700123 encoders_.emplace_back(std::move(enc));
Sean Paul6a55e9f2015-04-30 15:31:06 -0400124 }
125
Alexandru Gheorghee8b668c2018-03-22 11:31:29 +0000126 for (unsigned int i = 0; i < encoders_.size(); i++) {
127 for (unsigned int j = 0; j < encoders_.size(); j++)
128 if (possible_clones[i] & (1 << j))
129 encoders_[i]->AddPossibleClone(encoders_[j].get());
130 }
131
Sean Paul6a55e9f2015-04-30 15:31:06 -0400132 for (int i = 0; !ret && i < res->count_connectors; ++i) {
Zach Reiznerff30b522015-10-28 19:08:45 -0700133 drmModeConnectorPtr c = drmModeGetConnector(fd(), res->connectors[i]);
Sean Paul6a55e9f2015-04-30 15:31:06 -0400134 if (!c) {
135 ALOGE("Failed to get connector %d", res->connectors[i]);
136 ret = -ENODEV;
137 break;
138 }
139
140 std::vector<DrmEncoder *> possible_encoders;
141 DrmEncoder *current_encoder = NULL;
142 for (int j = 0; j < c->count_encoders; ++j) {
Zach Reiznerff30b522015-10-28 19:08:45 -0700143 for (auto &encoder : encoders_) {
144 if (encoder->id() == c->encoders[j])
145 possible_encoders.push_back(encoder.get());
146 if (encoder->id() == c->encoder_id)
147 current_encoder = encoder.get();
Sean Paul6a55e9f2015-04-30 15:31:06 -0400148 }
149 }
150
Zach Reiznerff30b522015-10-28 19:08:45 -0700151 std::unique_ptr<DrmConnector> conn(
152 new DrmConnector(this, c, current_encoder, possible_encoders));
Sean Paul6a55e9f2015-04-30 15:31:06 -0400153
154 drmModeFreeConnector(c);
155
Sean Paul6a55e9f2015-04-30 15:31:06 -0400156 ret = conn->Init();
157 if (ret) {
158 ALOGE("Init connector %d failed", res->connectors[i]);
Sean Paul6a55e9f2015-04-30 15:31:06 -0400159 break;
160 }
Sean Paul6a55e9f2015-04-30 15:31:06 -0400161
Robert Foss610d9892017-11-01 12:50:04 -0500162 connectors_.emplace_back(std::move(conn));
163 }
164
165 // First look for primary amongst internal connectors
166 for (auto &conn : connectors_) {
167 if (conn->internal() && !found_primary) {
Alexandru Gheorghec5463582018-03-27 15:52:02 +0100168 conn->set_display(num_displays);
169 displays_[num_displays] = num_displays;
170 ++num_displays;
Sean Paul6a55e9f2015-04-30 15:31:06 -0400171 found_primary = true;
Alexandru Gheorghec5463582018-03-27 15:52:02 +0100172 break;
Sean Paul6a55e9f2015-04-30 15:31:06 -0400173 }
174 }
Robert Foss610d9892017-11-01 12:50:04 -0500175
Alexandru Gheorghec5463582018-03-27 15:52:02 +0100176 // Then pick first available as primary and for the others assign
177 // consecutive display_numbers.
Robert Foss610d9892017-11-01 12:50:04 -0500178 for (auto &conn : connectors_) {
Alexandru Gheorghec5463582018-03-27 15:52:02 +0100179 if (conn->external() || conn->internal()) {
180 if (!found_primary) {
181 conn->set_display(num_displays);
182 displays_[num_displays] = num_displays;
183 found_primary = true;
184 ++num_displays;
185 } else if (conn->display() < 0) {
186 conn->set_display(num_displays);
187 displays_[num_displays] = num_displays;
188 ++num_displays;
189 }
Robert Foss610d9892017-11-01 12:50:04 -0500190 }
191 }
192
Sean Paul6a55e9f2015-04-30 15:31:06 -0400193 if (res)
194 drmModeFreeResources(res);
195
196 // Catch-all for the above loops
197 if (ret)
Alexandru Gheorghec5463582018-03-27 15:52:02 +0100198 return std::make_tuple(ret, 0);
Sean Paul6a55e9f2015-04-30 15:31:06 -0400199
Zach Reiznerff30b522015-10-28 19:08:45 -0700200 drmModePlaneResPtr plane_res = drmModeGetPlaneResources(fd());
Sean Paul6a55e9f2015-04-30 15:31:06 -0400201 if (!plane_res) {
202 ALOGE("Failed to get plane resources");
Alexandru Gheorghec5463582018-03-27 15:52:02 +0100203 return std::make_tuple(-ENOENT, 0);
Sean Paul6a55e9f2015-04-30 15:31:06 -0400204 }
205
206 for (uint32_t i = 0; i < plane_res->count_planes; ++i) {
Zach Reiznerff30b522015-10-28 19:08:45 -0700207 drmModePlanePtr p = drmModeGetPlane(fd(), plane_res->planes[i]);
Sean Paul6a55e9f2015-04-30 15:31:06 -0400208 if (!p) {
209 ALOGE("Failed to get plane %d", plane_res->planes[i]);
210 ret = -ENODEV;
211 break;
212 }
213
Zach Reiznerff30b522015-10-28 19:08:45 -0700214 std::unique_ptr<DrmPlane> plane(new DrmPlane(this, p));
Sean Paul6a55e9f2015-04-30 15:31:06 -0400215
216 drmModeFreePlane(p);
217
Sean Paul6a55e9f2015-04-30 15:31:06 -0400218 ret = plane->Init();
219 if (ret) {
220 ALOGE("Init plane %d failed", plane_res->planes[i]);
Sean Paul6a55e9f2015-04-30 15:31:06 -0400221 break;
222 }
223
Zach Reiznerff30b522015-10-28 19:08:45 -0700224 planes_.emplace_back(std::move(plane));
Sean Paul6a55e9f2015-04-30 15:31:06 -0400225 }
226 drmModeFreePlaneResources(plane_res);
227 if (ret)
Alexandru Gheorghec5463582018-03-27 15:52:02 +0100228 return std::make_tuple(ret, 0);
Sean Paul6a55e9f2015-04-30 15:31:06 -0400229
Sean Paul047b9b22015-07-28 14:15:42 -0400230 ret = event_listener_.Init();
231 if (ret) {
232 ALOGE("Can't initialize event listener %d", ret);
Alexandru Gheorghec5463582018-03-27 15:52:02 +0100233 return std::make_tuple(ret, 0);
Sean Paul047b9b22015-07-28 14:15:42 -0400234 }
235
Zach Reiznerff30b522015-10-28 19:08:45 -0700236 for (auto &conn : connectors_) {
237 ret = CreateDisplayPipe(conn.get());
Sean Paul57355412015-09-19 09:14:34 -0400238 if (ret) {
Zach Reiznerff30b522015-10-28 19:08:45 -0700239 ALOGE("Failed CreateDisplayPipe %d with %d", conn->id(), ret);
Alexandru Gheorghec5463582018-03-27 15:52:02 +0100240 return std::make_tuple(ret, 0);
Sean Paul57355412015-09-19 09:14:34 -0400241 }
242 }
Alexandru Gheorghec5463582018-03-27 15:52:02 +0100243 return std::make_tuple(ret, displays_.size());
244}
245
246bool DrmDevice::HandlesDisplay(int display) const {
247 return displays_.find(display) != displays_.end();
Sean Paul6a55e9f2015-04-30 15:31:06 -0400248}
249
Alexandru Gheorghe0f5abd72018-05-01 14:37:10 +0100250DrmConnector *DrmDevice::GetConnectorForDisplay(int display) const {
Zach Reiznerff30b522015-10-28 19:08:45 -0700251 for (auto &conn : connectors_) {
252 if (conn->display() == display)
253 return conn.get();
Sean Paul6a55e9f2015-04-30 15:31:06 -0400254 }
255 return NULL;
256}
257
Alexandru Gheorghe0f5abd72018-05-01 14:37:10 +0100258DrmCrtc *DrmDevice::GetCrtcForDisplay(int display) const {
Zach Reiznerff30b522015-10-28 19:08:45 -0700259 for (auto &crtc : crtcs_) {
260 if (crtc->display() == display)
261 return crtc.get();
Sean Paul6a55e9f2015-04-30 15:31:06 -0400262 }
263 return NULL;
264}
265
Alexandru Gheorghe0f5abd72018-05-01 14:37:10 +0100266DrmPlane *DrmDevice::GetPlane(uint32_t id) const {
Zach Reiznerff30b522015-10-28 19:08:45 -0700267 for (auto &plane : planes_) {
268 if (plane->id() == id)
269 return plane.get();
Sean Paul6a55e9f2015-04-30 15:31:06 -0400270 }
271 return NULL;
272}
273
Alexandru Gheorghe0f5abd72018-05-01 14:37:10 +0100274const std::vector<std::unique_ptr<DrmCrtc>> &DrmDevice::crtcs() const {
Robert Foss0690c1c2016-10-20 11:07:57 -0400275 return crtcs_;
276}
277
Alexandru Gheorghe0f5abd72018-05-01 14:37:10 +0100278uint32_t DrmDevice::next_mode_id() {
Sean Paul6a55e9f2015-04-30 15:31:06 -0400279 return ++mode_id_;
280}
281
Alexandru Gheorghe0f5abd72018-05-01 14:37:10 +0100282int DrmDevice::TryEncoderForDisplay(int display, DrmEncoder *enc) {
Sean Paul6a55e9f2015-04-30 15:31:06 -0400283 /* First try to use the currently-bound crtc */
284 DrmCrtc *crtc = enc->crtc();
285 if (crtc && crtc->can_bind(display)) {
286 crtc->set_display(display);
Alexandru Gheorgheae4324c2018-03-21 12:06:20 +0000287 enc->set_crtc(crtc);
Sean Paul6a55e9f2015-04-30 15:31:06 -0400288 return 0;
289 }
290
291 /* Try to find a possible crtc which will work */
Zach Reiznerff30b522015-10-28 19:08:45 -0700292 for (DrmCrtc *crtc : enc->possible_crtcs()) {
Sean Paul6a55e9f2015-04-30 15:31:06 -0400293 /* We've already tried this earlier */
Zach Reiznerff30b522015-10-28 19:08:45 -0700294 if (crtc == enc->crtc())
Sean Paul6a55e9f2015-04-30 15:31:06 -0400295 continue;
296
Zach Reiznerff30b522015-10-28 19:08:45 -0700297 if (crtc->can_bind(display)) {
Zach Reiznerff30b522015-10-28 19:08:45 -0700298 crtc->set_display(display);
Alexandru Gheorgheae4324c2018-03-21 12:06:20 +0000299 enc->set_crtc(crtc);
Sean Paul6a55e9f2015-04-30 15:31:06 -0400300 return 0;
301 }
302 }
303
304 /* We can't use the encoder, but nothing went wrong, try another one */
305 return -EAGAIN;
306}
307
Alexandru Gheorghe0f5abd72018-05-01 14:37:10 +0100308int DrmDevice::CreateDisplayPipe(DrmConnector *connector) {
Sean Paul877be972015-06-03 14:08:27 -0400309 int display = connector->display();
310 /* Try to use current setup first */
311 if (connector->encoder()) {
312 int ret = TryEncoderForDisplay(display, connector->encoder());
313 if (!ret) {
314 return 0;
315 } else if (ret != -EAGAIN) {
316 ALOGE("Could not set mode %d/%d", display, ret);
317 return ret;
318 }
319 }
Sean Paul6a55e9f2015-04-30 15:31:06 -0400320
Zach Reiznerff30b522015-10-28 19:08:45 -0700321 for (DrmEncoder *enc : connector->possible_encoders()) {
322 int ret = TryEncoderForDisplay(display, enc);
Sean Paul877be972015-06-03 14:08:27 -0400323 if (!ret) {
Zach Reiznerff30b522015-10-28 19:08:45 -0700324 connector->set_encoder(enc);
Sean Paul877be972015-06-03 14:08:27 -0400325 return 0;
326 } else if (ret != -EAGAIN) {
327 ALOGE("Could not set mode %d/%d", display, ret);
328 return ret;
329 }
330 }
331 ALOGE("Could not find a suitable encoder/crtc for display %d",
332 connector->display());
333 return -ENODEV;
334}
335
Alexandru Gheorghe0f5abd72018-05-01 14:37:10 +0100336int DrmDevice::CreatePropertyBlob(void *data, size_t length,
337 uint32_t *blob_id) {
Sean Paul877be972015-06-03 14:08:27 -0400338 struct drm_mode_create_blob create_blob;
339 memset(&create_blob, 0, sizeof(create_blob));
340 create_blob.length = length;
341 create_blob.data = (__u64)data;
342
Zach Reiznerff30b522015-10-28 19:08:45 -0700343 int ret = drmIoctl(fd(), DRM_IOCTL_MODE_CREATEPROPBLOB, &create_blob);
Sean Paul877be972015-06-03 14:08:27 -0400344 if (ret) {
345 ALOGE("Failed to create mode property blob %d", ret);
346 return ret;
347 }
348 *blob_id = create_blob.blob_id;
349 return 0;
350}
351
Alexandru Gheorghe0f5abd72018-05-01 14:37:10 +0100352int DrmDevice::DestroyPropertyBlob(uint32_t blob_id) {
Sean Paul57355412015-09-19 09:14:34 -0400353 if (!blob_id)
354 return 0;
355
Sean Paul877be972015-06-03 14:08:27 -0400356 struct drm_mode_destroy_blob destroy_blob;
357 memset(&destroy_blob, 0, sizeof(destroy_blob));
358 destroy_blob.blob_id = (__u32)blob_id;
Zach Reiznerff30b522015-10-28 19:08:45 -0700359 int ret = drmIoctl(fd(), DRM_IOCTL_MODE_DESTROYPROPBLOB, &destroy_blob);
Sean Paul877be972015-06-03 14:08:27 -0400360 if (ret) {
Sean Paulf741c672016-05-11 13:49:38 -0400361 ALOGE("Failed to destroy mode property blob %" PRIu32 "/%d", blob_id, ret);
Sean Paul877be972015-06-03 14:08:27 -0400362 return ret;
363 }
364 return 0;
365}
366
Alexandru Gheorghe0f5abd72018-05-01 14:37:10 +0100367DrmEventListener *DrmDevice::event_listener() {
Sean Paul047b9b22015-07-28 14:15:42 -0400368 return &event_listener_;
369}
370
Alexandru Gheorghe0f5abd72018-05-01 14:37:10 +0100371int DrmDevice::GetProperty(uint32_t obj_id, uint32_t obj_type,
372 const char *prop_name, DrmProperty *property) {
Sean Paul6a55e9f2015-04-30 15:31:06 -0400373 drmModeObjectPropertiesPtr props;
374
Zach Reiznerff30b522015-10-28 19:08:45 -0700375 props = drmModeObjectGetProperties(fd(), obj_id, obj_type);
Sean Paul6a55e9f2015-04-30 15:31:06 -0400376 if (!props) {
377 ALOGE("Failed to get properties for %d/%x", obj_id, obj_type);
378 return -ENODEV;
379 }
380
381 bool found = false;
382 for (int i = 0; !found && (size_t)i < props->count_props; ++i) {
Zach Reiznerff30b522015-10-28 19:08:45 -0700383 drmModePropertyPtr p = drmModeGetProperty(fd(), props->props[i]);
Sean Paul6a55e9f2015-04-30 15:31:06 -0400384 if (!strcmp(p->name, prop_name)) {
385 property->Init(p, props->prop_values[i]);
386 found = true;
387 }
388 drmModeFreeProperty(p);
389 }
390
391 drmModeFreeObjectProperties(props);
392 return found ? 0 : -ENOENT;
393}
394
Alexandru Gheorghe0f5abd72018-05-01 14:37:10 +0100395int DrmDevice::GetPlaneProperty(const DrmPlane &plane, const char *prop_name,
396 DrmProperty *property) {
Sean Paul6a55e9f2015-04-30 15:31:06 -0400397 return GetProperty(plane.id(), DRM_MODE_OBJECT_PLANE, prop_name, property);
398}
399
Alexandru Gheorghe0f5abd72018-05-01 14:37:10 +0100400int DrmDevice::GetCrtcProperty(const DrmCrtc &crtc, const char *prop_name,
401 DrmProperty *property) {
Sean Paul877be972015-06-03 14:08:27 -0400402 return GetProperty(crtc.id(), DRM_MODE_OBJECT_CRTC, prop_name, property);
403}
404
Alexandru Gheorghe0f5abd72018-05-01 14:37:10 +0100405int DrmDevice::GetConnectorProperty(const DrmConnector &connector,
406 const char *prop_name,
407 DrmProperty *property) {
Sean Paul6a55e9f2015-04-30 15:31:06 -0400408 return GetProperty(connector.id(), DRM_MODE_OBJECT_CONNECTOR, prop_name,
409 property);
410}
411}