[PATCH 2/6] present: Fix int types for DebugPresent arguments
Keith Packard
keithp at keithp.com
Wed Aug 6 22:21:03 PDT 2014
Cast values to standard int types and fix format strings to match.
Signed-off-by: Keith Packard <keithp at keithp.com>
---
present/present.c | 47 +++++++++++++++++++++++++++--------------------
1 file changed, 27 insertions(+), 20 deletions(-)
diff --git a/present/present.c b/present/present.c
index eaaaa8e..c67af62 100644
--- a/present/present.c
+++ b/present/present.c
@@ -151,7 +151,9 @@ present_check_flip(RRCrtcPtr crtc,
/* Ask the driver for permission */
if (screen_priv->info->check_flip) {
if (!(*screen_priv->info->check_flip) (crtc, window, pixmap, sync_flip)) {
- DebugPresent(("\td %08lx -> %08lx\n", window->drawable.id, pixmap ? pixmap->drawable.id : 0));
+ DebugPresent(("\td %08lx -> %08lx\n",
+ (long) window->drawable.id,
+ pixmap ? (long) pixmap->drawable.id : 0l));
return FALSE;
}
}
@@ -194,7 +196,7 @@ present_pixmap_idle(PixmapPtr pixmap, WindowPtr window, CARD32 serial, struct pr
if (present_fence)
present_fence_set_triggered(present_fence);
if (window) {
- DebugPresent(("\ti %08lx\n", pixmap ? pixmap->drawable.id : 0));
+ DebugPresent(("\ti %08lx\n", pixmap ? (long) pixmap->drawable.id : 0l));
present_send_idle_notify(window, serial, pixmap, present_fence);
}
}
@@ -421,7 +423,7 @@ present_unflip(ScreenPtr screen)
NULL, 0, 0);
}
screen_priv->unflip_event_id = ++present_event_id;
- DebugPresent(("u %lld\n", screen_priv->unflip_event_id));
+ DebugPresent(("u %lld\n", (long long) screen_priv->unflip_event_id));
(*screen_priv->info->unflip) (screen, screen_priv->unflip_event_id);
}
@@ -432,9 +434,9 @@ present_flip_notify(present_vblank_ptr vblank, uint64_t ust, uint64_t crtc_msc)
present_screen_priv_ptr screen_priv = present_screen_priv(screen);
DebugPresent(("\tn %lld %p %8lld: %08lx -> %08lx\n",
- vblank->event_id, vblank, vblank->target_msc,
- vblank->pixmap ? vblank->pixmap->drawable.id : 0,
- vblank->window->drawable.id));
+ (long long) vblank->event_id, vblank, (long long) vblank->target_msc,
+ vblank->pixmap ? (long) vblank->pixmap->drawable.id : 0l,
+ (long) vblank->window->drawable.id));
assert (vblank == screen_priv->flip_pending);
@@ -471,7 +473,7 @@ present_event_notify(uint64_t event_id, uint64_t ust, uint64_t msc)
if (!event_id)
return;
- DebugPresent(("\te %lld ust %lld msc %lld\n", event_id, ust, msc));
+ DebugPresent(("\te %lld ust %lld msc %lld\n", (long long) event_id, (long long) ust, (long long) msc));
xorg_list_for_each_entry_safe(vblank, tmp, &present_exec_queue, event_queue) {
if (vblank->event_id == event_id) {
present_execute(vblank, ust, msc);
@@ -490,7 +492,7 @@ present_event_notify(uint64_t event_id, uint64_t ust, uint64_t msc)
present_screen_priv_ptr screen_priv = present_screen_priv(screen);
if (event_id == screen_priv->unflip_event_id) {
- DebugPresent(("\tun %lld\n", event_id));
+ DebugPresent(("\tun %lld\n", (long long) event_id));
screen_priv->unflip_event_id = 0;
present_flip_idle(screen);
present_flip_try_ready(screen);
@@ -587,8 +589,8 @@ present_execute(present_vblank_ptr vblank, uint64_t ust, uint64_t crtc_msc)
if (vblank->flip && vblank->pixmap && vblank->window) {
if (screen_priv->flip_pending || screen_priv->unflip_event_id) {
DebugPresent(("\tr %lld %p (pending %p unflip %lld)\n",
- vblank->event_id, vblank,
- screen_priv->flip_pending, screen_priv->unflip_event_id));
+ (long long) vblank->event_id, vblank,
+ screen_priv->flip_pending, (long long) screen_priv->unflip_event_id));
vblank->flip_ready = TRUE;
return;
}
@@ -603,8 +605,9 @@ present_execute(present_vblank_ptr vblank, uint64_t ust, uint64_t crtc_msc)
if (vblank->flip) {
DebugPresent(("\tf %lld %p %8lld: %08lx -> %08lx\n",
- vblank->event_id, vblank, crtc_msc,
- vblank->pixmap->drawable.id, vblank->window->drawable.id));
+ (long long) vblank->event_id, vblank, (long long) crtc_msc,
+ (long) vblank->pixmap->drawable.id,
+ (long) vblank->window->drawable.id));
/* Prepare to flip by placing it in the flip queue and
* and sticking it into the flip_pending field
@@ -645,7 +648,11 @@ present_execute(present_vblank_ptr vblank, uint64_t ust, uint64_t crtc_msc)
screen_priv->flip_pending = NULL;
vblank->flip = FALSE;
}
- DebugPresent(("\tc %p %8lld: %08lx -> %08lx\n", vblank, crtc_msc, vblank->pixmap->drawable.id, vblank->window->drawable.id));
+ DebugPresent(("\tc %p %8lld: %08lx -> %08lx\n",
+ vblank,
+ (long long) crtc_msc,
+ (long) vblank->pixmap->drawable.id,
+ (long) vblank->window->drawable.id));
if (screen_priv->flip_pending) {
/* Check pending flip
@@ -774,8 +781,8 @@ present_pixmap(WindowPtr window,
continue;
DebugPresent(("\tx %lld %p %8lld: %08lx -> %08lx (crtc %p)\n",
- vblank->event_id, vblank, vblank->target_msc,
- vblank->pixmap->drawable.id, vblank->window->drawable.id,
+ (long long) vblank->event_id, vblank, (long long) vblank->target_msc,
+ (long) vblank->pixmap->drawable.id, (long) vblank->window->drawable.id,
vblank->crtc));
present_pixmap_idle(vblank->pixmap, vblank->window, vblank->serial, vblank->idle_fence);
@@ -851,8 +858,8 @@ present_pixmap(WindowPtr window,
if (pixmap)
DebugPresent(("q %lld %p %8lld: %08lx -> %08lx (crtc %p)\n",
- vblank->event_id, vblank, target_msc,
- vblank->pixmap->drawable.id, vblank->window->drawable.id,
+ (long long) vblank->event_id, vblank, (long long) target_msc,
+ (long) vblank->pixmap->drawable.id, (long) vblank->window->drawable.id,
target_crtc));
xorg_list_add(&vblank->event_queue, &present_exec_queue);
@@ -943,9 +950,9 @@ present_vblank_destroy(present_vblank_ptr vblank)
xorg_list_del(&vblank->window_list);
DebugPresent(("\td %lld %p %8lld: %08lx -> %08lx\n",
- vblank->event_id, vblank, vblank->target_msc,
- vblank->pixmap ? vblank->pixmap->drawable.id : 0,
- vblank->window->drawable.id));
+ (long long) vblank->event_id, vblank, (long long) vblank->target_msc,
+ vblank->pixmap ? (long) vblank->pixmap->drawable.id : 0l,
+ (long) vblank->window->drawable.id));
/* Drop pixmap reference */
if (vblank->pixmap)
--
2.0.1
More information about the xorg-devel
mailing list