[parisc-linux-cvs] Preparations for ioctl(GCDESCRIBE)

Helge Deller deller@gmx.de
Mon, 28 May 2001 16:55:45 +0200


Most changes are for preparation to get ioctl(GCDESCRIBE) working
(needed to get XFree86 running):

- extraversion: pa3
- added union struct for regions (region_t)
- #define REGION_OFFSET_TO_PHYS() for easy access to region addr
- replaced u32 with region_t where appropiate
- make stifb screensaver work with blank_palette hack
- added new graphics id entries



Index: Makefile
===================================================================
RCS file: /home/cvs/parisc/linux/Makefile,v
retrieving revision 1.35
diff -u -r1.35 Makefile
--- Makefile    2001/05/24 20:21:16     1.35
+++ Makefile    2001/05/28 14:37:54
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 4
 SUBLEVEL = 0
-EXTRAVERSION = -pa2
+EXTRAVERSION = -pa3
 
 KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
 
Index: drivers/video/sti/sticore.c
===================================================================
RCS file: /home/cvs/parisc/linux/drivers/video/sti/sticore.c,v
retrieving revision 1.9
diff -u -r1.9 sticore.c
--- sticore.c   2001/05/01 14:16:14     1.9
+++ sticore.c   2001/05/28 14:38:03
@@ -377,14 +377,14 @@
 
        glob_cfg->ext_ptr = STI_PTR(glob_cfg_ext);
        glob_cfg->save_addr = STI_PTR(save_addr);
-       glob_cfg->region_ptrs[0] = ((sti->regions[0]>>18)<<12) + rom_address;
-       glob_cfg->region_ptrs[1] = ((sti->regions[1]>>18)<<12) + hpa;
-       glob_cfg->region_ptrs[2] = ((sti->regions[2]>>18)<<12) + hpa;
-       glob_cfg->region_ptrs[3] = ((sti->regions[3]>>18)<<12) + hpa;
-       glob_cfg->region_ptrs[4] = ((sti->regions[4]>>18)<<12) + hpa;
-       glob_cfg->region_ptrs[5] = ((sti->regions[5]>>18)<<12) + hpa;
-       glob_cfg->region_ptrs[6] = ((sti->regions[6]>>18)<<12) + hpa;
-       glob_cfg->region_ptrs[7] = ((sti->regions[7]>>18)<<12) + hpa;
+       glob_cfg->region_ptrs[0] = REGION_OFFSET_TO_PHYS(sti->regions[0], 
rom_address);
+       glob_cfg->region_ptrs[1] = REGION_OFFSET_TO_PHYS(sti->regions[1], 
hpa);
+       glob_cfg->region_ptrs[2] = REGION_OFFSET_TO_PHYS(sti->regions[2], 
hpa);
+       glob_cfg->region_ptrs[3] = REGION_OFFSET_TO_PHYS(sti->regions[3], 
hpa);
+       glob_cfg->region_ptrs[4] = REGION_OFFSET_TO_PHYS(sti->regions[4], 
hpa);
+       glob_cfg->region_ptrs[5] = REGION_OFFSET_TO_PHYS(sti->regions[5], 
hpa);
+       glob_cfg->region_ptrs[6] = REGION_OFFSET_TO_PHYS(sti->regions[6], 
hpa);
+       glob_cfg->region_ptrs[7] = REGION_OFFSET_TO_PHYS(sti->regions[7], 
hpa);
        
        glob_cfg_ext->sti_mem_addr = STI_PTR(sti_mem_addr);
 
Index: drivers/video/sti/sticore.h
===================================================================
RCS file: /home/cvs/parisc/linux/drivers/video/sti/sticore.h,v
retrieving revision 1.9
diff -u -r1.9 sticore.h
--- sticore.h   2001/05/01 14:16:15     1.9
+++ sticore.h   2001/05/28 14:38:04
@@ -85,6 +85,24 @@
 
 /* STI function configuration structs */
 
