Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
amifb.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/delay.h>
#include <linux/interrupt.h>
#include <linux/fb.h>
#include <linux/init.h>
#include <linux/ioport.h>
#include <linux/platform_device.h>
#include <linux/uaccess.h>
#include <asm/irq.h>
#include <asm/amigahw.h>
#include <asm/amigaints.h>
#include <asm/setup.h>
#include "c2p.h"

Go to the source code of this file.

Data Structures

union  copins
 
struct  copdisplay
 
struct  fb_fix_cursorinfo
 
struct  fb_var_cursorinfo
 
struct  fb_cursorstate
 
struct  amifb_par
 

Macros

#define DEBUG
 
#define CONFIG_FB_AMIGA_OCS   /* define at least one fb driver, this will change later */
 
#define CONFIG_FB_AMIGA_OCS_ONLY
 
#define IS_OCS   (1)
 
#define IS_ECS   (0)
 
#define IS_AGA   (0)
 
#define DPRINTK(fmt, args...)   printk(KERN_DEBUG "%s: " fmt, __func__ , ## args)
 
#define CUSTOM_OFS(fld)   ((long)&((struct CUSTOM*)0)->fld)
 
#define BPC0_HIRES   (0x8000)
 
#define BPC0_BPU2   (0x4000) /* Bit plane used count */
 
#define BPC0_BPU1   (0x2000)
 
#define BPC0_BPU0   (0x1000)
 
#define BPC0_HAM   (0x0800) /* HAM mode */
 
#define BPC0_DPF   (0x0400) /* Double playfield */
 
#define BPC0_COLOR   (0x0200) /* Enable colorburst */
 
#define BPC0_GAUD   (0x0100) /* Genlock audio enable */
 
#define BPC0_UHRES   (0x0080) /* Ultrahi res enable */
 
#define BPC0_SHRES   (0x0040) /* Super hi res mode */
 
#define BPC0_BYPASS   (0x0020) /* Bypass LUT - AGA */
 
#define BPC0_BPU3   (0x0010) /* AGA */
 
#define BPC0_LPEN   (0x0008) /* Light pen enable */
 
#define BPC0_LACE   (0x0004) /* Interlace */
 
#define BPC0_ERSY   (0x0002) /* External resync */
 
#define BPC0_ECSENA   (0x0001) /* ECS enable */
 
#define BPC2_ZDBPSEL2   (0x4000) /* Bitplane to be used for ZD - AGA */
 
#define BPC2_ZDBPSEL1   (0x2000)
 
#define BPC2_ZDBPSEL0   (0x1000)
 
#define BPC2_ZDBPEN   (0x0800) /* Enable ZD with ZDBPSELx - AGA */
 
#define BPC2_ZDCTEN   (0x0400) /* Enable ZD with palette bit #31 - AGA */
 
#define BPC2_KILLEHB   (0x0200) /* Kill EHB mode - AGA */
 
#define BPC2_RDRAM   (0x0100) /* Color table accesses read, not write - AGA */
 
#define BPC2_SOGEN   (0x0080) /* SOG output pin high - AGA */
 
#define BPC2_PF2PRI   (0x0040) /* PF2 priority over PF1 */
 
#define BPC2_PF2P2   (0x0020) /* PF2 priority wrt sprites */
 
#define BPC2_PF2P1   (0x0010)
 
#define BPC2_PF2P0   (0x0008)
 
#define BPC2_PF1P2   (0x0004) /* ditto PF1 */
 
#define BPC2_PF1P1   (0x0002)
 
#define BPC2_PF1P0   (0x0001)
 
#define BPC3_BANK2   (0x8000) /* Bits to select color register bank */
 
#define BPC3_BANK1   (0x4000)
 
#define BPC3_BANK0   (0x2000)
 
#define BPC3_PF2OF2   (0x1000) /* Bits for color table offset when PF2 */
 
#define BPC3_PF2OF1   (0x0800)
 
#define BPC3_PF2OF0   (0x0400)
 
#define BPC3_LOCT   (0x0200) /* Color register writes go to low bits */
 
#define BPC3_SPRES1   (0x0080) /* Sprite resolution bits */
 
#define BPC3_SPRES0   (0x0040)
 
#define BPC3_BRDRBLNK   (0x0020) /* Border blanked? */
 
#define BPC3_BRDRTRAN   (0x0010) /* Border transparent? */
 
#define BPC3_ZDCLKEN   (0x0004) /* ZD pin is 14 MHz (HIRES) clock output */
 
#define BPC3_BRDRSPRT   (0x0002) /* Sprites in border? */
 
#define BPC3_EXTBLKEN   (0x0001) /* BLANK programmable */
 
#define BPC4_BPLAM7   (0x8000) /* bitplane color XOR field */
 
#define BPC4_BPLAM6   (0x4000)
 
#define BPC4_BPLAM5   (0x2000)
 
#define BPC4_BPLAM4   (0x1000)
 
#define BPC4_BPLAM3   (0x0800)
 
