NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: PR/49639 CVS commit: src/sys/dev/sun
The following reply was made to PR port-sparc/49639; it has been noted by GNATS.
From: phabrics%phabrics.com@localhost
To: gnats-bugs%netbsd.org@localhost
Cc:
Subject: Re: PR/49639 CVS commit: src/sys/dev/sun
Date: Mon, 14 Nov 2016 16:22:23 -0700
On 2016-11-09 12:55, Michael Lorenz wrote:
> The following reply was made to PR port-sparc/49639; it has been noted
> by GNATS.
>
> From: "Michael Lorenz" <macallan%netbsd.org@localhost>
> To: gnats-bugs%gnats.NetBSD.org@localhost
> Cc:
> Subject: PR/49639 CVS commit: src/sys/dev/sun
> Date: Wed, 9 Nov 2016 19:54:25 +0000
>
> Module Name: src
> Committed By: macallan
> Date: Wed Nov 9 19:54:25 UTC 2016
>
> Modified Files:
> src/sys/dev/sun: cgthree.c
>
> Log Message:
> - use bus_space_mmap()
> - pass the right colour depth in ioctl()
> should fix PR49639
>
>
> To generate a diff of this commit:
> cvs rdiff -u -r1.32 -r1.33 src/sys/dev/sun/cgthree.c
>
> Please note that diffs are not public domain; they are subject to the
> copyright notices on the relevant files.
Cool. Thanks, Michael!
I can independently confirm that these fixes work for me too.
As an added bonus, it looks like the equivalent changes will also work
for bwtwo driver,
as well as adding the WSDISPLAYIO_GET_FBINFO ioctl. Below is the diff
against the latest
revision I have (1.35), per "cvs diff -u bwtwo.c".
-Ruben
Index: sys/dev/sun/bwtwo.c
===================================================================
RCS file: /cvsroot/src/sys/dev/sun/bwtwo.c,v
retrieving revision 1.35
diff -u -r1.35 bwtwo.c
--- sys/dev/sun/bwtwo.c 21 Apr 2016 18:06:06 -0000 1.35
+++ sys/dev/sun/bwtwo.c 14 Nov 2016 23:13:10 -0000
@@ -413,7 +413,7 @@
wdf = (void *)data;
wdf->height = ri->ri_height;
wdf->width = ri->ri_width;
- wdf->depth = ri->ri_depth;
+ wdf->depth = 1;
wdf->cmsize = 0;
return 0;
@@ -434,6 +434,13 @@
}
}
}
+ return 0;
+ case WSDISPLAYIO_GET_FBINFO:
+ {
+ struct wsdisplayio_fbinfo *fbi = data;
+
+ return wsdisplayio_get_fbinfo(&ms->scr_ri, fbi);
+ }
}
return EPASSTHROUGH;
}
@@ -441,8 +448,16 @@
paddr_t
bwtwo_mmap(void *v, void *vs, off_t offset, int prot)
{
- /* I'm not at all sure this is the right thing to do */
- return bwtwommap(0, offset, prot); /* assume minor dev 0 for now */
+ struct vcons_data *vd = v;
+ struct bwtwo_softc *sc = vd->cookie;
+
+ if (offset < 0) return -1;
+ if (offset >= sc->sc_fb.fb_type.fb_size)
+ return -1;
+
+ return bus_space_mmap(sc->sc_bustag,
+ sc->sc_paddr, sc->sc_pixeloffset + offset,
+ prot, BUS_SPACE_MAP_LINEAR);
}
void
Home |
Main Index |
Thread Index |
Old Index