diff options
author | 2020-04-07 15:23:42 +0000 | |
---|---|---|
committer | 2020-04-07 15:23:42 +0000 | |
commit | 191ac81fc14393cf0c9e74d9f06fc52af7bc49c5 (patch) | |
tree | 9270b99460e5df5b8e56bc82ed938f8321f772f6 | |
parent | Do not restore history flag if it was never set. (diff) | |
download | wireguard-openbsd-191ac81fc14393cf0c9e74d9f06fc52af7bc49c5.tar.xz wireguard-openbsd-191ac81fc14393cf0c9e74d9f06fc52af7bc49c5.zip |
Claim framebuffer that was configured by bootloader.
ok patrick@
-rw-r--r-- | sys/dev/fdt/rkvop.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/sys/dev/fdt/rkvop.c b/sys/dev/fdt/rkvop.c index 404e2964815..39397f4375c 100644 --- a/sys/dev/fdt/rkvop.c +++ b/sys/dev/fdt/rkvop.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rkvop.c,v 1.2 2020/03/16 21:51:25 kettenis Exp $ */ +/* $OpenBSD: rkvop.c,v 1.3 2020/04/07 15:23:42 kettenis Exp $ */ /* $NetBSD: rk_vop.c,v 1.6 2020/01/05 12:14:35 mrg Exp $ */ /*- * Copyright (c) 2019 Jared D. McNeill <jmcneill@invisible.ca> @@ -216,6 +216,7 @@ rkvop_attach(struct device *parent, struct device *self, void *aux) struct rkvop_softc *sc = (struct rkvop_softc *)self; struct fdt_attach_args *faa = aux; int i, port, ep, nep; + paddr_t paddr; if (faa->fa_nreg < 1) return; @@ -253,6 +254,15 @@ rkvop_attach(struct device *parent, struct device *self, void *aux) sc->sc_ports.dp_ep_activate = rkvop_ep_activate; sc->sc_ports.dp_ep_get_cookie = rkvop_ep_get_cookie; device_ports_register(&sc->sc_ports, EP_DRM_CRTC); + + paddr = HREAD4(sc, VOP_WIN0_YRGB_MST); + if (paddr != 0) { + uint32_t stride, height; + + stride = HREAD4(sc, VOP_WIN0_VIR) & 0xffff; + height = (HREAD4(sc, VOP_WIN0_DSP_INFO) >> 16) + 1; + rasops_claim_framebuffer(paddr, height * stride * 4, self); + } } int |