#define BPC4_BPLAM2   (0x0400)
 
#define BPC4_BPLAM1   (0x0200)
 
#define BPC4_BPLAM0   (0x0100)
 
#define BPC4_ESPRM7   (0x0080) /* 4 high bits for even sprite colors */
 
#define BPC4_ESPRM6   (0x0040)
 
#define BPC4_ESPRM5   (0x0020)
 
#define BPC4_ESPRM4   (0x0010)
 
#define BPC4_OSPRM7   (0x0008) /* 4 high bits for odd sprite colors */
 
#define BPC4_OSPRM6   (0x0004)
 
#define BPC4_OSPRM5   (0x0002)
 
#define BPC4_OSPRM4   (0x0001)
 
#define BMC0_HARDDIS   (0x4000) /* Disable hardware limits */
 
#define BMC0_LPENDIS   (0x2000) /* Disable light pen latch */
 
#define BMC0_VARVBEN   (0x1000) /* Enable variable vertical blank */
 
#define BMC0_LOLDIS   (0x0800) /* Disable long/short line toggle */
 
#define BMC0_CSCBEN   (0x0400) /* Composite sync/blank */
 
#define BMC0_VARVSYEN   (0x0200) /* Enable variable vertical sync */
 
#define BMC0_VARHSYEN   (0x0100) /* Enable variable horizontal sync */
 
#define BMC0_VARBEAMEN   (0x0080) /* Enable variable beam counters */
 
#define BMC0_DUAL   (0x0040) /* Enable alternate horizontal beam counter */
 
#define BMC0_PAL   (0x0020) /* Set decodes for PAL */
 
#define BMC0_VARCSYEN   (0x0010) /* Enable variable composite sync */
 
#define BMC0_BLANKEN   (0x0008) /* Blank enable (no longer used on AGA) */
 
#define BMC0_CSYTRUE   (0x0004) /* CSY polarity */
 
#define BMC0_VSYTRUE   (0x0002) /* VSY polarity */
 
#define BMC0_HSYTRUE   (0x0001) /* HSY polarity */
 
#define FMODE_SSCAN2   (0x8000) /* Sprite scan-doubling */
 
#define FMODE_BSCAN2   (0x4000) /* Use PF2 modulus every other line */
 
#define FMODE_SPAGEM   (0x0008) /* Sprite page mode */
 
#define FMODE_SPR32   (0x0004) /* Sprite 32 bit fetch */
 
#define FMODE_BPAGEM   (0x0002) /* Bitplane page mode */
 
#define FMODE_BPL32   (0x0001) /* Bitplane 32 bit fetch */
 
#define PAL_DIWSTRT_H   (360) /* PAL Window Limits */
 
#define PAL_DIWSTRT_V   (48)
 
#define PAL_HTOTAL   (1816)
 
#define PAL_VTOTAL   (625)
 
#define NTSC_DIWSTRT_H   (360) /* NTSC Window Limits */
 
#define NTSC_DIWSTRT_V   (40)
 
#define NTSC_HTOTAL   (1816)
 
#define NTSC_VTOTAL   (525)
 
#define up2(v)   (((v) + 1) & -2)
 
#define down2(v)   ((v) & -2)
 
#define div2(v)   ((v)>>1)
 
#define mod2(v)   ((v) & 1)
 
#define up4(v)   (((v) + 3) & -4)
 
#define down4(v)   ((v) & -4)
 
#define mul4(v)   ((v) << 2)
 
#define div4(v)   ((v)>>2)
 
#define mod4(v)   ((v) & 3)
 
#define up8(v)   (((v) + 7) & -8)
 
#define down8(v)   ((v) & -8)
 
#define div8(v)   ((v)>>3)
 
#define mod8(v)   ((v) & 7)
 
#define up16(v)   (((v) + 15) & -16)
 
#define down16(v)   ((v) & -16)
 
#define div16(v)   ((v)>>4)
 
#define mod16(v)   ((v) & 15)
 
#define up32(v)   (((v) + 31) & -32)
 
#define down32(v)   ((v) & -32)
 
#define div32(v)   ((v)>>5)
 
#define mod32(v)   ((v) & 31)
 
#define up64(v)   (((v) + 63) & -64)
 
#define down64(v)   ((v) & -64)
 
#define div64(v)   ((v)>>6)
 
#define mod64(v)   ((v) & 63)
 
#define upx(x, v)   (((v) + (x) - 1) & -(x))
 
#define downx(x, v)   ((v) & -(x))
 
#define modx(x, v)   ((v) & ((x) - 1))
 
#define DIVUL(x1, x2)
 
#define highw(x)   ((u_long)(x)>>16 & 0xffff)
 
#define loww(x)   ((u_long)(x) & 0xffff)
 
#define custom   amiga_custom
 
#define VBlankOn()   custom.intena = IF_SETCLR|IF_COPER
 
#define VBlankOff()   custom.intena = IF_COPER
 
#define VIDEOMEMSIZE_AGA_2M   (1310720) /* AGA (2MB) : max 1280*1024*256 */
 
