Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
psb_intel_drv.h File Reference
#include <linux/i2c.h>
#include <linux/i2c-algo-bit.h>
#include <drm/drm_crtc.h>
#include <drm/drm_crtc_helper.h>
#include <linux/gpio.h>

Go to the source code of this file.

Data Structures

struct  psb_intel_mode_device
 
struct  psb_intel_i2c_chan
 
struct  psb_intel_encoder
 
struct  psb_intel_connector
 
struct  psb_intel_crtc_state
 
struct  psb_intel_crtc
 

Macros

#define INTELFB_CONN_LIMIT   4
 
#define INTEL_I2C_BUS_DVO   1
 
#define INTEL_I2C_BUS_SDVO   2
 
#define INTEL_HDMIB_CLONE_BIT   1
 
#define INTEL_HDMIC_CLONE_BIT   2
 
#define INTEL_HDMID_CLONE_BIT   3
 
#define INTEL_HDMIE_CLONE_BIT   4
 
#define INTEL_HDMIF_CLONE_BIT   5
 
#define INTEL_SDVO_NON_TV_CLONE_BIT   6
 
#define INTEL_SDVO_TV_CLONE_BIT   7
 
#define INTEL_SDVO_LVDS_CLONE_BIT   8
 
#define INTEL_ANALOG_CLONE_BIT   9
 
#define INTEL_TV_CLONE_BIT   10
 
#define INTEL_DP_B_CLONE_BIT   11
 
#define INTEL_DP_C_CLONE_BIT   12
 
#define INTEL_DP_D_CLONE_BIT   13
 
#define INTEL_LVDS_CLONE_BIT   14
 
#define INTEL_DVO_TMDS_CLONE_BIT   15
 
#define INTEL_DVO_LVDS_CLONE_BIT   16
 
#define INTEL_EDP_CLONE_BIT   17
 
#define INTEL_OUTPUT_UNUSED   0
 
#define INTEL_OUTPUT_ANALOG   1
 
#define INTEL_OUTPUT_DVO   2
 
#define INTEL_OUTPUT_SDVO   3
 
#define INTEL_OUTPUT_LVDS   4
 
#define INTEL_OUTPUT_TVOUT   5
 
#define INTEL_OUTPUT_HDMI   6
 
#define INTEL_OUTPUT_MIPI   7
 
#define INTEL_OUTPUT_MIPI2   8
 
#define INTEL_OUTPUT_DISPLAYPORT   9
 
#define INTEL_OUTPUT_EDP   10
 
#define INTEL_DVO_CHIP_NONE   0
 
#define INTEL_DVO_CHIP_LVDS   1
 
#define INTEL_DVO_CHIP_TMDS   2
 
#define INTEL_DVO_CHIP_TVOUT   4
 
#define INTEL_MODE_PIXEL_MULTIPLIER_SHIFT   (0x0)
 
#define INTEL_MODE_PIXEL_MULTIPLIER_MASK   (0xf << INTEL_MODE_PIXEL_MULTIPLIER_SHIFT)
 
#define DDI0_SELECT   0x01
 
#define DDI1_SELECT   0x02
 
#define DP_MASK   0x8000
 
#define DDI_MASK   0x03
 
#define to_psb_intel_crtc(x)   container_of(x, struct psb_intel_crtc, base)
 
#define to_psb_intel_connector(x)   container_of(x, struct psb_intel_connector, base)
 
#define to_psb_intel_encoder(x)   container_of(x, struct psb_intel_encoder, base)
 
#define to_psb_intel_framebuffer(x)   container_of(x, struct psb_intel_framebuffer, base)
 

Functions

struct psb_intel_i2c_chanpsb_intel_i2c_create (struct drm_device *dev, const u32 reg, const char *name)
 
void psb_intel_i2c_destroy (struct psb_intel_i2c_chan *chan)
 
int psb_intel_ddc_get_modes (struct drm_connector *connector, struct i2c_adapter *adapter)
 
bool psb_intel_ddc_probe (struct i2c_adapter *adapter)
 
void psb_intel_crtc_init (struct drm_device *dev, int pipe, struct psb_intel_mode_device *mode_dev)
 
void psb_intel_crt_init (struct drm_device *dev)
 
bool psb_intel_sdvo_init (struct drm_device *dev, int output_device)
 
void psb_intel_dvo_init (struct drm_device *dev)
 
