You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Linux-2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
obj-$(CONFIG_FB_INTEL) += intelfb.o
|
||||
|
||||
intelfb-objs := intelfbdrv.o intelfbhw.o
|
||||
|
||||
ifdef CONFIG_FB_INTEL_DEBUG
|
||||
#EXTRA_CFLAGS += -DDEBUG -DVERBOSE -DREGDUMP
|
||||
EXTRA_CFLAGS += -DDEBUG -DREGDUMP
|
||||
endif
|
||||
@@ -0,0 +1,280 @@
|
||||
#ifndef _INTELFB_H
|
||||
#define _INTELFB_H
|
||||
|
||||
/* $DHD: intelfb/intelfb.h,v 1.40 2003/06/27 15:06:25 dawes Exp $ */
|
||||
|
||||
#include <linux/agp_backend.h>
|
||||
#include <linux/fb.h>
|
||||
|
||||
|
||||
/*** Version/name ***/
|
||||
#define INTELFB_VERSION "0.9.2"
|
||||
#define INTELFB_MODULE_NAME "intelfb"
|
||||
#define SUPPORTED_CHIPSETS "830M/845G/852GM/855GM/865G/915G"
|
||||
|
||||
|
||||
/*** Debug/feature defines ***/
|
||||
|
||||
#ifndef DEBUG
|
||||
#define DEBUG 0
|
||||
#endif
|
||||
|
||||
#ifndef VERBOSE
|
||||
#define VERBOSE 0
|
||||
#endif
|
||||
|
||||
#ifndef REGDUMP
|
||||
#define REGDUMP 0
|
||||
#endif
|
||||
|
||||
#ifndef DETECT_VGA_CLASS_ONLY
|
||||
#define DETECT_VGA_CLASS_ONLY 1
|
||||
#endif
|
||||
|
||||
#ifndef ALLOCATE_FOR_PANNING
|
||||
#define ALLOCATE_FOR_PANNING 1
|
||||
#endif
|
||||
|
||||
#ifndef PREFERRED_MODE
|
||||
#define PREFERRED_MODE "1024x768-32@70"
|
||||
#endif
|
||||
|
||||
/*** hw-related values ***/
|
||||
|
||||
/* PCI ids for supported devices */
|
||||
#define PCI_DEVICE_ID_INTEL_830M 0x3577
|
||||
#define PCI_DEVICE_ID_INTEL_845G 0x2562
|
||||
#define PCI_DEVICE_ID_INTEL_85XGM 0x3582
|
||||
#define PCI_DEVICE_ID_INTEL_865G 0x2572
|
||||
#define PCI_DEVICE_ID_INTEL_915G 0x2582
|
||||
|
||||
/* Size of MMIO region */
|
||||
#define INTEL_REG_SIZE 0x80000
|
||||
|
||||
#define STRIDE_ALIGNMENT 16
|
||||
|
||||
#define PALETTE_8_ENTRIES 256
|
||||
|
||||
|
||||
/*** Macros ***/
|
||||
|
||||
/* basic arithmetic */
|
||||
#define KB(x) ((x) * 1024)
|
||||
#define MB(x) ((x) * 1024 * 1024)
|
||||
#define BtoKB(x) ((x) / 1024)
|
||||
#define BtoMB(x) ((x) / 1024 / 1024)
|
||||
|
||||
#define GTT_PAGE_SIZE KB(4)
|
||||
|
||||
#define ROUND_UP_TO(x, y) (((x) + (y) - 1) / (y) * (y))
|
||||
#define ROUND_DOWN_TO(x, y) ((x) / (y) * (y))
|
||||
#define ROUND_UP_TO_PAGE(x) ROUND_UP_TO((x), GTT_PAGE_SIZE)
|
||||
#define ROUND_DOWN_TO_PAGE(x) ROUND_DOWN_TO((x), GTT_PAGE_SIZE)
|
||||
|
||||
/* messages */
|
||||
#define PFX INTELFB_MODULE_NAME ": "
|
||||
|
||||
#define ERR_MSG(fmt, args...) printk(KERN_ERR PFX fmt, ## args)
|
||||
#define WRN_MSG(fmt, args...) printk(KERN_WARNING PFX fmt, ## args)
|
||||
#define NOT_MSG(fmt, args...) printk(KERN_NOTICE PFX fmt, ## args)
|
||||
#define INF_MSG(fmt, args...) printk(KERN_INFO PFX fmt, ## args)
|
||||
#if DEBUG
|
||||
#define DBG_MSG(fmt, args...) printk(KERN_DEBUG PFX fmt, ## args)
|
||||
#else
|
||||
#define DBG_MSG(fmt, args...) while (0) printk(fmt, ## args)
|
||||
#endif
|
||||
|
||||
/* get commonly used pointers */
|
||||
#define GET_DINFO(info) (info)->par
|
||||
|
||||
/* misc macros */
|
||||
#define ACCEL(d, i) \
|
||||
((d)->accel && !(d)->ring_lockup && \
|
||||
((i)->var.accel_flags & FB_ACCELF_TEXT))
|
||||
|
||||
/*#define NOACCEL_CHIPSET(d) \
|
||||
((d)->chipset != INTEL_865G)*/
|
||||
#define NOACCEL_CHIPSET(d) \
|
||||
(0)
|
||||
|
||||
#define FIXED_MODE(d) ((d)->fixed_mode)
|
||||
|
||||
/*** Driver paramters ***/
|
||||
|
||||
#define RINGBUFFER_SIZE KB(64)
|
||||
#define HW_CURSOR_SIZE KB(4)
|
||||
|
||||
/* Intel agpgart driver */
|
||||
#define AGP_PHYSICAL_MEMORY 2
|
||||
|
||||
/*** Data Types ***/
|
||||
|
||||
/* supported chipsets */
|
||||
enum intel_chips {
|
||||
INTEL_830M,
|
||||
INTEL_845G,
|
||||
INTEL_85XGM,
|
||||
INTEL_852GM,
|
||||
INTEL_852GME,
|
||||
INTEL_855GM,
|
||||
INTEL_855GME,
|
||||
INTEL_865G,
|
||||
INTEL_915G
|
||||
};
|
||||
|
||||
struct intelfb_hwstate {
|
||||
u32 vga0_divisor;
|
||||
u32 vga1_divisor;
|
||||
u32 vga_pd;
|
||||
u32 dpll_a;
|
||||
u32 dpll_b;
|
||||
u32 fpa0;
|
||||
u32 fpa1;
|
||||
u32 fpb0;
|
||||
u32 fpb1;
|
||||
u32 palette_a[PALETTE_8_ENTRIES];
|
||||
u32 palette_b[PALETTE_8_ENTRIES];
|
||||
u32 htotal_a;
|
||||
u32 hblank_a;
|
||||
u32 hsync_a;
|
||||
u32 vtotal_a;
|
||||
u32 vblank_a;
|
||||
u32 vsync_a;
|
||||
u32 src_size_a;
|
||||
u32 bclrpat_a;
|
||||
u32 htotal_b;
|
||||
u32 hblank_b;
|
||||
u32 hsync_b;
|
||||
u32 vtotal_b;
|
||||
u32 vblank_b;
|
||||
u32 vsync_b;
|
||||
u32 src_size_b;
|
||||
u32 bclrpat_b;
|
||||
u32 adpa;
|
||||
u32 dvoa;
|
||||
u32 dvob;
|
||||
u32 dvoc;
|
||||
u32 dvoa_srcdim;
|
||||
u32 dvob_srcdim;
|
||||
u32 dvoc_srcdim;
|
||||
u32 lvds;
|
||||
u32 pipe_a_conf;
|
||||
u32 pipe_b_conf;
|
||||
u32 disp_arb;
|
||||
u32 cursor_a_control;
|
||||
u32 cursor_b_control;
|
||||
u32 cursor_a_base;
|
||||
u32 cursor_b_base;
|
||||
u32 cursor_size;
|
||||
u32 disp_a_ctrl;
|
||||
u32 disp_b_ctrl;
|
||||
u32 disp_a_base;
|
||||
u32 disp_b_base;
|
||||
u32 cursor_a_palette[4];
|
||||
u32 cursor_b_palette[4];
|
||||
u32 disp_a_stride;
|
||||
u32 disp_b_stride;
|
||||
u32 vgacntrl;
|
||||
u32 add_id;
|
||||
u32 swf0x[7];
|
||||
u32 swf1x[7];
|
||||
u32 swf3x[3];
|
||||
u32 fence[8];
|
||||
u32 instpm;
|
||||
u32 mem_mode;
|
||||
u32 fw_blc_0;
|
||||
u32 fw_blc_1;
|
||||
};
|
||||
|
||||
struct intelfb_heap_data {
|
||||
u32 physical;
|
||||
u8 __iomem *virtual;
|
||||
u32 offset; // in GATT pages
|
||||
u32 size; // in bytes
|
||||
};
|
||||
|
||||
struct intelfb_info {
|
||||
struct fb_info *info;
|
||||
struct fb_ops *fbops;
|
||||
struct pci_dev *pdev;
|
||||
|
||||
struct intelfb_hwstate save_state;
|
||||
|
||||
/* agpgart structs */
|
||||
struct agp_memory *gtt_fb_mem; // use all stolen memory or vram
|
||||
struct agp_memory *gtt_ring_mem; // ring buffer
|
||||
struct agp_memory *gtt_cursor_mem; // hw cursor
|
||||
|
||||
/* use a gart reserved fb mem */
|
||||
u8 fbmem_gart;
|
||||
|
||||
/* mtrr support */
|
||||
u32 mtrr_reg;
|
||||
u32 has_mtrr;
|
||||
|
||||
/* heap data */
|
||||
struct intelfb_heap_data aperture;
|
||||
struct intelfb_heap_data fb;
|
||||
struct intelfb_heap_data ring;
|
||||
struct intelfb_heap_data cursor;
|
||||
|
||||
/* mmio regs */
|
||||
u32 mmio_base_phys;
|
||||
u8 __iomem *mmio_base;
|
||||
|
||||
/* fb start offset (in bytes) */
|
||||
u32 fb_start;
|
||||
|
||||
/* ring buffer */
|
||||
u8 __iomem *ring_head;
|
||||
u32 ring_tail;
|
||||
u32 ring_tail_mask;
|
||||
u32 ring_space;
|
||||
u32 ring_lockup;
|
||||
|
||||
/* palette */
|
||||
u32 pseudo_palette[17];
|
||||
struct { u8 red, green, blue, pad; } palette[256];
|
||||
|
||||
/* chip info */
|
||||
int pci_chipset;
|
||||
int chipset;
|
||||
const char *name;
|
||||
int mobile;
|
||||
|
||||
/* current mode */
|
||||
int bpp, depth;
|
||||
u32 visual;
|
||||
int xres, yres, pitch;
|
||||
int pixclock;
|
||||
|
||||
/* current pipe */
|
||||
int pipe;
|
||||
|
||||
/* some flags */
|
||||
int accel;
|
||||
int hwcursor;
|
||||
int fixed_mode;
|
||||
int ring_active;
|
||||
|
||||
/* hw cursor */
|
||||
int cursor_on;
|
||||
int cursor_blanked;
|
||||
u8 cursor_src[64];
|
||||
|
||||
/* initial parameters */
|
||||
int initial_vga;
|
||||
struct fb_var_screeninfo initial_var;
|
||||
u32 initial_fb_base;
|
||||
u32 initial_video_ram;
|
||||
u32 initial_pitch;
|
||||
|
||||
/* driver registered */
|
||||
int registered;
|
||||
};
|
||||
|
||||
/*** function prototypes ***/
|
||||
|
||||
extern int intelfb_var_to_depth(const struct fb_var_screeninfo *var);
|
||||
|
||||
#endif /* _INTELFB_H */
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,68 @@
|
||||
#ifndef _INTELFBDRV_H
|
||||
#define _INTELFBDRV_H
|
||||
|
||||
/*
|
||||
******************************************************************************
|
||||
* intelfb
|
||||
*
|
||||
* Linux framebuffer driver for Intel(R) 830M/845G/852GM/855GM/865G/915G
|
||||
* integrated graphics chips.
|
||||
*
|
||||
* Copyright © 2004 Sylvain Meyer
|
||||
*
|
||||
* Author: Sylvain Meyer
|
||||
*
|
||||
******************************************************************************
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
static void __devinit get_initial_mode(struct intelfb_info *dinfo);
|
||||
static void update_dinfo(struct intelfb_info *dinfo,
|
||||
struct fb_var_screeninfo *var);
|
||||
static int intelfb_get_fix(struct fb_fix_screeninfo *fix,
|
||||
struct fb_info *info);
|
||||
|
||||
static int intelfb_check_var(struct fb_var_screeninfo *var,
|
||||
struct fb_info *info);
|
||||
static int intelfb_set_par(struct fb_info *info);
|
||||
static int intelfb_setcolreg(unsigned regno, unsigned red, unsigned green,
|
||||
unsigned blue, unsigned transp,
|
||||
struct fb_info *info);
|
||||
|
||||
static int intelfb_blank(int blank, struct fb_info *info);
|
||||
static int intelfb_pan_display(struct fb_var_screeninfo *var,
|
||||
struct fb_info *info);
|
||||
|
||||
static void intelfb_fillrect(struct fb_info *info,
|
||||
const struct fb_fillrect *rect);
|
||||
static void intelfb_copyarea(struct fb_info *info,
|
||||
const struct fb_copyarea *region);
|
||||
static void intelfb_imageblit(struct fb_info *info,
|
||||
const struct fb_image *image);
|
||||
static int intelfb_cursor(struct fb_info *info,
|
||||
struct fb_cursor *cursor);
|
||||
|
||||
static int intelfb_sync(struct fb_info *info);
|
||||
|
||||
static int intelfb_ioctl(struct inode *inode, struct file *file,
|
||||
unsigned int cmd, unsigned long arg,
|
||||
struct fb_info *info);
|
||||
|
||||
static int __devinit intelfb_pci_register(struct pci_dev *pdev,
|
||||
const struct pci_device_id *ent);
|
||||
static void __devexit intelfb_pci_unregister(struct pci_dev *pdev);
|
||||
static int __devinit intelfb_set_fbinfo(struct intelfb_info *dinfo);
|
||||
|
||||
#endif
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user