#define VIDEOMEMSIZE_AGA_1M   (786432) /* AGA (1MB) : max 1024*768*256 */
 
#define VIDEOMEMSIZE_ECS_2M   (655360) /* ECS (2MB) : max 1280*1024*16 */
 
#define VIDEOMEMSIZE_ECS_1M   (393216) /* ECS (1MB) : max 1024*768*16 */
 
#define VIDEOMEMSIZE_OCS   (262144) /* OCS : max ca. 800*600*16 */
 
#define SPRITEMEMSIZE   (64 * 64 / 4) /* max 64*64*4 */
 
#define DUMMYSPRITEMEMSIZE   (8)
 
#define CHIPRAM_SAFETY_LIMIT   (16384)
 
#define assignchunk(name, type, ptr, size)
 
#define CMOVE(val, reg)   (CUSTOM_OFS(reg) << 16 | (val))
 
#define CMOVE2(val, reg)   ((CUSTOM_OFS(reg) + 2) << 16 | (val))
 
#define CWAIT(x, y)   (((y) & 0x1fe) << 23 | ((x) & 0x7f0) << 13 | 0x0001fffe)
 
#define CEND   (0xfffffffe)
 
#define FBIOGET_FCURSORINFO   0x4607
 
#define FBIOGET_VCURSORINFO   0x4608
 
#define FBIOPUT_VCURSORINFO   0x4609
 
#define FBIOGET_CURSORSTATE   0x460A
 
#define FBIOPUT_CURSORSTATE   0x460B
 
#define FB_CURSOR_OFF   0
 
#define FB_CURSOR_ON   1
 
#define FB_CURSOR_FLASH   2
 
#define NUM_TOTAL_MODES   ARRAY_SIZE(ami_modedb)
 
#define DEFMODE_PAL   2 /* "pal" for PAL OCS/ECS */
 
#define DEFMODE_NTSC   0 /* "ntsc" for NTSC OCS/ECS */
 
#define DEFMODE_AMBER_PAL   3 /* "pal-lace" for flicker fixed PAL (A3000) */
 
#define DEFMODE_AMBER_NTSC   1 /* "ntsc-lace" for flicker fixed NTSC (A3000) */
 
#define DEFMODE_AGA   19 /* "vga70" for AGA */
 
#define hscroll2hw(hscroll)
 
#define diwstrt2hw(diwstrt_h, diwstrt_v)   (((diwstrt_v) << 7 & 0xff00) | ((diwstrt_h)>>2 & 0x00ff))
 
#define diwstop2hw(diwstop_h, diwstop_v)   (((diwstop_v) << 7 & 0xff00) | ((diwstop_h)>>2 & 0x00ff))
 
#define diwhigh2hw(diwstrt_h, diwstrt_v, diwstop_h, diwstop_v)
 
#define ddfstrt2hw(ddfstrt)   div8(ddfstrt)
 
#define ddfstop2hw(ddfstop)   div8(ddfstop)
 
#define hsstrt2hw(hsstrt)   (div8(hsstrt))
 
#define hsstop2hw(hsstop)   (div8(hsstop))
 
#define htotal2hw(htotal)   (div8(htotal) - 1)
 
#define vsstrt2hw(vsstrt)   (div2(vsstrt))
 
#define vsstop2hw(vsstop)   (div2(vsstop))
 
#define vtotal2hw(vtotal)   (div2(vtotal) - 1)
 
#define hcenter2hw(htotal)   (div8(htotal))
 
#define hbstrt2hw(hbstrt)   (((hbstrt) << 8 & 0x0700) | ((hbstrt)>>3 & 0x00ff))
 
#define hbstop2hw(hbstop)   (((hbstop) << 8 & 0x0700) | ((hbstop)>>3 & 0x00ff))
 
#define vbstrt2hw(vbstrt)   (div2(vbstrt))
 
#define vbstop2hw(vbstop)   (div2(vbstop))
 
#define rgb2hw8_high(red, green, blue)   (((red & 0xf0) << 4) | (green & 0xf0) | ((blue & 0xf0)>>4))
 
#define rgb2hw8_low(red, green, blue)   (((red & 0x0f) << 8) | ((green & 0x0f) << 4) | (blue & 0x0f))
 
#define rgb2hw4(red, green, blue)   (((red & 0xf0) << 4) | (green & 0xf0) | ((blue & 0xf0)>>4))
 
#define rgb2hw2(red, green, blue)   (((red & 0xc0) << 4) | (green & 0xc0) | ((blue & 0xc0)>>4))
 
#define spr2hw_pos(start_v, start_h)   (((start_v) << 7 & 0xff00) | ((start_h)>>3 & 0x00ff))
 
#define spr2hw_ctl(start_v, start_h, stop_v)
 
#define get_vbpos()   ((u_short)((*(u_long volatile *)&custom.vposr >> 7) & 0xffe))
 
#define COPINITSIZE   (sizeof(copins) * 40)
 
#define COPLISTSIZE   (sizeof(copins) * 64)
 
