Skip to content

Commit

Permalink
Merge branch 'intelfb-patches' of master.kernel.org:/pub/scm/linux/ke…
Browse files Browse the repository at this point in the history
…rnel/git/airlied/intelfb-2.6

* 'intelfb-patches' of master.kernel.org:/pub/scm/linux/kernel/git/airlied/intelfb-2.6:
  intelfbhw.c: intelfbhw_get_p1p2 defined but not used
  intelfb: fix mtrr_reg signedness
  intelfb: update doc and Kconfig (supported devices)
  intelfb: add preliminary i2c support
  intelfb: add preliminary i2c support
  intelfb: add preliminary i2c support
  intelfb: add preliminary i2c support
  intelfb: add preliminary i2c support
  intelfb: add preliminary i2c support
  intelfb: add preliminary i2c support
  intelfb: add preliminary i2c support
  intelfb: add vsync interrupt support
  intelfb: add vsync interrupt support
  intelfb: add vsync interrupt support
  intelfb: add vsync interrupt support
  intelfb: add vsync interrupt support
  • Loading branch information
Linus Torvalds committed Sep 30, 2006
2 parents 369aa83 + 4dc3595 commit db1a19b
Show file tree
Hide file tree
Showing 9 changed files with 535 additions and 11 deletions.
11 changes: 7 additions & 4 deletions Documentation/fb/intelfb.txt
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
Intel 830M/845G/852GM/855GM/865G/915G Framebuffer driver
Intel 830M/845G/852GM/855GM/865G/915G/945G Framebuffer driver
================================================================

A. Introduction
This is a framebuffer driver for various Intel 810/815 compatible
This is a framebuffer driver for various Intel 8xx/9xx compatible
graphics devices. These would include:

Intel 830M
Intel 810E845G
Intel 845G
Intel 852GM
Intel 855GM
Intel 865G
Intel 915G
Intel 915GM
Intel 945G
Intel 945GM

B. List of available options

Expand Down Expand Up @@ -78,7 +81,7 @@ C. Kernel booting
Separate each option/option-pair by commas (,) and the option from its value
with an equals sign (=) as in the following:

video=i810fb:option1,option2=value2
video=intelfb:option1,option2=value2

Sample Usage
------------
Expand Down
26 changes: 22 additions & 4 deletions drivers/video/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -825,30 +825,48 @@ config FB_I810_I2C
help

config FB_INTEL
tristate "Intel 830M/845G/852GM/855GM/865G support (EXPERIMENTAL)"
tristate "Intel 830M/845G/852GM/855GM/865G/915G/945G support (EXPERIMENTAL)"
depends on FB && EXPERIMENTAL && PCI && X86
select AGP
select AGP_INTEL
select I2C_ALGOBIT if FB_INTEL_I2C
select I2C if FB_INTEL_I2C
select FB_MODE_HELPERS
select FB_CFB_FILLRECT
select FB_CFB_COPYAREA
select FB_CFB_IMAGEBLIT
help
This driver supports the on-board graphics built in to the Intel
830M/845G/852GM/855GM/865G chipsets.
830M/845G/852GM/855GM/865G/915G/915GM/945G/945GM chipsets.
Say Y if you have and plan to use such a board.

To compile this driver as a module, choose M here: the
If you say Y here and want DDC/I2C support you must first say Y to
"I2C support" and "I2C bit-banging support" in the character devices
section.

If you say M here then "I2C support" and "I2C bit-banging support"
can be build either as modules or built-in.

To compile this driver as a module, choose M here: the
module will be called intelfb.

For more information, please read <file:Documentation/fb/intelfb.txt>

config FB_INTEL_DEBUG
bool "Intel driver Debug Messages"
bool "Intel driver Debug Messages"
depends on FB_INTEL
---help---
Say Y here if you want the Intel driver to output all sorts
of debugging informations to provide to the maintainer when
something goes wrong.

config FB_INTEL_I2C
bool "DDC/I2C for Intel framebuffer support"
depends on FB_INTEL
default y
help
Say Y here if you want DDC/I2C support for your on-board Intel graphics.

config FB_MATROX
tristate "Matrox acceleration"
depends on FB && PCI
Expand Down
4 changes: 3 additions & 1 deletion drivers/video/intelfb/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
obj-$(CONFIG_FB_INTEL) += intelfb.o

intelfb-objs := intelfbdrv.o intelfbhw.o
intelfb-y := intelfbdrv.o intelfbhw.o
intelfb-$(CONFIG_FB_INTEL_I2C) += intelfb_i2c.o
intelfb-objs := $(intelfb-y)

