qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 08/14] sm501: Fix hardware cursor


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH v2 08/14] sm501: Fix hardware cursor
Date: Thu, 2 Mar 2017 19:35:16 +0000

On 4 December 2016 at 18:01, BALATON Zoltan <address@hidden> wrote:
> Signed-off-by: BALATON Zoltan <address@hidden>

Can you say in the commit message what the bugs you're fixing are,
please? Otherwise it's a bit hard to disentangle here what's
just refactoring and what's making behavioural changes.

> ---
>  hw/display/sm501.c          | 169 
> +++++++++++++++++++++++++-------------------
>  hw/display/sm501_template.h |  25 +++----
>  2 files changed, 107 insertions(+), 87 deletions(-)
>
> diff --git a/hw/display/sm501.c b/hw/display/sm501.c
> index 2694081..c4bdc50 100644
> --- a/hw/display/sm501.c
> +++ b/hw/display/sm501.c
> @@ -553,6 +553,24 @@ static uint32_t get_local_mem_size_index(uint32_t size)
>      return index;
>  }
>
> +static inline int get_width(SM501State *s, int crt)
> +{
> +    int width = crt ? s->dc_crt_h_total : s->dc_panel_h_total;
> +    return (width & 0x00000FFF) + 1;
> +}
> +
> +static inline int get_height(SM501State *s, int crt)
> +{
> +    int height = crt ? s->dc_crt_v_total : s->dc_panel_v_total;
> +    return (height & 0x00000FFF) + 1;
> +}
> +
> +static inline int get_bpp(SM501State *s, int crt)
> +{
> +    int bpp = crt ? s->dc_crt_control : s->dc_panel_control;
> +    return (8 << (bpp & 3)) / 8;

Isn't this the same as "1 << (bpp & 3)" ?

> +}


thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]