#define Please   update me
 

Enumerations

enum  { TAG_SHRES, TAG_HIRES, TAG_LORES }
 
enum  { TAG_OCS, TAG_ECS, TAG_AGA }
 
enum  { TAG_FMODE_1, TAG_FMODE_2, TAG_FMODE_4 }
 
enum  { cip_bplcon0 }
 
enum  {
  cop_wait, cop_bplcon0, cop_spr0ptrh, cop_spr0ptrl,
  cop_diwstrt, cop_diwstop, cop_diwhigh
}
 

Functions

 module_init (amifb_init)
 
 module_exit (amifb_exit)
 
 MODULE_LICENSE ("GPL")
 
 MODULE_ALIAS ("platform:amiga-video")
 

Macro Definition Documentation

#define assignchunk (   name,
  type,
  ptr,
  size 
)
Value:
{ \
(name) = (type)(ptr); \
ptr += size; \
}

Definition at line 626 of file amifb.c.

#define BMC0_BLANKEN   (0x0008) /* Blank enable (no longer used on AGA) */

Definition at line 471 of file amifb.c.

#define BMC0_CSCBEN   (0x0400) /* Composite sync/blank */

Definition at line 464 of file amifb.c.

#define BMC0_CSYTRUE   (0x0004) /* CSY polarity */

Definition at line 472 of file amifb.c.

#define BMC0_DUAL   (0x0040) /* Enable alternate horizontal beam counter */

Definition at line 468 of file amifb.c.

#define BMC0_HARDDIS   (0x4000) /* Disable hardware limits */

Definition at line 460 of file amifb.c.

#define BMC0_HSYTRUE   (0x0001) /* HSY polarity */

Definition at line 474 of file amifb.c.

#define BMC0_LOLDIS   (0x0800) /* Disable long/short line toggle */

Definition at line 463 of file amifb.c.

#define BMC0_LPENDIS   (0x2000) /* Disable light pen latch */

Definition at line 461 of file amifb.c.

#define BMC0_PAL   (0x0020) /* Set decodes for PAL */

Definition at line 469 of file amifb.c.

#define BMC0_VARBEAMEN   (0x0080) /* Enable variable beam counters */

Definition at line 467 of file amifb.c.

#define BMC0_VARCSYEN   (0x0010) /* Enable variable composite sync */

Definition at line 470 of file amifb.c.

#define BMC0_VARHSYEN   (0x0100) /* Enable variable horizontal sync */

Definition at line 466 of file amifb.c.

#define BMC0_VARVBEN   (0x1000) /* Enable variable vertical blank */

Definition at line 462 of file amifb.c.

#define BMC0_VARVSYEN   (0x0200) /* Enable variable vertical sync */

Definition at line 465 of file amifb.c.

#define BMC0_VSYTRUE   (0x0002) /* VSY polarity */

Definition at line 473 of file amifb.c.

#define BPC0_BPU0   (0x1000)

Definition at line 382 of file amifb.c.

#define BPC0_BPU1   (0x2000)

Definition at line 381 of file amifb.c.

#define BPC0_BPU2   (0x4000) /* Bit plane used count */

Definition at line 380 of file amifb.c.

#define BPC0_BPU3   (0x0010) /* AGA */

Definition at line 390 of file amifb.c.

#define BPC0_BYPASS   (0x0020) /* Bypass LUT - AGA */

Definition at line 389 of file amifb.c.

#define BPC0_COLOR   (0x0200) /* Enable colorburst */

Definition at line 385 of file amifb.c.

#define BPC0_DPF   (0x0400) /* Double playfield */

Definition at line 384 of file amifb.c.

#define BPC0_ECSENA   (0x0001) /* ECS enable */

Definition at line 394 of file amifb.c.

#define BPC0_ERSY   (0x0002) /* External resync */

Definition at line 393 of file amifb.c.

#define BPC0_GAUD   (0x0100) /* Genlock audio enable */

Definition at line 386 of file amifb.c.

#define BPC0_HAM   (0x0800) /* HAM mode */

Definition at line 383 of file amifb.c.

#define BPC0_HIRES   (0x8000)

Definition at line 379 of file amifb.c.

#define BPC0_LACE   (0x0004) /* Interlace */

Definition at line 392 of file amifb.c.

#define BPC0_LPEN   (0x0008) /* Light pen enable */

Definition at line 391 of file amifb.c.

#define BPC0_SHRES   (0x0040) /* Super hi res mode */

Definition at line 388 of file amifb.c.

#define BPC0_UHRES   (0x0080) /* Ultrahi res enable */

Definition at line 387 of file amifb.c.

#define BPC2_KILLEHB   (0x0200) /* Kill EHB mode - AGA */

Definition at line 405 of file amifb.c.

#define BPC2_PF1P0   (0x0001)

Definition at line 414 of file amifb.c.

#define BPC2_PF1P1   (0x0002)

Definition at line 413 of file amifb.c.

#define BPC2_PF1P2   (0x0004) /* ditto PF1 */

