Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
stifb.c File Reference
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/string.h>
#include <linux/mm.h>
#include <linux/slab.h>
#include <linux/delay.h>
#include <linux/fb.h>
#include <linux/init.h>
#include <linux/ioport.h>
#include <asm/grfioctl.h>
#include <asm/uaccess.h>
#include "sticore.h"

Go to the source code of this file.

Data Structures

struct  video_setup_t
 
struct  ngle_rom_t
 
struct  stifb_info
 
union  NgleLutBltCtl
 

Macros

#define REGION_BASE(fb_info, index)   F_EXTEND(fb_info->sti->glob_cfg->region_ptrs[index])
 
#define NGLEDEVDEPROM_CRT_REGION   1
 
#define NR_PALETTE   256
 
#define REG_1   0x000118
 
#define REG_2   0x000480
 
#define REG_3   0x0004a0
 
#define REG_4   0x000600
 
#define REG_6   0x000800
 
#define REG_8   0x000820
 
#define REG_9   0x000a04
 
#define REG_10   0x018000
 
#define REG_11   0x018004
 
#define REG_12   0x01800c
 
#define REG_13   0x018018
 
#define REG_14   0x01801c
 
#define REG_15   0x200000
 
#define REG_15b0   0x200000
 
#define REG_16b1   0x200005
 
#define REG_16b3   0x200007
 
#define REG_21   0x200218
 
#define REG_22   0x0005a0
 
#define REG_23   0x0005c0
 
#define REG_26   0x200118
 
#define REG_27   0x200308
 
#define REG_32   0x21003c
 
#define REG_33   0x210040
 
#define REG_34   0x200008
 
#define REG_35   0x018010
 
#define REG_38   0x210020
 
#define REG_39   0x210120
 
#define REG_40   0x210130
 
#define REG_42   0x210028
 
#define REG_43   0x21002c
 
#define REG_44   0x210030
 
#define REG_45   0x210034
 
#define READ_BYTE(fb, reg)   gsc_readb((fb)->info.fix.mmio_start + (reg))
 
#define READ_WORD(fb, reg)   gsc_readl((fb)->info.fix.mmio_start + (reg))
 
#define DEBUG_OFF()
 
#define DEBUG_ON()
 
#define WRITE_BYTE(value, fb, reg)   gsc_writeb((value),(fb)->info.fix.mmio_start + (reg))
 
#define WRITE_WORD(value, fb, reg)   gsc_writel((value),(fb)->info.fix.mmio_start + (reg))
 
#define ENABLE   1 /* for enabling/disabling screen */
 
#define DISABLE   0
 
#define NGLE_LOCK(fb_info)   do { } while (0)
 
#define NGLE_UNLOCK(fb_info)   do { } while (0)
 
#define GET_ROMTABLE_INDEX(fb)   (READ_BYTE(fb, REG_16b3) - 1)
 
#define HYPER_CONFIG_PLANES_24   0x00000100
 
#define IS_24_DEVICE(fb)   (fb->deviceSpecificConfig & HYPER_CONFIG_PLANES_24)
 
#define IS_888_DEVICE(fb)   (!(IS_24_DEVICE(fb)))
 
#define GET_FIFO_SLOTS(fb, cnt, numslots)
 
#define IndexedDcd   0 /* Pixel data is indexed (pseudo) color */
 
#define Otc04   2 /* Pixels in each longword transfer (4) */
 
#define Otc32   5 /* Pixels in each longword transfer (32) */
 
#define Ots08   3 /* Each pixel is size (8)d transfer (1) */
 
#define OtsIndirect   6 /* Each bit goes through FG/BG color(8) */
 
#define AddrLong   5 /* FB address is Long aligned (pixel) */
 
#define BINovly   0x2 /* 8 bit overlay */
 
#define BINapp0I   0x0 /* Application Buffer 0, Indexed */
 
#define BINapp1I   0x1 /* Application Buffer 1, Indexed */
 
#define BINapp0F8   0xa /* Application Buffer 0, Fractional 8-8-8 */
 
#define BINattr   0xd /* Attribute Bitmap */
 
#define RopSrc   0x3
 
#define BitmapExtent08   3 /* Each write hits ( 8) bits in depth */
 
