Skip to contentSkip to conversation

clk: sunxi-ng: Enable DE2_CCU for SUN8I and SUN50I

PATCH Applied Jagan Teki 3 participants 15 messages Sep 4, 2018 – Sep 7, 2018

Subsystems (5)

v4 of 6 Applied Latest is v6 →

lore
Share & tools
lore

Jagan Teki

author
#0 lore raw

PATCH v4 1/4 clk: sunxi-ng: Enable DE2_CCU for SUN8I and SUN50I

Allwinner SoC like SUN8I and SUN50I has DE2 CCU so enable them as default.

---
Changes for v4, v3:
- none
Changes for v2:
- Enable for MACH_SUN8I

 drivers/clk/sunxi-ng/Kconfig | 2 ++
 1 file changed, 2 insertions(+)
drivers/clk/sunxi-ng/Kconfig +2 -0
index 826674d090fd..e20182aa9748 100644
@@ -63,6 +63,8 @@ config SUN8I_V3S_CCU
 
 config SUN8I_DE2_CCU
 	bool "Support for the Allwinner SoCs DE2 CCU"
+	default MACH_SUN8I || (ARM64 && ARCH_SUNXI)
+	depends on DRM_SUN4I && (MACH_SUN8I || (ARM64 && ARCH_SUNXI))
 
 config SUN8I_R40_CCU
 	bool "Support for the Allwinner R40 CCU"
Signature · 1 line
2.18.0.321.gffc6fa0e3
author
#1 lore raw

PATCH v4 2/4 arm64: defconfig: Enable CONFIG_DRM_SUN4I

Enable DRM Support for Allwinner Display Engine, built as a module.

---
Changes for v4, v3, v2:
- none

 arch/arm64/configs/defconfig | 1 +
 1 file changed, 1 insertion(+)
arch/arm64/configs/defconfig +1 -0
index f67e8d5e93ad..4919e4577548 100644
@@ -433,6 +433,7 @@ CONFIG_DRM_EXYNOS_DSI=y
 CONFIG_DRM_EXYNOS_HDMI=y
 CONFIG_DRM_EXYNOS_MIC=y
 CONFIG_DRM_ROCKCHIP=m
+CONFIG_DRM_SUN4I=m
 CONFIG_ROCKCHIP_ANALOGIX_DP=y
 CONFIG_ROCKCHIP_CDN_DP=y
 CONFIG_ROCKCHIP_DW_HDMI=y
Signature · 1 line
2.18.0.321.gffc6fa0e3
author
#3 lore raw

PATCH v4 3/4 drm/sun4i: Enable DE2 Mixer for SUN8I and SUN50I

In reply to Jagan Teki

Allwinner SoC like SUN8I and SUN50I are now using DE2 Mixer so enable them as default.

---
Changes for v4, v3:
- none
Changes for v2:
- Enable for SUN8I

 drivers/gpu/drm/sun4i/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/sun4i/Kconfig +1 -1
index c2c042287c19..cfa8b96273fb 100644
@@ -61,7 +61,7 @@ config DRM_SUN8I_DW_HDMI
 
 config DRM_SUN8I_MIXER
 	tristate "Support for Allwinner Display Engine 2.0 Mixer"
-	default MACH_SUN8I
+	default MACH_SUN8I || (ARM64 && ARCH_SUNXI)
 	help
 	  Choose this option if you have an Allwinner SoC with the
 	  Allwinner Display Engine 2.0, which has a mixer to do some
Signature · 1 line
2.18.0.321.gffc6fa0e3
#4 lore raw

Re: [PATCH v4 3/4] drm/sun4i: Enable DE2 Mixer for SUN8I and SUN50I

Quoted 18 lines · Jagan Teki

Allwinner SoC like SUN8I and SUN50I are now using DE2 Mixer so enable them as default.

---
Changes for v4, v3:
- none
Changes for v2:
- Enable for SUN8I

 drivers/gpu/drm/sun4i/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/sun4i/Kconfig +0 -0
index c2c042287c19..cfa8b96273fb 100644

drivers/gpu/drm/sun4i/Kconfig config DRM_SUN8I_DW_HDMI · line 64

