NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kern/53126: uefi boot breaks graphics
The following reply was made to PR port-amd64/53126; it has been noted by GNATS.
From: Taylor R Campbell <riastradh%NetBSD.org@localhost>
To: prlw1%cam.ac.uk@localhost
Cc: tnn%NetBSD.org@localhost,
gnats-bugs%NetBSD.org@localhost
Subject: Re: kern/53126: uefi boot breaks graphics
Date: Tue, 21 Feb 2023 20:26:35 +0000
This is a multi-part message in MIME format.
--=_rFLsIlDMAmZS54PhaM3eE2ii5a8qA3Zz
Does the attached patch make a difference?
Need to think more about the mechanism, and probably change it, before
committing, but testing will confirm whether I'm barking up the right
tree or not.
--=_rFLsIlDMAmZS54PhaM3eE2ii5a8qA3Zz
Content-Type: text/plain; charset="ISO-8859-1"; name="nvgenfbborrow"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment; filename="nvgenfbborrow.patch"
From ee72bfac5c676ceef4a93af56bc5d3f2d4bfbf1d Mon Sep 17 00:00:00 2001
From: Taylor R Campbell <riastradh%NetBSD.org@localhost>
Date: Tue, 21 Feb 2023 20:22:32 +0000
Subject: [PATCH] nouveau: Try genfb_borrow to map MMIO spaces.
If x86 consinit has already taken the framebuffer with _x86_memio_map
for genfb, we might need genfb_borrow to get at it.
PR kern/53126
---
sys/external/bsd/drm2/dist/drm/nouveau/nouveau_nvif.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/sys/external/bsd/drm2/dist/drm/nouveau/nouveau_nvif.c b/sys/ex=
ternal/bsd/drm2/dist/drm/nouveau/nouveau_nvif.c
index d7946dbbfd25..2c6b1744d7be 100644
--- a/sys/external/bsd/drm2/dist/drm/nouveau/nouveau_nvif.c
+++ b/sys/external/bsd/drm2/dist/drm/nouveau/nouveau_nvif.c
@@ -69,6 +69,15 @@ nvkm_client_map(void *priv, bus_space_tag_t tag, u64 bus=
addr, u32 size,
return 0;
}
=20
+#ifdef NGENFB > 0 /* XXX module */
+ /* XXX tag? */
+ /* XXX size? */
+ if (genfb_borrow(busaddr, handlep)) {
+ *ptrp =3D bus_space_vaddr(tag, *handlep);
+ return 0;
+ }
+#endif
+
ret =3D -bus_space_map(tag, busaddr, size, BUS_SPACE_MAP_LINEAR,
handlep);
if (ret)
--=_rFLsIlDMAmZS54PhaM3eE2ii5a8qA3Zz--
Home |
Main Index |
Thread Index |
Old Index