#define BitmapExtent32   5 /* Each write hits (32) bits in depth */
 
#define DataDynamic   0 /* Data register reloaded by direct access */
 
#define MaskDynamic   1 /* Mask register reloaded by direct access */
 
#define MaskOtc   0 /* Mask contains Object Count valid bits */
 
#define MaskAddrOffset(offset)   (offset)
 
#define StaticReg(en)   (en)
 
#define BGx(en)   (en)
 
#define FGx(en)   (en)
 
#define BAJustPoint(offset)   (offset)
 
#define BAIndexBase(base)   (base)
 
#define BA(F, C, S, A, J, B, I)   (((F)<<31)|((C)<<27)|((S)<<24)|((A)<<21)|((J)<<16)|((B)<<12)|(I))
 
#define IBOvals(R, M, X, S, D, L, B, F)   (((R)<<8)|((M)<<16)|((X)<<24)|((S)<<29)|((D)<<28)|((L)<<31)|((B)<<1)|(F))
 
#define NGLE_QUICK_SET_IMAGE_BITMAP_OP(fb, val)   WRITE_WORD(val, fb, REG_14)
 
#define NGLE_QUICK_SET_DST_BM_ACCESS(fb, val)   WRITE_WORD(val, fb, REG_11)
 
#define NGLE_QUICK_SET_CTL_PLN_REG(fb, val)   WRITE_WORD(val, fb, REG_12)
 
#define NGLE_REALLY_SET_IMAGE_PLANEMASK(fb, plnmsk32)   WRITE_WORD(plnmsk32, fb, REG_13)
 
#define NGLE_REALLY_SET_IMAGE_FG_COLOR(fb, fg32)   WRITE_WORD(fg32, fb, REG_35)
 
#define NGLE_SET_TRANSFERDATA(fb, val)   WRITE_WORD(val, fb, REG_8)
 
#define NGLE_SET_DSTXY(fb, val)   WRITE_WORD(val, fb, REG_6)
 
#define NGLE_LONG_FB_ADDRESS(fbaddrbase, x, y)
 
#define NGLE_BINC_SET_DSTADDR(fb, addr)   WRITE_WORD(addr, fb, REG_3)
 
#define NGLE_BINC_SET_SRCADDR(fb, addr)   WRITE_WORD(addr, fb, REG_2)
 
#define NGLE_BINC_SET_DSTMASK(fb, mask)   WRITE_WORD(mask, fb, REG_22)
 
#define NGLE_BINC_WRITE32(fb, data32)   WRITE_WORD(data32, fb, REG_23)
 
#define START_COLORMAPLOAD(fb, cmapBltCtlData32)   WRITE_WORD((cmapBltCtlData32), fb, REG_38)
 
#define SET_LENXY_START_RECFILL(fb, lenxy)   WRITE_WORD(lenxy, fb, REG_9)
 
#define BUFF0_CMAP0   0x00001e02
 
#define BUFF1_CMAP0   0x02001e02
 
#define BUFF1_CMAP3   0x0c001e02
 
#define ARTIST_CMAP0   0x00000102
 
#define HYPER_CMAP8   0x00000100
 
#define HYPER_CMAP24   0x00000800
 
#define HYPER_CMAP_TYPE   0
 
#define NGLE_CMAP_INDEXED0_TYPE   0
 
#define NGLE_CMAP_OVERLAY_TYPE   3
 
#define HYPERBOWL_MODE_FOR_8_OVER_88_LUT0_NO_TRANSPARENCIES   4
 
#define HYPERBOWL_MODE01_8_24_LUT0_TRANSPARENT_LUT1_OPAQUE   8
 
#define HYPERBOWL_MODE01_8_24_LUT0_OPAQUE_LUT1_OPAQUE   10
 
#define HYPERBOWL_MODE2_8_24   15
 

Functions

int __init stifb_setup (char *options)
 
 __setup ("stifb=", stifb_setup)
 
 module_init (stifb_init)
 
 module_exit (stifb_cleanup)
 
 MODULE_AUTHOR ("Helge Deller <[email protected]>, Thomas Bogendoerfer <[email protected]>")
 
 MODULE_DESCRIPTION ("Framebuffer driver for HP's NGLE series graphics cards in HP PARISC machines")
 
 MODULE_LICENSE ("GPL v2")
 