Quoted 5 lines
drivers/gpu/drm/sun4i/Kconfig +1 -1
@@ -61,7 +61,7 @@ config DRM_SUN8I_DW_HDMI
 
 config DRM_SUN8I_MIXER
 	tristate "Support for Allwinner Display Engine 2.0 Mixer"
-	default MACH_SUN8I
+	default MACH_SUN8I || (ARM64 && ARCH_SUNXI)

I'm not really sure we should put it as a default. We should just enable it in the defconfig.

Maxime

Quoted 6 lines
drivers/gpu/drm/sun4i/Kconfig +0 -0
 	help
 	  Choose this option if you have an Allwinner SoC with the
 	  Allwinner Display Engine 2.0, which has a mixer to do some
Signature · 1 line
2.18.0.321.gffc6fa0e3
Signature · 3 lines
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
author
#5 lore raw

Re: [PATCH v4 3/4] drm/sun4i: Enable DE2 Mixer for SUN8I and SUN50I

Quoted 20 lines · Maxime Ripard
Quoted 19 lines · Jagan Teki

Allwinner SoC like SUN8I and SUN50I are now using DE2 Mixer so enable them as default.

---
Changes for v4, v3:
- none
Changes for v2:
- Enable for SUN8I

 drivers/gpu/drm/sun4i/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/sun4i/Kconfig +0 -0
index c2c042287c19..cfa8b96273fb 100644
@@ -61,7 +61,7 @@ config DRM_SUN8I_DW_HDMI
 
Quoted 7 lines

drivers/gpu/drm/sun4i/Kconfig config DRM_SUN8I_DW_HDMI · line 64

Quoted 4 lines
drivers/gpu/drm/sun4i/Kconfig +1 -1
 config DRM_SUN8I_MIXER
      tristate "Support for Allwinner Display Engine 2.0 Mixer"
-     default MACH_SUN8I
+     default MACH_SUN8I || (ARM64 && ARCH_SUNXI)

I'm not really sure we should put it as a default. We should just enable it in the defconfig.

What would be the difference in both cases it would be build as module since DRM_SUN4I=m for ARM64

#6 lore raw

Re: [PATCH v4 3/4] drm/sun4i: Enable DE2 Mixer for SUN8I and SUN50I

Quoted 30 lines · Jagan Teki
Quoted 20 lines · Maxime Ripard
Quoted 19 lines · Jagan Teki

Allwinner SoC like SUN8I and SUN50I are now using DE2 Mixer so enable them as default.

---
Changes for v4, v3:
- none
Changes for v2:
- Enable for SUN8I

 drivers/gpu/drm/sun4i/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/sun4i/Kconfig +0 -0
index c2c042287c19..cfa8b96273fb 100644
@@ -61,7 +61,7 @@ config DRM_SUN8I_DW_HDMI
 
Quoted 7 lines

drivers/gpu/drm/sun4i/Kconfig config DRM_SUN8I_DW_HDMI · line 64

Quoted 4 lines
drivers/gpu/drm/sun4i/Kconfig +1 -1
 config DRM_SUN8I_MIXER
      tristate "Support for Allwinner Display Engine 2.0 Mixer"
-     default MACH_SUN8I
+     default MACH_SUN8I || (ARM64 && ARCH_SUNXI)

I'm not really sure we should put it as a default. We should just enable it in the defconfig.

Quoted 2 lines

What would be the difference in both cases it would be build as module since DRM_SUN4I=m for ARM64

We wouldn't force it down the throat to every user by default, even though they have no interest in that driver being compiled into their kernel.

Maxime

Signature · 3 lines
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
author
#7 lore raw

PATCH v4 4/4 drm/sun4i: Enable DesignWare HDMI for SUN50I

In reply to Jagan Teki

Allwinner SUN50I are now using DesignWare HDMI so enable them as default. This can build DRM_SUN8I_DW_HDMI as module since DRM in arm64 has module.

Making this as defult to SUN8I, may cause an issue while loading since arm32 DRM built as static.

