#include <errno.h>
#include <pthread.h>
#include "tbm_bufmgr.h"
-#include "tbm_bufmgr_glock.h"
+#include "tbm_bufmgr_tgl.h"
#include "tbm_bufmgr_backend.h"
#include "tbm_bufmgr_int.h"
#include "list.h"
{
RETURN_VAL_CHECK_FLAG (TBM_ALL_CTRL_BACKEND_VALID(bufmgr->backend->flags), 1);
- bufmgr->lock_fd = open(tgl_devfile, O_RDWR);
+ bufmgr->lock_fd = open (tgl_devfile, O_RDWR);
if(bufmgr->lock_fd < 0)
{
- TBM_LOG ("[libtbm:%d] "
- "error: Fail to open global_lock:%s\n",
- getpid(), tgl_devfile);
- return 0;
+ bufmgr->lock_fd = open (tgl_devfile1, O_RDWR);
+ if(bufmgr->lock_fd < 0)
+ {
+
+ TBM_LOG ("[libtbm:%d] "
+ "error: Fail to open global_lock:%s\n",
+ getpid(), tgl_devfile);
+ return 0;
+ }
}
if (!_tgl_init(bufmgr->lock_fd, GLOBAL_KEY))
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#ifndef __TBM_BUFMGR_GLOCK_H__
-#define __TBM_BUFMGR_GLOCK_H__
+#ifndef __TBM_BUFMGR_TGL_H__
+#define __TBM_BUFMGR_TGL_H__
#include <linux/ioctl.h>
static char tgl_devfile[] = "/dev/slp_global_lock";
+static char tgl_devfile1[] = "/dev/tgl";
#define TGL_IOC_BASE 0x32
#define TGL_IOC_SET_DATA _IOW(TGL_IOC_BASE, _TGL_SET_DATA, struct tgl_user_data *)
#define TGL_IOC_GET_DATA _IOW(TGL_IOC_BASE, _TGL_GET_DATA, struct tgl_user_data *)
-#endif /* __TBM_BUFMGR_GLOCK_H__ */
+#endif /* __TBM_BUFMGR_TGL_H__ */