+static struct omapfb_plane_info omap_pi;
+
+static int hide_omap_layer(void)
+{
+ int retval = -1;
+ int ret;
+ int fd;
+
+ fd = open("/dev/fb1", O_RDWR);
+ if (fd == -1) {
+ perror("open(/dev/fb1)");
+ return -1;
+ }
+
+ ret = ioctl(fd, OMAPFB_QUERY_PLANE, &omap_pi);
+ if (ret != 0) {
+ perror("QUERY_PLANE");
+ goto out;
+ }
+
+ if (omap_pi.enabled) {
+ omap_pi.enabled = 0;
+ ret = ioctl(fd, OMAPFB_SETUP_PLANE, &omap_pi);
+ if (ret != 0) {
+ perror("SETUP_PLANE");
+ goto out;
+ }
+ retval = 1;
+ }
+ else {
+ retval = 0;
+ }
+
+out:
+ close(fd);
+ return retval;
+}
+
+static void show_omap_layer(void)
+{
+ int ret;
+ int fd;
+
+ fd = open("/dev/fb1", O_RDWR);
+ if (fd == -1) {
+ perror("open(/dev/fb1)");
+ return;
+ }
+
+ omap_pi.enabled = 1;
+ ret = ioctl(fd, OMAPFB_SETUP_PLANE, &omap_pi);
+ if (ret != 0)
+ perror("SETUP_PLANE");
+
+ close(fd);
+}
+