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/VSyncWorker.cpp b/drm/VSyncWorker.cpp
index 8d1cb99..0ac626e 100644
--- a/drm/VSyncWorker.cpp
+++ b/drm/VSyncWorker.cpp
@@ -129,7 +129,8 @@
ALOGE("Failed to get crtc for display");
return;
}
- uint32_t high_crtc = (crtc->pipe() << DRM_VBLANK_HIGH_CRTC_SHIFT);
+ uint32_t high_crtc = (crtc->GetIndexInResArray()
+ << DRM_VBLANK_HIGH_CRTC_SHIFT);
drmVBlank vblank;
memset(&vblank, 0, sizeof(vblank));