drm_hwcomposer: Tidy-up DrmCrtc class
Implement DrmCrtc instantiation through CreateInstance() static method,
which helps to reduce complexity of DrmDevice::Init() function.
Move CRTC-to-Display binding information to the DrmDevice class.
Move drm/DrmCrtc.h to Normal clang-tidy checks list by fixing
clang-tidy findings.
Signed-off-by: Roman Stratiienko <roman.o.stratiienko@globallogic.com>
diff --git a/drm/DrmPlane.cpp b/drm/DrmPlane.cpp
index 5001457..6b5cec1 100644
--- a/drm/DrmPlane.cpp
+++ b/drm/DrmPlane.cpp
@@ -148,7 +148,7 @@
}
bool DrmPlane::IsCrtcSupported(const DrmCrtc &crtc) const {
- return ((1 << crtc.pipe()) & plane_->possible_crtcs) != 0;
+ return ((1 << crtc.GetIndexInResArray()) & plane_->possible_crtcs) != 0;
}
bool DrmPlane::IsValidForLayer(DrmHwcLayer *layer) {