Definition at line 412 of file amifb.c.

#define BPC2_PF2P0   (0x0008)

Definition at line 411 of file amifb.c.

#define BPC2_PF2P1   (0x0010)

Definition at line 410 of file amifb.c.

#define BPC2_PF2P2   (0x0020) /* PF2 priority wrt sprites */

Definition at line 409 of file amifb.c.

#define BPC2_PF2PRI   (0x0040) /* PF2 priority over PF1 */

Definition at line 408 of file amifb.c.

#define BPC2_RDRAM   (0x0100) /* Color table accesses read, not write - AGA */

Definition at line 406 of file amifb.c.

#define BPC2_SOGEN   (0x0080) /* SOG output pin high - AGA */

Definition at line 407 of file amifb.c.

#define BPC2_ZDBPEN   (0x0800) /* Enable ZD with ZDBPSELx - AGA */

Definition at line 403 of file amifb.c.

#define BPC2_ZDBPSEL0   (0x1000)

Definition at line 402 of file amifb.c.

#define BPC2_ZDBPSEL1   (0x2000)

Definition at line 401 of file amifb.c.

#define BPC2_ZDBPSEL2   (0x4000) /* Bitplane to be used for ZD - AGA */

Definition at line 400 of file amifb.c.

#define BPC2_ZDCTEN   (0x0400) /* Enable ZD with palette bit #31 - AGA */

Definition at line 404 of file amifb.c.

#define BPC3_BANK0   (0x2000)

Definition at line 422 of file amifb.c.

#define BPC3_BANK1   (0x4000)

Definition at line 421 of file amifb.c.

#define BPC3_BANK2   (0x8000) /* Bits to select color register bank */

Definition at line 420 of file amifb.c.

#define BPC3_BRDRBLNK   (0x0020) /* Border blanked? */

Definition at line 429 of file amifb.c.

#define BPC3_BRDRSPRT   (0x0002) /* Sprites in border? */

Definition at line 432 of file amifb.c.

#define BPC3_BRDRTRAN   (0x0010) /* Border transparent? */

Definition at line 430 of file amifb.c.

#define BPC3_EXTBLKEN   (0x0001) /* BLANK programmable */

Definition at line 433 of file amifb.c.

#define BPC3_LOCT   (0x0200) /* Color register writes go to low bits */

Definition at line 426 of file amifb.c.

#define BPC3_PF2OF0   (0x0400)

Definition at line 425 of file amifb.c.

#define BPC3_PF2OF1   (0x0800)

Definition at line 424 of file amifb.c.

#define BPC3_PF2OF2   (0x1000) /* Bits for color table offset when PF2 */

Definition at line 423 of file amifb.c.

#define BPC3_SPRES0   (0x0040)

Definition at line 428 of file amifb.c.

#define BPC3_SPRES1   (0x0080) /* Sprite resolution bits */

Definition at line 427 of file amifb.c.

#define BPC3_ZDCLKEN   (0x0004) /* ZD pin is 14 MHz (HIRES) clock output */

Definition at line 431 of file amifb.c.

#define BPC4_BPLAM0   (0x0100)

Definition at line 446 of file amifb.c.

#define BPC4_BPLAM1   (0x0200)

Definition at line 445 of file amifb.c.

#define BPC4_BPLAM2   (0x0400)

Definition at line 444 of file amifb.c.

#define BPC4_BPLAM3   (0x0800)

Definition at line 443 of file amifb.c.

#define BPC4_BPLAM4   (0x1000)

Definition at line 442 of file amifb.c.

#define BPC4_BPLAM5   (0x2000)

Definition at line 441 of file amifb.c.

#define BPC4_BPLAM6   (0x4000)

Definition at line 440 of file amifb.c.

#define BPC4_BPLAM7   (0x8000) /* bitplane color XOR field */

Definition at line 439 of file amifb.c.

#define BPC4_ESPRM4   (0x0010)

Definition at line 450 of file amifb.c.

#define BPC4_ESPRM5   (0x0020)

Definition at line 449 of file amifb.c.

#define BPC4_ESPRM6   (0x0040)

Definition at line 448 of file amifb.c.

#define BPC4_ESPRM7   (0x0080) /* 4 high bits for even sprite colors */

Definition at line 447 of file amifb.c.

#define BPC4_OSPRM4   (0x0001)

Definition at line 454 of file amifb.c.

#define BPC4_OSPRM5   (0x0002)

Definition at line 453 of file amifb.c.

#define BPC4_OSPRM6   (0x0004)

Definition at line 452 of file amifb.c.

#define BPC4_OSPRM7   (0x0008) /* 4 high bits for odd sprite colors */

Definition at line 451 of file amifb.c.

#define CEND   (0xfffffffe)

Definition at line 640 of file amifb.c.

#define CHIPRAM_SAFETY_LIMIT   (16384)

Definition at line 614 of file amifb.c.

#define CMOVE (   val,
  reg 
)    (CUSTOM_OFS(reg) << 16 | (val))

