[parisc-linux-cvs] sti(fb) fixes

Helge Deller deller@gmx.de
Wed, 30 May 2001 02:41:52 +0200


- I broke sti(fb) compilation with my last commit. Now it's fixed again.
- updated some TODO's and comments
- bumped version to -pa8

Index: sticon-bmode.c
===================================================================
RCS file: /home/cvs/parisc/linux/drivers/video/sti/sticon-bmode.c,v
retrieving revision 1.7
diff -u -r1.7 sticon-bmode.c
--- sticon-bmode.c      2001/05/01 14:16:14     1.7
+++ sticon-bmode.c      2001/05/30 00:24:41
@@ -145,7 +145,7 @@

        bmode_sti_cook_fonts(cooked, raw);

-       sti->regions[0] = hpa;  /* ?? */
+       sti->regions[0].region = hpa; /* FIXME: shouldn't it be ZERO ? */

        if (STI_U32(raw->region_list)) {
                struct sti_rom_region_bmode *region =
@@ -153,13 +153,13 @@

 //             DPRINTK(("region_list %08x\n", STI_U32(raw->region_list)));

-               sti->regions[1] = STI_U32(region[1].region);
-               sti->regions[2] = STI_U32(region[2].region);
-               sti->regions[3] = STI_U32(region[3].region);
-               sti->regions[4] = STI_U32(region[4].region);
-               sti->regions[5] = STI_U32(region[5].region);
-               sti->regions[6] = STI_U32(region[6].region);
-               sti->regions[7] = STI_U32(region[7].region);
+               sti->regions[1].region = STI_U32(region[1].region);
+               sti->regions[2].region = STI_U32(region[2].region);
+               sti->regions[3].region = STI_U32(region[3].region);
+               sti->regions[4].region = STI_U32(region[4].region);
+               sti->regions[5].region = STI_U32(region[5].region);
+               sti->regions[6].region = STI_U32(region[6].region);
+               sti->regions[7].region = STI_U32(region[7].region);
        }

        address = (unsigned long) STI_PTR(raw);
Index: sticore.c
===================================================================
RCS file: /home/cvs/parisc/linux/drivers/video/sti/sticore.c,v
retrieving revision 1.10
diff -u -r1.10 sticore.c
--- sticore.c   2001/05/28 14:46:21     1.10
+++ sticore.c   2001/05/30 00:24:41
@@ -4,26 +4,16 @@
  *
  *     Copyright (C) 2000 Philipp Rumpf <prumpf@tux.org>
  *     Portions Copyright (C) 2001 Helge Deller <deller@gmx.de>
- *
  *
  * TODO:
  * - support 64bit parisc rom code
  * - call STI in virtual mode rather than in real mode
- * - use framebuffer-fonts for STI
  * - support for PCI-only STI ROMs (which don't have a traditional region 
list)
- * - colour fb (sticfb ?)
- * - rename current stifb to stifb_mono ?
  * - support for multiple STI devices in one machine (not yet complete...)
  * - screen blanking with state_mgmt() in text mode STI ?
  * - try to make it work on m68k hp workstations ;)
  * - clean up the cache flushing functions
- * - create a linked list for fb-fonts & HP-fonts
- *
  *
- * KNOWN ISSUES:
- * - (monocrome) stifb doesn't work yet
- * - byte-mode STI support is untested, please give feedback to 
<deller@gmx.de>
- *
  */

 #include <linux/module.h>
@@ -476,7 +466,6 @@
        else
                return rom->font_start;
 }
-


 static int num_sti_roms;
Index: sticore.h
===================================================================
RCS file: /home/cvs/parisc/linux/drivers/video/sti/sticore.h,v
retrieving revision 1.10
diff -u -r1.10 sticore.h
--- sticore.h   2001/05/28 14:46:21     1.10
+++ sticore.h   2001/05/30 00:24:41
@@ -85,9 +85,8 @@

 /* STI function configuration structs */

-typedef
-       union {
-               struct {
+typedef union region {
+               struct {
                u32 offset      : 14;   /* offset in 4kbyte page */
                u32 sys_only    : 1;    /* don't map to user space */
                u32 cache       : 1;    /* map to data cache */
@@ -97,11 +96,10 @@
                } region_desc;

                u32 region;             /* complete region value */
-       } region;
 } region_t;

 #define REGION_OFFSET_TO_PHYS( rt, hpa ) \
-       ((rt).region.offset << 12 + (hpa))
+       (((rt).region_desc.offset << 12) + (hpa))

 struct sti_glob_cfg_ext {
         u8 curr_mon;                   /* current monitor configured */
@@ -120,7 +118,7 @@
        s16 offscreen_y;                /* offset height in pixels */
        s16 total_x;                    /* frame buffer width in pixels */
        s16 total_y;                    /* frame buffer height in pixels */
-       region_t region_ptrs[STI_REGION_MAX]; /* region pointers */
+       u32 region_ptrs[STI_REGION_MAX]; /* region pointers */
        s32 reent_lvl;                  /* storage for reentry level value */
        s32 *save_addr;                 /* where to save or restore reentrant 
state */
        struct sti_glob_cfg_ext *ext_ptr; /* pointer to extended glob_cfg 
data structure */
@@ -297,7 +295,7 @@

        /* all following fields are initialized by the generic routines */
        int text_planes;
-       region_t  regions[STI_REGION_MAX];
+       region_t regions[STI_REGION_MAX];
        /* u8 *pci_regions; */

        struct sti_glob_cfg *glob_cfg;
Index: stifb.c
===================================================================
RCS file: /home/cvs/parisc/linux/drivers/video/sti/stifb.c,v
retrieving revision 1.11
diff -u -r1.11 stifb.c
--- stifb.c     2001/05/28 14:46:21     1.11
+++ stifb.c     2001/05/30 00:24:41
@@ -712,5 +712,5 @@

 #ifdef MODULE
 module_init(stifb_init);
-__setup("stifb=", sti_setup);
+__setup("stifb=", stifb_setup);
 #endif