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 Do not assume that an fb's pitch is width...
details: https://anonhg.NetBSD.org/src/rev/d9cab5b5c4f5
branches: trunk
changeset: 465468:d9cab5b5c4f5
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Sat Nov 23 20:24:12 2019 +0000
description:
Do not assume that an fb's pitch is width * 4 bytes.
diffstat:
sys/arch/arm/sunxi/sunxi_mixer.c | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diffs (46 lines):
diff -r a90c827a2ef6 -r d9cab5b5c4f5 sys/arch/arm/sunxi/sunxi_mixer.c
--- a/sys/arch/arm/sunxi/sunxi_mixer.c Sat Nov 23 19:46:38 2019 +0000
+++ b/sys/arch/arm/sunxi/sunxi_mixer.c Sat Nov 23 20:24:12 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sunxi_mixer.c,v 1.7 2019/02/16 16:20:50 jmcneill Exp $ */
+/* $NetBSD: sunxi_mixer.c,v 1.8 2019/11/23 20:24:12 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_mixer.c,v 1.7 2019/02/16 16:20:50 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sunxi_mixer.c,v 1.8 2019/11/23 20:24:12 jmcneill Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -255,6 +255,9 @@
uint32_t haddr = (paddr >> 32) & OVL_UI_TOP_HADD_LAYER0;
uint32_t laddr = paddr & 0xffffffff;
+ /* Set UI overlay line size */
+ OVL_UI_WRITE(sc, 0, OVL_UI_PITCH(0), sfb->base.pitches[0]);
+
/* Framebuffer start address */
val = OVL_UI_READ(sc, 0, OVL_UI_TOP_HADD);
val &= ~OVL_UI_TOP_HADD_LAYER0;
@@ -367,7 +370,7 @@
/* Set UI overlay offset */
OVL_UI_WRITE(sc, 1, OVL_UI_COOR(0), offset);
/* Set UI overlay line size */
- OVL_UI_WRITE(sc, 1, OVL_UI_PITCH(0), width * 4);
+ OVL_UI_WRITE(sc, 1, OVL_UI_PITCH(0), crtc->primary->fb->pitches[0]);
/* Set UI overlay window size */
OVL_UI_WRITE(sc, 1, OVL_UI_SIZE, crtc_size);
@@ -491,8 +494,6 @@
OVL_UI_WRITE(sc, 0, OVL_UI_MBSIZE(0), size);
/* Set UI overlay offset */
OVL_UI_WRITE(sc, 0, OVL_UI_COOR(0), offset);
- /* Set UI overlay line size */
- OVL_UI_WRITE(sc, 0, OVL_UI_PITCH(0), adjusted_mode->hdisplay * 4);
/* Set UI overlay window size */
OVL_UI_WRITE(sc, 0, OVL_UI_SIZE, size);
Home |
Main Index |
Thread Index |
Old Index