drm/i915: Move intel_dp->lane_count into pipe_config
[deliverable/linux.git] / drivers / gpu / drm / i915 / intel_drv.h
index 2c23900b491fd86326f1cbe6c365a15934e5c764..0a11041232e4f4df90581d3ffb59ed74cc0cadda 100644 (file)
@@ -130,15 +130,9 @@ struct intel_fbdev {
 
 struct intel_encoder {
        struct drm_encoder base;
-       /*
-        * The new crtc this encoder will be driven from. Only differs from
-        * base->crtc while a modeset is in progress.
-        */
-       struct intel_crtc *new_crtc;
 
        enum intel_output_type type;
        unsigned int cloneable;
-       bool connectors_active;
        void (*hot_plug)(struct intel_encoder *);
        bool (*compute_config)(struct intel_encoder *,
                               struct intel_crtc_state *);
@@ -182,6 +176,10 @@ struct intel_panel {
                bool enabled;
                bool combination_mode;  /* gen 2/4 only */
                bool active_low_pwm;
+
+               /* PWM chip */
+               struct pwm_device *pwm;
+
                struct backlight_device *device;
        } backlight;
 
@@ -195,12 +193,6 @@ struct intel_connector {
         */
        struct intel_encoder *encoder;
 
-       /*
-        * The new encoder this connector will be driven. Only differs from
-        * encoder while a modeset is in progress.
-        */
-       struct intel_encoder *new_encoder;
-
        /* Reads out the current hw, returning true if the connector is enabled
         * and active (i.e. dpms ON state). */
        bool (*get_hw_state)(struct intel_connector *);
@@ -328,6 +320,9 @@ struct intel_crtc_scaler_state {
        int scaler_id;
 };
 
+/* drm_mode->private_flags */
+#define I915_MODE_FLAG_INHERITED 1
+
 struct intel_crtc_state {
        struct drm_crtc_state base;
 
@@ -340,7 +335,6 @@ struct intel_crtc_state {
         * accordingly.
         */
 #define PIPE_CONFIG_QUIRK_MODE_SYNC_FLAGS      (1<<0) /* unreliable sync mode.flags */
-#define PIPE_CONFIG_QUIRK_INHERITED_MODE       (1<<1) /* mode inherited from firmware */
        unsigned long quirks;
 
        /* Pipe source size (ie. panel fitter input size)
@@ -429,6 +423,8 @@ struct intel_crtc_state {
        /* Used by SDVO (and if we ever fix it, HDMI). */
        unsigned pixel_multiplier;
 
+       uint8_t lane_count;
+
        /* Panel fitter controls for gen2-gen4 + VLV */
        struct {
                u32 control;
@@ -499,10 +495,6 @@ struct skl_pipe_wm {
  * and thus can't be run with interrupts disabled.
  */
 struct intel_crtc_atomic_commit {
-       /* vblank evasion */
-       bool evade;
-       unsigned start_vbl_count;
-
        /* Sleepable operations to perform before commit */
        bool wait_for_flips;
        bool disable_fbc;
@@ -550,7 +542,6 @@ struct intel_crtc {
        uint32_t cursor_base;
 
        struct intel_crtc_state *config;
-       bool new_enabled;
 
        /* reset counter value when the last flip was submitted */
        unsigned int reset_counter;
@@ -571,6 +562,7 @@ struct intel_crtc {
 
        int scanline_offset;
 
+       unsigned start_vbl_count;
        struct intel_crtc_atomic_commit atomic;
 
        /* scalers available on this crtc */
@@ -667,7 +659,7 @@ struct cxsr_latency {
 struct intel_hdmi {
        u32 hdmi_reg;
        int ddc_bus;
-       uint32_t color_range;
+       bool limited_color_range;
        bool color_range_auto;
        bool has_hdmi_sink;
        bool has_audio;
@@ -706,23 +698,29 @@ enum link_m_n_set {
        M2_N2
 };
 
+struct sink_crc {
+       bool started;
+       u8 last_crc[6];
+       int last_count;
+};
+
 struct intel_dp {
        uint32_t output_reg;
        uint32_t aux_ch_ctl_reg;
        uint32_t DP;
        bool has_audio;
        enum hdmi_force_audio force_audio;
-       uint32_t color_range;
+       bool limited_color_range;
        bool color_range_auto;
        uint8_t link_bw;
        uint8_t rate_select;
-       uint8_t lane_count;
        uint8_t dpcd[DP_RECEIVER_CAP_SIZE];
        uint8_t psr_dpcd[EDP_PSR_RECEIVER_CAP_SIZE];
        uint8_t downstream_ports[DP_MAX_DOWNSTREAM_PORTS];
        /* sink rates as reported by DP_SUPPORTED_LINK_RATES */
        uint8_t num_sink_rates;
        int sink_rates[DP_MAX_SUPPORTED_RATES];
+       struct sink_crc sink_crc;
        struct drm_dp_aux aux;
        uint8_t train_set[4];
        int panel_power_up_delay;
@@ -1000,15 +998,11 @@ int intel_pch_rawclk(struct drm_device *dev);
 void intel_mark_busy(struct drm_device *dev);
 void intel_mark_idle(struct drm_device *dev);
 void intel_crtc_restore_mode(struct drm_crtc *crtc);
-void intel_display_suspend(struct drm_device *dev);
-int intel_crtc_control(struct drm_crtc *crtc, bool enable);
-void intel_crtc_update_dpms(struct drm_crtc *crtc);
+int intel_display_suspend(struct drm_device *dev);
 void intel_encoder_destroy(struct drm_encoder *encoder);
 int intel_connector_init(struct intel_connector *);
 struct intel_connector *intel_connector_alloc(void);
-void intel_connector_dpms(struct drm_connector *, int mode);
 bool intel_connector_get_hw_state(struct intel_connector *connector);
-void intel_modeset_check_state(struct drm_device *dev);
 bool ibx_digital_port_connected(struct drm_i915_private *dev_priv,
                                struct intel_digital_port *port);
 void intel_connector_attach_encoder(struct intel_connector *connector,
@@ -1252,7 +1246,7 @@ void intel_fbc_invalidate(struct drm_i915_private *dev_priv,
                          unsigned int frontbuffer_bits,
                          enum fb_op_origin origin);
 void intel_fbc_flush(struct drm_i915_private *dev_priv,
-                    unsigned int frontbuffer_bits);
+                    unsigned int frontbuffer_bits, enum fb_op_origin origin);
 const char *intel_no_fbc_reason_str(enum no_fbc_reason reason);
 void intel_fbc_cleanup_cfb(struct drm_i915_private *dev_priv);
 
@@ -1397,7 +1391,7 @@ bool intel_sdvo_init(struct drm_device *dev, uint32_t sdvo_reg, bool is_sdvob);
 int intel_plane_init(struct drm_device *dev, enum pipe pipe, int plane);
 int intel_sprite_set_colorkey(struct drm_device *dev, void *data,
                              struct drm_file *file_priv);
-bool intel_pipe_update_start(struct intel_crtc *crtc,
+void intel_pipe_update_start(struct intel_crtc *crtc,
                             uint32_t *start_vbl_count);
 void intel_pipe_update_end(struct intel_crtc *crtc, u32 start_vbl_count);
 
@@ -1405,11 +1399,6 @@ void intel_pipe_update_end(struct intel_crtc *crtc, u32 start_vbl_count);
 void intel_tv_init(struct drm_device *dev);
 
 /* intel_atomic.c */
-int intel_atomic_check(struct drm_device *dev,
-                      struct drm_atomic_state *state);
-int intel_atomic_commit(struct drm_device *dev,
-                       struct drm_atomic_state *state,
-                       bool async);
 int intel_connector_atomic_get_property(struct drm_connector *connector,
                                        const struct drm_connector_state *state,
                                        struct drm_property *property,
This page took 0.026524 seconds and 5 git commands to generate.