From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>, Anthony Liguori <aliguori@amazon.com>
Subject: [Qemu-devel] [PULL 8/8] console: Remove unused QEMU_BIG_ENDIAN_FLAG
Date: Fri, 5 Sep 2014 13:51:16 +0200 [thread overview]
Message-ID: <1409917876-21961-9-git-send-email-kraxel@redhat.com> (raw)
In-Reply-To: <1409917876-21961-1-git-send-email-kraxel@redhat.com>
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
If we need to, we should use the pixman formats instead but for
now this is unused except in commented out code so take it out
to avoid further confusion about surface endianness.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
include/ui/console.h | 3 +--
ui/console.c | 7 -------
ui/vnc-enc-tight.c | 12 ++++--------
3 files changed, 5 insertions(+), 17 deletions(-)
diff --git a/include/ui/console.h b/include/ui/console.h
index 58a7d4b..cde0faf 100644
--- a/include/ui/console.h
+++ b/include/ui/console.h
@@ -102,8 +102,7 @@ struct QemuConsoleClass {
ObjectClass parent_class;
};
-#define QEMU_BIG_ENDIAN_FLAG 0x01
-#define QEMU_ALLOCATED_FLAG 0x02
+#define QEMU_ALLOCATED_FLAG 0x01
struct PixelFormat {
uint8_t bits_per_pixel;
diff --git a/ui/console.c b/ui/console.c
index d1342ca..5d73d81 100644
--- a/ui/console.c
+++ b/ui/console.c
@@ -1237,9 +1237,6 @@ static void qemu_alloc_display(DisplaySurface *surface, int width, int height)
assert(surface->image != NULL);
surface->flags = QEMU_ALLOCATED_FLAG;
-#ifdef HOST_WORDS_BIGENDIAN
- surface->flags |= QEMU_BIG_ENDIAN_FLAG;
-#endif
}
DisplaySurface *qemu_create_displaysurface(int width, int height)
@@ -1264,10 +1261,6 @@ DisplaySurface *qemu_create_displaysurface_from(int width, int height,
(void *)data, linesize);
assert(surface->image != NULL);
-#ifdef HOST_WORDS_BIGENDIAN
- surface->flags = QEMU_BIG_ENDIAN_FLAG;
-#endif
-
return surface;
}
diff --git a/ui/vnc-enc-tight.c b/ui/vnc-enc-tight.c
index f02352c..3d1b5cd 100644
--- a/ui/vnc-enc-tight.c
+++ b/ui/vnc-enc-tight.c
@@ -220,8 +220,7 @@ tight_detect_smooth_image24(VncState *vs, int w, int h)
unsigned int errors; \
unsigned char *buf = vs->tight.tight.buffer; \
\
- endian = 0; /* FIXME: ((vs->clientds.flags & QEMU_BIG_ENDIAN_FLAG) != \
- (vs->ds->surface->flags & QEMU_BIG_ENDIAN_FLAG)); */ \
+ endian = 0; /* FIXME */ \
\
\
max[0] = vs->client_pf.rmax; \
@@ -563,8 +562,7 @@ tight_filter_gradient24(VncState *vs, uint8_t *buf, int w, int h)
buf32 = (uint32_t *)buf;
memset(vs->tight.gradient.buffer, 0, w * 3 * sizeof(int));
- if (1 /* FIXME: (vs->clientds.flags & QEMU_BIG_ENDIAN_FLAG) ==
- (vs->ds->surface->flags & QEMU_BIG_ENDIAN_FLAG) */) {
+ if (1 /* FIXME */) {
shift[0] = vs->client_pf.rshift;
shift[1] = vs->client_pf.gshift;
shift[2] = vs->client_pf.bshift;
@@ -621,8 +619,7 @@ tight_filter_gradient24(VncState *vs, uint8_t *buf, int w, int h)
\
memset (vs->tight.gradient.buffer, 0, w * 3 * sizeof(int)); \
\
- endian = 0; /* FIXME: ((vs->clientds.flags & QEMU_BIG_ENDIAN_FLAG) != \
- (vs->ds->surface->flags & QEMU_BIG_ENDIAN_FLAG)); */ \
+ endian = 0; /* FIXME */ \
\
max[0] = vs->client_pf.rmax; \
max[1] = vs->client_pf.gmax; \
@@ -898,8 +895,7 @@ static void tight_pack24(VncState *vs, uint8_t *buf, size_t count, size_t *ret)
buf32 = (uint32_t *)buf;
- if (1 /* FIXME: (vs->clientds.flags & QEMU_BIG_ENDIAN_FLAG) ==
- (vs->ds->surface->flags & QEMU_BIG_ENDIAN_FLAG) */) {
+ if (1 /* FIXME */) {
rshift = vs->client_pf.rshift;
gshift = vs->client_pf.gshift;
bshift = vs->client_pf.bshift;
--
1.8.3.1
next prev parent reply other threads:[~2014-09-05 11:51 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-05 11:51 [Qemu-devel] [PULL 0/8] console: pixman conversion continued Gerd Hoffmann
2014-09-05 11:51 ` [Qemu-devel] [PULL 1/8] console: add qemu_pixelformat_from_pixman Gerd Hoffmann
2014-09-05 11:51 ` [Qemu-devel] [PULL 2/8] console: add qemu_default_pixman_format Gerd Hoffmann
2014-09-05 11:51 ` [Qemu-devel] [PULL 3/8] console: reimplement qemu_default_pixelformat Gerd Hoffmann
2014-09-05 11:51 ` [Qemu-devel] [PULL 4/8] console: stop using PixelFormat Gerd Hoffmann
2014-09-05 11:51 ` [Qemu-devel] [PULL 5/8] console: add qemu_create_displaysurface_guestmem Gerd Hoffmann
2014-09-05 11:51 ` [Qemu-devel] [PULL 6/8] console: add dpy_gfx_update_dirty Gerd Hoffmann
2014-09-05 11:51 ` [Qemu-devel] [PULL 7/8] console: add qemu_pixman_linebuf_copy Gerd Hoffmann
2014-09-05 11:51 ` Gerd Hoffmann [this message]
2014-09-05 13:29 ` [Qemu-devel] [PULL 8/8] console: Remove unused QEMU_BIG_ENDIAN_FLAG Peter Maydell
2014-09-05 13:40 ` Gerd Hoffmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1409917876-21961-9-git-send-email-kraxel@redhat.com \
--to=kraxel@redhat.com \
--cc=aliguori@amazon.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).