} \
while (0)
-#define EHWQINF(f, ec, ehwq, x...) \
+#define EHWQERR(f, ec, hwc, ehwq, x...) \
+ do \
+ { \
+ ERR("EWL|%20.20s| | |%8s|"f, \
+ "HWC-WINQ", (e_hwc_output_id_get(hwc)), ##x); \
+ } \
+ while (0)
+
+#define EHWQINF(f, ec, hwc, ehwq, x...) \
do \
{ \
if ((!ec) && (!ehwq)) \
- INF("EWL|%20.20s| | |"f, \
- "HWC-WINQ", ##x); \
+ INF("EWL|%20.20s| | |%8s|"f, \
+ "HWC-WINQ", (e_hwc_output_id_get(hwc)), ##x); \
else \
- INF("EWL|%20.20s|win:0x%08zx|ec:%8p| ehwq:%8p "f, \
+ INF("EWL|%20.20s|win:0x%08zx|ec:%8p| ehwq:%8p|%8s| "f, \
"HWC-WINQ", \
(e_client_util_win_get(ec)), \
(ec), \
- (ehwq), \
+ (ehwq), (e_hwc_output_id_get(hwc)), \
##x); \
} \
while (0)
-#define EHWQTRACE(f, ec, ehwq, x...) \
- do \
- { \
- if (ehwq_trace) \
- { \
- if ((!ec) && (!ehwq)) \
- INF("EWL|%20.20s| | |"f, \
- "HWC-WINQ", ##x); \
- else \
- INF("EWL|%20.20s|win:0x%08zx|ec:%8p| ehwq:%8p "f, \
- "HWC-WINQ", \
- (e_client_util_win_get(ec)), \
- (ec), \
- (ehwq), \
- ##x); \
- } \
- } \
+#define EHWQTRACE(f, ec, hwc, ehwq, x...) \
+ do \
+ { \
+ if (ehwq_trace) \
+ { \
+ if ((!ec) && (!ehwq)) \
+ INF("EWL|%20.20s| | |%8s|"f, \
+ "HWC-WINQ", (e_hwc_output_id_get(hwc)), ##x); \
+ else \
+ INF("EWL|%20.20s|win:0x%08zx|ec:%8p| ehwq:%8p|%8s| "f, \
+ "HWC-WINQ", \
+ (e_client_util_win_get(ec)), \
+ (ec), \
+ (ehwq), (e_hwc_output_id_get(hwc)), \
+ ##x); \
+ } \
+ } \
while (0)
static Eina_Bool ehwq_trace = EINA_FALSE;
ret = tbm_surface_map(tsurface, TBM_SURF_OPTION_READ, &src_info);
if (ret != TBM_SURFACE_ERROR_NONE)
{
- ERR("fail to map the tsurface.");
+ EHWQERR("fail to map the tsurface.", NULL, NULL, NULL);
return NULL;
}
new_tsurface = tbm_surface_create(src_info.width, src_info.height, src_info.format);
if (!new_tsurface)
{
- ERR("fail to allocate the new_tsurface.");
+ EHWQERR("fail to allocate the new_tsurface.", NULL, NULL, NULL);
tbm_surface_unmap(tsurface);
return NULL;
}
ret = tbm_surface_map(new_tsurface, TBM_SURF_OPTION_WRITE, &dst_info);
if (ret != TBM_SURFACE_ERROR_NONE)
{
- ERR("fail to map the new_tsurface.");
+ EHWQERR("fail to map the new_tsurface.", NULL, NULL, NULL);
tbm_surface_destroy(new_tsurface);
tbm_surface_unmap(tsurface);
return NULL;
backup_buffer = e_comp_wl_tbm_buffer_get(backup_tsurface);
if (!backup_buffer)
{
- ERR("Fail to e_comp_wl_tbm_buffer_get");
+ EHWQERR("Fail to e_comp_wl_tbm_buffer_get", NULL, NULL, NULL);
tbm_surface_internal_unref(backup_tsurface);
return NULL;
}
tqueue = tdm_hwc_window_acquire_buffer_queue(hwc_window->thwc_window, &error);
EHWQINF("Acquire buffer queue ehw:%p tq:%p",
- hwc_window->ec, NULL, hwc_window, tqueue);
+ hwc_window->ec, hwc_window->hwc, NULL, hwc_window, tqueue);
}
if (!tqueue)
{
- ERR("fail to tdm_hwc_window_get_buffer_queue hwc_win:%p tdm_error:%d",
- hwc_window, error);
+ EHWQERR("fail to tdm_hwc_window_get_buffer_queue hwc_win:%p tdm_error:%d",
+ hwc_window->ec, hwc_window->queue->hwc, hwc_window->queue, hwc_window, error);
return NULL;
}
tdm_hwc_window_release_buffer_queue(hwc_window->thwc_window, tqueue);
EHWQINF("Release buffer queue ehw:%p tq:%p",
- hwc_window->ec, NULL, hwc_window, tqueue);
+ hwc_window->ec, hwc_window->hwc, NULL, hwc_window, tqueue);
}
static E_Hwc_Window_Queue_Buffer *
hwc_window = queue->user;
EHWQTRACE("DES ts:%p tq:%p wl_buffer:%p",
- (hwc_window ? hwc_window->ec : NULL), queue,
+ (hwc_window ? hwc_window->ec : NULL), queue->hwc, queue,
queue_buffer->tsurface, queue->tqueue,
queue_buffer->exported_wl_buffer);
queue->state = E_HWC_WINDOW_QUEUE_STATE_SET_INVALID;
EHWQTRACE("DET ts:%p tq:%p wl_buffer:%p",
- (user ? user->ec : NULL), queue,
+ (user ? user->ec : NULL), queue->hwc, queue,
queue_buffer->tsurface, queue->tqueue,
queue_buffer->exported_wl_buffer);
EINA_SAFETY_ON_FALSE_RETURN_VAL(wl_buffer, EINA_FALSE);
EHWQTRACE("EXP ts:%p tq:%p wl_buffer:%p",
- (user ? user->ec : NULL), queue,
+ (user ? user->ec : NULL), queue->hwc, queue,
queue_buffer->tsurface, queue->tqueue, wl_buffer);
queue_buffer->exported = EINA_TRUE;
if (!queue_buffer->exported || !queue_buffer->exported_wl_buffer)
{
- ERR("Not exported queue_buffer:%p tsurface:%p", queue_buffer, queue_buffer->tsurface);
+ EHWQERR("Not exported queue_buffer:%p tsurface:%p",
+ (hwc_window ? hwc_window->ec : NULL), queue->hwc, queue,
+ queue_buffer, queue_buffer->tsurface);
return EINA_FALSE;
}
queue_buffer->usable = EINA_TRUE;
EHWQTRACE("USA ts:%p tq:%p wl_buffer:%p ehw:%p",
- (hwc_window ? hwc_window->ec : NULL), queue,
+ (hwc_window ? hwc_window->ec : NULL), queue->hwc,
+ queue,
queue_buffer->tsurface, queue->tqueue,
queue_buffer->exported_wl_buffer,
hwc_window);
{
if (!_e_hwc_window_queue_buffers_export(queue))
{
- ERR("fail to queue_buffers_export STATE_SET_WAITING queue:%p ehw:%p", queue, hwc_window);
+ EHWQERR("fail to queue_buffers_export STATE_SET_WAITING ehw:%p", NULL, queue->hwc, queue, hwc_window);
return EINA_FALSE;
}
if (!_e_hwc_window_queue_buffer_send(queue))
{
- ERR("fail to queue_dequeue_buffer_send STATE_SET_WAITING queue:%p ehw:%p", queue, hwc_window);
+ EHWQERR("fail to queue_dequeue_buffer_send STATE_SET_WAITING ehw:%p", NULL, queue->hwc, queue, hwc_window);
return EINA_FALSE;
}
e_hwc_window_activate(hwc_window, queue);
EHWQINF("Set Waiting user ehw:%p -- {%s}",
- hwc_window->ec, queue, hwc_window,
+ hwc_window->ec, queue->hwc, queue, hwc_window,
(hwc_window->ec ? hwc_window->ec->icccm.title : "UNKNOWN"));
}
else
queue->state = E_HWC_WINDOW_QUEUE_STATE_SET_PENDING;
EHWQINF("Set Pending user ehw:%p -- {%s}",
- hwc_window->ec, queue, hwc_window,
+ hwc_window->ec, queue->hwc, queue, hwc_window,
(hwc_window->ec ? hwc_window->ec->icccm.title : "UNKNOWN"));
}
if (queue->state == E_HWC_WINDOW_QUEUE_STATE_SET)
{
if (!_e_hwc_window_queue_buffer_send(queue))
- ERR("fail to queue_dequeue_buffer_send STATE_SET_PENDING queue:%p ehw:%p", queue, queue->user);
+ EHWQERR("fail to queue_dequeue_buffer_send STATE_SET_PENDING ehw:%p", NULL, queue->hwc, queue, queue->user);
}
else if (queue->state == E_HWC_WINDOW_QUEUE_STATE_SET_PENDING)
{
if (!_e_hwc_window_queue_buffers_hand_over(queue, queue->user))
- ERR("fail to queue_buffers_hand_over STATE_SET_PENDING queue:%p hwc_window:%p", queue, queue->user);
+ EHWQERR("fail to queue_buffers_hand_over STATE_SET_PENDING hwc_window:%p", NULL, queue->hwc, queue, queue->user);
}
}
static void
_e_hwc_window_queue_free(E_Hwc_Window_Queue *queue)
{
- EHWQINF("Free", NULL, queue);
+ EINA_SAFETY_ON_NULL_RETURN(queue);
+
+ EHWQINF("Free", NULL, queue->hwc, queue);
E_FREE(queue);
}
if (_hwc_winq_mgr && queue->tqueue)
eina_hash_del(_hwc_winq_mgr->hwc_winq_hash, &queue->tqueue, queue);
- EHWQINF("Destroy tq:%p", NULL, queue, queue->tqueue);
+ EHWQINF("Destroy tq:%p", NULL, queue->hwc, queue, queue->tqueue);
EINA_LIST_FREE(queue->buffers, queue_buffer)
_e_hwc_window_queue_buffer_destroy(queue_buffer);
e_object_unref(E_OBJECT(queue->user));
queue->user = NULL;
- ERR("fail to queue_buffers_hand_over queue:%p hwc_window:%p", queue, hwc_window);
+ EHWQERR("fail to queue_buffers_hand_over hwc_window:%p", NULL, queue->hwc, queue, hwc_window);
return EINA_FALSE;
}
{
if (!_e_hwc_window_queue_buffer_send(queue))
{
- ERR("fail to queue_dequeue_buffer_send QUEUE_STATE_SET queue:%p ehw:%p", queue, queue->user);
+ EHWQERR("fail to queue_dequeue_buffer_send QUEUE_STATE_SET ehw:%p",
+ NULL, queue->hwc, queue, queue->user);
return;
}
}
queue->state = E_HWC_WINDOW_QUEUE_STATE_SET;
EHWQINF("Set user ehw:%p -- {%s}",
- queue->user->ec, queue, queue->user,
+ queue->user->ec, queue->hwc, queue, queue->user,
(queue->user->ec ? queue->user->ec->icccm.title : "UNKNOWN"));
}
_e_hwc_window_queue_tqueue_release(queue->tqueue, queue->user);
EHWQINF("Unset user ehw:%p -- {%s}",
- queue->user->ec, queue, queue->user,
+ queue->user->ec, queue->hwc, queue, queue->user,
(queue->user->ec ? queue->user->ec->icccm.title : "UNKNOWN"));
/* unset the hwc_window from the queue */
{
hwc_window = eina_list_nth(queue->user_pending_set, 0);
if (!_e_hwc_window_queue_prepare_set(queue, hwc_window))
- ERR("fail to queue_prepare_set for user_pending_set queue:%p hwc_window:%p", queue, hwc_window);
+ EHWQERR("fail to queue_prepare_set for user_pending_set hwc_window:%p", NULL, queue->hwc, queue, hwc_window);
}
e_object_unref(E_OBJECT(queue));
EINA_SAFETY_ON_NULL_RETURN(backup_buffer);
EHWQTRACE("Backup buffer set ehw:%p origin:%p tsurface:%p",
- hwc_window->ec, NULL, hwc_window,
+ hwc_window->ec, hwc_window->hwc, NULL, hwc_window,
comp_buffer->tbm_surface, backup_buffer->tbm_surface);
e_comp_wl_buffer_reference(&ec->comp_data->buffer_ref, backup_buffer);
queue_buffer = _e_hwc_window_queue_buffer_create(queue, surfaces[i]);
if (!queue_buffer)
{
- ERR("fail to e_hwc_window_queue_buffer_create");
+ EHWQERR("fail to e_hwc_window_queue_buffer_create", NULL, queue->hwc, queue);
goto fail;
}
if (surfaces) E_FREE(surfaces);
- EHWQINF("Create tq:%p", NULL, queue, tqueue);
+ EHWQINF("Create tq:%p", NULL, queue->hwc, queue, tqueue);
return queue;
queue = _e_hwc_window_queue_get(tqueue);
EINA_SAFETY_ON_NULL_RETURN_VAL(queue, NULL);
+ /* set the hwc to the queue */
+ if (queue->hwc != hwc_window->hwc)
+ queue->hwc = hwc_window->hwc;
+
if (e_hwc_window_is_target(hwc_window))
{
queue->is_target = EINA_TRUE;
_e_hwc_window_queue_user_pending_set_add(queue, hwc_window);
EHWQINF("Add user_pending_set ehw:%p {%s} user:{%s} unset_waiting:%d",
- hwc_window->ec, queue, hwc_window,
+ hwc_window->ec, queue->hwc, queue, hwc_window,
(hwc_window->ec ? hwc_window->ec->icccm.title : "UNKNOWN"),
(queue->user&&queue->user->ec?queue->user->ec->icccm.title : "UNKNOWN"),
(queue->state == E_HWC_WINDOW_QUEUE_STATE_UNSET_WAITING?1:0));
/* _e_hwc_window_queue_set_prepare */
if (!_e_hwc_window_queue_prepare_set(queue, hwc_window))
{
- ERR("fail to queue_prepare_set queue:%p hwc_window:%p", queue, hwc_window);
+ EHWQERR("fail to queue_prepare_set hwc_window:%p", NULL, queue->hwc, queue, hwc_window);
return NULL;
}
_e_hwc_window_queue_tqueue_release(queue->tqueue, hwc_window);
EHWQINF("Remove user_pending_set ehw:%p -- {%s}",
- hwc_window->ec, queue, hwc_window,
+ hwc_window->ec, queue->hwc, queue, hwc_window,
(hwc_window->ec ? hwc_window->ec->icccm.title : "UNKNOWN"));
return;
queue->user = NULL;
EHWQINF("Unset Waiting user ehw:%p -- {%s}",
- hwc_window->ec, queue, hwc_window,
+ hwc_window->ec, queue->hwc, queue, hwc_window,
(hwc_window->ec ? hwc_window->ec->icccm.title : "UNKNOWN"));
}
}
user = queue->user;
EHWQTRACE("DEQ ts:%p tq:%p",
- (user ? user->ec : NULL), queue, queue_buffer->tsurface, queue->tqueue);
+ (user ? user->ec : NULL), queue->hwc, queue, queue_buffer->tsurface, queue->tqueue);
return queue_buffer;
}
user = queue->user;
EHWQTRACE("ENQ ts:%p tq:%p",
- (user ? user->ec : NULL), queue, queue_buffer->tsurface, queue->tqueue);
+ (user ? user->ec : NULL), queue->hwc, queue, queue_buffer->tsurface, queue->tqueue);
tsq_err = tbm_surface_queue_enqueue(queue->tqueue, queue_buffer->tsurface);
EINA_SAFETY_ON_FALSE_RETURN_VAL(tsq_err == TBM_SURFACE_QUEUE_ERROR_NONE, EINA_FALSE);
user = queue->user;
EHWQTRACE("ACQ ts:%p tq:%p",
- (user ? user->ec : NULL), queue, queue_buffer->tsurface, queue->tqueue);
+ (user ? user->ec : NULL), queue->hwc, queue, queue_buffer->tsurface, queue->tqueue);
return queue_buffer;
}
user = queue->user;
EHWQTRACE("REL ts:%p tq:%p",
- (user ? user->ec : NULL), queue, queue_buffer->tsurface, queue->tqueue);
+ (user ? user->ec : NULL), queue->hwc, queue, queue_buffer->tsurface, queue->tqueue);
tsq_err = tbm_surface_queue_release(queue->tqueue, queue_buffer->tsurface);
EINA_SAFETY_ON_FALSE_RETURN_VAL(tsq_err == TBM_SURFACE_QUEUE_ERROR_NONE, EINA_FALSE);
tsurfaces = E_NEW(tbm_surface_h, queue_size);
if (!tsurfaces)
{
- ERR("failed to alloc tsurfaces");
+ EHWQERR("failed to alloc tsurfaces", NULL, queue->hwc, queue);
return NULL;
}
tsq_err = tbm_surface_queue_get_acquirable_surfaces(queue->tqueue, tsurfaces, &num);
if (tsq_err != TBM_SURFACE_QUEUE_ERROR_NONE)
{
- ERR("failed to tbm_surface_queue_get_acquirable_surfaces");
+ EHWQERR("failed to tbm_surface_queue_get_acquirable_surfaces", NULL, queue->hwc, queue);
E_FREE(tsurfaces);
return NULL;
}