Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/sunxi Fix start_delay calculation for tcon0. po...
details: https://anonhg.NetBSD.org/src/rev/be824fe87b43
branches: trunk
changeset: 962222:be824fe87b43
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Sat Jul 06 00:23:38 2019 +0000
description:
Fix start_delay calculation for tcon0. port-arm/54342
diffstat:
sys/arch/arm/sunxi/sunxi_lcdc.c | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
diffs (31 lines):
diff -r e0a20c944b0c -r be824fe87b43 sys/arch/arm/sunxi/sunxi_lcdc.c
--- a/sys/arch/arm/sunxi/sunxi_lcdc.c Sat Jul 06 00:10:25 2019 +0000
+++ b/sys/arch/arm/sunxi/sunxi_lcdc.c Sat Jul 06 00:23:38 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sunxi_lcdc.c,v 1.5 2019/02/18 02:42:27 jakllsch Exp $ */
+/* $NetBSD: sunxi_lcdc.c,v 1.6 2019/07/06 00:23:38 jmcneill Exp $ */
/*-
* Copyright (c) 2019 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sunxi_lcdc.c,v 1.5 2019/02/18 02:42:27 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sunxi_lcdc.c,v 1.6 2019/07/06 00:23:38 jmcneill Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -219,10 +219,8 @@
const u_int hbp = mode->htotal - mode->hsync_start;
const u_int vspw = mode->vsync_end - mode->vsync_start;
const u_int vbp = mode->vtotal - mode->vsync_start;
- const u_int vblank_len =
- ((mode->vtotal << interlace_p) >> 1) - mode->vdisplay - 2;
- const u_int start_delay =
- vblank_len >= 32 ? 30 : vblank_len - 2;
+ const u_int vblank_len = (mode->vtotal - mode->vdisplay) >> interlace_p;
+ const u_int start_delay = uimin(vblank_len, 30);
val = TCON0_CTL_TCON0_EN |
__SHIFTIN(start_delay, TCON0_CTL_START_DELAY);
Home |
Main Index |
Thread Index |
Old Index