#include <linux/dmi.h>
#include <linux/slab.h>
#include <drm/drm_atomic_helper.h>
#include <drm/drm_crtc.h>
#include <drm/drm_edid.h>
#include <drm/drm_mipi_dsi.h>
#include "i915_drv.h"
#include "i915_reg.h"
#include "intel_atomic.h"
#include "intel_backlight.h"
#include "intel_connector.h"
#include "intel_crtc.h"
#include "intel_de.h"
#include "intel_display_types.h"
#include "intel_dsi.h"
#include "intel_dsi_vbt.h"
#include "intel_fifo_underrun.h"
#include "intel_panel.h"
#include "skl_scaler.h"
#include "vlv_dsi.h"
#include "vlv_dsi_pll.h"
#include "vlv_dsi_regs.h"
#include "vlv_sideband.h"
static u16 txbyteclkhs(u16 pixels, int bpp, int lane_count,
u16 burst_mode_ratio)
{ … }
static u16 pixels_from_txbyteclkhs(u16 clk_hs, int bpp, int lane_count,
u16 burst_mode_ratio)
{ … }
enum mipi_dsi_pixel_format pixel_format_from_register_bits(u32 fmt)
{ … }
void vlv_dsi_wait_for_fifo_empty(struct intel_dsi *intel_dsi, enum port port)
{ … }
static void write_data(struct intel_display *display,
i915_reg_t reg,
const u8 *data, u32 len)
{ … }
static void read_data(struct intel_display *display,
i915_reg_t reg,
u8 *data, u32 len)
{ … }
static ssize_t intel_dsi_host_transfer(struct mipi_dsi_host *host,
const struct mipi_dsi_msg *msg)
{ … }
static int intel_dsi_host_attach(struct mipi_dsi_host *host,
struct mipi_dsi_device *dsi)
{ … }
static int intel_dsi_host_detach(struct mipi_dsi_host *host,
struct mipi_dsi_device *dsi)
{ … }
static const struct mipi_dsi_host_ops intel_dsi_host_ops = …;
static int dpi_send_cmd(struct intel_dsi *intel_dsi, u32 cmd, bool hs,
enum port port)
{ … }
static void band_gap_reset(struct drm_i915_private *dev_priv)
{ … }
static int intel_dsi_compute_config(struct intel_encoder *encoder,
struct intel_crtc_state *pipe_config,
struct drm_connector_state *conn_state)
{ … }
static bool glk_dsi_enable_io(struct intel_encoder *encoder)
{ … }
static void glk_dsi_device_ready(struct intel_encoder *encoder)
{ … }
static void bxt_dsi_device_ready(struct intel_encoder *encoder)
{ … }
static void vlv_dsi_device_ready(struct intel_encoder *encoder)
{ … }
static void intel_dsi_device_ready(struct intel_encoder *encoder)
{ … }
static void glk_dsi_enter_low_power_mode(struct intel_encoder *encoder)
{ … }
static void glk_dsi_disable_mipi_io(struct intel_encoder *encoder)
{ … }
static void glk_dsi_clear_device_ready(struct intel_encoder *encoder)
{ … }
static i915_reg_t port_ctrl_reg(struct drm_i915_private *i915, enum port port)
{ … }
static void vlv_dsi_clear_device_ready(struct intel_encoder *encoder)
{ … }
static void intel_dsi_port_enable(struct intel_encoder *encoder,
const struct intel_crtc_state *crtc_state)
{ … }
static void intel_dsi_port_disable(struct intel_encoder *encoder)
{ … }
static void intel_dsi_prepare(struct intel_encoder *encoder,
const struct intel_crtc_state *pipe_config);
static void intel_dsi_unprepare(struct intel_encoder *encoder);
static void intel_dsi_pre_enable(struct intel_atomic_state *state,
struct intel_encoder *encoder,
const struct intel_crtc_state *pipe_config,
const struct drm_connector_state *conn_state)
{ … }
static void bxt_dsi_enable(struct intel_atomic_state *state,
struct intel_encoder *encoder,
const struct intel_crtc_state *crtc_state,
const struct drm_connector_state *conn_state)
{ … }
static void intel_dsi_disable(struct intel_atomic_state *state,
struct intel_encoder *encoder,
const struct intel_crtc_state *old_crtc_state,
const struct drm_connector_state *old_conn_state)
{ … }
static void intel_dsi_clear_device_ready(struct intel_encoder *encoder)
{ … }
static void intel_dsi_post_disable(struct intel_atomic_state *state,
struct intel_encoder *encoder,
const struct intel_crtc_state *old_crtc_state,
const struct drm_connector_state *old_conn_state)
{ … }
static bool intel_dsi_get_hw_state(struct intel_encoder *encoder,
enum pipe *pipe)
{ … }
static void bxt_dsi_get_pipe_config(struct intel_encoder *encoder,
struct intel_crtc_state *pipe_config)
{ … }
static void intel_dsi_get_config(struct intel_encoder *encoder,
struct intel_crtc_state *pipe_config)
{ … }
static u16 txclkesc(u32 divider, unsigned int us)
{ … }
static void set_dsi_timings(struct intel_encoder *encoder,
const struct drm_display_mode *adjusted_mode)
{ … }
static u32 pixel_format_to_reg(enum mipi_dsi_pixel_format fmt)
{ … }
static void intel_dsi_prepare(struct intel_encoder *encoder,
const struct intel_crtc_state *pipe_config)
{ … }
static void intel_dsi_unprepare(struct intel_encoder *encoder)
{ … }
static const struct drm_encoder_funcs intel_dsi_funcs = …;
static enum drm_mode_status vlv_dsi_mode_valid(struct drm_connector *connector,
struct drm_display_mode *mode)
{ … }
static const struct drm_connector_helper_funcs intel_dsi_connector_helper_funcs = …;
static const struct drm_connector_funcs intel_dsi_connector_funcs = …;
static void vlv_dsi_add_properties(struct intel_connector *connector)
{ … }
#define NS_KHZ_RATIO …
#define PREPARE_CNT_MAX …
#define EXIT_ZERO_CNT_MAX …
#define CLK_ZERO_CNT_MAX …
#define TRAIL_CNT_MAX …
static void vlv_dphy_param_init(struct intel_dsi *intel_dsi)
{ … }
vlv_dsi_dmi_quirk_func;
static void vlv_dsi_asus_tf103c_mode_fixup(struct intel_dsi *intel_dsi)
{ … }
static void vlv_dsi_lenovo_yoga_tab2_size_fixup(struct intel_dsi *intel_dsi)
{ … }
static void vlv_dsi_lenovo_yoga_tab3_backlight_fixup(struct intel_dsi *intel_dsi)
{ … }
static const struct dmi_system_id vlv_dsi_dmi_quirk_table[] = …;
void vlv_dsi_init(struct drm_i915_private *dev_priv)
{ … }