Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/amiga/dev Return display depth correctly from WSDIS...



details:   https://anonhg.NetBSD.org/src/rev/7567aa9bc9ed
branches:  trunk
changeset: 368356:7567aa9bc9ed
user:      jandberg <jandberg%NetBSD.org@localhost>
date:      Wed Jul 06 14:34:13 2022 +0000

description:
Return display depth correctly from WSDISPLAYIO_GET_FBINFO.
(previous workaround to always return 1 no longer needed with latest wsfb)

diffstat:

 sys/arch/amiga/dev/amidisplaycc.c |  9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diffs (35 lines):

diff -r ef40dc3c8f88 -r 7567aa9bc9ed sys/arch/amiga/dev/amidisplaycc.c
--- a/sys/arch/amiga/dev/amidisplaycc.c Wed Jul 06 13:52:24 2022 +0000
+++ b/sys/arch/amiga/dev/amidisplaycc.c Wed Jul 06 14:34:13 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: amidisplaycc.c,v 1.39 2022/02/06 10:05:56 jandberg Exp $ */
+/*     $NetBSD: amidisplaycc.c,v 1.40 2022/07/06 14:34:13 jandberg Exp $ */
 
 /*-
  * Copyright (c) 2000 Jukka Andberg.
@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: amidisplaycc.c,v 1.39 2022/02/06 10:05:56 jandberg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: amidisplaycc.c,v 1.40 2022/07/06 14:34:13 jandberg Exp $");
 
 /*
  * wscons interface to amiga custom chips. Contains the necessary functions
@@ -1112,14 +1112,13 @@
        bm = adp->gfxview->bitmap;
        KASSERT(bm);
 
-       /* Depth 1 since current X wsfb driver doesn't support multiple bitplanes */
        memset(fbinfo, 0, sizeof(*fbinfo));
-       fbinfo->fbi_fbsize = bm->bytes_per_row * bm->rows;
+       fbinfo->fbi_fbsize = bm->bytes_per_row * bm->rows * adp->gfxdepth;
        fbinfo->fbi_fboffset = 0;
        fbinfo->fbi_width = bm->bytes_per_row * 8;
        fbinfo->fbi_height = bm->rows;
        fbinfo->fbi_stride = bm->bytes_per_row;
-       fbinfo->fbi_bitsperpixel = 1;
+       fbinfo->fbi_bitsperpixel = adp->gfxdepth;
        fbinfo->fbi_pixeltype = WSFB_CI;
        fbinfo->fbi_flags = 0;
        fbinfo->fbi_subtype.fbi_cmapinfo.cmap_entries = 1 << adp->gfxdepth;



Home | Main Index | Thread Index | Old Index