Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/wsfb For WSDISPLAYIO_GET_FBINFO ioctl, set WSFB_VRAM...



details:   https://anonhg.NetBSD.org/src/rev/facc2d640dff
branches:  trunk
changeset: 1015231:facc2d640dff
user:      rin <rin%NetBSD.org@localhost>
date:      Sun Oct 18 11:54:20 2020 +0000

description:
For WSDISPLAYIO_GET_FBINFO ioctl, set WSFB_VRAM_IS_RAM to fbi_flags
when shadow FB is used.

diffstat:

 sys/dev/wsfb/genfb.c |  11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diffs (32 lines):

diff -r e5b37834ae45 -r facc2d640dff sys/dev/wsfb/genfb.c
--- a/sys/dev/wsfb/genfb.c      Sun Oct 18 11:51:08 2020 +0000
+++ b/sys/dev/wsfb/genfb.c      Sun Oct 18 11:54:20 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: genfb.c,v 1.74 2020/06/11 02:39:31 thorpej Exp $ */
+/*     $NetBSD: genfb.c,v 1.75 2020/10/18 11:54:20 rin Exp $ */
 
 /*-
  * Copyright (c) 2007 Michael Lorenz
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: genfb.c,v 1.74 2020/06/11 02:39:31 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: genfb.c,v 1.75 2020/10/18 11:54:20 rin Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -500,7 +500,12 @@
        
                case WSDISPLAYIO_GET_FBINFO: {
                        struct wsdisplayio_fbinfo *fbi = data;
-                       return wsdisplayio_get_fbinfo(&ms->scr_ri, fbi);
+                       ret = wsdisplayio_get_fbinfo(&ms->scr_ri, fbi);
+                       if (ret == 0) {
+                               if (sc->sc_enable_shadowfb)
+                                       fbi->fbi_flags |= WSFB_VRAM_IS_RAM;
+                       }
+                       return ret;
                }
        }
        return EPASSTHROUGH;



Home | Main Index | Thread Index | Old Index