diff mbox

[RFC,01/14] vga: Create direct sufaces for depth 24 too

Message ID 1403565068-15229-2-git-send-email-benh@kernel.crashing.org
State New
Headers show

Commit Message

Benjamin Herrenschmidt June 23, 2014, 11:10 p.m. UTC
pixman supports 24bpp directly, let's share surfaces
For both endians even !

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
 hw/display/vga.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Gerd Hoffmann July 1, 2014, 7:09 a.m. UTC | #1
Hi,

> -        if (depth == 32 || ((depth == 16 || depth == 15) && !byteswap)) {
> +	if (depth == 32 || depth == 24 ||
> +           ((depth == 16 || depth == 15) && !byteswap)) {

Doesn't apply.  depth == 15 isn't upstream.  Guess you have some more
local changes?  Also the whitespace looks fishy (tabs vs. spaces?).
Note that the qemu whitespace codestyle (spaces only) differs from linux
kernel ...

cheers,
  Gerd
Benjamin Herrenschmidt July 1, 2014, 9:31 a.m. UTC | #2
On Tue, 2014-07-01 at 09:09 +0200, Gerd Hoffmann wrote:
>   Hi,
> 
> > -        if (depth == 32 || ((depth == 16 || depth == 15) && !byteswap)) {
> > +	if (depth == 32 || depth == 24 ||
> > +           ((depth == 16 || depth == 15) && !byteswap)) {
> 
> Doesn't apply.  

> depth == 15 isn't upstream. 

It's added by the previous patch, I just git send-email'ed the series
with the wrong starting point :-) I'll resend when I've addressed the
other comments.

If you want to see the whole lot (including my fix to one of your
patches) it's at https://github.com/ozbenh/qemu/commits/vga-work

>  Guess you have some more
> local changes?

>   Also the whitespace looks fishy (tabs vs. spaces?).
> Note that the qemu whitespace codestyle (spaces only) differs from linux
> kernel ...

Yes, I am aware of that, I might have accidentally left a tab slip in,
my emacs is still configured for Linux and I'm fixing them up "by hand"
but that's obviously sub-optimal, I'll look into fixing that.

Cheers,
Ben.

> cheers,
>   Gerd
>
diff mbox

Patch

diff --git a/hw/display/vga.c b/hw/display/vga.c
index e4cd206..4674576 100644
--- a/hw/display/vga.c
+++ b/hw/display/vga.c
@@ -1692,7 +1692,8 @@  static void vga_draw_graphic(VGACommonState *s, int full_update)
         disp_width != s->last_width ||
         height != s->last_height ||
         s->last_depth != depth) {
-        if (depth == 32 || ((depth == 16 || depth == 15) && !byteswap)) {
+	if (depth == 32 || depth == 24 ||
+           ((depth == 16 || depth == 15) && !byteswap)) {
             pixman_format_code_t format =
                 qemu_default_pixman_format(depth, !byteswap);
             surface = qemu_create_displaysurface_from(disp_width,