+typedef
+       union {
+               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 */
+               u32 btlb        : 1;    /* map to block tlb */
+               u32 last        : 1;    /* last region in list */
+               u32 length      : 14;   /* length in 4kbyte page */
+               } region_desc;
+
+               u32 region;             /* complete region value */
+       } region;
+} region_t;
+
+#define REGION_OFFSET_TO_PHYS( rt, hpa ) \
+       ((rt).region.offset << 12 + (hpa))
+
 struct sti_glob_cfg_ext {
         u8 curr_mon;                   /* current monitor configured */
         u8 friendly_boot;              /* in friendly boot mode */
@@ -102,7 +120,7 @@
        s16 offscreen_y;                /* offset height in pixels */
        s16 total_x;                    /* frame buffer width in pixels */
        s16 total_y;                    /* frame buffer height in pixels */
-       u32 region_ptrs[STI_REGION_MAX]; /* region pointers */
+       region_t 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 */
@@ -279,7 +297,7 @@
 
        /* all following fields are initialized by the generic routines */
        int text_planes;
-       u32 regions[STI_REGION_MAX];
+       region_t  regions[STI_REGION_MAX];
        /* u8 *pci_regions; */
 
        struct sti_glob_cfg *glob_cfg;
Index: drivers/video/sti/stifb.c
===================================================================
RCS file: /home/cvs/parisc/linux/drivers/video/sti/stifb.c,v
retrieving revision 1.10
diff -u -r1.10 stifb.c
--- stifb.c     2001/05/18 21:44:46     1.10
+++ stifb.c     2001/05/28 14:38:04
@@ -572,7 +572,11 @@
        
        SETUP_FB(fb_info);
 
-       return 0;
+       /* the above ENABLE_DISABLE functions use the color
+        * of the cursor, which we don't program yet.
+        * So return 1 for now to use fbgen's palette-blanking function
+        * until we fully support screen blanking. */
+       return 1;  /* FIXME: should be 0 later ! */
 }
 
 /* ------------ Interfaces to hardware functions ------------ */
Index: include/asm-parisc/grfioctl.h
===================================================================
RCS file: /home/cvs/parisc/linux/include/asm-parisc/grfioctl.h,v
retrieving revision 1.2
diff -u -r1.2 grfioctl.h
--- grfioctl.h  2001/05/16 17:45:40     1.2
+++ grfioctl.h  2001/05/28 14:38:06
@@ -21,7 +21,7 @@
 #define S9000_ID_FRI           13
 #define S9000_ID_98730         14
 #define GRFDAVINCI             14
-#define S9000_ID_98705         0x26C08070
+#define S9000_ID_98705         0x26C08070      /* Tigershark */
 #define S9000_ID_98736         0x26D148AB
 #define S9000_ID_A1659A                0x26D1482A      /* CRX 8 plane color 
(=ELK) */
 #define S9000_ID_ELK           S9000_ID_A1659A
@@ -37,6 +37,22 @@
 #define S9000_ID_HCRX          0x2BCB015A      /* Hyperdrive/Hyperbowl 
(A4071A) Graphics */
 #define CRX24_OVERLAY_PLANES   0x920825AA      /* Overlay planes on CRX24 */
 
+#define CRT_ID_ELK_1024                S9000_ID_ELK_768 /* Elk 1024x768  CRX 
*/
+#define CRT_ID_ELK_1280                S9000_ID_A1659A /* Elk 1280x1024 CRX 
*/
+#define CRT_ID_ELK_1024DB      0x27849CA5      /* Elk 1024x768 double buffer 
*/
+#define CRT_ID_ELK_GS          S9000_ID_A1924A /* Elk 1280x1024 GreyScale    
*/
+#define CRT_ID_CRX24           S9000_ID_A1439A /* Piranha */
+#define CRT_ID_VISUALIZE_EG    0x2D08C0A7      /* Graffiti (built-in 
B132+/B160L) */
+#define CRT_ID_THUNDER         0x2F23E5FC      /* Thunder 1 VISUALIZE 48*/
+#define CRT_ID_THUNDER2                0x2F8D570E      /* Thunder 2 
VISUALIZE 48 XP*/
+#define CRT_ID_HCRX            S9000_ID_HCRX   /* Hyperdrive HCRX */
+#define CRT_ID_CRX48Z          S9000_ID_STINGER /* Stinger */
+#define CRT_ID_DUAL_CRX                S9000_ID_TOMCAT /* Tomcat */
+#define CRT_ID_PVRX            S9000_ID_98705  /* Tigershark */
+#define CRT_ID_TIMBER          S9000_ID_TIMBER /* Timber (710 builtin) */
+#define CRT_ID_TVRX            S9000_ID_98765  /* TVRX (gto/falcon) */
+#define CRT_ID_ARTIST          S9000_ID_ARTIST /* Artist */
+#define CRT_ID_SUMMIT          0x2FC1066B      /* Summit FX2, FX4, FX6 ... */
 
 /* structure for ioctl(GCDESCRIBE) */