aboutsummaryrefslogtreecommitdiff
path: root/hw/display
diff options
context:
space:
mode:
authorEmil Condrea <emilcondrea@gmail.com>2016-10-25 08:50:14 +0300
committerStefano Stabellini <sstabellini@kernel.org>2016-10-28 17:53:50 -0700
commit96c77dba6f1c334d0c38c1fa43b02dbf727d100a (patch)
tree5f8191bee801fd5b3da30a965b702ca38aa56a57 /hw/display
parentecf798189133b84ab90d6d96a1eb37f5c9ca444e (diff)
xen: Rename xen_be_printf to xen_pv_printf
Prepare xen_be_printf to be used by both backend and frontends: * xen_be_printf -> xen_pv_printf Signed-off-by: Emil Condrea <emilcondrea@gmail.com> Signed-off-by: Stefano Stabellini <sstabellini@kernel.org> Signed-off-by: Quan Xu <xuquan8@huawei.com> Acked-by: Anthony PERARD <anthony.perard@citrix.com>
Diffstat (limited to 'hw/display')
-rw-r--r--hw/display/xenfb.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/hw/display/xenfb.c b/hw/display/xenfb.c
index d458fc1269..d7b94b05ad 100644
--- a/hw/display/xenfb.c
+++ b/hw/display/xenfb.c
@@ -103,7 +103,7 @@ static int common_bind(struct common *c)
return -1;
xen_be_bind_evtchn(&c->xendev);
- xen_be_printf(&c->xendev, 1,
+ xen_pv_printf(&c->xendev, 1,
"ring mfn %"PRI_xen_pfn", remote-port %d, local-port %d\n",
mfn, c->xendev.remote_port, c->xendev.local_port);
@@ -346,7 +346,7 @@ static int input_initialise(struct XenDevice *xendev)
int rc;
if (!in->c.con) {
- xen_be_printf(xendev, 1, "ds not set (yet)\n");
+ xen_pv_printf(xendev, 1, "ds not set (yet)\n");
return -1;
}
@@ -511,44 +511,44 @@ static int xenfb_configure_fb(struct XenFB *xenfb, size_t fb_len_lim,
int max_width, max_height;
if (fb_len_lim > fb_len_max) {
- xen_be_printf(&xenfb->c.xendev, 0,
+ xen_pv_printf(&xenfb->c.xendev, 0,
"fb size limit %zu exceeds %zu, corrected\n",
fb_len_lim, fb_len_max);
fb_len_lim = fb_len_max;
}
if (fb_len_lim && fb_len > fb_len_lim) {
- xen_be_printf(&xenfb->c.xendev, 0,
+ xen_pv_printf(&xenfb->c.xendev, 0,
"frontend fb size %zu limited to %zu\n",
fb_len, fb_len_lim);
fb_len = fb_len_lim;
}
if (depth != 8 && depth != 16 && depth != 24 && depth != 32) {
- xen_be_printf(&xenfb->c.xendev, 0,
+ xen_pv_printf(&xenfb->c.xendev, 0,
"can't handle frontend fb depth %d\n",
depth);
return -1;
}
if (row_stride <= 0 || row_stride > fb_len) {
- xen_be_printf(&xenfb->c.xendev, 0, "invalid frontend stride %d\n",
+ xen_pv_printf(&xenfb->c.xendev, 0, "invalid frontend stride %d\n",
row_stride);
return -1;
}
max_width = row_stride / (depth / 8);
if (width < 0 || width > max_width) {
- xen_be_printf(&xenfb->c.xendev, 0,
+ xen_pv_printf(&xenfb->c.xendev, 0,
"invalid frontend width %d limited to %d\n",
width, max_width);
width = max_width;
}
if (offset < 0 || offset >= fb_len) {
- xen_be_printf(&xenfb->c.xendev, 0,
+ xen_pv_printf(&xenfb->c.xendev, 0,
"invalid frontend offset %d (max %zu)\n",
offset, fb_len - 1);
return -1;
}
max_height = (fb_len - offset) / row_stride;
if (height < 0 || height > max_height) {
- xen_be_printf(&xenfb->c.xendev, 0,
+ xen_pv_printf(&xenfb->c.xendev, 0,
"invalid frontend height %d limited to %d\n",
height, max_height);
height = max_height;
@@ -561,7 +561,7 @@ static int xenfb_configure_fb(struct XenFB *xenfb, size_t fb_len_lim,
xenfb->offset = offset;
xenfb->up_fullscreen = 1;
xenfb->do_resize = 1;
- xen_be_printf(&xenfb->c.xendev, 1,
+ xen_pv_printf(&xenfb->c.xendev, 1,
"framebuffer %dx%dx%d offset %d stride %d\n",
width, height, depth, offset, row_stride);
return 0;
@@ -640,7 +640,7 @@ static void xenfb_guest_copy(struct XenFB *xenfb, int x, int y, int w, int h)
}
}
if (oops) /* should not happen */
- xen_be_printf(&xenfb->c.xendev, 0, "%s: oops: convert %d -> %d bpp?\n",
+ xen_pv_printf(&xenfb->c.xendev, 0, "%s: oops: convert %d -> %d bpp?\n",
__FUNCTION__, xenfb->depth, bpp);
dpy_gfx_update(xenfb->c.con, x, y, w, h);
@@ -730,7 +730,7 @@ static void xenfb_update(void *opaque)
break;
}
dpy_gfx_replace_surface(xenfb->c.con, surface);
- xen_be_printf(&xenfb->c.xendev, 1,
+ xen_pv_printf(&xenfb->c.xendev, 1,
"update: resizing: %dx%d @ %d bpp%s\n",
xenfb->width, xenfb->height, xenfb->depth,
is_buffer_shared(surface) ? " (shared)" : "");
@@ -739,10 +739,10 @@ static void xenfb_update(void *opaque)
/* run queued updates */
if (xenfb->up_fullscreen) {
- xen_be_printf(&xenfb->c.xendev, 3, "update: fullscreen\n");
+ xen_pv_printf(&xenfb->c.xendev, 3, "update: fullscreen\n");
xenfb_guest_copy(xenfb, 0, 0, xenfb->width, xenfb->height);
} else if (xenfb->up_count) {
- xen_be_printf(&xenfb->c.xendev, 3, "update: %d rects\n",
+ xen_pv_printf(&xenfb->c.xendev, 3, "update: %d rects\n",
xenfb->up_count);
for (i = 0; i < xenfb->up_count; i++)
xenfb_guest_copy(xenfb,
@@ -751,7 +751,7 @@ static void xenfb_update(void *opaque)
xenfb->up_rects[i].w,
xenfb->up_rects[i].h);
} else {
- xen_be_printf(&xenfb->c.xendev, 3, "update: nothing\n");
+ xen_pv_printf(&xenfb->c.xendev, 3, "update: nothing\n");
}
xenfb->up_count = 0;
xenfb->up_fullscreen = 0;
@@ -805,14 +805,14 @@ static void xenfb_handle_events(struct XenFB *xenfb)
w = MIN(event->update.width, xenfb->width - x);
h = MIN(event->update.height, xenfb->height - y);
if (w < 0 || h < 0) {
- xen_be_printf(&xenfb->c.xendev, 1, "bogus update ignored\n");
+ xen_pv_printf(&xenfb->c.xendev, 1, "bogus update ignored\n");
break;
}
if (x != event->update.x ||
y != event->update.y ||
w != event->update.width ||
h != event->update.height) {
- xen_be_printf(&xenfb->c.xendev, 1, "bogus update clipped\n");
+ xen_pv_printf(&xenfb->c.xendev, 1, "bogus update clipped\n");
}
if (w == xenfb->width && h > xenfb->height / 2) {
/* scroll detector: updated more than 50% of the lines,
@@ -894,7 +894,7 @@ static int fb_initialise(struct XenDevice *xendev)
if (fb->feature_update)
xenstore_write_be_int(xendev, "request-update", 1);
- xen_be_printf(xendev, 1, "feature-update=%d, videoram=%d\n",
+ xen_pv_printf(xendev, 1, "feature-update=%d, videoram=%d\n",
fb->feature_update, videoram);
return 0;
}
@@ -913,7 +913,7 @@ static void fb_disconnect(struct XenDevice *xendev)
PROT_READ | PROT_WRITE, MAP_SHARED | MAP_ANON,
-1, 0);
if (fb->pixels == MAP_FAILED) {
- xen_be_printf(xendev, 0,
+ xen_pv_printf(xendev, 0,
"Couldn't replace the framebuffer with anonymous memory errno=%d\n",
errno);
}
@@ -934,7 +934,7 @@ static void fb_frontend_changed(struct XenDevice *xendev, const char *node)
if (fb->bug_trigger == 0 && strcmp(node, "state") == 0 &&
xendev->fe_state == XenbusStateConnected &&
xendev->be_state == XenbusStateConnected) {
- xen_be_printf(xendev, 2, "re-trigger connected (frontend bug)\n");
+ xen_pv_printf(xendev, 2, "re-trigger connected (frontend bug)\n");
xen_be_set_state(xendev, XenbusStateConnected);
fb->bug_trigger = 1; /* only once */
}
@@ -995,7 +995,7 @@ wait_more:
usleep(10000);
goto wait_more;
}
- xen_be_printf(NULL, 1, "displaystate setup failed\n");
+ xen_pv_printf(NULL, 1, "displaystate setup failed\n");
return;
}