diff mbox series

[65/67] ppc/kconfig: make SAM460EX depend on PPC & PIXMAN

Message ID 20230830093843.3531473-66-marcandre.lureau@redhat.com
State New
Headers show
Series Make pixman an optional dependency | expand

Commit Message

Marc-André Lureau Aug. 30, 2023, 9:38 a.m. UTC
From: Marc-André Lureau <marcandre.lureau@redhat.com>

SM501 is going to depend on PIXMAN next.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 configs/devices/ppc-softmmu/default.mak | 2 +-
 hw/ppc/Kconfig                          | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

Comments

BALATON Zoltan Aug. 30, 2023, 12:34 p.m. UTC | #1
On Wed, 30 Aug 2023, marcandre.lureau@redhat.com wrote:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
>
> SM501 is going to depend on PIXMAN next.

Why is this patch needed when SM501 is the one that depends on PIXMAN and 
should pull in the dependency? Also what's the change in default.mak? 
ati-vga also uses pixman and currently has no fall back. The sm501 already 
has fallback when pixman fails so could work without pixman too, see 
x-pixman property in sm501.c.

Regards,
BALATON Zoltan

> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
> configs/devices/ppc-softmmu/default.mak | 2 +-
> hw/ppc/Kconfig                          | 2 ++
> 2 files changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/configs/devices/ppc-softmmu/default.mak b/configs/devices/ppc-softmmu/default.mak
> index a887f5438b..603ed701ed 100644
> --- a/configs/devices/ppc-softmmu/default.mak
> +++ b/configs/devices/ppc-softmmu/default.mak
> @@ -8,7 +8,7 @@ CONFIG_PPC440=y
> CONFIG_VIRTEX=y
>
> # For Sam460ex
> -CONFIG_SAM460EX=y
> +#CONFIG_SAM460EX=n
>
> # For Macs
> CONFIG_MAC_OLDWORLD=y
> diff --git a/hw/ppc/Kconfig b/hw/ppc/Kconfig
> index 5dfbf47ef5..86d3f5cfca 100644
> --- a/hw/ppc/Kconfig
> +++ b/hw/ppc/Kconfig
> @@ -58,6 +58,8 @@ config PPC4XX
>
> config SAM460EX
>     bool
> +    default y
> +    depends on PPC && PIXMAN
>     select PFLASH_CFI01
>     select IDE_SII3112
>     select M41T80
>
Paolo Bonzini Sept. 4, 2023, 2:05 p.m. UTC | #2
On 8/30/23 11:38, marcandre.lureau@redhat.com wrote:
> From: Marc-André Lureau<marcandre.lureau@redhat.com>
> 
> SM501 is going to depend on PIXMAN next.
> 
> Signed-off-by: Marc-André Lureau<marcandre.lureau@redhat.com>
> ---
>   configs/devices/ppc-softmmu/default.mak | 2 +-
>   hw/ppc/Kconfig                          | 2 ++
>   2 files changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/configs/devices/ppc-softmmu/default.mak b/configs/devices/ppc-softmmu/default.mak
> index a887f5438b..603ed701ed 100644
> --- a/configs/devices/ppc-softmmu/default.mak
> +++ b/configs/devices/ppc-softmmu/default.mak
> @@ -8,7 +8,7 @@ CONFIG_PPC440=y
>   CONFIG_VIRTEX=y
>   
>   # For Sam460ex
> -CONFIG_SAM460EX=y
> +#CONFIG_SAM460EX=n

This reminds me that we were planning to move all boards from "default 
n" to "default y", similar to ARM boards.  But for now this is okay.

Paolo
Paolo Bonzini Sept. 4, 2023, 4:24 p.m. UTC | #3
On 8/30/23 14:34, BALATON Zoltan wrote:
> 
>> From: Marc-André Lureau <marcandre.lureau@redhat.com>
>>
>> SM501 is going to depend on PIXMAN next.
> 
> Why is this patch needed when SM501 is the one that depends on PIXMAN 
> and should pull in the dependency? Also what's the change in 
> default.mak?

The change in default.mak is needed because the default is moved from 
there to hw/ppc/Kconfig.  Without it,

     # configs/devices/ppc-softmmu/default.mak
     CONFIG_SAM460EX=y

     # hw/ppc/Kconfig
     config SAM460EX
         depends on PPC && PIXMAN

fails to compile without pixman, due to a contradiction (default.mak 
requires enabling SAM460EX, hw/ppc/Kconfig requires disabling it because 
CONFIG_PIXMAN=n).

> ati-vga also uses pixman and currently has no fall back. 
> The sm501 already has fallback when pixman fails so could work without 
> pixman too, see x-pixman property in sm501.c.

Yeah, this means there are changes needed in both this patch and ATI.

Paolo
Marc-André Lureau Sept. 5, 2023, 8:07 p.m. UTC | #4
Hi

On Wed, Aug 30, 2023 at 4:35 PM BALATON Zoltan <balaton@eik.bme.hu> wrote:
>
> On Wed, 30 Aug 2023, marcandre.lureau@redhat.com wrote:
> > From: Marc-André Lureau <marcandre.lureau@redhat.com>
> >
> > SM501 is going to depend on PIXMAN next.
>
> Why is this patch needed when SM501 is the one that depends on PIXMAN and
> should pull in the dependency? Also what's the change in default.mak?

(see Paolo answer)

> ati-vga also uses pixman and currently has no fall back.

Indeed, and it is disabled not by Kconfig but by meson:
system_ss.add(when: [pixman, 'CONFIG_ATI_VGA'], if_true:
files('ati.c', 'ati_2d.c', 'ati_dbg.c'))


> The sm501 already
> has fallback when pixman fails so could work without pixman too, see
> x-pixman property in sm501.c.

Correct, I have changed it to conditionally compile x-pixman related code.

thanks
Paolo Bonzini Sept. 6, 2023, 11 a.m. UTC | #5
On Tue, Sep 5, 2023 at 10:07 PM Marc-André Lureau
<marcandre.lureau@gmail.com> wrote:
> Indeed, and it is disabled not by Kconfig but by meson:
> system_ss.add(when: [pixman, 'CONFIG_ATI_VGA'], if_true:
> files('ati.c', 'ati_2d.c', 'ati_dbg.c'))

It's better to add a "depends on", so that it fails to compile with
--disable-pixman.  Without it, you're left with possible runtime
failures where boards expect ATI_VGA to be there.

Paolo
diff mbox series

Patch

diff --git a/configs/devices/ppc-softmmu/default.mak b/configs/devices/ppc-softmmu/default.mak
index a887f5438b..603ed701ed 100644
--- a/configs/devices/ppc-softmmu/default.mak
+++ b/configs/devices/ppc-softmmu/default.mak
@@ -8,7 +8,7 @@  CONFIG_PPC440=y
 CONFIG_VIRTEX=y
 
 # For Sam460ex
-CONFIG_SAM460EX=y
+#CONFIG_SAM460EX=n
 
 # For Macs
 CONFIG_MAC_OLDWORLD=y
diff --git a/hw/ppc/Kconfig b/hw/ppc/Kconfig
index 5dfbf47ef5..86d3f5cfca 100644
--- a/hw/ppc/Kconfig
+++ b/hw/ppc/Kconfig
@@ -58,6 +58,8 @@  config PPC4XX
 
 config SAM460EX
     bool
+    default y
+    depends on PPC && PIXMAN
     select PFLASH_CFI01
     select IDE_SII3112
     select M41T80