Definition at line 637 of file amifb.c.

#define CMOVE2 (   val,
  reg 
)    ((CUSTOM_OFS(reg) + 2) << 16 | (val))

Definition at line 638 of file amifb.c.

#define CONFIG_FB_AMIGA_OCS   /* define at least one fb driver, this will change later */

Definition at line 67 of file amifb.c.

#define CONFIG_FB_AMIGA_OCS_ONLY

Definition at line 75 of file amifb.c.

#define COPINITSIZE   (sizeof(copins) * 40)

Definition at line 1062 of file amifb.c.

#define COPLISTSIZE   (sizeof(copins) * 64)

Definition at line 1073 of file amifb.c.

#define custom   amiga_custom

Definition at line 591 of file amifb.c.

#define CUSTOM_OFS (   fld)    ((long)&((struct CUSTOM*)0)->fld)

Definition at line 373 of file amifb.c.

#define CWAIT (   x,
  y 
)    (((y) & 0x1fe) << 23 | ((x) & 0x7f0) << 13 | 0x0001fffe)

Definition at line 639 of file amifb.c.

#define ddfstop2hw (   ddfstop)    div8(ddfstop)

Definition at line 1015 of file amifb.c.

#define ddfstrt2hw (   ddfstrt)    div8(ddfstrt)

Definition at line 1014 of file amifb.c.

#define DEBUG

Definition at line 64 of file amifb.c.

#define DEFMODE_AGA   19 /* "vga70" for AGA */

Definition at line 948 of file amifb.c.

#define DEFMODE_AMBER_NTSC   1 /* "ntsc-lace" for flicker fixed NTSC (A3000) */

Definition at line 947 of file amifb.c.

#define DEFMODE_AMBER_PAL   3 /* "pal-lace" for flicker fixed PAL (A3000) */

Definition at line 946 of file amifb.c.

#define DEFMODE_NTSC   0 /* "ntsc" for NTSC OCS/ECS */

Definition at line 945 of file amifb.c.

#define DEFMODE_PAL   2 /* "pal" for PAL OCS/ECS */

Definition at line 944 of file amifb.c.

#define div16 (   v)    ((v)>>4)

Definition at line 561 of file amifb.c.

#define div2 (   v)    ((v)>>1)

Definition at line 545 of file amifb.c.

#define div32 (   v)    ((v)>>5)

Definition at line 566 of file amifb.c.

#define div4 (   v)    ((v)>>2)

Definition at line 551 of file amifb.c.

#define div64 (   v)    ((v)>>6)

Definition at line 571 of file amifb.c.

#define div8 (   v)    ((v)>>3)

Definition at line 556 of file amifb.c.

#define DIVUL (   x1,
  x2 
)
Value:
((((long)((unsigned long long)x1 >> 8) / x2) << 8) + \
((((long)((unsigned long long)x1 >> 8) % x2) << 8) / x2))

Definition at line 584 of file amifb.c.

#define diwhigh2hw (   diwstrt_h,
  diwstrt_v,
  diwstop_h,
  diwstop_v 
)
Value:
(((diwstop_h) << 3 & 0x2000) | ((diwstop_h) << 11 & 0x1800) | \
((diwstop_v)>>1 & 0x0700) | ((diwstrt_h)>>5 & 0x0020) | \
((diwstrt_h) << 3 & 0x0018) | ((diwstrt_v)>>9 & 0x0007))

Definition at line 1007 of file amifb.c.

#define diwstop2hw (   diwstop_h,
  diwstop_v 
)    (((diwstop_v) << 7 & 0xff00) | ((diwstop_h)>>2 & 0x00ff))

Definition at line 1005 of file amifb.c.

#define diwstrt2hw (   diwstrt_h,
  diwstrt_v 
)    (((diwstrt_v) << 7 & 0xff00) | ((diwstrt_h)>>2 & 0x00ff))

Definition at line 1003 of file amifb.c.

#define down16 (   v)    ((v) & -16)

Definition at line 560 of file amifb.c.

#define down2 (   v)    ((v) & -2)

Definition at line 544 of file amifb.c.

#define down32 (   v)    ((v) & -32)

Definition at line 565 of file amifb.c.

#define down4 (   v)    ((v) & -4)

Definition at line 549 of file amifb.c.

#define down64 (   v)    ((v) & -64)

Definition at line 570 of file amifb.c.

#define down8 (   v)    ((v) & -8)

Definition at line 555 of file amifb.c.

#define downx (   x,
  v 
)    ((v) & -(x))

Definition at line 575 of file amifb.c.

