qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Cc: qemu-devel@nongnu.org, "David Hildenbrand" <david@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Eric Blake" <eblake@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"Dmitry Osipenko" <dmitry.osipenko@collabora.com>,
	"Markus Armbruster" <armbru@redhat.com>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Peter Xu" <peterx@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Andrew Keesler" <ankeesler@google.com>,
	"Daniel P. Berrangé" <berrange@redhat.com>
Subject: Re: [PATCH 1/8] Support per-head resolutions with virtio-gpu
Date: Wed, 15 Oct 2025 10:40:37 +0100	[thread overview]
Message-ID: <87sefkjyei.fsf@draig.linaro.org> (raw)
In-Reply-To: <7ebab3d3-ee30-499c-b475-a64560eb160a@rsg.ci.i.u-tokyo.ac.jp> (Akihiko Odaki's message of "Wed, 15 Oct 2025 11:49:04 +0900")

Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp> writes:

> On 2025/10/14 20:12, Alex Bennée wrote:
>> From: Andrew Keesler <ankeesler@google.com>
>> In 454f4b0f, we started down the path of supporting separate
>> configurations per display head (e.g., you have 2 heads - one with
>> EDID name "AAA" and the other with EDID name "BBB").
<snip>
>> diff --git a/hw/display/virtio-gpu-base.c b/hw/display/virtio-gpu-base.c
>> index 7269477a1c8..6adb5312a40 100644
>> --- a/hw/display/virtio-gpu-base.c
>> +++ b/hw/display/virtio-gpu-base.c
>> @@ -233,6 +233,16 @@ virtio_gpu_base_device_realize(DeviceState *qdev,
>>       g->req_state[0].width = g->conf.xres;
>>       g->req_state[0].height = g->conf.yres;
>>   +    for (output_idx = 0, node = g->conf.outputs;
>> +         node && output_idx < g->conf.max_outputs;
>
> output_idx < g->conf.max_outputs is redundant as it is already
> enforced with the first for-loop that enumerates outputs.
>
> The condition can be simply removed, but I think merging this loop to
> the earlier loop will make the code a bit more concise.

I've dropped the extra condition check but I've left the loop where it
is as I don't want to change the effect of:

    g->req_state[0].width = g->conf.xres;
    g->req_state[0].height = g->conf.yres;

above. 

>
> Aside this redundancy of the code, the logic this patch implements
> looks good to me.
>
>> +         output_idx++, node = node->next) {
>> +        if (node->value->has_xres && node->value->has_yres) {
>> +            g->enabled_output_bitmask |= (1 << output_idx);
>> +            g->req_state[output_idx].width = node->value->xres;
>> +            g->req_state[output_idx].height = node->value->yres;
>> +        }
>> +    }
>> +
>>       g->hw_ops = &virtio_gpu_ops;
>>       for (i = 0; i < g->conf.max_outputs; i++) {
>>           g->scanout[i].con =

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro


  reply	other threads:[~2025-10-15  9:41 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-14 11:12 [PATCH 0/8] virtio-gpu/next - misc fixes and MR handling Alex Bennée
2025-10-14 11:12 ` [PATCH 1/8] Support per-head resolutions with virtio-gpu Alex Bennée
2025-10-15  2:49   ` Akihiko Odaki
2025-10-15  9:40     ` Alex Bennée [this message]
2025-10-14 11:12 ` [PATCH 2/8] system/memory: add memory_region_finalize tracepoint Alex Bennée
2025-10-15  3:37   ` Akihiko Odaki
2025-10-14 11:12 ` [PATCH 3/8] ui/gtk-gl-area: Remove extra draw call in refresh Alex Bennée
2025-10-15  3:08   ` Akihiko Odaki
2025-10-15 10:45     ` Alex Bennée
2025-10-15 11:58       ` Akihiko Odaki
2025-10-14 11:12 ` [PATCH 4/8] hw/display: add blob map/unmap trace events Alex Bennée
2025-10-15  3:39   ` Akihiko Odaki
2025-10-14 11:12 ` [PATCH 5/8] hw/display: re-arrange memory region tracking Alex Bennée
2025-10-14 17:00   ` Peter Xu
2025-10-14 11:12 ` [PATCH 6/8] virtio-gpu: refactor async blob unmapping Alex Bennée
2025-10-14 11:12 ` [PATCH 7/8] virtio-gpu: fix hang under TCG when unmapping blob Alex Bennée
2025-10-14 11:12 ` [PATCH 8/8] tests/functional: add GPU blob allocation test Alex Bennée
2025-10-15  2:41   ` Akihiko Odaki
2025-10-15 12:12     ` Akihiko Odaki

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=87sefkjyei.fsf@draig.linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=ankeesler@google.com \
    --cc=armbru@redhat.com \
    --cc=berrange@redhat.com \
    --cc=david@redhat.com \
    --cc=dmitry.osipenko@collabora.com \
    --cc=eblake@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=mst@redhat.com \
    --cc=odaki@rsg.ci.i.u-tokyo.ac.jp \
    --cc=pbonzini@redhat.com \
    --cc=peterx@redhat.com \
    --cc=philmd@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 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).