Skip to contentSkip to conversation

clk: meson-gxbb: round the vdec dividers to closest

PATCH In review Maxime Jourdan 2 participants 2 messages Mar 19, 2019

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

PATCH 1/1 clk: meson-gxbb: round the vdec dividers to closest

We want the video decoder clocks to always round to closest. While the muxes are already using CLK_MUX_ROUND_CLOSEST, the corresponding CLK_DIVIDER_ROUND_CLOSEST was forgotten for the dividers.

Fix this by adding the flag to the two vdec dividers.

Fixes a565242eb9fc ("clk: meson: gxbb: add the video decoder clocks")
---
 drivers/clk/meson/gxbb.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/clk/meson/gxbb.c +2 -0
index 04df2e208ed6..29ffb4fde714 100644
@@ -2216,6 +2216,7 @@ static struct clk_regmap gxbb_vdec_1_div = {
 		.offset = HHI_VDEC_CLK_CNTL,
 		.shift = 0,
 		.width = 7,
+		.flags = CLK_DIVIDER_ROUND_CLOSEST,
 	},
 	.hw.init = &(struct clk_init_data){
 		.name = "vdec_1_div",
@@ -2261,6 +2262,7 @@ static struct clk_regmap gxbb_vdec_hevc_div = {
 		.offset = HHI_VDEC2_CLK_CNTL,
 		.shift = 16,
 		.width = 7,
+		.flags = CLK_DIVIDER_ROUND_CLOSEST,
 	},
 	.hw.init = &(struct clk_init_data){
 		.name = "vdec_hevc_div",
Signature · 1 line
2.21.0
Acked-by on v1 1/1
#1 lore raw
Quoted 26 lines · Maxime Jourdan

We want the video decoder clocks to always round to closest. While the muxes are already using CLK_MUX_ROUND_CLOSEST, the corresponding CLK_DIVIDER_ROUND_CLOSEST was forgotten for the dividers.

Fix this by adding the flag to the two vdec dividers.

Fixes a565242eb9fc ("clk: meson: gxbb: add the video decoder clocks")
---
 drivers/clk/meson/gxbb.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/clk/meson/gxbb.c +1 -0
index 04df2e208ed6..29ffb4fde714 100644
@@ -2216,6 +2216,7 @@ static struct clk_regmap gxbb_vdec_1_div = {
 		.offset = HHI_VDEC_CLK_CNTL,
 		.shift = 0,
 		.width = 7,
+		.flags = CLK_DIVIDER_ROUND_CLOSEST,
 	},
 	.hw.init = &(struct clk_init_data){
 		.name = "vdec_1_div",

drivers/clk/meson/gxbb.c static struct clk_regmap gxbb_vdec_hevc_div = { · line 2268

Quoted 7 lines
drivers/clk/meson/gxbb.c +1 -0
@@ -2261,6 +2262,7 @@ static struct clk_regmap gxbb_vdec_hevc_div = {
 		.offset = HHI_VDEC2_CLK_CNTL,
 		.shift = 16,
 		.width = 7,
+		.flags = CLK_DIVIDER_ROUND_CLOSEST,
 	},
 	.hw.init = &(struct clk_init_data){
 		.name = "vdec_hevc_div",

Will apply to fixes/drivers for 5.1