drm_hwcomposer: Allow NULL crtcs in display composition
In cases where we have displays which do not have a mode,
the crtc will be NULL. This shouldn't fail the composition
initialization.
Change-Id: I1a6acb72cd3f614b5a7c854ba61be1539efa4bea
Signed-off-by: Sean Paul <seanpaul@chromium.org>
diff --git a/drmdisplaycomposition.cpp b/drmdisplaycomposition.cpp
index c989494..465a318 100644
--- a/drmdisplaycomposition.cpp
+++ b/drmdisplaycomposition.cpp
@@ -102,7 +102,7 @@
int DrmDisplayComposition::Init(DrmResources *drm, DrmCrtc *crtc,
Importer *importer) {
drm_ = drm;
- crtc_ = crtc;
+ crtc_ = crtc; // Can be NULL if we haven't modeset yet
importer_ = importer;
int ret = hw_get_module(GRALLOC_HARDWARE_MODULE_ID,