Linux Kernel
3.7.1
|
#include <linux/backlight.h>
#include <drm/drmP.h>
#include <drm/drm.h>
#include <drm/drm_crtc.h>
#include <drm/drm_edid.h>
#include "psb_drv.h"
#include "psb_intel_drv.h"
#include "psb_intel_reg.h"
#include "mdfld_output.h"
#include <asm/mrst.h>
Go to the source code of this file.
Data Structures | |
struct | mdfld_dsi_connector |
struct | mdfld_dsi_encoder |
struct | mdfld_dsi_config |
Enumerations | |
enum | { MDFLD_DSI_VIDEO_NON_BURST_MODE_SYNC_PULSE = 1, MDFLD_DSI_VIDEO_NON_BURST_MODE_SYNC_EVENTS = 2, MDFLD_DSI_VIDEO_BURST_MODE = 3 } |
Functions | |
void | mdfld_dsi_gen_fifo_ready (struct drm_device *dev, u32 gen_fifo_stat_reg, u32 fifo_stat) |
void | mdfld_dsi_brightness_init (struct mdfld_dsi_config *dsi_config, int pipe) |
void | mdfld_dsi_brightness_control (struct drm_device *dev, int pipe, int level) |
void | mdfld_dsi_output_init (struct drm_device *dev, int pipe, const struct panel_funcs *p_vid_funcs) |
void | mdfld_dsi_controller_init (struct mdfld_dsi_config *dsi_config, int pipe) |
int | mdfld_dsi_get_power_mode (struct mdfld_dsi_config *dsi_config, u32 *mode, bool hs) |
int | mdfld_dsi_panel_reset (int pipe) |
Definition at line 80 of file mdfld_dsi_output.h.
#define DSI_DBI_COLOR_FORMAT_OPTION2 (0x05 << 13) |
Definition at line 149 of file mdfld_dsi_output.h.
#define DSI_DBI_FIFO_WM_HALF (0x0) |
Definition at line 164 of file mdfld_dsi_output.h.
#define DSI_DBI_FIFO_WM_LOW (0x2) |
Definition at line 166 of file mdfld_dsi_output.h.
#define DSI_DBI_FIFO_WM_QUARTER (0x1) |
Definition at line 165 of file mdfld_dsi_output.h.
#define DSI_DBI_HS_LP_SWITCH_MASK (0x1) |
Definition at line 205 of file mdfld_dsi_output.h.
#define DSI_DBI_RETURN_PACK_SIZE_MASK (0x3ff) |
Definition at line 172 of file mdfld_dsi_output.h.
#define DSI_DBI_VIRT_CHANNEL_OFFSET (0x5) |
Definition at line 144 of file mdfld_dsi_output.h.
#define DSI_DEVICE_READY (0x1) |
Definition at line 133 of file mdfld_dsi_output.h.
#define DSI_DPI_COLOR_FORMAT_RGB565 (0x01 << 7) |
Definition at line 145 of file mdfld_dsi_output.h.
#define DSI_DPI_COLOR_FORMAT_RGB666 (0x02 << 7) |
Definition at line 146 of file mdfld_dsi_output.h.
#define DSI_DPI_COLOR_FORMAT_RGB666_UNPACK (0x03 << 7) |
Definition at line 147 of file mdfld_dsi_output.h.
#define DSI_DPI_COLOR_FORMAT_RGB888 (0x04 << 7) |
Definition at line 148 of file mdfld_dsi_output.h.
#define DSI_DPI_COMPLETE_LAST_LINE BIT(2) |
Definition at line 226 of file mdfld_dsi_output.h.
#define DSI_DPI_CTRL_HS_SHUTDOWN (0x00000001) |
Definition at line 210 of file mdfld_dsi_output.h.
#define DSI_DPI_CTRL_HS_TURN_ON (0x00000002) |
Definition at line 211 of file mdfld_dsi_output.h.
#define DSI_DPI_DISABLE_BTA BIT(3) |
Definition at line 227 of file mdfld_dsi_output.h.
#define DSI_DPI_TIMING_MASK (0xffff) |
Definition at line 168 of file mdfld_dsi_output.h.
#define DSI_DPI_VIRT_CHANNEL_OFFSET (0x3) |
Definition at line 143 of file mdfld_dsi_output.h.
#define DSI_FIFO_DBI_EMPTY BIT(27) |
Definition at line 202 of file mdfld_dsi_output.h.
#define DSI_FIFO_DPI_EMPTY BIT(28) |
Definition at line 203 of file mdfld_dsi_output.h.
#define DSI_FIFO_GEN_HS_CTRL_EMPTY BIT(18) |
Definition at line 198 of file mdfld_dsi_output.h.
#define DSI_FIFO_GEN_HS_CTRL_FULL BIT(16) |
Definition at line 196 of file mdfld_dsi_output.h.
#define DSI_FIFO_GEN_HS_CTRL_HALF_EMPTY BIT(17) |
Definition at line 197 of file mdfld_dsi_output.h.
#define DSI_FIFO_GEN_HS_DATA_EMPTY BIT(2) |
Definition at line 192 of file mdfld_dsi_output.h.
#define DSI_FIFO_GEN_HS_DATA_FULL BIT(0) |
Definition at line 190 of file mdfld_dsi_output.h.
#define DSI_FIFO_GEN_HS_DATA_HALF_EMPTY BIT(1) |
Definition at line 191 of file mdfld_dsi_output.h.
#define DSI_FIFO_GEN_LP_CTRL_EMPTY BIT(26) |
Definition at line 201 of file mdfld_dsi_output.h.
#define DSI_FIFO_GEN_LP_CTRL_FULL BIT(24) |
Definition at line 199 of file mdfld_dsi_output.h.
#define DSI_FIFO_GEN_LP_CTRL_HALF_EMPTY BIT(25) |
Definition at line 200 of file mdfld_dsi_output.h.
#define DSI_FIFO_GEN_LP_DATA_EMPTY BIT(10) |
Definition at line 195 of file mdfld_dsi_output.h.
#define DSI_FIFO_GEN_LP_DATA_FULL BIT(8) |
Definition at line 193 of file mdfld_dsi_output.h.
#define DSI_FIFO_GEN_LP_DATA_HALF_EMPTY BIT(9) |
Definition at line 194 of file mdfld_dsi_output.h.
#define DSI_FOUR_DATA_LANE (0x4) |
Definition at line 142 of file mdfld_dsi_output.h.
#define DSI_HS_CTRL_GEN_LONG_W (0x29) |
Definition at line 182 of file mdfld_dsi_output.h.
#define DSI_HS_CTRL_GEN_R0 (0x04) |
Definition at line 179 of file mdfld_dsi_output.h.
#define DSI_HS_CTRL_GEN_R1 (0x14) |
Definition at line 180 of file mdfld_dsi_output.h.
#define DSI_HS_CTRL_GEN_R2 (0x24) |
Definition at line 181 of file mdfld_dsi_output.h.
#define DSI_HS_CTRL_GEN_SHORT_W0 (0x03) |
Definition at line 176 of file mdfld_dsi_output.h.
#define DSI_HS_CTRL_GEN_SHORT_W1 (0x13) |
Definition at line 177 of file mdfld_dsi_output.h.
#define DSI_HS_CTRL_GEN_SHORT_W2 (0x23) |
Definition at line 178 of file mdfld_dsi_output.h.
#define DSI_HS_CTRL_MCS_LONG_W (0x39) |
Definition at line 186 of file mdfld_dsi_output.h.
#define DSI_HS_CTRL_MCS_R0 (0x06) |
Definition at line 185 of file mdfld_dsi_output.h.
#define DSI_HS_CTRL_MCS_SHORT_W0 (0x05) |
Definition at line 183 of file mdfld_dsi_output.h.
#define DSI_HS_CTRL_MCS_SHORT_W1 (0x15) |
Definition at line 184 of file mdfld_dsi_output.h.
#define DSI_HS_CTRL_VC_OFFSET (0x06) |
Definition at line 187 of file mdfld_dsi_output.h.
#define DSI_HS_CTRL_WC_OFFSET (0x08) |
Definition at line 188 of file mdfld_dsi_output.h.
#define DSI_HS_LP_SWITCH_COUNTER_OFFSET (0x0) |
Definition at line 207 of file mdfld_dsi_output.h.
#define DSI_HS_TX_TIMEOUT_MASK (0xffffff) |
Definition at line 156 of file mdfld_dsi_output.h.
#define DSI_INIT_TIMER_MASK (0xffff) |
Definition at line 170 of file mdfld_dsi_output.h.
#define DSI_INTR_STATE_RXSOTERROR BIT(0) |
Definition at line 151 of file mdfld_dsi_output.h.
#define DSI_INTR_STATE_SPL_PKG_SENT BIT(30) |
Definition at line 153 of file mdfld_dsi_output.h.
#define DSI_INTR_STATE_TE BIT(31) |
Definition at line 154 of file mdfld_dsi_output.h.
#define DSI_LP_BYTECLK_MASK (0x0ffff) |
Definition at line 174 of file mdfld_dsi_output.h.
#define DSI_LP_HS_SWITCH_COUNTER_OFFSET (0x16) |
Definition at line 208 of file mdfld_dsi_output.h.
#define DSI_LP_RX_TIMEOUT_MASK (0xffffff) |
Definition at line 158 of file mdfld_dsi_output.h.
#define DSI_ONE_DATA_LANE (0x1) |
Definition at line 139 of file mdfld_dsi_output.h.
#define DSI_POWER_MODE_DISPLAY_ON BIT(2) |
Definition at line 214 of file mdfld_dsi_output.h.
#define DSI_POWER_MODE_IDLE_ON BIT(6) |
Definition at line 218 of file mdfld_dsi_output.h.
#define DSI_POWER_MODE_NORMAL_ON BIT(3) |
Definition at line 215 of file mdfld_dsi_output.h.
#define DSI_POWER_MODE_PARTIAL_ON BIT(5) |
Definition at line 217 of file mdfld_dsi_output.h.
#define DSI_POWER_MODE_SLEEP_OUT BIT(4) |
Definition at line 216 of file mdfld_dsi_output.h.
#define DSI_POWER_STATE_ULPS_ENTER (0x2 << 1) |
Definition at line 134 of file mdfld_dsi_output.h.
#define DSI_POWER_STATE_ULPS_EXIT (0x1 << 1) |
Definition at line 135 of file mdfld_dsi_output.h.
#define DSI_POWER_STATE_ULPS_OFFSET (0x1) |
Definition at line 136 of file mdfld_dsi_output.h.
#define DSI_RESET_TIMER_MASK (0xffff) |
Definition at line 162 of file mdfld_dsi_output.h.
#define DSI_THREE_DATA_LANE (0X3) |
Definition at line 141 of file mdfld_dsi_output.h.
#define DSI_TURN_AROUND_TIMEOUT_MASK (0x3f) |
Definition at line 160 of file mdfld_dsi_output.h.
#define DSI_TWO_DATA_LANE (0x2) |
Definition at line 140 of file mdfld_dsi_output.h.
Definition at line 46 of file mdfld_dsi_output.h.
Definition at line 44 of file mdfld_dsi_output.h.
#define FLD_MOD | ( | orig, | |
val, | |||
start, | |||
end | |||
) | (((orig) & ~FLD_MASK(start, end)) | FLD_VAL(val, start, end)) |
Definition at line 47 of file mdfld_dsi_output.h.
Definition at line 45 of file mdfld_dsi_output.h.
#define MDFLD_DSI_BRIGHTNESS_MAX_LEVEL 100 |
Definition at line 72 of file mdfld_dsi_output.h.
#define MIPI_CLK_LANE_SWITCH_TIME_CNT_REG | ( | pipe | ) | (0xb088 + REG_OFFSET(pipe)) |
Definition at line 122 of file mdfld_dsi_output.h.
#define MIPI_CMD_ADD_REG | ( | pipe | ) | (0xb110 + REG_OFFSET(pipe)) |
Definition at line 127 of file mdfld_dsi_output.h.
#define MIPI_CMD_LEN_REG | ( | pipe | ) | (0xb114 + REG_OFFSET(pipe)) |
Definition at line 128 of file mdfld_dsi_output.h.
#define MIPI_CTRL_REG | ( | pipe | ) | (0xb104 + REG_OFFSET(pipe)) |
Definition at line 124 of file mdfld_dsi_output.h.
#define MIPI_DATA_ADD_REG | ( | pipe | ) | (0xb108 + REG_OFFSET(pipe)) |
Definition at line 125 of file mdfld_dsi_output.h.
#define MIPI_DATA_LEN_REG | ( | pipe | ) | (0xb10c + REG_OFFSET(pipe)) |
Definition at line 126 of file mdfld_dsi_output.h.
#define MIPI_DBI_BW_CTRL_REG | ( | pipe | ) | (0xb084 + REG_OFFSET(pipe)) |
Definition at line 121 of file mdfld_dsi_output.h.
#define MIPI_DBI_FIFO_THROTTLE_REG | ( | pipe | ) | (0xb024 + REG_OFFSET(pipe)) |
Definition at line 98 of file mdfld_dsi_output.h.
#define MIPI_DEVICE_READY_REG | ( | pipe | ) | (0xb000 + REG_OFFSET(pipe)) |
Definition at line 89 of file mdfld_dsi_output.h.
#define MIPI_DEVICE_RESET_TIMER_REG | ( | pipe | ) | (0xb01c + REG_OFFSET(pipe)) |
Definition at line 96 of file mdfld_dsi_output.h.
#define MIPI_DPHY_PARAM_REG | ( | pipe | ) | (0xb080 + REG_OFFSET(pipe)) |
Definition at line 120 of file mdfld_dsi_output.h.
#define MIPI_DPI_CONTROL_REG | ( | pipe | ) | (0xb048 + REG_OFFSET(pipe)) |
Definition at line 107 of file mdfld_dsi_output.h.
#define MIPI_DPI_DATA_REG | ( | pipe | ) | (0xb04c + REG_OFFSET(pipe)) |
Definition at line 108 of file mdfld_dsi_output.h.
#define MIPI_DPI_RESOLUTION_REG | ( | pipe | ) | (0xb020 + REG_OFFSET(pipe)) |
Definition at line 97 of file mdfld_dsi_output.h.
#define MIPI_DSI_FUNC_PRG_REG | ( | pipe | ) | (0xb00c + REG_OFFSET(pipe)) |
Definition at line 92 of file mdfld_dsi_output.h.
#define MIPI_EOT_DISABLE_REG | ( | pipe | ) | (0xb05c + REG_OFFSET(pipe)) |
Definition at line 112 of file mdfld_dsi_output.h.
#define MIPI_GEN_FIFO_STAT_REG | ( | pipe | ) | (0xb074 + REG_OFFSET(pipe)) |
Definition at line 118 of file mdfld_dsi_output.h.
#define MIPI_HACTIVE_COUNT_REG | ( | pipe | ) | (0xb034 + REG_OFFSET(pipe)) |
Definition at line 102 of file mdfld_dsi_output.h.
#define MIPI_HBP_COUNT_REG | ( | pipe | ) | (0xb02c + REG_OFFSET(pipe)) |
Definition at line 100 of file mdfld_dsi_output.h.
#define MIPI_HFP_COUNT_REG | ( | pipe | ) | (0xb030 + REG_OFFSET(pipe)) |
Definition at line 101 of file mdfld_dsi_output.h.
#define MIPI_HIGH_LOW_SWITCH_COUNT_REG | ( | pipe | ) | (0xb044 + REG_OFFSET(pipe)) |
Definition at line 106 of file mdfld_dsi_output.h.
#define MIPI_HS_GEN_CTRL_REG | ( | pipe | ) | (0xb070 + REG_OFFSET(pipe)) |
Definition at line 117 of file mdfld_dsi_output.h.
#define MIPI_HS_GEN_DATA_REG | ( | pipe | ) | (0xb068 + REG_OFFSET(pipe)) |
Definition at line 115 of file mdfld_dsi_output.h.
#define MIPI_HS_LS_DBI_ENABLE_REG | ( | pipe | ) | (0xb078 + REG_OFFSET(pipe)) |
Definition at line 119 of file mdfld_dsi_output.h.
#define MIPI_HS_TX_TIMEOUT_REG | ( | pipe | ) | (0xb010 + REG_OFFSET(pipe)) |
Definition at line 93 of file mdfld_dsi_output.h.
#define MIPI_HSYNC_COUNT_REG | ( | pipe | ) | (0xb028 + REG_OFFSET(pipe)) |
Definition at line 99 of file mdfld_dsi_output.h.
#define MIPI_INIT_COUNT_REG | ( | pipe | ) | (0xb050 + REG_OFFSET(pipe)) |
Definition at line 109 of file mdfld_dsi_output.h.
#define MIPI_INTR_EN_REG | ( | pipe | ) | (0xb008 + REG_OFFSET(pipe)) |
Definition at line 91 of file mdfld_dsi_output.h.
#define MIPI_INTR_STAT_REG | ( | pipe | ) | (0xb004 + REG_OFFSET(pipe)) |
Definition at line 90 of file mdfld_dsi_output.h.
#define MIPI_LP_BYTECLK_REG | ( | pipe | ) | (0xb060 + REG_OFFSET(pipe)) |
Definition at line 113 of file mdfld_dsi_output.h.
#define MIPI_LP_GEN_CTRL_REG | ( | pipe | ) | (0xb06c + REG_OFFSET(pipe)) |
Definition at line 116 of file mdfld_dsi_output.h.
#define MIPI_LP_GEN_DATA_REG | ( | pipe | ) | (0xb064 + REG_OFFSET(pipe)) |
Definition at line 114 of file mdfld_dsi_output.h.
#define MIPI_LP_RX_TIMEOUT_REG | ( | pipe | ) | (0xb014 + REG_OFFSET(pipe)) |
Definition at line 94 of file mdfld_dsi_output.h.
#define MIPI_MAX_RETURN_PACK_SIZE_REG | ( | pipe | ) | (0xb054 + REG_OFFSET(pipe)) |
Definition at line 110 of file mdfld_dsi_output.h.
#define MIPI_PORT_CONTROL | ( | pipe | ) | (CHECK_PIPE(pipe) ? MIPI_C : MIPI) |
Definition at line 131 of file mdfld_dsi_output.h.
#define MIPI_TURN_AROUND_TIMEOUT_REG | ( | pipe | ) | (0xb018 + REG_OFFSET(pipe)) |
Definition at line 95 of file mdfld_dsi_output.h.
#define MIPI_VBP_COUNT_REG | ( | pipe | ) | (0xb03c + REG_OFFSET(pipe)) |
Definition at line 104 of file mdfld_dsi_output.h.
#define MIPI_VFP_COUNT_REG | ( | pipe | ) | (0xb040 + REG_OFFSET(pipe)) |
Definition at line 105 of file mdfld_dsi_output.h.
#define MIPI_VIDEO_MODE_FORMAT_REG | ( | pipe | ) | (0xb058 + REG_OFFSET(pipe)) |
Definition at line 111 of file mdfld_dsi_output.h.
#define MIPI_VSYNC_COUNT_REG | ( | pipe | ) | (0xb038 + REG_OFFSET(pipe)) |
Definition at line 103 of file mdfld_dsi_output.h.
Definition at line 69 of file mdfld_dsi_output.h.
#define REG_FLD_MOD | ( | reg, | |
val, | |||
start, | |||
end | |||
) | REG_WRITE(reg, FLD_MOD(REG_READ(reg), val, start, end)) |
Definition at line 50 of file mdfld_dsi_output.h.
Definition at line 66 of file mdfld_dsi_output.h.
#define REG_OFFSET | ( | pipe | ) | (CHECK_PIPE(pipe) * 0x400) |
Definition at line 86 of file mdfld_dsi_output.h.
anonymous enum |
MDFLD_DSI_VIDEO_NON_BURST_MODE_SYNC_PULSE | |
MDFLD_DSI_VIDEO_NON_BURST_MODE_SYNC_EVENTS | |
MDFLD_DSI_VIDEO_BURST_MODE |
Definition at line 220 of file mdfld_dsi_output.h.
void mdfld_dsi_brightness_control | ( | struct drm_device * | dev, |
int | pipe, | ||
int | level | ||
) |
Definition at line 129 of file mdfld_dsi_output.c.
void mdfld_dsi_brightness_init | ( | struct mdfld_dsi_config * | dsi_config, |
int | pipe | ||
) |
Manage the DSI MIPI keyboard and display brightness. FIXME: this is exported to OSPM code. should work out an specific display interface to OSPM.
Definition at line 91 of file mdfld_dsi_output.c.
void mdfld_dsi_controller_init | ( | struct mdfld_dsi_config * | dsi_config, |
int | pipe | ||
) |
Definition at line 212 of file mdfld_dsi_output.c.
void mdfld_dsi_gen_fifo_ready | ( | struct drm_device * | dev, |
u32 | gen_fifo_stat_reg, | ||
u32 | fifo_stat | ||
) |
Check and see if the generic control or data buffer is empty and ready.
Definition at line 66 of file mdfld_dsi_output.c.
int mdfld_dsi_get_power_mode | ( | struct mdfld_dsi_config * | dsi_config, |
u32 * | mode, | ||
bool | hs | ||
) |
Definition at line 197 of file mdfld_dsi_output.c.
void mdfld_dsi_output_init | ( | struct drm_device * | dev, |
int | pipe, | ||
const struct panel_funcs * | p_vid_funcs | ||
) |
Definition at line 495 of file mdfld_dsi_output.c.
Definition at line 448 of file mdfld_dsi_output.c.