(__after)->next->prev = (__item); \
(__after)->next = (__item);
+#define STRERROR_SIZE 128
+
typedef struct _Drm_Event_Context {
void (*vblank_handler)(int fd, unsigned int sequence, unsigned int tv_sec,
unsigned int tv_usec, void *user_data);
{
struct timespec timeout = {0, }, cur = {0, };
int ret;
+ char buf[STRERROR_SIZE];
ret = clock_gettime(CLOCK_MONOTONIC, &timeout);
if (ret < 0) {
- TDM_ERR("clock_gettime failed: %s", strerror(errno));
+ TDM_ERR("clock_gettime failed: %s", strerror_r(errno, buf, STRERROR_SIZE));
goto out;
}
timeout.tv_sec++;
_tdm_sprd_display_output_disable(tdm_sprd_output_data *output_data)
{
tdm_sprd_layer_data *layer_data = NULL;
+ char buf[STRERROR_SIZE];
+
LIST_FOR_EACH_ENTRY(layer_data, &output_data->layer_list, link)
memset(&layer_data->ovi, 0, sizeof(overlay_info));
TDM_DBG("FB_BLANK_POWERDOWN\n");
if (ioctl(output_data->fb_fd, FBIOBLANK, FB_BLANK_POWERDOWN) < 0) {
- TDM_ERR("FB_BLANK_POWERDOWN is failed: %s\n", strerror(errno));
+ TDM_ERR("FB_BLANK_POWERDOWN is failed: %s\n", strerror_r(errno, buf, STRERROR_SIZE));
return TDM_ERROR_OPERATION_FAILED;
}
return TDM_ERROR_NONE;
{
TDM_DBG("FB_BLANK_UNBLANK\n");
tdm_sprd_layer_data *layer_data = NULL;
+ char buf[STRERROR_SIZE];
+
LIST_FOR_EACH_ENTRY(layer_data, &output_data->layer_list, link) {
memset(&layer_data->ovi, 0, sizeof(overlay_info));
}
if (ioctl(output_data->fb_fd, FBIOBLANK, FB_BLANK_UNBLANK) < 0) {
- TDM_ERR("FB_BLANK_UNBLANK is failed: %s\n", strerror(errno));
+ TDM_ERR("FB_BLANK_UNBLANK is failed: %s\n", strerror_r(errno, buf, STRERROR_SIZE));
return TDM_ERROR_OPERATION_FAILED;
}
return TDM_ERROR_NONE;
{
tdm_sprd_layer_data *layer_data = layer;
int layer_index = 0;
+ char buf[STRERROR_SIZE];
+
RETURN_VAL_IF_FAIL(layer_data, TDM_ERROR_OPERATION_FAILED);
if (layer_data->capabilities & TDM_LAYER_CAPABILITY_PRIMARY) {
layer_index = SPRD_LAYER_OSD;
if (layer_data->enabled_flag) {
TDM_DBG("SPRD_FB_UNSET_OVERLAY(%d)\n", layer_index);
if (ioctl(layer_data->output_data->fb_fd, SPRD_FB_UNSET_OVERLAY, &layer_index) == -1)
- TDM_ERR("SPRD_FB_UNSET_OVERLAY(%d) error:%s\n", layer_index, strerror(errno));
+ TDM_ERR("SPRD_FB_UNSET_OVERLAY(%d) error:%s\n", layer_index, strerror_r(errno, buf, STRERROR_SIZE));
memset(&layer_data->ovi, 0, sizeof(overlay_info));
layer_data->enabled_flag = 0;
overlay_info ovi = {0};
overlay_display ov_disp = {0};
int layer_index = 0;
+ char buf[STRERROR_SIZE];
RETURN_VAL_IF_FAIL(output_data, TDM_ERROR_OPERATION_FAILED);
#if 0
TDM_DBG("SPRD_FB_SET_OVERLAY(%d) rect:%dx%d+%d+%d size:%dx%d\n", ovi.layer_index, ovi.rect.w,
ovi.rect.h, ovi.rect.x, ovi.rect.y, ovi.size.hsize, ovi.size.vsize);
if (ioctl(layer_data->output_data->fb_fd, SPRD_FB_SET_OVERLAY, &ovi) == -1) {
- TDM_ERR("SPRD_FB_SET_OVERLAY(%d) error:%s\n", layer_index, strerror(errno));
+ TDM_ERR("SPRD_FB_SET_OVERLAY(%d) error:%s\n", layer_index, strerror_r(errno, buf, STRERROR_SIZE));
continue;
}
memcpy(&layer_data->ovi, &ovi, sizeof(overlay_info));
TDM_DBG("SPRD_FB_DISPLAY_OVERLAY(%d) osd_handle:%d img_handle:%d\n", ov_disp.layer_index, ov_disp.osd_handle,
ov_disp.img_handle);
if (ioctl(output_data->fb_fd, SPRD_FB_DISPLAY_OVERLAY, &ov_disp) == -1) {
- TDM_ERR("SPRD_FB_DISPLAY_OVERLAY(%d) error: %s \n", strerror(errno), ov_disp.layer_index);
+ TDM_ERR("SPRD_FB_DISPLAY_OVERLAY(%d) error:%s\n", ov_disp.layer_index, strerror_r(errno, buf, STRERROR_SIZE));
res = TDM_ERROR_OPERATION_FAILED;
} else {
//save enable layers