ifdef CONFIG_FB_INTEL_DEBUG
#EXTRA_CFLAGS += -DDEBUG -DVERBOSE -DREGDUMP
Expand Down
79 changes: 78 additions & 1 deletion drivers/video/intelfb/intelfb.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
#include <linux/agp_backend.h>
#include <linux/fb.h>

#ifdef CONFIG_FB_INTEL_I2C
#include <linux/i2c.h>
#include <linux/i2c-algo-bit.h>
#endif

/*** Version/name ***/
#define INTELFB_VERSION "0.9.4"
Expand Down Expand Up @@ -115,6 +119,29 @@
/* Intel agpgart driver */
#define AGP_PHYSICAL_MEMORY 2

/* store information about an Ixxx DVO */
/* The i830->i865 use multiple DVOs with multiple i2cs */
/* the i915, i945 have a single sDVO i2c bus - which is different */
#define MAX_OUTPUTS 6

/* these are outputs from the chip - integrated only
external chips are via DVO or SDVO output */
#define INTELFB_OUTPUT_UNUSED 0
#define INTELFB_OUTPUT_ANALOG 1
#define INTELFB_OUTPUT_DVO 2
#define INTELFB_OUTPUT_SDVO 3
#define INTELFB_OUTPUT_LVDS 4
#define INTELFB_OUTPUT_TVOUT 5

#define INTELFB_DVO_CHIP_NONE 0
#define INTELFB_DVO_CHIP_LVDS 1
#define INTELFB_DVO_CHIP_TMDS 2
#define INTELFB_DVO_CHIP_TVOUT 4

#define INTELFB_OUTPUT_PIPE_NC 0
#define INTELFB_OUTPUT_PIPE_A 1
#define INTELFB_OUTPUT_PIPE_B 2

/*** Data Types ***/

/* supported chipsets */
Expand Down Expand Up @@ -195,6 +222,10 @@ struct intelfb_hwstate {
u32 mem_mode;
u32 fw_blc_0;
u32 fw_blc_1;
u16 hwstam;
u16 ier;
u16 iir;
u16 imr;
};

struct intelfb_heap_data {
Expand All @@ -204,6 +235,33 @@ struct intelfb_heap_data {
u32 size; // in bytes
};

#ifdef CONFIG_FB_INTEL_I2C
struct intelfb_i2c_chan {
struct intelfb_info *dinfo;
u32 reg;
struct i2c_adapter adapter;
struct i2c_algo_bit_data algo;
};
#endif

struct intelfb_output_rec {
int type;
int pipe;
int flags;

#ifdef CONFIG_FB_INTEL_I2C
struct intelfb_i2c_chan i2c_bus;
struct intelfb_i2c_chan ddc_bus;
#endif
};

struct intelfb_vsync {
wait_queue_head_t wait;
unsigned int count;
int pan_display;
u32 pan_offset;
};

struct intelfb_info {
struct fb_info *info;
struct fb_ops *fbops;
Expand All @@ -220,7 +278,7 @@ struct intelfb_info {
u8 fbmem_gart;

/* mtrr support */
u32 mtrr_reg;
int mtrr_reg;
u32 has_mtrr;

/* heap data */
Expand Down Expand Up @@ -267,6 +325,12 @@ struct intelfb_info {
int fixed_mode;
int ring_active;
int flag;
unsigned long irq_flags;
int open;

/* vsync */
struct intelfb_vsync vsync;
spinlock_t int_lock;

/* hw cursor */
int cursor_on;
Expand All @@ -285,12 +349,25 @@ struct intelfb_info {

/* index into plls */
int pll_index;

/* outputs */
int num_outputs;
struct intelfb_output_rec output[MAX_OUTPUTS];
};

#define IS_I9XX(dinfo) (((dinfo)->chipset == INTEL_915G)||(dinfo->chipset == INTEL_915GM)||((dinfo)->chipset == INTEL_945G)||(dinfo->chipset==INTEL_945GM))

#ifndef FBIO_WAITFORVSYNC
#define FBIO_WAITFORVSYNC _IOW('F', 0x20, __u32)
#endif

/*** function prototypes ***/

extern int intelfb_var_to_depth(const struct fb_var_screeninfo *var);

#ifdef CONFIG_FB_INTEL_I2C
extern void intelfb_create_i2c_busses(struct intelfb_info *dinfo);
extern void intelfb_delete_i2c_busses(struct intelfb_info *dinfo);
#endif

#endif /* _INTELFB_H */
Loading

0 comments on commit db1a19b

Please sign in to comment.