Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 6083 → Rev 6084

/drivers/video/drm/i915/intel_dsi.h
26,58 → 26,30
 
#include <drm/drmP.h>
#include <drm/drm_crtc.h>
#include <drm/drm_mipi_dsi.h>
#include "intel_drv.h"
 
struct intel_dsi_device {
unsigned int panel_id;
const char *name;
const struct intel_dsi_dev_ops *dev_ops;
void *dev_priv;
};
/* Dual Link support */
#define DSI_DUAL_LINK_NONE 0
#define DSI_DUAL_LINK_FRONT_BACK 1
#define DSI_DUAL_LINK_PIXEL_ALT 2
 
struct intel_dsi_dev_ops {
bool (*init)(struct intel_dsi_device *dsi);
struct intel_dsi_host;
 
void (*panel_reset)(struct intel_dsi_device *dsi);
 
void (*disable_panel_power)(struct intel_dsi_device *dsi);
 
/* one time programmable commands if needed */
void (*send_otp_cmds)(struct intel_dsi_device *dsi);
 
/* This callback must be able to assume DSI commands can be sent */
void (*enable)(struct intel_dsi_device *dsi);
 
/* This callback must be able to assume DSI commands can be sent */
void (*disable)(struct intel_dsi_device *dsi);
 
int (*mode_valid)(struct intel_dsi_device *dsi,
struct drm_display_mode *mode);
 
bool (*mode_fixup)(struct intel_dsi_device *dsi,
const struct drm_display_mode *mode,
struct drm_display_mode *adjusted_mode);
 
void (*mode_set)(struct intel_dsi_device *dsi,
struct drm_display_mode *mode,
struct drm_display_mode *adjusted_mode);
 
enum drm_connector_status (*detect)(struct intel_dsi_device *dsi);
 
bool (*get_hw_state)(struct intel_dsi_device *dev);
 
struct drm_display_mode *(*get_modes)(struct intel_dsi_device *dsi);
 
void (*destroy) (struct intel_dsi_device *dsi);
};
 
struct intel_dsi {
struct intel_encoder base;
 
struct intel_dsi_device dev;
struct drm_panel *panel;
struct intel_dsi_host *dsi_hosts[I915_MAX_PORTS];
 
/* GPIO Desc for CRC based Panel control */
struct gpio_desc *gpio_panel;
 
struct intel_connector *attached_connector;
 
/* bit mask of ports being driven */
u16 ports;
 
/* if true, use HS mode, otherwise LP */
bool hs;
 
101,6 → 73,8
u8 clock_stop;
 
u8 escape_clk_div;
u8 dual_link;
u8 pixel_overlap;
u32 port_bits;
u32 bw_timer;
u32 dphy_reg;
127,15 → 101,36
u16 panel_pwr_cycle_delay;
};
 
struct intel_dsi_host {
struct mipi_dsi_host base;
struct intel_dsi *intel_dsi;
enum port port;
 
/* our little hack */
struct mipi_dsi_device *device;
};
 
static inline struct intel_dsi_host *to_intel_dsi_host(struct mipi_dsi_host *h)
{
return container_of(h, struct intel_dsi_host, base);
}
 
#define for_each_dsi_port(__port, __ports_mask) \
for ((__port) = PORT_A; (__port) < I915_MAX_PORTS; (__port)++) \
if ((__ports_mask) & (1 << (__port)))
 
static inline struct intel_dsi *enc_to_intel_dsi(struct drm_encoder *encoder)
{
return container_of(encoder, struct intel_dsi, base.base);
}
 
extern void vlv_enable_dsi_pll(struct intel_encoder *encoder);
extern void vlv_disable_dsi_pll(struct intel_encoder *encoder);
extern void intel_enable_dsi_pll(struct intel_encoder *encoder);
extern void intel_disable_dsi_pll(struct intel_encoder *encoder);
extern u32 vlv_get_dsi_pclk(struct intel_encoder *encoder, int pipe_bpp);
extern u32 bxt_get_dsi_pclk(struct intel_encoder *encoder, int pipe_bpp);
extern void intel_dsi_reset_clocks(struct intel_encoder *encoder,
enum port port);
 
extern struct intel_dsi_dev_ops vbt_generic_dsi_display_ops;
struct drm_panel *vbt_panel_init(struct intel_dsi *intel_dsi, u16 panel_id);
 
#endif /* _INTEL_DSI_H */