Macro Definition Documentation

#define AddrLong   5 /* FB address is Long aligned (pixel) */

Definition at line 361 of file stifb.c.

#define ARTIST_CMAP0   0x00000102

Definition at line 451 of file stifb.c.

#define BA (   F,
  C,
  S,
  A,
  J,
  B,
  I 
)    (((F)<<31)|((C)<<27)|((S)<<24)|((A)<<21)|((J)<<16)|((B)<<12)|(I))

Definition at line 381 of file stifb.c.

#define BAIndexBase (   base)    (base)

Definition at line 380 of file stifb.c.

#define BAJustPoint (   offset)    (offset)

Definition at line 379 of file stifb.c.

#define BGx (   en)    (en)

Definition at line 376 of file stifb.c.

#define BINapp0F8   0xa /* Application Buffer 0, Fractional 8-8-8 */

Definition at line 365 of file stifb.c.

#define BINapp0I   0x0 /* Application Buffer 0, Indexed */

Definition at line 363 of file stifb.c.

#define BINapp1I   0x1 /* Application Buffer 1, Indexed */

Definition at line 364 of file stifb.c.

#define BINattr   0xd /* Attribute Bitmap */

Definition at line 366 of file stifb.c.

#define BINovly   0x2 /* 8 bit overlay */

Definition at line 362 of file stifb.c.

#define BitmapExtent08   3 /* Each write hits ( 8) bits in depth */

Definition at line 368 of file stifb.c.

#define BitmapExtent32   5 /* Each write hits (32) bits in depth */

Definition at line 369 of file stifb.c.

#define BUFF0_CMAP0   0x00001e02

Definition at line 448 of file stifb.c.

#define BUFF1_CMAP0   0x02001e02

Definition at line 449 of file stifb.c.

#define BUFF1_CMAP3   0x0c001e02

Definition at line 450 of file stifb.c.

#define DataDynamic   0 /* Data register reloaded by direct access */

Definition at line 370 of file stifb.c.

#define DEBUG_OFF ( )

Definition at line 157 of file stifb.c.

#define DEBUG_ON ( )

Definition at line 158 of file stifb.c.

#define DISABLE   0

Definition at line 177 of file stifb.c.

#define ENABLE   1 /* for enabling/disabling screen */

Definition at line 176 of file stifb.c.

#define FGx (   en)    (en)

Definition at line 377 of file stifb.c.

#define GET_FIFO_SLOTS (   fb,
  cnt,
  numslots 
)
Value:
{ while (cnt < numslots) \
cnt = READ_WORD(fb, REG_34); \
cnt -= numslots; \
}

Definition at line 350 of file stifb.c.

#define GET_ROMTABLE_INDEX (   fb)    (READ_BYTE(fb, REG_16b3) - 1)

Definition at line 339 of file stifb.c.

#define HYPER_CMAP24   0x00000800

Definition at line 453 of file stifb.c.

#define HYPER_CMAP8   0x00000100

Definition at line 452 of file stifb.c.

#define HYPER_CMAP_TYPE   0

Definition at line 531 of file stifb.c.

#define HYPER_CONFIG_PLANES_24   0x00000100

Definition at line 342 of file stifb.c.

#define HYPERBOWL_MODE01_8_24_LUT0_OPAQUE_LUT1_OPAQUE   10

Definition at line 869 of file stifb.c.

#define HYPERBOWL_MODE01_8_24_LUT0_TRANSPARENT_LUT1_OPAQUE   8

Definition at line 868 of file stifb.c.

#define HYPERBOWL_MODE2_8_24   15

Definition at line 870 of file stifb.c.

#define HYPERBOWL_MODE_FOR_8_OVER_88_LUT0_NO_TRANSPARENCIES   4

Definition at line 867 of file stifb.c.

#define IBOvals (   R,
  M,
  X,
  S,
  D,
  L,
  B,
  F 
)    (((R)<<8)|((M)<<16)|((X)<<24)|((S)<<29)|((D)<<28)|((L)<<31)|((B)<<1)|(F))

Definition at line 384 of file stifb.c.

#define IndexedDcd   0 /* Pixel data is indexed (pseudo) color */