void psb_intel_tv_init (struct drm_device *dev)
 
void psb_intel_lvds_init (struct drm_device *dev, struct psb_intel_mode_device *mode_dev)
 
void psb_intel_lvds_set_brightness (struct drm_device *dev, int level)
 
void oaktrail_lvds_init (struct drm_device *dev, struct psb_intel_mode_device *mode_dev)
 
void oaktrail_wait_for_INTR_PKT_SENT (struct drm_device *dev)
 
void oaktrail_dsi_init (struct drm_device *dev, struct psb_intel_mode_device *mode_dev)
 
void mid_dsi_init (struct drm_device *dev, struct psb_intel_mode_device *mode_dev, int dsi_num)
 
void psb_intel_crtc_load_lut (struct drm_crtc *crtc)
 
void psb_intel_encoder_prepare (struct drm_encoder *encoder)
 
void psb_intel_encoder_commit (struct drm_encoder *encoder)
 
void psb_intel_encoder_destroy (struct drm_encoder *encoder)
 
void psb_intel_connector_attach_encoder (struct psb_intel_connector *connector, struct psb_intel_encoder *encoder)
 
struct drm_encoderpsb_intel_best_encoder (struct drm_connector *connector)
 
struct drm_display_modepsb_intel_crtc_mode_get (struct drm_device *dev, struct drm_crtc *crtc)
 
void psb_intel_wait_for_vblank (struct drm_device *dev)
 
int psb_intel_get_pipe_from_crtc_id (struct drm_device *dev, void *data, struct drm_file *file_priv)
 
struct drm_crtcpsb_intel_get_crtc_from_pipe (struct drm_device *dev, int pipe)
 
struct drm_connectorpsb_intel_sdvo_find (struct drm_device *dev, int sdvoB)
 
int psb_intel_sdvo_supports_hotplug (struct drm_connector *connector)
 
void psb_intel_sdvo_set_hotplug (struct drm_connector *connector, int enable)
 
int intelfb_probe (struct drm_device *dev)
 
int intelfb_remove (struct drm_device *dev, struct drm_framebuffer *fb)
 
struct drm_framebufferpsb_intel_framebuffer_create (struct drm_device *dev, struct drm_mode_fb_cmd *mode_cmd, void *mm_private)
 
bool psb_intel_lvds_mode_fixup (struct drm_encoder *encoder, const struct drm_display_mode *mode, struct drm_display_mode *adjusted_mode)
 
int psb_intel_lvds_mode_valid (struct drm_connector *connector, struct drm_display_mode *mode)
 
int psb_intel_lvds_set_property (struct drm_connector *connector, struct drm_property *property, uint64_t value)
 
void psb_intel_lvds_destroy (struct drm_connector *connector)
 
void gma_intel_i2c_reset (struct drm_device *dev)
 
int gma_intel_setup_gmbus (struct drm_device *dev)
 
void gma_intel_gmbus_set_speed (struct i2c_adapter *adapter, int speed)
 
void gma_intel_gmbus_force_bit (struct i2c_adapter *adapter, bool force_bit)
 
void gma_intel_teardown_gmbus (struct drm_device *dev)
 
void cdv_intel_dp_init (struct drm_device *dev, struct psb_intel_mode_device *mode_dev, int output_reg)
 
void cdv_intel_dp_set_m_n (struct drm_crtc *crtc, struct drm_display_mode *mode, struct drm_display_mode *adjusted_mode)
 
void psb_intel_attach_force_audio_property (struct drm_connector *connector)
 
void psb_intel_attach_broadcast_rgb_property (struct drm_connector *connector)
 
int cdv_sb_read (struct drm_device *dev, u32 reg, u32 *val)
 
int cdv_sb_write (struct drm_device *dev, u32 reg, u32 val)
 
void cdv_sb_reset (struct drm_device *dev)
 
void cdv_intel_attach_force_audio_property (struct drm_connector *connector)
 
void cdv_intel_attach_broadcast_rgb_property (struct drm_connector *connector)
 

Variables

struct drm_encoder_funcs psb_intel_lvds_enc_funcs
 

Macro Definition Documentation

#define DDI0_SELECT   0x01

Definition at line 135 of file psb_intel_drv.h.

#define DDI1_SELECT   0x02

Definition at line 136 of file psb_intel_drv.h.

