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_display.c File Reference
#include <linux/i2c.h>
#include <linux/pm_runtime.h>
#include <drm/drmP.h>
#include "framebuffer.h"
#include "psb_drv.h"
#include "psb_intel_drv.h"
#include "psb_intel_reg.h"
#include "psb_intel_display.h"
#include "power.h"

Go to the source code of this file.

Data Structures

struct  psb_intel_clock_t
 
struct  psb_intel_range_t
 
struct  psb_intel_p2_t
 
struct  psb_intel_limit_t
 

Macros

#define INTEL_P2_NUM   2
 
#define I8XX_DOT_MIN   25000
 
#define I8XX_DOT_MAX   350000
 
#define I8XX_VCO_MIN   930000
 
#define I8XX_VCO_MAX   1400000
 
#define I8XX_N_MIN   3
 
#define I8XX_N_MAX   16
 
#define I8XX_M_MIN   96
 
#define I8XX_M_MAX   140
 
#define I8XX_M1_MIN   18
 
#define I8XX_M1_MAX   26
 
#define I8XX_M2_MIN   6
 
#define I8XX_M2_MAX   16
 
#define I8XX_P_MIN   4
 
#define I8XX_P_MAX   128
 
#define I8XX_P1_MIN   2
 
#define I8XX_P1_MAX   33
 
#define I8XX_P1_LVDS_MIN   1
 
#define I8XX_P1_LVDS_MAX   6
 
#define I8XX_P2_SLOW   4
 
#define I8XX_P2_FAST   2
 
#define I8XX_P2_LVDS_SLOW   14
 
#define I8XX_P2_LVDS_FAST   14 /* No fast option */
 
#define I8XX_P2_SLOW_LIMIT   165000
 
#define I9XX_DOT_MIN   20000
 
#define I9XX_DOT_MAX   400000
 
#define I9XX_VCO_MIN   1400000
 
#define I9XX_VCO_MAX   2800000
 
#define I9XX_N_MIN   3
 
#define I9XX_N_MAX   8
 
#define I9XX_M_MIN   70
 
#define I9XX_M_MAX   120
 
#define I9XX_M1_MIN   10
 
#define I9XX_M1_MAX   20
 
#define I9XX_M2_MIN   5
 
#define I9XX_M2_MAX   9
 
#define I9XX_P_SDVO_DAC_MIN   5
 
#define I9XX_P_SDVO_DAC_MAX   80
 
#define I9XX_P_LVDS_MIN   7
 
#define I9XX_P_LVDS_MAX   98
 
#define I9XX_P1_MIN   1
 
#define I9XX_P1_MAX   8
 
#define I9XX_P2_SDVO_DAC_SLOW   10
 
#define I9XX_P2_SDVO_DAC_FAST   5
 
#define I9XX_P2_SDVO_DAC_SLOW_LIMIT   200000
 
#define I9XX_P2_LVDS_SLOW   14
 
#define I9XX_P2_LVDS_FAST   7
 
#define I9XX_P2_LVDS_SLOW_LIMIT   112000
 
#define INTEL_LIMIT_I8XX_DVO_DAC   0
 
#define INTEL_LIMIT_I8XX_LVDS   1
 
#define INTEL_LIMIT_I9XX_SDVO_DAC   2
 
#define INTEL_LIMIT_I9XX_LVDS   3
 
#define INTELPllInvalid(s)   { /* ErrorF (s) */; return false; }
 

Functions

bool psb_intel_pipe_has_type (struct drm_crtc *crtc, int type)
 
void psb_intel_wait_for_vblank (struct drm_device *dev)
 
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_crtc_load_lut (struct drm_crtc *crtc)
 
void psb_intel_crtc_gamma_set (struct drm_crtc *crtc, u16 *red, u16 *green, u16 *blue, uint32_t type, uint32_t size)
 
struct drm_display_modepsb_intel_crtc_mode_get (struct drm_device *dev, struct drm_crtc *crtc)
 
