From: Paolo Bonzini <pbonzini@redhat.com>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>, qemu-devel@nongnu.org
Cc: Phil Dennis-Jordan <phil@philjordan.eu>
Subject: Re: [PATCH 1/2] pvg: do not enable it on cross-architecture targets
Date: Fri, 21 Feb 2025 18:01:42 +0100 [thread overview]
Message-ID: <701a0452-8aa9-4bcd-b334-bdfca2d12fd4@redhat.com> (raw)
In-Reply-To: <df0b1287-1a4d-43ad-860a-59bcd6ec3c7e@linaro.org>
On 2/20/25 16:19, Philippe Mathieu-Daudé wrote:
> Hmm what about keeping a MAC_PVG_COMMON instead:
>
> -- >8 --
> --- a/hw/display/Kconfig
> +++ b/hw/display/Kconfig
> @@ -141,15 +141,17 @@ config XLNX_DISPLAYPORT
> config DM163
> bool
>
> -config MAC_PVG
> +config MAC_PVG_COMMON
> bool
> - default y
> + depends on MAC_PVG
>
> config MAC_PVG_MMIO
> bool
> - depends on MAC_PVG && AARCH64
> + depends on AARCH64
It's possible, but the two "depends on MAC_PVG" cannot be removed here,
because otherwise MAC_PVG_PCI would be selected by "default y". The
only reason to do so, in my opinion, was if one wanted to build pvg as
a module, otherwise it's just (a handful) more lines of code with no
particular benefit.
> -if host_os == 'darwin'
> - system_ss.add(when: 'CONFIG_MAC_PVG', if_true: [files('apple-
> gfx.m'), pvg, metal])
> - system_ss.add(when: 'CONFIG_MAC_PVG_PCI', if_true: [files('apple-
> gfx-pci.m'), pvg, metal])
> - if cpu == 'aarch64'
> - system_ss.add(when: 'CONFIG_MAC_PVG_MMIO', if_true: [files('apple-
> gfx-mmio.m'), pvg, metal])
> - endif
> -endif
> +system_ss.add(when: 'CONFIG_MAC_PVG_COMMON', if_true: [files('apple-
> gfx.m'), pvg, metal])
> +system_ss.add(when: 'CONFIG_MAC_PVG_PCI', if_true: [files('apple-
> gfx-pci.m'), pvg, metal])
> +system_ss.add(when: 'CONFIG_MAC_PVG_MMIO', if_true: [files('apple-
> gfx-mmio.m'), pvg, metal])
Removing the "if" is independent of whether you keep CONFIG_MAC_PVG_COMMON.
I can squash that in patch 2:
-if pvg.found()
- system_ss.add(when: 'CONFIG_MAC_PVG_PCI', if_true: [files('apple-gfx.m', 'apple-gfx-pci.m'), pvg])
- system_ss.add(when: 'CONFIG_MAC_PVG_MMIO', if_true: [files('apple-gfx.m', 'apple-gfx-mmio.m'), pvg])
-endif
+system_ss.add(when: [pvg, 'CONFIG_MAC_PVG_PCI'], if_true: [files('apple-gfx.m', 'apple-gfx-pci.m')])
+system_ss.add(when: [pvg, 'CONFIG_MAC_PVG_MMIO'], if_true: [files('apple-gfx.m', 'apple-gfx-mmio.m')])
(you need to keep the conditional, whether as "if" or "when:"; otherwise,
because Meson cannot know that the .m files will never be built, it
complains that you don't have an Objective-C compiler).
Paolo
next prev parent reply other threads:[~2025-02-21 17:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-20 13:33 [PATCH 0/2] pvg: clean up Kconfig Paolo Bonzini
2025-02-20 13:33 ` [PATCH 1/2] pvg: do not enable it on cross-architecture targets Paolo Bonzini
2025-02-20 15:19 ` Philippe Mathieu-Daudé
2025-02-21 17:01 ` Paolo Bonzini [this message]
2025-02-24 9:27 ` Philippe Mathieu-Daudé
2025-02-20 13:33 ` [PATCH 2/2] pvg: add option to configure it out Paolo Bonzini
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=701a0452-8aa9-4bcd-b334-bdfca2d12fd4@redhat.com \
--to=pbonzini@redhat.com \
--cc=phil@philjordan.eu \
--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 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.