#define DPRINTK (   fmt,
  args... 
)    printk(KERN_DEBUG "%s: " fmt, __func__ , ## args)

Definition at line 98 of file amifb.c.

#define DUMMYSPRITEMEMSIZE   (8)

Definition at line 611 of file amifb.c.

#define FB_CURSOR_FLASH   2

Definition at line 695 of file amifb.c.

#define FB_CURSOR_OFF   0

Definition at line 693 of file amifb.c.

#define FB_CURSOR_ON   1

Definition at line 694 of file amifb.c.

#define FBIOGET_CURSORSTATE   0x460A

Definition at line 666 of file amifb.c.

#define FBIOGET_FCURSORINFO   0x4607

Definition at line 663 of file amifb.c.

#define FBIOGET_VCURSORINFO   0x4608

Definition at line 664 of file amifb.c.

#define FBIOPUT_CURSORSTATE   0x460B

Definition at line 667 of file amifb.c.

#define FBIOPUT_VCURSORINFO   0x4609

Definition at line 665 of file amifb.c.

#define FMODE_BPAGEM   (0x0002) /* Bitplane page mode */

Definition at line 485 of file amifb.c.

#define FMODE_BPL32   (0x0001) /* Bitplane 32 bit fetch */

Definition at line 486 of file amifb.c.

#define FMODE_BSCAN2   (0x4000) /* Use PF2 modulus every other line */

Definition at line 482 of file amifb.c.

#define FMODE_SPAGEM   (0x0008) /* Sprite page mode */

Definition at line 483 of file amifb.c.

#define FMODE_SPR32   (0x0004) /* Sprite 32 bit fetch */

Definition at line 484 of file amifb.c.

#define FMODE_SSCAN2   (0x8000) /* Sprite scan-doubling */

Definition at line 481 of file amifb.c.

#define get_vbpos ( )    ((u_short)((*(u_long volatile *)&custom.vposr >> 7) & 0xffe))

Definition at line 1056 of file amifb.c.

#define hbstop2hw (   hbstop)    (((hbstop) << 8 & 0x0700) | ((hbstop)>>3 & 0x00ff))

Definition at line 1030 of file amifb.c.

#define hbstrt2hw (   hbstrt)    (((hbstrt) << 8 & 0x0700) | ((hbstrt)>>3 & 0x00ff))

Definition at line 1029 of file amifb.c.

#define hcenter2hw (   htotal)    (div8(htotal))

Definition at line 1025 of file amifb.c.

#define highw (   x)    ((u_long)(x)>>16 & 0xffff)

Definition at line 588 of file amifb.c.

#define hscroll2hw (   hscroll)
Value:
(((hscroll) << 12 & 0x3000) | ((hscroll) << 8 & 0xc300) | \
((hscroll) << 4 & 0x0c00) | ((hscroll) << 2 & 0x00f0) | \
((hscroll)>>2 & 0x000f))

Definition at line 996 of file amifb.c.

#define hsstop2hw (   hsstop)    (div8(hsstop))

Definition at line 1020 of file amifb.c.

#define hsstrt2hw (   hsstrt)    (div8(hsstrt))

Definition at line 1019 of file amifb.c.

#define htotal2hw (   htotal)    (div8(htotal) - 1)

Definition at line 1021 of file amifb.c.

#define IS_AGA   (0)

Definition at line 89 of file amifb.c.

#define IS_ECS   (0)

Definition at line 80 of file amifb.c.

#define IS_OCS   (1)

Definition at line 76 of file amifb.c.

#define loww (   x)    ((u_long)(x) & 0xffff)

Definition at line 589 of file amifb.c.

#define mod16 (   v)    ((v) & 15)

Definition at line 562 of file amifb.c.

#define mod2 (   v)    ((v) & 1)

Definition at line 546 of file amifb.c.

#define mod32 (   v)    ((v) & 31)

Definition at line 567 of file amifb.c.

#define mod4 (   v)    ((v) & 3)

Definition at line 552 of file amifb.c.

#define mod64 (   v)    ((v) & 63)

Definition at line 572 of file amifb.c.

#define mod8 (   v)    ((v) & 7)

Definition at line 557 of file amifb.c.

#define modx (   x,
  v 
)    ((v) & ((x) - 1))

Definition at line 576 of file amifb.c.

#define mul4 (   v)    ((v) << 2)

Definition at line 550 of file amifb.c.

#define NTSC_DIWSTRT_H   (360) /* NTSC Window Limits */

Definition at line 533 of file amifb.c.

#define NTSC_DIWSTRT_V   (40)

Definition at line 534 of file amifb.c.

#define NTSC_HTOTAL   (1816)

Definition at line 535 of file amifb.c.

#define NTSC_VTOTAL   (525)

Definition at line 536 of file amifb.c.

#define NUM_TOTAL_MODES   ARRAY_SIZE(ami_modedb)

Definition at line 934 of file amifb.c.

#define PAL_DIWSTRT_H   (360) /* PAL Window Limits */

Definition at line 528 of file amifb.c.

#define PAL_DIWSTRT_V   (48)

Definition at line 529 of file amifb.c.

#define PAL_HTOTAL   (1816)

Definition at line 530 of file amifb.c.

#define PAL_VTOTAL   (625)

Definition at line 531 of file amifb.c.

#define Please   update me

Definition at line 2573 of file amifb.c.

#define rgb2hw2 (   red,
  green,
  blue 
)    (((red & 0xc0) << 4) | (green & 0xc0) | ((blue & 0xc0)>>4))

