use slp_global_lock temporarily 91/99791/1
authorSooChan Lim <sc1.lim@samsung.com>
Thu, 24 Nov 2016 06:07:13 +0000 (15:07 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Thu, 24 Nov 2016 06:22:51 +0000 (15:22 +0900)
we remove slp_global_lock after kernel enables tgl

Change-Id: I356c344863a7d700929cb53151db7c6fda1b75cc

rules/99-libtbm_sprd.rules
src/tbm_bufmgr_sprd.c
src/tbm_bufmgr_tgl.h

index 13cef12..a826c4c 100644 (file)
@@ -1 +1,2 @@
 KERNEL=="tgl", MODE="0666", GROUP="display", SECLABEL{smack}="*"
+KERNEL=="slp_global_lock*", MODE="0666", GROUP="display", SECLABEL{smack}="*"
index 6866db9..2ac2b4a 100644 (file)
@@ -675,9 +675,14 @@ _bufmgr_init_cache_state(tbm_bufmgr_sprd bufmgr_sprd)
 
        /* open tgl fd for saving cache flush data */
        bufmgr_sprd->tgl_fd = open(tgl_devfile, O_RDWR);
+
        if (bufmgr_sprd->tgl_fd < 0) {
-               TBM_SPRD_ERROR("fail to open global_lock:%s\n", tgl_devfile);
-               return 0;
+           bufmgr_sprd->tgl_fd = open(tgl_devfile1, O_RDWR);
+           if (bufmgr_sprd->tgl_fd < 0) {
+                   TBM_SPRD_ERROR("fail to open global_lock:%s\n",
+                                       tgl_devfile1);
+                   return 0;
+           }
        }
 
        if (!_tgl_get_version(bufmgr_sprd->tgl_fd)) {
index 1790885..cae2c04 100644 (file)
@@ -34,7 +34,8 @@
 
 #include <linux/ioctl.h>
 
-static char tgl_devfile[] = "/dev/tgl";
+static char tgl_devfile[] = "/dev/slp_global_lock";
+static char tgl_devfile1[] = "/dev/tgl";
 
 #define TGL_IOCTL_BASE         0x32
 #define TGL_IO(nr)                     _IO(TGL_IOCTL_BASE, nr)