#define DDI_MASK   0x03

Definition at line 138 of file psb_intel_drv.h.

#define DP_MASK   0x8000

Definition at line 137 of file psb_intel_drv.h.

#define INTEL_ANALOG_CLONE_BIT   9

Definition at line 47 of file psb_intel_drv.h.

#define INTEL_DP_B_CLONE_BIT   11

Definition at line 49 of file psb_intel_drv.h.

#define INTEL_DP_C_CLONE_BIT   12

Definition at line 50 of file psb_intel_drv.h.

#define INTEL_DP_D_CLONE_BIT   13

Definition at line 51 of file psb_intel_drv.h.

#define INTEL_DVO_CHIP_LVDS   1

Definition at line 72 of file psb_intel_drv.h.

#define INTEL_DVO_CHIP_NONE   0

Definition at line 71 of file psb_intel_drv.h.

#define INTEL_DVO_CHIP_TMDS   2

Definition at line 73 of file psb_intel_drv.h.

#define INTEL_DVO_CHIP_TVOUT   4

Definition at line 74 of file psb_intel_drv.h.

#define INTEL_DVO_LVDS_CLONE_BIT   16

Definition at line 54 of file psb_intel_drv.h.

#define INTEL_DVO_TMDS_CLONE_BIT   15

Definition at line 53 of file psb_intel_drv.h.

#define INTEL_EDP_CLONE_BIT   17

Definition at line 55 of file psb_intel_drv.h.

#define INTEL_HDMIB_CLONE_BIT   1

Definition at line 39 of file psb_intel_drv.h.

#define INTEL_HDMIC_CLONE_BIT   2

Definition at line 40 of file psb_intel_drv.h.

#define INTEL_HDMID_CLONE_BIT   3

Definition at line 41 of file psb_intel_drv.h.

#define INTEL_HDMIE_CLONE_BIT   4

Definition at line 42 of file psb_intel_drv.h.

#define INTEL_HDMIF_CLONE_BIT   5

Definition at line 43 of file psb_intel_drv.h.

#define INTEL_I2C_BUS_DVO   1

Definition at line 35 of file psb_intel_drv.h.

#define INTEL_I2C_BUS_SDVO   2

Definition at line 36 of file psb_intel_drv.h.

#define INTEL_LVDS_CLONE_BIT   14

Definition at line 52 of file psb_intel_drv.h.

#define INTEL_MODE_PIXEL_MULTIPLIER_MASK   (0xf << INTEL_MODE_PIXEL_MULTIPLIER_SHIFT)

Definition at line 77 of file psb_intel_drv.h.

#define INTEL_MODE_PIXEL_MULTIPLIER_SHIFT   (0x0)

Definition at line 76 of file psb_intel_drv.h.

#define INTEL_OUTPUT_ANALOG   1

Definition at line 60 of file psb_intel_drv.h.

#define INTEL_OUTPUT_DISPLAYPORT   9

Definition at line 68 of file psb_intel_drv.h.

#define INTEL_OUTPUT_DVO   2

Definition at line 61 of file psb_intel_drv.h.

#define INTEL_OUTPUT_EDP   10

Definition at line 69 of file psb_intel_drv.h.

#define INTEL_OUTPUT_HDMI   6

Definition at line 65 of file psb_intel_drv.h.

#define INTEL_OUTPUT_LVDS   4

Definition at line 63 of file psb_intel_drv.h.

#define INTEL_OUTPUT_MIPI   7

Definition at line 66 of file psb_intel_drv.h.

#define INTEL_OUTPUT_MIPI2   8

Definition at line 67 of file psb_intel_drv.h.

#define INTEL_OUTPUT_SDVO   3

Definition at line 62 of file psb_intel_drv.h.

#define INTEL_OUTPUT_TVOUT   5

Definition at line 64 of file psb_intel_drv.h.

#define INTEL_OUTPUT_UNUSED   0

Definition at line 59 of file psb_intel_drv.h.

#define INTEL_SDVO_LVDS_CLONE_BIT   8

Definition at line 46 of file psb_intel_drv.h.

#define INTEL_SDVO_NON_TV_CLONE_BIT   6

Definition at line 44 of file psb_intel_drv.h.

#define INTEL_SDVO_TV_CLONE_BIT   7

Definition at line 45 of file psb_intel_drv.h.

