drm_hwcomposer: Support cases where BI is not available

Some legacy grallocs may not provide correct buffer information
for regular buffers. In this case, we should not return an error
and allow the composer to delegate the composition of such layers
to the client.

Change-Id: I69f6923f6c7bf517d8a0bbb473dcc64bbe74f673
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
diff --git a/hwc2_device/HwcLayer.cpp b/hwc2_device/HwcLayer.cpp
index d0ff216..400ac9b 100644
--- a/hwc2_device/HwcLayer.cpp
+++ b/hwc2_device/HwcLayer.cpp
@@ -101,6 +101,10 @@
     return;
   }
 
+  if (slots_.count(*active_slot_id_) == 0) {
+    return;
+  }
+
   layer_data_.bi = slots_[*active_slot_id_].bi;
   layer_data_.fb = slots_[*active_slot_id_].fb;