Skip to contentSkip to conversation

clk: sunxi-ng: sun6i: Fix enable bit offset for hdmi-ddc module clock

PATCH Applied Chen-Yu Tsai 3 participants 4 messages Feb 14, 2017 – Feb 16, 2017

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 clk: sunxi-ng: sun6i: Fix enable bit offset for hdmi-ddc module clock

The enable bit offset for the hdmi-ddc module clock is wrong. It is pointing to the main hdmi module clock enable bit.

Fixes c6e6c96d8fa6 ("clk: sunxi-ng: Add A31/A31s clocks")
Cc stable at vger.kernel.org # 4.9.x-

---

Hi Bob,

Can you try this patch and see if it fixes your HDMI issue? With the kernel running without "clk_ignore_unused" that is.

---
 drivers/clk/sunxi-ng/ccu-sun6i-a31.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/sunxi-ng/ccu-sun6i-a31.c +1 -1
index 4c9a920ff4ab..89e68d29bf45 100644
@@ -608,7 +608,7 @@ static SUNXI_CCU_M_WITH_MUX_GATE(hdmi_clk, "hdmi", lcd_ch1_parents,
 				 0x150, 0, 4, 24, 2, BIT(31),
 				 CLK_SET_RATE_PARENT);
 
-static SUNXI_CCU_GATE(hdmi_ddc_clk, "hdmi-ddc", "osc24M", 0x150, BIT(31), 0);
+static SUNXI_CCU_GATE(hdmi_ddc_clk, "hdmi-ddc", "osc24M", 0x150, BIT(30), 0);
 
 static SUNXI_CCU_GATE(ps_clk, "ps", "lcd1-ch1", 0x140, BIT(31), 0);
 
Signature · 1 line
2.11.0
#1 lore raw
Quoted 7 lines · Chen-Yu Tsai

The enable bit offset for the hdmi-ddc module clock is wrong. It is pointing to the main hdmi module clock enable bit.

Fixes c6e6c96d8fa6 ("clk: sunxi-ng: Add A31/A31s clocks")
Cc stable at vger.kernel.org # 4.9.x-
Quoted 6 lines

---

Hi Bob,

Can you try this patch and see if it fixes your HDMI issue? With the kernel running without "clk_ignore_unused" that is.

Hi Chen-Yu,

Unfortunately, that doesn't fix it; I get the same behaviour as without clk_ignore_unused.

Thanks though,

Bob

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20170214/806a4080/attachment.sig>

#2 lore raw

Hi Bob,

Quoted 12 lines · Bob Ham
Quoted 11 lines · Chen-Yu Tsai

The enable bit offset for the hdmi-ddc module clock is wrong. It is pointing to the main hdmi module clock enable bit.

Fixes c6e6c96d8fa6 ("clk: sunxi-ng: Add A31/A31s clocks")
Cc stable at vger.kernel.org # 4.9.x-

---

Hi Bob,

Quoted 7 lines
Quoted 2 lines

Can you try this patch and see if it fixes your HDMI issue? With the kernel running without "clk_ignore_unused" that is.

Hi Chen-Yu,

Unfortunately, that doesn't fix it; I get the same behaviour as without clk_ignore_unused.

can you apply that patch and give us your kernel boot logs?

Thanks!

------8<---------

drivers/clk/clk.c +3 -1
index 820a939fb6bb..0a23b03ea393 100644
@@ -773,7 +773,9 @@ static void clk_disable_unused_subtree(struct clk_core *core)
 	if (core->enable_count)
 		goto unlock_out;
 
-	if (core->flags & CLK_IGNORE_UNUSED)
+	printk("Ignoring %s\n", core->name);
+
+	if (true)
 		goto unlock_out;
 
 	/*

-------8<-------

Signature · 10 lines
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20170216/6977311a/attachment.sig>
#3 lore raw
In reply to Chen-Yu Tsai
Quoted 7 lines · Chen-Yu Tsai

The enable bit offset for the hdmi-ddc module clock is wrong. It is pointing to the main hdmi module clock enable bit.

Fixes c6e6c96d8fa6 ("clk: sunxi-ng: Add A31/A31s clocks")
Cc stable at vger.kernel.org # 4.9.x-

Queued as a fix for 4.11, thanks,
Maxime

Signature · 10 lines
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20170216/0dd51a64/attachment.sig>