#define INTEL_TV_CLONE_BIT   10

Definition at line 48 of file psb_intel_drv.h.

#define INTELFB_CONN_LIMIT   4

Definition at line 33 of file psb_intel_drv.h.

#define to_psb_intel_connector (   x)    container_of(x, struct psb_intel_connector, base)

Definition at line 203 of file psb_intel_drv.h.

#define to_psb_intel_crtc (   x)    container_of(x, struct psb_intel_crtc, base)

Definition at line 201 of file psb_intel_drv.h.

#define to_psb_intel_encoder (   x)    container_of(x, struct psb_intel_encoder, base)

Definition at line 205 of file psb_intel_drv.h.

#define to_psb_intel_framebuffer (   x)    container_of(x, struct psb_intel_framebuffer, base)

Definition at line 207 of file psb_intel_drv.h.

Function Documentation

void cdv_intel_attach_broadcast_rgb_property ( struct drm_connector connector)

Definition at line 535 of file cdv_device.c.

void cdv_intel_attach_force_audio_property ( struct drm_connector connector)

Definition at line 506 of file cdv_device.c.

void cdv_intel_dp_init ( struct drm_device dev,
struct psb_intel_mode_device mode_dev,
int  output_reg 
)

Definition at line 1800 of file cdv_intel_dp.c.

void cdv_intel_dp_set_m_n ( struct drm_crtc crtc,
struct drm_display_mode mode,
struct drm_display_mode adjusted_mode 
)

Definition at line 787 of file cdv_intel_dp.c.

int cdv_sb_read ( struct drm_device dev,
u32  reg,
u32 val 
)

Definition at line 174 of file cdv_intel_display.c.

void cdv_sb_reset ( struct drm_device dev)

Definition at line 243 of file cdv_intel_display.c.

int cdv_sb_write ( struct drm_device dev,
u32  reg,
u32  val 
)

Definition at line 201 of file cdv_intel_display.c.

void gma_intel_gmbus_force_bit ( struct i2c_adapter adapter,
bool  force_bit 
)

Definition at line 454 of file intel_gmbus.c.

void gma_intel_gmbus_set_speed ( struct i2c_adapter adapter,
int  speed 
)

Definition at line 441 of file intel_gmbus.c.

void gma_intel_i2c_reset ( struct drm_device dev)

Definition at line 72 of file intel_gmbus.c.

int gma_intel_setup_gmbus ( struct drm_device dev)

intel_gmbus_setup - instantiate all Intel i2c GMBuses : DRM device

Definition at line 382 of file intel_gmbus.c.

void gma_intel_teardown_gmbus ( struct drm_device dev)

Definition at line 473 of file intel_gmbus.c.

int intelfb_probe ( struct drm_device dev)
int intelfb_remove ( struct drm_device dev,
struct drm_framebuffer fb 
)
void mid_dsi_init ( struct drm_device dev,
struct psb_intel_mode_device mode_dev,
int  dsi_num 
)
void oaktrail_dsi_init ( struct drm_device dev,
struct psb_intel_mode_device mode_dev 
)
void oaktrail_lvds_init ( struct drm_device dev,
struct psb_intel_mode_device mode_dev 
)

oaktrail_lvds_init - setup LVDS connectors on this device : drm device

Create the connector, register the LVDS DDC bus, and try to figure out what modes we can display on the LVDS panel (if present).

Definition at line 325 of file oaktrail_lvds.c.

void oaktrail_wait_for_INTR_PKT_SENT ( struct drm_device dev)
void psb_intel_attach_broadcast_rgb_property ( struct drm_connector connector)
void psb_intel_attach_force_audio_property ( struct drm_connector connector)
struct drm_encoder* psb_intel_best_encoder ( struct drm_connector connector)
read

Definition at line 1429 of file psb_intel_display.c.

void psb_intel_connector_attach_encoder ( struct psb_intel_connector connector,
struct psb_intel_encoder encoder 
)

Definition at line 1437 of file psb_intel_display.c.

void psb_intel_crt_init ( struct drm_device dev)
void psb_intel_crtc_init ( struct drm_device dev,
int  pipe,
struct psb_intel_mode_device mode_dev 
)

Definition at line 1301 of file psb_intel_display.c.

void psb_intel_crtc_load_lut ( struct drm_crtc crtc)

