drm_hwcomposer: Tidy-up DrmDevice class

1. Move drm/DrmConnector.h to Normal clang-tidy checks list by fixing
   clang-tidy findings.

2. Remove DrmDevice self-reference.

3. Replace shared_ptr reference to DrmDevice in DrmFbImporter with a
   pointer, making ResourceManager only owner of DrmDevice and its
   chilren.

Signed-off-by: Roman Stratiienko <roman.o.stratiienko@globallogic.com>
diff --git a/drm/DrmFbImporter.cpp b/drm/DrmFbImporter.cpp
index 6f2abe8..eeab076 100644
--- a/drm/DrmFbImporter.cpp
+++ b/drm/DrmFbImporter.cpp
@@ -32,7 +32,7 @@
 namespace android {
 
 auto DrmFbIdHandle::CreateInstance(hwc_drm_bo_t *bo, GemHandle first_gem_handle,
-                                   const std::shared_ptr<DrmDevice> &drm)
+                                   DrmDevice &drm)
     -> std::shared_ptr<DrmFbIdHandle> {
   // NOLINTNEXTLINE(cppcoreguidelines-owning-memory): priv. constructor usage
   std::shared_ptr<DrmFbIdHandle> local(new DrmFbIdHandle(drm));
@@ -44,7 +44,7 @@
   for (size_t i = 1; i < local->gem_handles_.size(); i++) {
     if (bo->prime_fds[i] > 0) {
       if (bo->prime_fds[i] != bo->prime_fds[0]) {
-        err = drmPrimeFDToHandle(drm->fd(), bo->prime_fds[i],
+        err = drmPrimeFDToHandle(drm.GetFd(), bo->prime_fds[i],
                                  &local->gem_handles_.at(i));
         if (err != 0) {
           ALOGE("failed to import prime fd %d errno=%d", bo->prime_fds[i],
@@ -59,7 +59,7 @@
   bool has_modifiers = bo->modifiers[0] != DRM_FORMAT_MOD_NONE &&
                        bo->modifiers[0] != DRM_FORMAT_MOD_INVALID;
 
-  if (!drm->HasAddFb2ModifiersSupport() && has_modifiers) {
+  if (!drm.HasAddFb2ModifiersSupport() && has_modifiers) {
     ALOGE("No ADDFB2 with modifier support. Can't import modifier %" PRIu64,
           bo->modifiers[0]);
     local.reset();
@@ -68,11 +68,11 @@
 
   /* Create framebuffer object */
   if (!has_modifiers) {
-    err = drmModeAddFB2(drm->fd(), bo->width, bo->height, bo->format,
+    err = drmModeAddFB2(drm.GetFd(), bo->width, bo->height, bo->format,
                         &local->gem_handles_[0], &bo->pitches[0],
                         &bo->offsets[0], &local->fb_id_, 0);
   } else {
-    err = drmModeAddFB2WithModifiers(drm->fd(), bo->width, bo->height,
+    err = drmModeAddFB2WithModifiers(drm.GetFd(), bo->width, bo->height,
                                      bo->format, &local->gem_handles_[0],
                                      &bo->pitches[0], &bo->offsets[0],
                                      &bo->modifiers[0], &local->fb_id_,
@@ -88,7 +88,7 @@
 
 DrmFbIdHandle::~DrmFbIdHandle() {
   /* Destroy framebuffer object */
-  if (drmModeRmFB(drm_->fd(), fb_id_) != 0) {
+  if (drmModeRmFB(drm_->GetFd(), fb_id_) != 0) {
     ALOGE("Failed to rm fb");
   }
 
@@ -109,7 +109,7 @@
       continue;
     }
     gem_close.handle = gem_handles_[i];
-    int32_t err = drmIoctl(drm_->fd(), DRM_IOCTL_GEM_CLOSE, &gem_close);
+    int32_t err = drmIoctl(drm_->GetFd(), DRM_IOCTL_GEM_CLOSE, &gem_close);
     if (err != 0) {
       ALOGE("Failed to close gem handle %d, errno: %d", gem_handles_[i], errno);
     }
@@ -120,7 +120,8 @@
     -> std::shared_ptr<DrmFbIdHandle> {
   /* Lookup DrmFbIdHandle in cache first. First handle serves as a cache key. */
   GemHandle first_handle = 0;
-  int32_t err = drmPrimeFDToHandle(drm_->fd(), bo->prime_fds[0], &first_handle);
+  int32_t err = drmPrimeFDToHandle(drm_->GetFd(), bo->prime_fds[0],
+                                   &first_handle);
 
   if (err != 0) {
     ALOGE("Failed to import prime fd %d ret=%d", bo->prime_fds[0], err);
@@ -143,7 +144,7 @@
   }
 
   /* No DrmFbIdHandle found in cache, create framebuffer object */
-  auto fb_id_handle = DrmFbIdHandle::CreateInstance(bo, first_handle, drm_);
+  auto fb_id_handle = DrmFbIdHandle::CreateInstance(bo, first_handle, *drm_);
   if (fb_id_handle) {
     drm_fb_id_handle_cache_[first_handle] = fb_id_handle;
   }