qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: QEMU Developers <qemu-devel@nongnu.org>, qemu-arm <qemu-arm@nongnu.org>
Subject: Re: [Qemu-devel] [Qemu-arm] [PATCH 2/3] hw/sii9022: Add support for Silicon Image SII9022
Date: Thu, 22 Feb 2018 14:42:46 +0000	[thread overview]
Message-ID: <CAFEAcA8QVBRLs1ZfgMP1nTUG4xQJRH9WrwxdXzrwAR8pZJJ4ew@mail.gmail.com> (raw)
In-Reply-To: <20180217140051.22731-2-linus.walleij@linaro.org>

On 17 February 2018 at 14:00, Linus Walleij <linus.walleij@linaro.org> wrote:
> This adds support for emulating the Silicon Image SII9022 DVI/HDMI
> bridge. It's not very clever right now, it just acknowledges
> the switch into DDC I2C mode and back. Combining this with the
> existing DDC I2C emulation gives the right behavior on the Versatile
> Express emulation passing through the QEMU EDID to the emulated
> platform.
>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
>  hw/display/Makefile.objs |   1 +
>  hw/display/sii9022.c     | 185 +++++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 186 insertions(+)
>  create mode 100644 hw/display/sii9022.c
>
> diff --git a/hw/display/Makefile.objs b/hw/display/Makefile.objs
> index d3a4cb396eb9..3c7c75b94da5 100644
> --- a/hw/display/Makefile.objs
> +++ b/hw/display/Makefile.objs
> @@ -3,6 +3,7 @@ common-obj-$(CONFIG_VGA_CIRRUS) += cirrus_vga.o
>  common-obj-$(CONFIG_G364FB) += g364fb.o
>  common-obj-$(CONFIG_JAZZ_LED) += jazz_led.o
>  common-obj-$(CONFIG_PL110) += pl110.o
> +common-obj-$(CONFIG_SII9022) += sii9022.o
>  common-obj-$(CONFIG_SSD0303) += ssd0303.o
>  common-obj-$(CONFIG_SSD0323) += ssd0323.o
>  common-obj-$(CONFIG_XEN) += xenfb.o
> diff --git a/hw/display/sii9022.c b/hw/display/sii9022.c
> new file mode 100644
> index 000000000000..d6f3cdc04293
> --- /dev/null
> +++ b/hw/display/sii9022.c
> @@ -0,0 +1,185 @@
> +/*
> + * Silicon Image SiI9022
> + *
> + * This is a pretty hollow emulation: all we do is acknowledge that we
> + * exist (chip ID) and confirm that we get switched over into DDC mode
> + * so the emulated host can proceed to read out EDID data. All subsequent
> + * set-up of connectors etc will be acknowledged and ignored.
> + *
> + * Copyright (c) 2018 Linus Walleij

Sanity check: really copyright you and not Linaro ?

> + *
> + * This code is licensed under the GNU GPL v2.
> + *
> + * Contributions after 2012-01-13 are licensed under the terms of the
> + * GNU GPL, version 2 or (at your option) any later version.

If this is copyright 2018 then what parts of it are not covered by
the "contributions after 2012-01-13" condition? Could we just have
this be GPL-v2-or-later, which is what most new code is ?


> +static void sii9022_reset(DeviceState *dev)
> +{
> +    sii9022_state *s = SII9022(dev);
> +
> +    s->ptr = 0;
> +    s->addr_byte = false;

I think we should reset ddc/ddc_skip_finish/ddc_req
here too. I suspect the state machine logic means we
can't get to a place where their values are used once
we reset ptr and addr_byte, but it's easier to reason
about if we just reset all the device's state.

I agree with Philippe that we should use trace events here rather
than the DPRINTF macro. Otherwise the code looks fine.

thanks
-- PMM

  parent reply	other threads:[~2018-02-22 14:43 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-17 14:00 [Qemu-devel] [PATCH 1/3] hw/i2c-ddc: Do not fail writes Linus Walleij
2018-02-17 14:00 ` [Qemu-devel] [PATCH 2/3] hw/sii9022: Add support for Silicon Image SII9022 Linus Walleij
2018-02-17 18:32   ` [Qemu-devel] [Qemu-arm] " Philippe Mathieu-Daudé
2018-02-27  7:41     ` Linus Walleij
2018-02-27 10:09       ` Peter Maydell
2018-02-27 10:21         ` Linus Walleij
2018-02-27 10:24           ` Peter Maydell
2018-02-27 10:29             ` Peter Maydell
2018-02-22 14:42   ` Peter Maydell [this message]
2018-02-17 14:00 ` [Qemu-devel] [PATCH 3/3] arm/vexpress: Add proper display connector emulation Linus Walleij
2018-02-17 18:28   ` Philippe Mathieu-Daudé
2018-02-19 14:10     ` Linus Walleij
2018-02-19 15:16       ` Corey Minyard
2018-02-19 15:20       ` [Qemu-devel] [PATCH 0/2] Move the bus class to i2c.h minyard
2018-02-19 15:20         ` [Qemu-devel] [PATCH 1/2] i2c: Fix some brace style issues minyard
2018-02-19 15:24           ` Peter Maydell
2018-02-22 15:37           ` Linus Walleij
2018-02-19 15:20         ` [Qemu-devel] [PATCH 2/2] i2c: Move the bus class to i2c.h minyard
2018-02-19 15:25           ` Peter Maydell
2018-02-20 13:06             ` Corey Minyard
2018-02-22 15:39               ` Linus Walleij
2018-02-22 15:44                 ` Peter Maydell
2018-02-22 15:55                   ` Linus Walleij
2018-02-22 15:38           ` Linus Walleij
2018-02-22 14:36 ` [Qemu-devel] [Qemu-arm] [PATCH 1/3] hw/i2c-ddc: Do not fail writes Peter Maydell

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=CAFEAcA8QVBRLs1ZfgMP1nTUG4xQJRH9WrwxdXzrwAR8pZJJ4ew@mail.gmail.com \
    --to=peter.maydell@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=qemu-arm@nongnu.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 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).