Definition at line 356 of file stifb.c.

#define IS_24_DEVICE (   fb)    (fb->deviceSpecificConfig & HYPER_CONFIG_PLANES_24)

Definition at line 344 of file stifb.c.

#define IS_888_DEVICE (   fb)    (!(IS_24_DEVICE(fb)))

Definition at line 347 of file stifb.c.

#define MaskAddrOffset (   offset)    (offset)

Definition at line 374 of file stifb.c.

#define MaskDynamic   1 /* Mask register reloaded by direct access */

Definition at line 371 of file stifb.c.

#define MaskOtc   0 /* Mask contains Object Count valid bits */

Definition at line 372 of file stifb.c.

#define NGLE_BINC_SET_DSTADDR (   fb,
  addr 
)    WRITE_WORD(addr, fb, REG_3)

Definition at line 414 of file stifb.c.

#define NGLE_BINC_SET_DSTMASK (   fb,
  mask 
)    WRITE_WORD(mask, fb, REG_22)

Definition at line 420 of file stifb.c.

#define NGLE_BINC_SET_SRCADDR (   fb,
  addr 
)    WRITE_WORD(addr, fb, REG_2)

Definition at line 417 of file stifb.c.

#define NGLE_BINC_WRITE32 (   fb,
  data32 
)    WRITE_WORD(data32, fb, REG_23)

Definition at line 423 of file stifb.c.

#define NGLE_CMAP_INDEXED0_TYPE   0

Definition at line 532 of file stifb.c.

#define NGLE_CMAP_OVERLAY_TYPE   3

Definition at line 533 of file stifb.c.

#define NGLE_LOCK (   fb_info)    do { } while (0)

Definition at line 179 of file stifb.c.

#define NGLE_LONG_FB_ADDRESS (   fbaddrbase,
  x,
  y 
)
Value:
( \
(u32) (fbaddrbase) + \
( (unsigned int) ( (y) << 13 ) | \
(unsigned int) ( (x) << 2 ) ) \
)

Definition at line 408 of file stifb.c.

#define NGLE_QUICK_SET_CTL_PLN_REG (   fb,
  val 
)    WRITE_WORD(val, fb, REG_12)

Definition at line 393 of file stifb.c.

#define NGLE_QUICK_SET_DST_BM_ACCESS (   fb,
  val 
)    WRITE_WORD(val, fb, REG_11)

Definition at line 390 of file stifb.c.

#define NGLE_QUICK_SET_IMAGE_BITMAP_OP (   fb,
  val 
)    WRITE_WORD(val, fb, REG_14)

Definition at line 387 of file stifb.c.

#define NGLE_REALLY_SET_IMAGE_FG_COLOR (   fb,
  fg32 
)    WRITE_WORD(fg32, fb, REG_35)

Definition at line 399 of file stifb.c.

#define NGLE_REALLY_SET_IMAGE_PLANEMASK (   fb,
  plnmsk32 
)    WRITE_WORD(plnmsk32, fb, REG_13)

Definition at line 396 of file stifb.c.

#define NGLE_SET_DSTXY (   fb,
  val 
)    WRITE_WORD(val, fb, REG_6)

Definition at line 405 of file stifb.c.

#define NGLE_SET_TRANSFERDATA (   fb,
  val 
)    WRITE_WORD(val, fb, REG_8)

Definition at line 402 of file stifb.c.

#define NGLE_UNLOCK (   fb_info)    do { } while (0)

Definition at line 180 of file stifb.c.

#define NGLEDEVDEPROM_CRT_REGION   1

Definition at line 77 of file stifb.c.

#define NR_PALETTE   256

Definition at line 79 of file stifb.c.

#define Otc04   2 /* Pixels in each longword transfer (4) */

Definition at line 357 of file stifb.c.

#define Otc32   5 /* Pixels in each longword transfer (32) */

Definition at line 358 of file stifb.c.

#define Ots08   3 /* Each pixel is size (8)d transfer (1) */

Definition at line 359 of file stifb.c.

#define OtsIndirect   6 /* Each bit goes through FG/BG color(8) */

Definition at line 360 of file stifb.c.

#define READ_BYTE (   fb,
  reg 
)    gsc_readb((fb)->info.fix.mmio_start + (reg))

