Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/sun return correct parameters in ioctl(WSDISPLAYIO_G...



details:   https://anonhg.NetBSD.org/src/rev/4fe7a2ddae84
branches:  trunk
changeset: 814878:4fe7a2ddae84
user:      macallan <macallan%NetBSD.org@localhost>
date:      Wed Apr 13 17:26:08 2016 +0000

description:
return correct parameters in ioctl(WSDISPLAYIO_GINFO), from lausgans
while there, support WSDISPLAYIO_GET_FBINFO

diffstat:

 sys/dev/sun/cgsix.c |  18 ++++++++++++------
 1 files changed, 12 insertions(+), 6 deletions(-)

diffs (53 lines):

diff -r 62bf1ef845f2 -r 4fe7a2ddae84 sys/dev/sun/cgsix.c
--- a/sys/dev/sun/cgsix.c       Wed Apr 13 15:26:27 2016 +0000
+++ b/sys/dev/sun/cgsix.c       Wed Apr 13 17:26:08 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cgsix.c,v 1.65 2014/07/25 08:10:39 dholland Exp $ */
+/*     $NetBSD: cgsix.c,v 1.66 2016/04/13 17:26:08 macallan Exp $ */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -78,7 +78,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cgsix.c,v 1.65 2014/07/25 08:10:39 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cgsix.c,v 1.66 2016/04/13 17:26:08 macallan Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1178,7 +1178,6 @@
        struct vcons_data *vd = v;
        struct cgsix_softc *sc = vd->cookie;
        struct wsdisplay_fbinfo *wdf;
-       struct rasops_info *ri = &sc->sc_fb.fb_rinfo;
        struct vcons_screen *ms = sc->vd.active;
 
 #ifdef CGSIX_DEBUG
@@ -1190,9 +1189,9 @@
                        return 0;
                case WSDISPLAYIO_GINFO:
                        wdf = (void *)data;
-                       wdf->height = ri->ri_height;
-                       wdf->width = ri->ri_width;
-                       wdf->depth = ri->ri_depth;
+                       wdf->height = sc->sc_height;
+                       wdf->width = sc->sc_width;
+                       wdf->depth = 8;
                        wdf->cmsize = 256;
                        return 0;
 
@@ -1222,6 +1221,13 @@
                                        }
                                }
                        }
+                       return 0;
+               case WSDISPLAYIO_GET_FBINFO:
+                       {
+                               struct wsdisplayio_fbinfo *fbi = data;
+
+                               return wsdisplayio_get_fbinfo(&ms->scr_ri, fbi);
+                       }
        }
        return EPASSTHROUGH;
 }



Home | Main Index | Thread Index | Old Index