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 <campbell%mumble.net@localhost>
To: Taylor R Campbell <riastradh%NetBSD.org@localhost>
Cc: gnats-bugs%NetBSD.org@localhost
Subject: Re: kern/53126: uefi boot breaks graphics
Date: Wed, 22 Feb 2023 13:48:55 +0000

 This is a multi-part message in MIME format.
 --=_3LM3Qr5snjR6jwWdKR2eeC80vJ4rOpBA
 
 Correction -- please try the attached patch, which I have confirmed
 actually results in a call to genfb_borrow in the generated code, now
 that it includes the appropriate header files to get NGENFB.
 
 --=_3LM3Qr5snjR6jwWdKR2eeC80vJ4rOpBA
 Content-Type: text/plain; charset="ISO-8859-1"; name="nvgenfbborrow-v2"
 Content-Transfer-Encoding: quoted-printable
 Content-Disposition: attachment; filename="nvgenfbborrow-v2.patch"
 
 From 6d5defc76a9cd22b52fc488115fa8d556e560ba0 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
 ---
  .../bsd/drm2/dist/drm/nouveau/nouveau_nvif.c  | 19 +++++++++++++++++++
  1 file changed, 19 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..961849395d0a 100644
 --- a/sys/external/bsd/drm2/dist/drm/nouveau/nouveau_nvif.c
 +++ b/sys/external/bsd/drm2/dist/drm/nouveau/nouveau_nvif.c
 @@ -31,6 +31,16 @@
  #include <sys/cdefs.h>
  __KERNEL_RCSID(0, "$NetBSD: nouveau_nvif.c,v 1.6 2021/12/18 23:45:32 riast=
 radh Exp $");
 =20
 +#ifdef __NetBSD__
 +#ifdef _KERNEL_OPT
 +#include "genfb.h"
 +#endif
 +
 +#if NGENFB > 0
 +#include <dev/wsfb/genfbvar.h>
 +#endif
 +#endif
 +
  #include <core/client.h>
  #include <core/notify.h>
  #include <core/ioctl.h>
 @@ -69,6 +79,15 @@ nvkm_client_map(void *priv, bus_space_tag_t tag, u64 bus=
 addr, u32 size,
  		return 0;
  	}
 =20
 +#if 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)
 
 --=_3LM3Qr5snjR6jwWdKR2eeC80vJ4rOpBA--
 


Home | Main Index | Thread Index | Old Index