Definition at line 152 of file stifb.c.

#define READ_WORD (   fb,
  reg 
)    gsc_readl((fb)->info.fix.mmio_start + (reg))

Definition at line 153 of file stifb.c.

#define REG_1   0x000118

Definition at line 119 of file stifb.c.

#define REG_10   0x018000

Definition at line 126 of file stifb.c.

#define REG_11   0x018004

Definition at line 127 of file stifb.c.

#define REG_12   0x01800c

Definition at line 128 of file stifb.c.

#define REG_13   0x018018

Definition at line 129 of file stifb.c.

#define REG_14   0x01801c

Definition at line 130 of file stifb.c.

#define REG_15   0x200000

Definition at line 131 of file stifb.c.

#define REG_15b0   0x200000

Definition at line 132 of file stifb.c.

#define REG_16b1   0x200005

Definition at line 133 of file stifb.c.

#define REG_16b3   0x200007

Definition at line 134 of file stifb.c.

#define REG_2   0x000480

Definition at line 120 of file stifb.c.

#define REG_21   0x200218

Definition at line 135 of file stifb.c.

#define REG_22   0x0005a0

Definition at line 136 of file stifb.c.

#define REG_23   0x0005c0

Definition at line 137 of file stifb.c.

#define REG_26   0x200118

Definition at line 138 of file stifb.c.

#define REG_27   0x200308

Definition at line 139 of file stifb.c.

#define REG_3   0x0004a0

Definition at line 121 of file stifb.c.

#define REG_32   0x21003c

Definition at line 140 of file stifb.c.

#define REG_33   0x210040

Definition at line 141 of file stifb.c.

#define REG_34   0x200008

Definition at line 142 of file stifb.c.

#define REG_35   0x018010

Definition at line 143 of file stifb.c.

#define REG_38   0x210020

Definition at line 144 of file stifb.c.

#define REG_39   0x210120

Definition at line 145 of file stifb.c.

#define REG_4   0x000600

Definition at line 122 of file stifb.c.

#define REG_40   0x210130

Definition at line 146 of file stifb.c.

#define REG_42   0x210028

Definition at line 147 of file stifb.c.

#define REG_43   0x21002c

Definition at line 148 of file stifb.c.

#define REG_44   0x210030

Definition at line 149 of file stifb.c.

#define REG_45   0x210034

Definition at line 150 of file stifb.c.

#define REG_6   0x000800

Definition at line 123 of file stifb.c.

#define REG_8   0x000820

Definition at line 124 of file stifb.c.

#define REG_9   0x000a04

Definition at line 125 of file stifb.c.

#define REGION_BASE (   fb_info,
  index 
)    F_EXTEND(fb_info->sti->glob_cfg->region_ptrs[index])

Definition at line 74 of file stifb.c.

#define RopSrc   0x3

Definition at line 367 of file stifb.c.

#define SET_LENXY_START_RECFILL (   fb,
  lenxy 
)    WRITE_WORD(lenxy, fb, REG_9)

Definition at line 429 of file stifb.c.

#define START_COLORMAPLOAD (   fb,
  cmapBltCtlData32 
)    WRITE_WORD((cmapBltCtlData32), fb, REG_38)

Definition at line 426 of file stifb.c.

#define StaticReg (   en)    (en)

Definition at line 375 of file stifb.c.

#define WRITE_BYTE (   value,
  fb,
  reg 
)    gsc_writeb((value),(fb)->info.fix.mmio_start + (reg))

Definition at line 159 of file stifb.c.

#define WRITE_WORD (   value,
  fb,
  reg 
)    gsc_writel((value),(fb)->info.fix.mmio_start + (reg))

Definition at line 160 of file stifb.c.

Function Documentation

__setup ( )
MODULE_AUTHOR ( "Helge Deller <[email protected] ,
Thomas Bogendoerfer< tsbogend @alpha.franken.de >"   
)
MODULE_DESCRIPTION ( "Framebuffer driver for HP's NGLE series graphics cards in HP PARISC machines"  )
module_exit ( stifb_cleanup  )
module_init ( stifb_init  )
MODULE_LICENSE ( "GPL v2 )
int __init stifb_setup ( char options)

Definition at line 1389 of file stifb.c.