Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci Initialize dp->rd_cmap_{red,green,blue} in radeo...



details:   https://anonhg.NetBSD.org/src/rev/ac85989efcde
branches:  trunk
changeset: 1019549:ac85989efcde
user:      rin <rin%NetBSD.org@localhost>
date:      Sun Mar 14 03:14:42 2021 +0000

description:
Initialize dp->rd_cmap_{red,green,blue} in radeonfb_init_palette() for 8bpp,
so that color map can be obtained by WSDISPLAYIO_GETCMAP ioctl(2).

Now, mlterm-fb from pkgsrc/x11/mlterm works just fine on radeonfb(4).

diffstat:

 sys/dev/pci/radeonfb.c |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (28 lines):

diff -r 30e2387ef34c -r ac85989efcde sys/dev/pci/radeonfb.c
--- a/sys/dev/pci/radeonfb.c    Sun Mar 14 02:56:51 2021 +0000
+++ b/sys/dev/pci/radeonfb.c    Sun Mar 14 03:14:42 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: radeonfb.c,v 1.112 2020/10/30 15:30:43 macallan Exp $ */
+/*     $NetBSD: radeonfb.c,v 1.113 2021/03/14 03:14:42 rin Exp $ */
 
 /*-
  * Copyright (c) 2006 Itronix Inc.
@@ -70,7 +70,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: radeonfb.c,v 1.112 2020/10/30 15:30:43 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: radeonfb.c,v 1.113 2021/03/14 03:14:42 rin Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -2953,6 +2953,9 @@
                        tmp |= tmp >> 4;
                        b = tmp;
 
+                       dp->rd_cmap_red[i] = r;
+                       dp->rd_cmap_green[i] = g;
+                       dp->rd_cmap_blue[i] = b;
                        radeonfb_putpal(dp, i, r, g, b);
                }
        } else {



Home | Main Index | Thread Index | Old Index