Lines Matching refs:fd
168 static drmModeCrtc* find_crtc_for_connector(int fd, drmModeRes* resources, in find_crtc_for_connector() argument
173 encoder = drmModeGetEncoder(fd, connector->encoder_id); in find_crtc_for_connector()
182 return drmModeGetCrtc(fd, crtc); in find_crtc_for_connector()
188 encoder = drmModeGetEncoder(fd, connector->encoders[i]); in find_crtc_for_connector()
198 return drmModeGetCrtc(fd, crtc); in find_crtc_for_connector()
206 static drmModeConnector* find_used_connector_by_type(int fd, drmModeRes* resources, unsigned type) { in find_used_connector_by_type() argument
208 drmModeConnector* connector = drmModeGetConnector(fd, resources->connectors[i]); in find_used_connector_by_type()
220 static drmModeConnector* find_first_connected_connector(int fd, drmModeRes* resources) { in find_first_connected_connector() argument
224 connector = drmModeGetConnector(fd, resources->connectors[i]); in find_first_connected_connector()
235 drmModeConnector* MinuiBackendDrm::FindMainMonitor(int fd, drmModeRes* resources, in FindMainMonitor() argument
247 main_monitor_connector = find_used_connector_by_type(fd, resources, kConnectorPriority[i]); in FindMainMonitor()
253 main_monitor_connector = find_first_connected_connector(fd, resources); in FindMainMonitor()
270 void MinuiBackendDrm::DisableNonMainCrtcs(int fd, drmModeRes* resources, drmModeCrtc* main_crtc) { in DisableNonMainCrtcs() argument
272 drmModeConnector* connector = drmModeGetConnector(fd, resources->connectors[i]); in DisableNonMainCrtcs()
273 drmModeCrtc* crtc = find_crtc_for_connector(fd, resources, connector); in DisableNonMainCrtcs()
275 DrmDisableCrtc(fd, crtc); in DisableNonMainCrtcs()
288 android::base::unique_fd fd(open(dev_name.c_str(), O_RDWR | O_CLOEXEC)); in Init() local
289 if (fd == -1) continue; in Init()
292 if (uint64_t cap = 0; drmGetCap(fd.get(), DRM_CAP_DUMB_BUFFER, &cap) != 0 || cap == 0) { in Init()
296 res = drmModeGetResources(fd.get()); in Init()
303 if (find_first_connected_connector(fd.get(), res)) { in Init()
304 drm_fd = fd.release(); in Init()
360 static void page_flip_complete(__unused int fd, in page_flip_complete() argument
378 .fd = drm_fd, in Flip()