void psb_intel_crtc_destroy (struct drm_crtc *crtc)
 
void psb_intel_crtc_init (struct drm_device *dev, int pipe, struct psb_intel_mode_device *mode_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)
 
int psb_intel_connector_clones (struct drm_device *dev, int type_mask)
 
struct drm_encoderpsb_intel_best_encoder (struct drm_connector *connector)
 
void psb_intel_connector_attach_encoder (struct psb_intel_connector *connector, struct psb_intel_encoder *encoder)
 

Variables

struct drm_crtc_helper_funcs psb_intel_helper_funcs
 
struct drm_crtc_funcs psb_intel_crtc_funcs
 

Macro Definition Documentation

#define I8XX_DOT_MAX   350000

Definition at line 61 of file psb_intel_display.c.

#define I8XX_DOT_MIN   25000

Definition at line 60 of file psb_intel_display.c.

#define I8XX_M1_MAX   26

Definition at line 69 of file psb_intel_display.c.

#define I8XX_M1_MIN   18

Definition at line 68 of file psb_intel_display.c.

#define I8XX_M2_MAX   16

Definition at line 71 of file psb_intel_display.c.

#define I8XX_M2_MIN   6

Definition at line 70 of file psb_intel_display.c.

#define I8XX_M_MAX   140

Definition at line 67 of file psb_intel_display.c.

#define I8XX_M_MIN   96

Definition at line 66 of file psb_intel_display.c.

#define I8XX_N_MAX   16

Definition at line 65 of file psb_intel_display.c.

#define I8XX_N_MIN   3

Definition at line 64 of file psb_intel_display.c.

#define I8XX_P1_LVDS_MAX   6

Definition at line 77 of file psb_intel_display.c.

#define I8XX_P1_LVDS_MIN   1

Definition at line 76 of file psb_intel_display.c.

#define I8XX_P1_MAX   33

Definition at line 75 of file psb_intel_display.c.

#define I8XX_P1_MIN   2

Definition at line 74 of file psb_intel_display.c.

#define I8XX_P2_FAST   2

Definition at line 79 of file psb_intel_display.c.

#define I8XX_P2_LVDS_FAST   14 /* No fast option */

Definition at line 81 of file psb_intel_display.c.

#define I8XX_P2_LVDS_SLOW   14

Definition at line 80 of file psb_intel_display.c.

#define I8XX_P2_SLOW   4

Definition at line 78 of file psb_intel_display.c.

#define I8XX_P2_SLOW_LIMIT   165000

Definition at line 82 of file psb_intel_display.c.

#define I8XX_P_MAX   128

Definition at line 73 of file psb_intel_display.c.

#define I8XX_P_MIN   4

Definition at line 72 of file psb_intel_display.c.

#define I8XX_VCO_MAX   1400000

Definition at line 63 of file psb_intel_display.c.

#define I8XX_VCO_MIN   930000

Definition at line 62 of file psb_intel_display.c.

#define I9XX_DOT_MAX   400000

Definition at line 85 of file psb_intel_display.c.

#define I9XX_DOT_MIN   20000

Definition at line 84 of file psb_intel_display.c.

#define I9XX_M1_MAX   20

Definition at line 93 of file psb_intel_display.c.

#define I9XX_M1_MIN   10

Definition at line 92 of file psb_intel_display.c.

#define I9XX_M2_MAX   9

Definition at line 95 of file psb_intel_display.c.

#define I9XX_M2_MIN   5

Definition at line 94 of file psb_intel_display.c.

#define I9XX_M_MAX   120

Definition at line 91 of file psb_intel_display.c.

#define I9XX_M_MIN   70

Definition at line 90 of file psb_intel_display.c.

#define I9XX_N_MAX   8

Definition at line 89 of file psb_intel_display.c.

#define I9XX_N_MIN   3

Definition at line 88 of file psb_intel_display.c.

#define I9XX_P1_MAX   8

Definition at line 101 of file psb_intel_display.c.

