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 Support non-zero fb start pixels.
details: https://anonhg.NetBSD.org/src/rev/1c63f803f17a
branches: trunk
changeset: 465473:1c63f803f17a
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Sat Nov 23 21:40:57 2019 +0000
description:
Support non-zero fb start pixels.
diffstat:
sys/arch/arm/sunxi/sunxi_mixer.c | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diffs (54 lines):
diff -r e0284413cc2d -r 1c63f803f17a sys/arch/arm/sunxi/sunxi_mixer.c
--- a/sys/arch/arm/sunxi/sunxi_mixer.c Sat Nov 23 21:30:41 2019 +0000
+++ b/sys/arch/arm/sunxi/sunxi_mixer.c Sat Nov 23 21:40:57 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sunxi_mixer.c,v 1.8 2019/11/23 20:24:12 jmcneill Exp $ */
+/* $NetBSD: sunxi_mixer.c,v 1.9 2019/11/23 21:40:57 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.8 2019/11/23 20:24:12 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sunxi_mixer.c,v 1.9 2019/11/23 21:40:57 jmcneill Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -252,6 +252,9 @@
uint64_t paddr = (uint64_t)sfb->obj->dmamap->dm_segs[0].ds_addr;
+ paddr += y * sfb->base.pitches[0];
+ paddr += x * drm_format_plane_cpp(sfb->base.pixel_format, 0);
+
uint32_t haddr = (paddr >> 32) & OVL_UI_TOP_HADD_LAYER0;
uint32_t laddr = paddr & 0xffffffff;
@@ -461,7 +464,6 @@
const uint32_t size = ((adjusted_mode->vdisplay - 1) << 16) |
(adjusted_mode->hdisplay - 1);
- const uint32_t offset = (y << 16) | x;
/* Set global size */
GLB_WRITE(sc, GLB_SIZE, size);
@@ -474,7 +476,7 @@
/* Set blender 0 input size */
BLD_WRITE(sc, BLD_CH_ISIZE(0), size);
/* Set blender 0 offset */
- BLD_WRITE(sc, BLD_CH_OFFSET(0), offset);
+ BLD_WRITE(sc, BLD_CH_OFFSET(0), 0);
/* Route channel 1 to pipe 0 */
val = BLD_READ(sc, BLD_CH_RTCTL);
val &= ~BLD_CH_RTCTL_P0;
@@ -493,7 +495,7 @@
/* Set UI overlay layer size */
OVL_UI_WRITE(sc, 0, OVL_UI_MBSIZE(0), size);
/* Set UI overlay offset */
- OVL_UI_WRITE(sc, 0, OVL_UI_COOR(0), offset);
+ OVL_UI_WRITE(sc, 0, OVL_UI_COOR(0), 0);
/* Set UI overlay window size */
OVL_UI_WRITE(sc, 0, OVL_UI_SIZE, size);
Home |
Main Index |
Thread Index |
Old Index