minui: graphics: add interface for framebuffer blank/unblank

Change-Id: I5c3ee61cbf6fadae50f10b9f2e73caceaa5048a7
Signed-off-by: Dima Zavin <dima@android.com>
diff --git a/minui/graphics.c b/minui/graphics.c
index 57ca810..fa8e510 100644
--- a/minui/graphics.c
+++ b/minui/graphics.c
@@ -14,6 +14,7 @@
  * limitations under the License.
  */
 
+#include <stdbool.h>
 #include <stdlib.h>
 #include <unistd.h>
 
@@ -364,3 +365,12 @@
 {
     return (unsigned short *) gr_mem_surface.data;
 }
+
+void gr_fb_blank(bool blank)
+{
+    int ret;
+
+    ret = ioctl(gr_fb_fd, FBIOBLANK, blank ? FB_BLANK_POWERDOWN : FB_BLANK_UNBLANK);
+    if (ret < 0)
+        perror("ioctl(): blank");
+}