---
Changes for v4:
- none
Changes for v3:
- skip SUN8I enablement, since it built statically for arm32 Changes for v2:
- Enable for SUN8I

 drivers/gpu/drm/sun4i/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/sun4i/Kconfig +1 -0
index cfa8b96273fb..5d0c450db148 100644
@@ -52,6 +52,7 @@ config DRM_SUN6I_DSI
 
 config DRM_SUN8I_DW_HDMI
 	tristate "Support for Allwinner version of DesignWare HDMI"
+	default ARM64 && ARCH_SUNXI
 	depends on DRM_SUN4I
 	select DRM_DW_HDMI
 	help
Signature · 1 line
2.18.0.321.gffc6fa0e3
#8 lore raw

Re: [PATCH v4 4/4] drm/sun4i: Enable DesignWare HDMI for SUN50I

Quoted 6 lines · Jagan Teki

Allwinner SUN50I are now using DesignWare HDMI so enable them as default. This can build DRM_SUN8I_DW_HDMI as module since DRM in arm64 has module.

Making this as defult to SUN8I, may cause an issue while loading since arm32 DRM built as static.

Uh? Why? We should fix this instead of working around it.

Maxime

Signature · 3 lines
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
author
#9 lore raw

Re: [PATCH v4 4/4] drm/sun4i: Enable DesignWare HDMI for SUN50I

Quoted 9 lines · Maxime Ripard
Quoted 6 lines · Jagan Teki

Allwinner SUN50I are now using DesignWare HDMI so enable them as default. This can build DRM_SUN8I_DW_HDMI as module since DRM in arm64 has module.

Making this as defult to SUN8I, may cause an issue while loading since arm32 DRM built as static.

Uh? Why? We should fix this instead of working around it.

I didn't dig further on this. Since ARM64 has is fine with it both (module and static) may be we can take this.

#10 lore raw

Re: [PATCH v4 4/4] drm/sun4i: Enable DesignWare HDMI for SUN50I

Quoted 7 lines · Jagan Teki
Quoted 5 lines · Maxime Ripard
Quoted 4 lines · Jagan Teki

Allwinner SUN50I are now using DesignWare HDMI so enable them as default. This can build DRM_SUN8I_DW_HDMI as module since DRM in arm64 has module.

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

Making this as defult to SUN8I, may cause an issue while loading since arm32 DRM built as static.

Uh? Why? We should fix this instead of working around it.

I didn't dig further on this. Since ARM64 has is fine with it both (module and static) may be we can take this.

No, this build breakage needs to be (reported and) addressed first.

Maxime

Signature · 3 lines
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#11 lore raw
In reply to Jagan Teki
Quoted 18 lines · Jagan Teki

Allwinner SoC like SUN8I and SUN50I has DE2 CCU so enable them as default.

---
Changes for v4, v3:
- none
Changes for v2:
- Enable for MACH_SUN8I

 drivers/clk/sunxi-ng/Kconfig | 2 ++
 1 file changed, 2 insertions(+)
drivers/clk/sunxi-ng/Kconfig +0 -0
index 826674d090fd..e20182aa9748 100644

drivers/clk/sunxi-ng/Kconfig config SUN8I_V3S_CCU · line 67

Quoted 5 lines
drivers/clk/sunxi-ng/Kconfig +2 -0
@@ -63,6 +63,8 @@ config SUN8I_V3S_CCU
 
 config SUN8I_DE2_CCU
 	bool "Support for the Allwinner SoCs DE2 CCU"
+	default MACH_SUN8I || (ARM64 && ARCH_SUNXI)
+	depends on DRM_SUN4I && (MACH_SUN8I || (ARM64 && ARCH_SUNXI))

I don't see why there's a dependency on the DRM driver. I'm pretty sure this would even break simplefb.

Maxime

Signature · 3 lines
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
author
#12 lore raw
Quoted 20 lines · Maxime Ripard
Quoted 19 lines · Jagan Teki

Allwinner SoC like SUN8I and SUN50I has DE2 CCU so enable them as default.

---
Changes for v4, v3:
- none
Changes for v2:
- Enable for MACH_SUN8I

 drivers/clk/sunxi-ng/Kconfig | 2 ++
 1 file changed, 2 insertions(+)