Definition at line 1042 of file amifb.c.

#define rgb2hw4 (   red,
  green,
  blue 
)    (((red & 0xf0) << 4) | (green & 0xf0) | ((blue & 0xf0)>>4))

Definition at line 1040 of file amifb.c.

#define rgb2hw8_high (   red,
  green,
  blue 
)    (((red & 0xf0) << 4) | (green & 0xf0) | ((blue & 0xf0)>>4))

Definition at line 1036 of file amifb.c.

#define rgb2hw8_low (   red,
  green,
  blue 
)    (((red & 0x0f) << 8) | ((green & 0x0f) << 4) | (blue & 0x0f))

Definition at line 1038 of file amifb.c.

#define spr2hw_ctl (   start_v,
  start_h,
  stop_v 
)
Value:
(((stop_v) << 7 & 0xff00) | ((start_v)>>4 & 0x0040) | \
((stop_v)>>5 & 0x0020) | ((start_h) << 3 & 0x0018) | \
((start_v)>>7 & 0x0004) | ((stop_v)>>8 & 0x0002) | \
((start_h)>>2 & 0x0001))

Definition at line 1049 of file amifb.c.

#define spr2hw_pos (   start_v,
  start_h 
)    (((start_v) << 7 & 0xff00) | ((start_h)>>3 & 0x00ff))

Definition at line 1047 of file amifb.c.

#define SPRITEMEMSIZE   (64 * 64 / 4) /* max 64*64*4 */

Definition at line 610 of file amifb.c.

#define up16 (   v)    (((v) + 15) & -16)

Definition at line 559 of file amifb.c.

#define up2 (   v)    (((v) + 1) & -2)

Definition at line 543 of file amifb.c.

#define up32 (   v)    (((v) + 31) & -32)

Definition at line 564 of file amifb.c.

#define up4 (   v)    (((v) + 3) & -4)

Definition at line 548 of file amifb.c.

#define up64 (   v)    (((v) + 63) & -64)

Definition at line 569 of file amifb.c.

#define up8 (   v)    (((v) + 7) & -8)

Definition at line 554 of file amifb.c.

#define upx (   x,
  v 
)    (((v) + (x) - 1) & -(x))

Definition at line 574 of file amifb.c.

#define VBlankOff ( )    custom.intena = IF_COPER

Definition at line 594 of file amifb.c.

#define VBlankOn ( )    custom.intena = IF_SETCLR|IF_COPER

Definition at line 593 of file amifb.c.

#define vbstop2hw (   vbstop)    (div2(vbstop))

Definition at line 1032 of file amifb.c.

#define vbstrt2hw (   vbstrt)    (div2(vbstrt))

Definition at line 1031 of file amifb.c.

#define VIDEOMEMSIZE_AGA_1M   (786432) /* AGA (1MB) : max 1024*768*256 */

Definition at line 605 of file amifb.c.

#define VIDEOMEMSIZE_AGA_2M   (1310720) /* AGA (2MB) : max 1280*1024*256 */

Definition at line 604 of file amifb.c.

#define VIDEOMEMSIZE_ECS_1M   (393216) /* ECS (1MB) : max 1024*768*16 */

Definition at line 607 of file amifb.c.

#define VIDEOMEMSIZE_ECS_2M   (655360) /* ECS (2MB) : max 1280*1024*16 */

Definition at line 606 of file amifb.c.

#define VIDEOMEMSIZE_OCS   (262144) /* OCS : max ca. 800*600*16 */

Definition at line 608 of file amifb.c.

#define vsstop2hw (   vsstop)    (div2(vsstop))

Definition at line 1023 of file amifb.c.

#define vsstrt2hw (   vsstrt)    (div2(vsstrt))

Definition at line 1022 of file amifb.c.

#define vtotal2hw (   vtotal)    (div2(vtotal) - 1)

Definition at line 1024 of file amifb.c.

Enumeration Type Documentation

anonymous enum
Enumerator:
TAG_SHRES 
TAG_HIRES 
TAG_LORES 

Definition at line 494 of file amifb.c.

anonymous enum
Enumerator:
TAG_OCS 
TAG_ECS 
TAG_AGA 

Definition at line 500 of file amifb.c.

anonymous enum
Enumerator:
TAG_FMODE_1 
TAG_FMODE_2 
TAG_FMODE_4 

Definition at line 506 of file amifb.c.

anonymous enum
Enumerator:
cip_bplcon0 

Definition at line 1064 of file amifb.c.

anonymous enum
Enumerator:
cop_wait 
cop_bplcon0 
cop_spr0ptrh 
cop_spr0ptrl 
cop_diwstrt 
cop_diwstop 
cop_diwhigh 

Definition at line 1075 of file amifb.c.

Function Documentation

MODULE_ALIAS ( "platform:amiga-video"  )
module_exit ( amifb_exit  )
module_init ( amifb_init  )
MODULE_LICENSE ( "GPL"  )