qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: Gerd Hoffmann <kraxel@redhat.com>, qemu-devel@nongnu.org
Cc: Konstantin Nazarov <mail@knazarov.com>
Subject: Re: [PATCH 9/9] edid: add support for DisplayID extension (5k resolution)
Date: Tue, 16 Mar 2021 17:15:31 +0100	[thread overview]
Message-ID: <980cbb3b-3870-ec1f-cbd7-f9e52ea0ebd3@redhat.com> (raw)
In-Reply-To: <20210316143812.2363588-10-kraxel@redhat.com>

On 3/16/21 3:38 PM, Gerd Hoffmann wrote:
> From: Konstantin Nazarov <mail@knazarov.com>
> 
> The Detailed Timing Descriptor has only 12 bits to store the
> resolution. This limits the guest to 4095 pixels.
> 
> This patch adds support for the DisplayID extension, that has 2 full
> bytes for that purpose, thus allowing 5k resolutions and above.
> 
> Based-on: <20210303152948.59943-2-akihiko.odaki@gmail.com>
> Signed-off-by: Konstantin Nazarov <mail@knazarov.com>
> Message-Id: <20210315114639.91953-3-mail@knazarov.com>
> 
> [ kraxel: minor workflow tweaks ]
> 
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
>  hw/display/edid-generate.c | 78 +++++++++++++++++++++++++++++++++++---
>  hw/display/vga-pci.c       |  2 +-
>  2 files changed, 74 insertions(+), 6 deletions(-)

> +static void qemu_displayid_generate(uint8_t *did, uint32_t refresh_rate,
> +                                    uint32_t xres, uint32_t yres,
> +                                    uint32_t xmm, uint32_t ymm)
> +{
> +    Timings timings;
> +    generate_timings(&timings, refresh_rate, xres, yres);
> +
> +    did[0] = 0x70; /* display id extension */
> +    did[1] = 0x13; /* version 1.3 */
> +    did[2] = 23;   /* length */
> +    did[3] = 0x03; /* product type (0x03 == standalone display device) */
> +
> +    did[5] = 0x03; /* Detailed Timings Data Block */
> +    did[6] = 0x00; /* revision */
> +    did[7] = 0x14; /* block length */
> +
> +    did[8]  = timings.clock  & 0xff;
> +    did[9]  = (timings.clock & 0xff00) >> 8;
> +    did[10] = (timings.clock & 0xff0000) >> 16;
> +
> +    did[11] = 0x88; /* leave aspect ratio undefined */
> +
> +    stw_le_p(did + 12, 0xffff & (xres - 1));
> +    stw_le_p(did + 14, 0xffff & (timings.xblank - 1));
> +    stw_le_p(did + 16, 0xffff & (timings.xfront - 1));
> +    stw_le_p(did + 18, 0xffff & (timings.xsync - 1));
> +
> +    stw_le_p(did + 20, 0xffff & (yres - 1));
> +    stw_le_p(did + 22, 0xffff & (timings.yblank - 1));
> +    stw_le_p(did + 24, 0xffff & (timings.yfront - 1));
> +    stw_le_p(did + 26, 0xffff & (timings.ysync - 1));

Pointless 0xffff mask.

> +
> +    edid_checksum(did + 1, did[2] + 4);
> +}



  reply	other threads:[~2021-03-16 16:21 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-16 14:38 [PATCH 0/9] edid: windows fixes Gerd Hoffmann
2021-03-16 14:38 ` [PATCH 1/9] qemu-edid: use qemu_edid_size() Gerd Hoffmann
2021-03-16 16:16   ` Philippe Mathieu-Daudé
2021-03-16 14:38 ` [PATCH 2/9] edid: edid_desc_next Gerd Hoffmann
2021-03-16 14:38 ` [PATCH 3/9] edid: move xtra3 descriptor Gerd Hoffmann
2021-03-16 14:38 ` [PATCH 4/9] edid: use dta extension block descriptors Gerd Hoffmann
2021-03-16 14:38 ` [PATCH 5/9] edid: prefer standard timings Gerd Hoffmann
2021-03-16 14:38 ` [PATCH 6/9] edid: Make refresh rate configurable Gerd Hoffmann
2021-03-16 14:38 ` [PATCH 7/9] edid: move timing generation into a separate function Gerd Hoffmann
2021-03-16 14:38 ` [PATCH 8/9] edid: allow arbitrary-length checksums Gerd Hoffmann
2021-03-16 14:38 ` [PATCH 9/9] edid: add support for DisplayID extension (5k resolution) Gerd Hoffmann
2021-03-16 16:15   ` Philippe Mathieu-Daudé [this message]
2021-03-16 15:39 ` [PATCH 0/9] edid: windows fixes no-reply

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=980cbb3b-3870-ec1f-cbd7-f9e52ea0ebd3@redhat.com \
    --to=philmd@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=mail@knazarov.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).