Loads the palette/gamma unit for the CRTC with the prepared values

Definition at line 773 of file psb_intel_display.c.

struct drm_display_mode* psb_intel_crtc_mode_get ( struct drm_device dev,
struct drm_crtc crtc 
)
read

Returns the currently programmed mode of the given pipe.

Definition at line 1181 of file psb_intel_display.c.

int psb_intel_ddc_get_modes ( struct drm_connector connector,
struct i2c_adapter adapter 
)

psb_intel_ddc_get_modes - get modelist from monitor : DRM connector device to use

Fetch the EDID information from using the DDC bus.

Definition at line 62 of file psb_intel_modes.c.

bool psb_intel_ddc_probe ( struct i2c_adapter adapter)

psb_intel_ddc_probe

Definition at line 29 of file psb_intel_modes.c.

void psb_intel_dvo_init ( struct drm_device dev)
void psb_intel_encoder_commit ( struct drm_encoder encoder)

Definition at line 529 of file psb_intel_display.c.

void psb_intel_encoder_destroy ( struct drm_encoder encoder)

Definition at line 537 of file psb_intel_display.c.

void psb_intel_encoder_prepare ( struct drm_encoder encoder)

Definition at line 521 of file psb_intel_display.c.

struct drm_framebuffer* psb_intel_framebuffer_create ( struct drm_device dev,
struct drm_mode_fb_cmd mode_cmd,
void mm_private 
)
read
struct drm_crtc* psb_intel_get_crtc_from_pipe ( struct drm_device dev,
int  pipe 
)
read

Definition at line 1397 of file psb_intel_display.c.

int psb_intel_get_pipe_from_crtc_id ( struct drm_device dev,
void data,
struct drm_file *  file_priv 
)

Definition at line 1370 of file psb_intel_display.c.

struct psb_intel_i2c_chan* psb_intel_i2c_create ( struct drm_device dev,
const u32  reg,
const char name 
)
read

Definition at line 116 of file intel_i2c.c.

void psb_intel_i2c_destroy ( struct psb_intel_i2c_chan chan)

psb_intel_i2c_destroy - unregister and free i2c bus resources : channel to free

Unregister the adapter from the i2c layer, then free the structure.

Definition at line 162 of file intel_i2c.c.

void psb_intel_lvds_destroy ( struct drm_connector connector)

psb_intel_lvds_destroy - unregister and free LVDS structures : connector to free

Unregister the DDC bus for this connector then free the driver private structure.

Definition at line 565 of file psb_intel_lvds.c.

void psb_intel_lvds_init ( struct drm_device dev,
struct psb_intel_mode_device mode_dev 
)

psb_intel_lvds_init - setup LVDS connectors on this device : drm device

Create the connector, register the LVDS DDC bus, and try to figure out what modes we can display on the LVDS panel (if present).

Definition at line 691 of file psb_intel_lvds.c.

bool psb_intel_lvds_mode_fixup ( struct drm_encoder encoder,
const struct drm_display_mode mode,
struct drm_display_mode adjusted_mode 
)

Definition at line 377 of file psb_intel_lvds.c.

int psb_intel_lvds_mode_valid ( struct drm_connector connector,
struct drm_display_mode mode 
)

Definition at line 348 of file psb_intel_lvds.c.

void psb_intel_lvds_set_brightness ( struct drm_device dev,
int  level 
)

Definition at line 173 of file psb_intel_lvds.c.

int psb_intel_lvds_set_property ( struct drm_connector connector,
struct drm_property property,
uint64_t  value 
)

Definition at line 578 of file psb_intel_lvds.c.

struct drm_connector* psb_intel_sdvo_find ( struct drm_device dev,
int  sdvoB 
)
read
bool psb_intel_sdvo_init ( struct drm_device dev,
int  output_device 
)

Definition at line 2507 of file psb_intel_sdvo.c.

void psb_intel_sdvo_set_hotplug ( struct drm_connector connector,
int  enable 
)
int psb_intel_sdvo_supports_hotplug ( struct drm_connector connector)
void psb_intel_tv_init ( struct drm_device dev)
void psb_intel_wait_for_vblank ( struct drm_device dev)

Definition at line 330 of file psb_intel_display.c.

Variable Documentation

struct drm_encoder_funcs psb_intel_lvds_enc_funcs

Definition at line 678 of file psb_intel_lvds.c.