drivers/clk/sunxi-ng/Kconfig +0 -0
index 826674d090fd..e20182aa9748 100644
@@ -63,6 +63,8 @@ config SUN8I_V3S_CCU
 
Quoted 7 lines

drivers/clk/sunxi-ng/Kconfig config SUN8I_V3S_CCU · line 67

Quoted 4 lines
drivers/clk/sunxi-ng/Kconfig +2 -0
 config SUN8I_DE2_CCU
      bool "Support for the Allwinner SoCs DE2 CCU"
+     default MACH_SUN8I || (ARM64 && ARCH_SUNXI)
+     depends on DRM_SUN4I && (MACH_SUN8I || (ARM64 && ARCH_SUNXI))

I don't see why there's a dependency on the DRM driver. I'm pretty sure this would even break simplefb.

Ok, got it. I will drop the depends on just add default.

#13 lore raw
In reply to Maxime Ripard

Dne sreda, 05. september 2018 ob 09:03:35 CEST je Maxime Ripard napisal(a):

Quoted 22 lines · Jagan Teki
Quoted 21 lines

Allwinner SoC like SUN8I and SUN50I has DE2 CCU so enable them as default.

---
Changes for v4, v3:
- none
Changes for v2:
- Enable for MACH_SUN8I

 drivers/clk/sunxi-ng/Kconfig | 2 ++
 1 file changed, 2 insertions(+)
drivers/clk/sunxi-ng/Kconfig +0 -0
index 826674d090fd..e20182aa9748 100644
@@ -63,6 +63,8 @@ config SUN8I_V3S_CCU
 
 config SUN8I_DE2_CCU
 
Quoted 7 lines

drivers/clk/sunxi-ng/Kconfig config SUN8I_V3S_CCU · line 67

Quoted 4 lines
drivers/clk/sunxi-ng/Kconfig +2 -0
 	bool "Support for the Allwinner SoCs DE2 CCU"
 
+	default MACH_SUN8I || (ARM64 && ARCH_SUNXI)
+	depends on DRM_SUN4I && (MACH_SUN8I || (ARM64 && ARCH_SUNXI))

I don't see why there's a dependency on the DRM driver. I'm pretty sure this would even break simplefb.

I think best approach would be that SUN8I_MIXER selects (or depends on?) this symbol, since it can't work if there is no DE2 CCU clock present.

Best regards,
Jernej

#14 lore raw
Quoted 25 lines · Jernej Škrabec

Dne sreda, 05. september 2018 ob 09:03:35 CEST je Maxime Ripard napisal(a):

Quoted 24 lines · Jagan Teki
Quoted 23 lines

Allwinner SoC like SUN8I and SUN50I has DE2 CCU so enable them as default.

---
Changes for v4, v3:
- none
Changes for v2:
- Enable for MACH_SUN8I

 drivers/clk/sunxi-ng/Kconfig | 2 ++
 1 file changed, 2 insertions(+)
drivers/clk/sunxi-ng/Kconfig +0 -0
index 826674d090fd..e20182aa9748 100644
@@ -63,6 +63,8 @@ config SUN8I_V3S_CCU
 
 config SUN8I_DE2_CCU
 
 	bool "Support for the Allwinner SoCs DE2 CCU"
 
Quoted 8 lines
Quoted 5 lines

drivers/clk/sunxi-ng/Kconfig config SUN8I_V3S_CCU · line 67

Quoted 2 lines
drivers/clk/sunxi-ng/Kconfig +2 -0
+	default MACH_SUN8I || (ARM64 && ARCH_SUNXI)
+	depends on DRM_SUN4I && (MACH_SUN8I || (ARM64 && ARCH_SUNXI))

I don't see why there's a dependency on the DRM driver. I'm pretty sure this would even break simplefb.

I think best approach would be that SUN8I_MIXER selects (or depends on?) this symbol, since it can't work if there is no DE2 CCU clock present.

This is a runtime dependency, not a build time one. We're not doing it for any other similar driver, so there's no reason to do it in this particular case.

Maxime

Signature · 8 lines
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

-- 
You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected]
For more options, visit https://groups.google.com/d/optout.