#define I9XX_P1_MIN   1

Definition at line 100 of file psb_intel_display.c.

#define I9XX_P2_LVDS_FAST   7

Definition at line 106 of file psb_intel_display.c.

#define I9XX_P2_LVDS_SLOW   14

Definition at line 105 of file psb_intel_display.c.

#define I9XX_P2_LVDS_SLOW_LIMIT   112000

Definition at line 107 of file psb_intel_display.c.

#define I9XX_P2_SDVO_DAC_FAST   5

Definition at line 103 of file psb_intel_display.c.

#define I9XX_P2_SDVO_DAC_SLOW   10

Definition at line 102 of file psb_intel_display.c.

#define I9XX_P2_SDVO_DAC_SLOW_LIMIT   200000

Definition at line 104 of file psb_intel_display.c.

#define I9XX_P_LVDS_MAX   98

Definition at line 99 of file psb_intel_display.c.

#define I9XX_P_LVDS_MIN   7

Definition at line 98 of file psb_intel_display.c.

#define I9XX_P_SDVO_DAC_MAX   80

Definition at line 97 of file psb_intel_display.c.

#define I9XX_P_SDVO_DAC_MIN   5

Definition at line 96 of file psb_intel_display.c.

#define I9XX_VCO_MAX   2800000

Definition at line 87 of file psb_intel_display.c.

#define I9XX_VCO_MIN   1400000

Definition at line 86 of file psb_intel_display.c.

#define INTEL_LIMIT_I8XX_DVO_DAC   0

Definition at line 109 of file psb_intel_display.c.

#define INTEL_LIMIT_I8XX_LVDS   1

Definition at line 110 of file psb_intel_display.c.

#define INTEL_LIMIT_I9XX_LVDS   3

Definition at line 112 of file psb_intel_display.c.

#define INTEL_LIMIT_I9XX_SDVO_DAC   2

Definition at line 111 of file psb_intel_display.c.

#define INTEL_P2_NUM   2

Definition at line 53 of file psb_intel_display.c.

#define INTELPllInvalid (   s)    { /* ErrorF (s) */; return false; }

Definition at line 226 of file psb_intel_display.c.

Function Documentation

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.

int psb_intel_connector_clones ( struct drm_device dev,
int  type_mask 
)

Definition at line 1409 of file psb_intel_display.c.

void psb_intel_crtc_destroy ( struct drm_crtc crtc)

Definition at line 1228 of file psb_intel_display.c.

void psb_intel_crtc_gamma_set ( struct drm_crtc crtc,
u16 red,
u16 green,
u16 blue,
uint32_t  type,
uint32_t  size 
)

Definition at line 1071 of file psb_intel_display.c.

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.

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_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.

bool psb_intel_pipe_has_type ( struct drm_crtc crtc,
int  type 
)

Returns whether any output on the specified pipe is of the specified type

Definition at line 209 of file psb_intel_display.c.

void psb_intel_wait_for_vblank ( struct drm_device dev)

Definition at line 330 of file psb_intel_display.c.

Variable Documentation

struct drm_crtc_funcs psb_intel_crtc_funcs
Initial value:
= {
.save = psb_intel_crtc_save,
.restore = psb_intel_crtc_restore,
.cursor_set = psb_intel_crtc_cursor_set,
.cursor_move = psb_intel_crtc_cursor_move,
.set_config = psb_crtc_set_config,
}

Definition at line 1258 of file psb_intel_display.c.

struct drm_crtc_helper_funcs psb_intel_helper_funcs
Initial value:
= {
.dpms = psb_intel_crtc_dpms,
.mode_fixup = psb_intel_crtc_mode_fixup,
.mode_set = psb_intel_crtc_mode_set,
.mode_set_base = psb_intel_pipe_set_base,
.prepare = psb_intel_crtc_prepare,
.commit = psb_intel_crtc_commit,
}

Definition at line 1249 of file psb_intel_display.c.