All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vasily Khoruzhick <anarsoul@gmail.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH v3 1/2] pxa2xx_lcd: add proper rotation support
Date: Wed, 8 Jun 2011 14:22:42 +0300	[thread overview]
Message-ID: <201106081422.42682.anarsoul@gmail.com> (raw)
In-Reply-To: <BANLkTin4kz7cGMXxF9unzZ5ZTeChZh5wig@mail.gmail.com>

On Wednesday 08 June 2011 12:50:50 Peter Maydell wrote:
> On 3 June 2011 16:36, Vasily Khoruzhick <anarsoul@gmail.com> wrote:
> > Until now, pxa2xx_lcd only supported 90deg rotation, but
> > some machines (for example Zipit Z2) needs 270deg rotation.
> > 
> > Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
> 
> Still haven't tested this yet, but some very quick first
> pass comments.
> 
> > +static void pxa2xx_lcdc_dma0_redraw_rot180(PXA2xxLCDState *s,
> > +                target_phys_addr_t addr, int *miny, int *maxy)
> > +{
> > +    int src_width, dest_width;
> > +    drawfn fn = NULL;
> > +    if (s->dest_width)
> > +        fn = s->line_fn[s->transp][s->bpp];
> > +    if (!fn)
> > +        return;
> 
> Braces (here and elsewhere); if we're adding whole new functions
> we might as well do them in accordance with the styl.

Oh, ok. I'll add patch to fix pxa2xx_lcd.c codestyle to the series, and then 
fix this patch.

> 
> >             case QEMU_OPTION_portrait:
> > -                graphic_rotate = 1;
> > +                graphic_rotate = 90;
> > +                break;
> > +            case QEMU_OPTION_rotate:
> > +                graphic_rotate = atoi(optarg);
> > +                if (graphic_rotate != 0 && graphic_rotate != 90 &&
> > +                    graphic_rotate != 180 && graphic_rotate != 270) {
> > +                    fprintf(stderr,
> > +                        "qemu: only 90, 180, 270 deg rotation is
> > available\n"); +                    exit(1);
> > +                }
> 
> We seem to generally use strtol() for argument parsing rather
> than atoi, might be nicer to be consistent.

Ok

> The other bit of code that looks at graphic_rotate
> is hw/spitz.c:spitz_keyboard_register(). Does that require
> changes? It doesn't seem entirely right for us to assert
> 'tablet mode' for everything except 0deg rotation.

Well, -portrait argument is preserved, so all old code should work fine 
(including scripts to start qemu). Passing -rotate 180 or -rotate 270 will 
produce unpredictable result (but not a crash). I have no spitz  image, so I 
can't test what happens.

Regards
Vasily

  reply	other threads:[~2011-06-08 11:23 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-31 14:16 [Qemu-devel] [PATCH 1/2] pxa2xx_lcd: add proper rotation support Vasily Khoruzhick
2011-05-31 14:16 ` [Qemu-devel] [PATCH 2/2] Add support for Zipit Z2 machine Vasily Khoruzhick
2011-05-31 23:35   ` Peter Maydell
2011-06-01  6:25     ` Vasily Khoruzhick
2011-06-01  9:28     ` [Qemu-devel] [PATCH v2 1/2] pxa2xx_lcd: add proper rotation support Vasily Khoruzhick
2011-06-01  9:28       ` [Qemu-devel] [PATCH v2 2/2] Add support for Zipit Z2 machine Vasily Khoruzhick
2011-06-03 15:33       ` [Qemu-devel] [PATCH v2 1/2] pxa2xx_lcd: add proper rotation support Vasily Khoruzhick
2011-06-03 15:36       ` [Qemu-devel] [PATCH v3 " Vasily Khoruzhick
2011-06-03 15:36         ` [Qemu-devel] [PATCH v3 2/2] Add support for Zipit Z2 machine Vasily Khoruzhick
2011-06-03 15:38         ` [Qemu-devel] [PATCH v3 1/2] pxa2xx_lcd: add proper rotation support Vasily Khoruzhick
2011-06-08  8:52         ` Vasily Khoruzhick
2011-06-08  9:50         ` Peter Maydell
2011-06-08 11:22           ` Vasily Khoruzhick [this message]
2011-06-17 10:04             ` [Qemu-devel] [PATCH v4 " Vasily Khoruzhick
2011-06-17 10:04               ` [Qemu-devel] [PATCH v4 2/2] Add support for Zipit Z2 machine Vasily Khoruzhick
2011-06-21  9:47                 ` Vasily Khoruzhick
2011-06-24 14:45                 ` Peter Maydell
2011-06-24 17:06                   ` Vasily Khoruzhick
2011-06-24 17:16                     ` Peter Maydell
2011-07-06 13:52                       ` [Qemu-devel] [PATCH v5] " Vasily Khoruzhick
2011-07-11 15:26                         ` Vasily Khoruzhick
2011-07-28  8:19                           ` Vasily Khoruzhick
2011-07-12 17:31                         ` Peter Maydell
2011-07-30  5:04                         ` andrzej zaborowski
2011-06-21  9:47               ` [Qemu-devel] [PATCH v4 1/2] pxa2xx_lcd: add proper rotation support Vasily Khoruzhick
2011-07-04 20:11               ` andrzej zaborowski

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=201106081422.42682.anarsoul@gmail.com \
    --to=anarsoul@gmail.com \
    --cc=peter.maydell@linaro.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.