2 * Copyright (C) 2005-2020 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
16 using namespace KODI::WINDOWING::GBM
;
18 CDRMCrtc::CDRMCrtc(int fd
, uint32_t crtc
) : CDRMObject(fd
), m_crtc(drmModeGetCrtc(m_fd
, crtc
))
21 throw std::runtime_error("drmModeGetCrtc failed: " + std::string
{strerror(errno
)});
23 if (!GetProperties(m_crtc
->crtc_id
, DRM_MODE_OBJECT_CRTC
))
24 throw std::runtime_error("failed to get properties for crtc: " +
25 std::to_string(m_crtc
->crtc_id
));