Source-Changes-HG archive

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

[src/trunk]: src/sys Fixed dev/hpc/hpcfb.c to set RI_BSWAP flag in 8bpp for r...



details:   https://anonhg.NetBSD.org/src/rev/bcd122f0c518
branches:  trunk
changeset: 525578:bcd122f0c518
user:      takemura <takemura%NetBSD.org@localhost>
date:      Sat Apr 13 09:29:53 2002 +0000

description:
Fixed dev/hpc/hpcfb.c to set RI_BSWAP flag in 8bpp for rasops8.c
and backout changes 'fix LCD byte-order setting':
        arch/hpcsh/dev/hd64461/hd64461video.c   Rev. 1.7 to 1.8
        arch/hpcmips/dev/plumvideo.c            Rev. 1.23 to 1.24
        arch/hpcmips/tx/tx3912video.c           Rev. 1.24 to 1.25

diffstat:

 sys/arch/hpcmips/dev/plumvideo.c          |   4 +---
 sys/arch/hpcmips/tx/tx3912video.c         |   3 +--
 sys/arch/hpcsh/dev/hd64461/hd64461video.c |   4 +---
 sys/dev/hpc/hpcfb.c                       |  25 ++++++++++++++++++-------
 4 files changed, 21 insertions(+), 15 deletions(-)

diffs (122 lines):

diff -r 7c00b1d58ca1 -r bcd122f0c518 sys/arch/hpcmips/dev/plumvideo.c
--- a/sys/arch/hpcmips/dev/plumvideo.c  Sat Apr 13 08:14:07 2002 +0000
+++ b/sys/arch/hpcmips/dev/plumvideo.c  Sat Apr 13 09:29:53 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: plumvideo.c,v 1.26 2002/03/17 19:40:40 atatat Exp $ */
+/*     $NetBSD: plumvideo.c,v 1.27 2002/04/13 09:29:53 takemura Exp $ */
 
 /*-
  * Copyright (c) 1999-2002 The NetBSD Foundation, Inc.
@@ -268,7 +268,6 @@
        case 16:
                fb->hf_class = HPCFB_CLASS_RGBCOLOR;
                fb->hf_access_flags |= HPCFB_ACCESS_STATIC;
-               fb->hf_order_flags = HPCFB_REVORDER_WORD;
                fb->hf_pack_width = 16;
                fb->hf_pixels_per_pack = 1;
                fb->hf_pixel_width = 16;
@@ -288,7 +287,6 @@
                break;
 
        case 8:
-               fb->hf_order_flags = HPCFB_REVORDER_BYTE | HPCFB_REVORDER_WORD;
                fb->hf_class = HPCFB_CLASS_INDEXCOLOR;
                fb->hf_access_flags |= HPCFB_ACCESS_STATIC;
                fb->hf_pack_width = 8;
diff -r 7c00b1d58ca1 -r bcd122f0c518 sys/arch/hpcmips/tx/tx3912video.c
--- a/sys/arch/hpcmips/tx/tx3912video.c Sat Apr 13 08:14:07 2002 +0000
+++ b/sys/arch/hpcmips/tx/tx3912video.c Sat Apr 13 09:29:53 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tx3912video.c,v 1.27 2002/03/17 19:40:40 atatat Exp $ */
+/*     $NetBSD: tx3912video.c,v 1.28 2002/04/13 09:29:54 takemura Exp $ */
 
 /*-
  * Copyright (c) 1999-2002 The NetBSD Foundation, Inc.
@@ -287,7 +287,6 @@
                fb->hf_u.hf_gray.hf_flags = 0;
                break;
        case 8:
-               fb->hf_order_flags = HPCFB_REVORDER_BYTE | HPCFB_REVORDER_WORD;
                fb->hf_class = HPCFB_CLASS_INDEXCOLOR;
                fb->hf_access_flags |= HPCFB_ACCESS_STATIC;
                fb->hf_pack_width = 8;
diff -r 7c00b1d58ca1 -r bcd122f0c518 sys/arch/hpcsh/dev/hd64461/hd64461video.c
--- a/sys/arch/hpcsh/dev/hd64461/hd64461video.c Sat Apr 13 08:14:07 2002 +0000
+++ b/sys/arch/hpcsh/dev/hd64461/hd64461video.c Sat Apr 13 09:29:53 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: hd64461video.c,v 1.9 2002/03/17 19:40:41 atatat Exp $  */
+/*     $NetBSD: hd64461video.c,v 1.10 2002/04/13 09:29:54 takemura Exp $       */
 
 /*-
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -330,7 +330,6 @@
                panic("%s: not supported color depth\n", __FUNCTION__);
                /* NOTREACHED */
        case 16:
