hwc: set FB z-order when there are no hwc layers

When there are no layers passed to hwc, FB is still used, and
z-order must be set.

Change-Id: I7e45f56468b47712f7686b78ba0650943037c64a
Signed-off-by: Lajos Molnar <lajos@ti.com>
diff --git a/hwc/hwc.c b/hwc/hwc.c
index 1654680..8dc39e0 100644
--- a/hwc/hwc.c
+++ b/hwc/hwc.c
@@ -1292,8 +1292,11 @@
 
     if (hwc_dev->use_sgx) {
         /* assign a z-layer for fb */
-        if (fb_z < 0)
-            LOGE("**** should have assigned z-layer for fb");
+        if (fb_z < 0) {
+            if (num.composited_layers)
+                LOGE("**** should have assigned z-layer for fb");
+            fb_z = z++;
+        }
 
         hwc_dev->buffers[0] = NULL;
         omap4_hwc_setup_layer_base(&dsscomp->ovls[0].cfg, fb_z,