diff mbox series

[U-Boot] sunxi: Fix display timing flags

Message ID 1516121028-57871-1-git-send-email-giulio.benetti@micronovasrl.com
State Accepted
Commit 3900b45125dea0476c03f413ec80201865bfde70
Delegated to: Jagannadha Sutradharudu Teki
Headers show
Series [U-Boot] sunxi: Fix display timing flags | expand

Commit Message

Giulio Benetti Jan. 16, 2018, 4:43 p.m. UTC
flags member of struct timing was not initialized,
this took to unpredictable behaviour of display flags,
such DISPLAY_FLAGS_HSYNC_HIGH instead of _LOW etc.

Init timing->flags = 0

Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
---
 drivers/video/sunxi/sunxi_display.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Maxime Ripard Jan. 17, 2018, 7:38 a.m. UTC | #1
On Tue, Jan 16, 2018 at 05:43:48PM +0100, Giulio Benetti wrote:
> flags member of struct timing was not initialized,
> this took to unpredictable behaviour of display flags,
> such DISPLAY_FLAGS_HSYNC_HIGH instead of _LOW etc.
> 
> Init timing->flags = 0
> 
> Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>

Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>

Thanks!
Maxime
Jagan Teki Jan. 22, 2018, 8:22 a.m. UTC | #2
On Wed, Jan 17, 2018 at 1:08 PM, Maxime Ripard
<maxime.ripard@free-electrons.com> wrote:
> On Tue, Jan 16, 2018 at 05:43:48PM +0100, Giulio Benetti wrote:
>> flags member of struct timing was not initialized,
>> this took to unpredictable behaviour of display flags,
>> such DISPLAY_FLAGS_HSYNC_HIGH instead of _LOW etc.
>>
>> Init timing->flags = 0
>>
>> Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com>
>
> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>

Applied to u-boot-sunxi/master
diff mbox series

Patch

diff --git a/drivers/video/sunxi/sunxi_display.c b/drivers/video/sunxi/sunxi_display.c
index 0630289..f191ef1 100644
--- a/drivers/video/sunxi/sunxi_display.c
+++ b/drivers/video/sunxi/sunxi_display.c
@@ -625,6 +625,8 @@  static void sunxi_ctfb_mode_to_display_timing(const struct ctfb_res_modes *mode,
 	timing->vback_porch.typ = mode->upper_margin;
 	timing->vsync_len.typ = mode->vsync_len;
 
+	timing->flags = 0;
+
 	if (mode->sync & FB_SYNC_HOR_HIGH_ACT)
 		timing->flags |= DISPLAY_FLAGS_HSYNC_HIGH;
 	else