#include "tdm_nexell.h"
#include <tdm_helper.h>
+#include <tbm_drm_helper.h>
#define ENABLE_PP
nexell_data->dpy = dpy;
/* The drm master fd can be opened by a tbm backend module in
- * tbm_bufmgr_init() time. In this case, we just get it from
- * TBM_DRM_MASTER_FD enviroment.
- *
+ * tbm_bufmgr_init() time. In this case, we just get it from tbm.
*/
- nexell_data->drm_fd = tdm_helper_get_fd("TBM_DRM_MASTER_FD");
- if (nexell_data->drm_fd < 0)
+ nexell_data->drm_fd = tbm_drm_helper_get_master_fd();
+ if (nexell_data->drm_fd < 0) {
nexell_data->drm_fd = _tdm_nexell_open_drm();
- if (nexell_data->drm_fd < 0) {
- ret = TDM_ERROR_OPERATION_FAILED;
- goto failed;
+ if (nexell_data->drm_fd < 0) {
+ ret = TDM_ERROR_OPERATION_FAILED;
+ goto failed;
+ }
+
+ tbm_drm_helper_set_tbm_master_fd(nexell_data->drm_fd);
}
- /* To share the drm master fd with other modules in display server side. */
- tdm_helper_set_fd("TDM_DRM_MASTER_FD", nexell_data->drm_fd);
+ TDM_INFO("master fd(%d)", nexell_data->drm_fd);
#ifdef HAVE_UDEV
_tdm_nexell_udev_init(nexell_data);