-               fb->hf_order_flags = HPCFB_REVORDER_WORD;
                fb->hf_class = HPCFB_CLASS_RGBCOLOR;
                fb->hf_access_flags |= HPCFB_ACCESS_STATIC;
                fb->hf_pack_width = 16;
@@ -352,7 +351,6 @@
                break;
 
        case 8:
-               fb->hf_order_flags = HPCFB_REVORDER_BYTE | HPCFB_REVORDER_WORD;
                fb->hf_class = HPCFB_CLASS_INDEXCOLOR;
                fb->hf_access_flags |= HPCFB_ACCESS_STATIC;
                fb->hf_pack_width = 8;
diff -r 7c00b1d58ca1 -r bcd122f0c518 sys/dev/hpc/hpcfb.c
--- a/sys/dev/hpc/hpcfb.c       Sat Apr 13 08:14:07 2002 +0000
+++ b/sys/dev/hpc/hpcfb.c       Sat Apr 13 09:29:53 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: hpcfb.c,v 1.18 2002/03/17 19:40:56 atatat Exp $        */
+/*     $NetBSD: hpcfb.c,v 1.19 2002/04/13 09:29:55 takemura Exp $      */
 
 /*-
  * Copyright (c) 1999
@@ -43,13 +43,13 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: hpcfb.c,v 1.18 2002/03/17 19:40:56 atatat Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hpcfb.c,v 1.19 2002/04/13 09:29:55 takemura Exp $");
 
 #define FBDEBUG
 static const char _copyright[] __attribute__ ((unused)) =
     "Copyright (c) 1999 Shin Takemura.  All rights reserved.";
 static const char _rcsid[] __attribute__ ((unused)) =
-    "$NetBSD: hpcfb.c,v 1.18 2002/03/17 19:40:56 atatat Exp $";
+    "$NetBSD: hpcfb.c,v 1.19 2002/04/13 09:29:55 takemura Exp $";
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -460,14 +460,25 @@
 #else
        ri->ri_flg = RI_CURSOR;
 #endif
-       if (fbconf->hf_order_flags & HPCFB_REVORDER_BYTE) {
+       switch (ri->ri_depth) {
+       case 8:
+               if (32 <= fbconf->hf_pack_width &&
+                   (fbconf->hf_order_flags & HPCFB_REVORDER_BYTE) &&
+                   (fbconf->hf_order_flags & HPCFB_REVORDER_WORD)) {
+                       ri->ri_flg |= RI_BSWAP;
+               }
+               break;
+       default:
+               if (fbconf->hf_order_flags & HPCFB_REVORDER_BYTE) {
 #if BYTE_ORDER == BIG_ENDIAN
-               ri->ri_flg |= RI_BSWAP;
+                       ri->ri_flg |= RI_BSWAP;
 #endif
-       } else {
+               } else {
 #if BYTE_ORDER == LITTLE_ENDIAN
-               ri->ri_flg |= RI_BSWAP;
+                       ri->ri_flg |= RI_BSWAP;
 #endif
+               }
+               break;
        }
 
        if (rasops_init(ri, HPCFB_MAX_ROW, HPCFB_MAX_COLUMN)) {



Home | Main Index | Thread Index | Old Index