Skip to contentSkip to conversation

tegra: video: fix tegra_dc_sor_config_panel()

RFC New Heinrich Schuchardt 2 participants 2 messages Apr 4, 2021 – Apr 11, 2021

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

RFC 1/1 tegra: video: fix tegra_dc_sor_config_panel()

Bitwise OR has a higher operator precedence than the ternary conditional. Add the missing parentheses.

---
I don't have a Tegra system. But the current U-Boot code seems to be incorrect. 2 << CSTM_ROTCLK_SHIFT | is_lvds is always true with and without the shift.

Best regards

Heinrich

---
 drivers/video/tegra124/sor.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/video/tegra124/sor.c +2 -2
index 95976ee573..ef1a2e6dc0 100644
@@ -671,8 +671,8 @@ static void tegra_dc_sor_config_panel(struct tegra_dc_sor_data *sor,
 			      CSTM_ROTCLK_DEFAULT_MASK |
 			      CSTM_LVDS_EN_ENABLE,
 			      2 << CSTM_ROTCLK_SHIFT |
-			      is_lvds ? CSTM_LVDS_EN_ENABLE :
-			      CSTM_LVDS_EN_DISABLE);
+			      (is_lvds ? CSTM_LVDS_EN_ENABLE :
+			      CSTM_LVDS_EN_DISABLE));
 
 	 tegra_dc_sor_config_pwm(sor, 1024, 1024);
 }

--
2.30.2

#1 lore raw

RFC 1/1 tegra: video: fix tegra_dc_sor_config_panel()

On Mon, 5 Apr 2021 01:48:51 +0200
Heinrich Schuchardt xypron.glpk at gmx.de wrote:
...

Quoted 3 lines
---
 drivers/video/tegra124/sor.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

applied to u-boot-video/master, thanks!

--
Anatolij