Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Mar 2020 02:21:57 +0000
From:      John F Carr <jfc@mit.edu>
To:        Mori Hiroki <yamori813@yahoo.co.jp>
Cc:        "freebsd-arm@freebsd.org" <freebsd-arm@freebsd.org>
Subject:   Re: log at access to framebuffer
Message-ID:  <4809ABAB-F415-4D06-A36F-8F4E2D6F8FC4@exchange.mit.edu>
In-Reply-To: <1009057156.3183549.1584322093930.JavaMail.yahoo@mail.yahoo.co.jp>
References:  <1009057156.3183549.1584322093930.JavaMail.yahoo.ref@mail.yahoo.co.jp> <1009057156.3183549.1584322093930.JavaMail.yahoo@mail.yahoo.co.jp>

next in thread | previous in thread | raw e-mail | index | archive | help
Setting D_MEM hides the message but does not fix the underlying problem.  E=
ach page has a byte of metadata saying how cacheable it is.  The cacheabili=
ty reported by the device driver is inconsistent with the cacheability in t=
he page tables.

creator.c is not used on ARM.  It is for Sun "Creator" graphics on machines=
 that are no longer supported after FreeBSD 12.

> On Mar 15, 2020, at 21:28 , Mori Hiroki <yamori813@yahoo.co.jp> wrote:
>=20
> Hi
>=20
> I write data to framebuffer then I get this log on console.
>=20
> WARNING: Device driver fb has set "memattr" inconsistently (drv 0 pmap 3)=
.
>=20
>=20
> I want delete this log. I make patch to fb. Is this correct ?
>=20
> diff --git a/sys/dev/fb/creator.c b/sys/dev/fb/creator.c
> index 2fd0bd10597..0f8d997a887 100644
> --- a/sys/dev/fb/creator.c
> +++ b/sys/dev/fb/creator.c
> @@ -184,7 +184,7 @@static d_mmap_t creator_fb_mmap;
> =20
>  static struct cdevsw creator_fb_devsw =3D {
>         .d_version =3D    D_VERSION,
> -       .d_flags =3D      D_NEEDGIANT,
> +      .d_flags =3D      D_MEM | D_NEEDGIANT,
>         .d_open =3D       creator_fb_open,
>         .d_close =3D      creator_fb_close,
>         .d_ioctl =3D      creator_fb_ioctl,
> diff --git a/sys/dev/fb/fb.c b/sys/dev/fb/fb.c
> index 2f821c8b65f..98bf7a4e58e 100644
> --- a/sys/dev/fb/fb.c
> +++ b/sys/dev/fb/fb.c
> @@ -365,7 +365,7 @@static d_mmap_t             fbmmap;
> =20
>  static struct cdevsw fb_cdevsw =3D {
>         .d_version =3D    D_VERSION,
> -       .d_flags =3D      D_NEEDGIANT,
> +      .d_flags =3D      D_MEM | D_NEEDGIANT,
>         .d_open =3D       fbopen,
>         .d_close =3D      fbclose,
>         .d_read =3D       fbread,
> diff --git a/sys/dev/fb/fbd.c b/sys/dev/fb/fbd.c
> index 02b8eb3ada4..8298d95def3 100644
> --- a/sys/dev/fb/fbd.c
> +++ b/sys/dev/fb/fbd.c
> @@ -84,7 +84,7 @@static d_mmap_t               fb_mmap;
> =20
>  static struct cdevsw fb_cdevsw =3D {
>         .d_version =3D    D_VERSION,
> -       .d_flags =3D      D_NEEDGIANT,
> +      .d_flags =3D      D_MEM | D_NEEDGIANT,
>         .d_open =3D       fb_open,
>         .d_close =3D      fb_close,
>=20
> _______________________________________________
> freebsd-arm@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-arm
> To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org"




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4809ABAB-F415-4D06-A36F-8F4E2D6F8FC4>