drm/i915: Pass atomic state to encoder hooks
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 13 Mar 2020 16:48:30 +0000 (18:48 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 3 Apr 2020 16:49:57 +0000 (19:49 +0300)
We're going to want access to the atomic state for iterating
the slave crtcs when enabling the port sync master crtc. Pass
the atomic state all the way down.

The alternative would be yet another encoder hook which we'll
have to call after all the normal modeset stuff is done. Not
really a fan of yet another hook just for this.

Note that during readout state sanitation we are now going
to pass NULL as the atomic state since we don't have one.
We need to change that and then we can also s/crtc_state/crtc/
and s/conn_state/conn/ for the encoder hooks as well.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200313164831.5980-13-ville.syrjala@linux.intel.com
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
18 files changed:
drivers/gpu/drm/i915/display/icl_dsi.c
drivers/gpu/drm/i915/display/intel_crt.c
drivers/gpu/drm/i915/display/intel_ddi.c
drivers/gpu/drm/i915/display/intel_ddi.h
drivers/gpu/drm/i915/display/intel_display.c
drivers/gpu/drm/i915/display/intel_display_types.h
drivers/gpu/drm/i915/display/intel_dp.c
drivers/gpu/drm/i915/display/intel_dp_mst.c
drivers/gpu/drm/i915/display/intel_dvo.c
drivers/gpu/drm/i915/display/intel_hdcp.c
drivers/gpu/drm/i915/display/intel_hdcp.h
drivers/gpu/drm/i915/display/intel_hdmi.c
drivers/gpu/drm/i915/display/intel_lvds.c
drivers/gpu/drm/i915/display/intel_panel.c
drivers/gpu/drm/i915/display/intel_panel.h
drivers/gpu/drm/i915/display/intel_sdvo.c
drivers/gpu/drm/i915/display/intel_tv.c
drivers/gpu/drm/i915/display/vlv_dsi.c

index 5a83df2fd72306048c2c50a0d5a6671b1de37775..99a25c0bb08f3a6d6543530ae31c4f6f58cf1e6f 100644 (file)
@@ -1156,7 +1156,8 @@ static void gen11_dsi_powerup_panel(struct intel_encoder *encoder)
        wait_for_cmds_dispatched_to_panel(encoder);
 }
 
-static void gen11_dsi_pre_pll_enable(struct intel_encoder *encoder,
+static void gen11_dsi_pre_pll_enable(struct intel_atomic_state *state,
+                                    struct intel_encoder *encoder,
                                     const struct intel_crtc_state *crtc_state,
                                     const struct drm_connector_state *conn_state)
 {
@@ -1167,7 +1168,8 @@ static void gen11_dsi_pre_pll_enable(struct intel_encoder *encoder,
        gen11_dsi_program_esc_clk_div(encoder, crtc_state);
 }
 
-static void gen11_dsi_pre_enable(struct intel_encoder *encoder,
+static void gen11_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)
 {
@@ -1186,7 +1188,8 @@ static void gen11_dsi_pre_enable(struct intel_encoder *encoder,
        gen11_dsi_set_transcoder_timings(encoder, pipe_config);
 }
 
-static void gen11_dsi_enable(struct intel_encoder *encoder,
+static void gen11_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)
 {
@@ -1341,7 +1344,8 @@ static void gen11_dsi_disable_io_power(struct intel_encoder *encoder)
        }
 }
 
-static void gen11_dsi_disable(struct intel_encoder *encoder,
+static void gen11_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)
 {
@@ -1369,7 +1373,8 @@ static void gen11_dsi_disable(struct intel_encoder *encoder,
        gen11_dsi_disable_io_power(encoder);
 }
 
-static void gen11_dsi_post_disable(struct intel_encoder *encoder,
+static void gen11_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)
 {
index 78f9b6cde810148dbef367eff5693eb7646531d7..80c91404046f6faa92f445fece1fa9c4e77012ab 100644 (file)
@@ -203,27 +203,31 @@ static void intel_crt_set_dpms(struct intel_encoder *encoder,
        intel_de_write(dev_priv, crt->adpa_reg, adpa);
 }
 
-static void intel_disable_crt(struct intel_encoder *encoder,
+static void intel_disable_crt(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)
 {
        intel_crt_set_dpms(encoder, old_crtc_state, DRM_MODE_DPMS_OFF);
 }
 
-static void pch_disable_crt(struct intel_encoder *encoder,
+static void pch_disable_crt(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 pch_post_disable_crt(struct intel_encoder *encoder,
+static void pch_post_disable_crt(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)
 {
-       intel_disable_crt(encoder, old_crtc_state, old_conn_state);
+       intel_disable_crt(state, encoder, old_crtc_state, old_conn_state);
 }
 
-static void hsw_disable_crt(struct intel_encoder *encoder,
+static void hsw_disable_crt(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)
 {
@@ -234,7 +238,8 @@ static void hsw_disable_crt(struct intel_encoder *encoder,
        intel_set_pch_fifo_underrun_reporting(dev_priv, PIPE_A, false);
 }
 
-static void hsw_post_disable_crt(struct intel_encoder *encoder,
+static void hsw_post_disable_crt(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)
 {
@@ -250,19 +255,20 @@ static void hsw_post_disable_crt(struct intel_encoder *encoder,
 
        intel_ddi_disable_pipe_clock(old_crtc_state);
 
-       pch_post_disable_crt(encoder, old_crtc_state, old_conn_state);
+       pch_post_disable_crt(state, encoder, old_crtc_state, old_conn_state);
 
        lpt_disable_pch_transcoder(dev_priv);
        lpt_disable_iclkip(dev_priv);
 
-       intel_ddi_fdi_post_disable(encoder, old_crtc_state, old_conn_state);
+       intel_ddi_fdi_post_disable(state, encoder, old_crtc_state, old_conn_state);
 
        drm_WARN_ON(&dev_priv->drm, !old_crtc_state->has_pch_encoder);
 
        intel_set_pch_fifo_underrun_reporting(dev_priv, PIPE_A, true);
 }
 
-static void hsw_pre_pll_enable_crt(struct intel_encoder *encoder,
+static void hsw_pre_pll_enable_crt(struct intel_atomic_state *state,
+                                  struct intel_encoder *encoder,
                                   const struct intel_crtc_state *crtc_state,
                                   const struct drm_connector_state *conn_state)
 {
@@ -273,7 +279,8 @@ static void hsw_pre_pll_enable_crt(struct intel_encoder *encoder,
        intel_set_pch_fifo_underrun_reporting(dev_priv, PIPE_A, false);
 }
 
-static void hsw_pre_enable_crt(struct intel_encoder *encoder,
+static void hsw_pre_enable_crt(struct intel_atomic_state *state,
+                              struct intel_encoder *encoder,
                               const struct intel_crtc_state *crtc_state,
                               const struct drm_connector_state *conn_state)
 {
@@ -290,7 +297,8 @@ static void hsw_pre_enable_crt(struct intel_encoder *encoder,
        intel_ddi_enable_pipe_clock(crtc_state);
 }
 
-static void hsw_enable_crt(struct intel_encoder *encoder,
+static void hsw_enable_crt(struct intel_atomic_state *state,
+                          struct intel_encoder *encoder,
                           const struct intel_crtc_state *crtc_state,
                           const struct drm_connector_state *conn_state)
 {
@@ -314,7 +322,8 @@ static void hsw_enable_crt(struct intel_encoder *encoder,
        intel_set_pch_fifo_underrun_reporting(dev_priv, PIPE_A, true);
 }
 
-static void intel_enable_crt(struct intel_encoder *encoder,
+static void intel_enable_crt(struct intel_atomic_state *state,
+                            struct intel_encoder *encoder,
                             const struct intel_crtc_state *crtc_state,
                             const struct drm_connector_state *conn_state)
 {
index c51d2bc5a410f1633d01aeaeaa8b58deeb6842e6..dd6fe4645a98f51a6aac8cc81782154df07f6121 100644 (file)
@@ -3089,7 +3089,8 @@ static void intel_ddi_disable_fec_state(struct intel_encoder *encoder,
        intel_de_posting_read(dev_priv, intel_dp->regs.dp_tp_ctl);
 }
 
-static void tgl_ddi_pre_enable_dp(struct intel_encoder *encoder,
+static void tgl_ddi_pre_enable_dp(struct intel_atomic_state *state,
+                                 struct intel_encoder *encoder,
                                  const struct intel_crtc_state *crtc_state,
                                  const struct drm_connector_state *conn_state)
 {
@@ -3229,7 +3230,8 @@ static void tgl_ddi_pre_enable_dp(struct intel_encoder *encoder,
        intel_dsc_enable(encoder, crtc_state);
 }
 
-static void hsw_ddi_pre_enable_dp(struct intel_encoder *encoder,
+static void hsw_ddi_pre_enable_dp(struct intel_atomic_state *state,
+                                 struct intel_encoder *encoder,
                                  const struct intel_crtc_state *crtc_state,
                                  const struct drm_connector_state *conn_state)
 {
@@ -3302,16 +3304,17 @@ static void hsw_ddi_pre_enable_dp(struct intel_encoder *encoder,
        intel_dsc_enable(encoder, crtc_state);
 }
 
-static void intel_ddi_pre_enable_dp(struct intel_encoder *encoder,
+static void intel_ddi_pre_enable_dp(struct intel_atomic_state *state,
+                                   struct intel_encoder *encoder,
                                    const struct intel_crtc_state *crtc_state,
                                    const struct drm_connector_state *conn_state)
 {
        struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
 
        if (INTEL_GEN(dev_priv) >= 12)
-               tgl_ddi_pre_enable_dp(encoder, crtc_state, conn_state);
+               tgl_ddi_pre_enable_dp(state, encoder, crtc_state, conn_state);
        else
-               hsw_ddi_pre_enable_dp(encoder, crtc_state, conn_state);
+               hsw_ddi_pre_enable_dp(state, encoder, crtc_state, conn_state);
 
        /* MST will call a setting of MSA after an allocating of Virtual Channel
         * from MST encoder pre_enable callback.
@@ -3323,7 +3326,8 @@ static void intel_ddi_pre_enable_dp(struct intel_encoder *encoder,
        }
 }
 
-static void intel_ddi_pre_enable_hdmi(struct intel_encoder *encoder,
+static void intel_ddi_pre_enable_hdmi(struct intel_atomic_state *state,
+                                     struct intel_encoder *encoder,
                                      const struct intel_crtc_state *crtc_state,
                                      const struct drm_connector_state *conn_state)
 {
@@ -3363,7 +3367,8 @@ static void intel_ddi_pre_enable_hdmi(struct intel_encoder *encoder,
                                       crtc_state, conn_state);
 }
 
-static void intel_ddi_pre_enable(struct intel_encoder *encoder,
+static void intel_ddi_pre_enable(struct intel_atomic_state *state,
+                                struct intel_encoder *encoder,
                                 const struct intel_crtc_state *crtc_state,
                                 const struct drm_connector_state *conn_state)
 {
@@ -3392,12 +3397,14 @@ static void intel_ddi_pre_enable(struct intel_encoder *encoder,
        intel_set_cpu_fifo_underrun_reporting(dev_priv, pipe, true);
 
        if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_HDMI)) {
-               intel_ddi_pre_enable_hdmi(encoder, crtc_state, conn_state);
+               intel_ddi_pre_enable_hdmi(state, encoder, crtc_state,
+                                         conn_state);
        } else {
                struct intel_lspcon *lspcon =
                                enc_to_intel_lspcon(encoder);
 
-               intel_ddi_pre_enable_dp(encoder, crtc_state, conn_state);
+               intel_ddi_pre_enable_dp(state, encoder, crtc_state,
+                                       conn_state);
                if (lspcon->active) {
                        struct intel_digital_port *dig_port =
                                        enc_to_dig_port(encoder);
@@ -3440,7 +3447,8 @@ static void intel_disable_ddi_buf(struct intel_encoder *encoder,
                intel_wait_ddi_buf_idle(dev_priv, port);
 }
 
-static void intel_ddi_post_disable_dp(struct intel_encoder *encoder,
+static void intel_ddi_post_disable_dp(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)
 {
@@ -3496,7 +3504,8 @@ static void intel_ddi_post_disable_dp(struct intel_encoder *encoder,
        intel_ddi_clk_disable(encoder);
 }
 
-static void intel_ddi_post_disable_hdmi(struct intel_encoder *encoder,
+static void intel_ddi_post_disable_hdmi(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)
 {
@@ -3519,7 +3528,8 @@ static void intel_ddi_post_disable_hdmi(struct intel_encoder *encoder,
        intel_dp_dual_mode_set_tmds_output(intel_hdmi, false);
 }
 
-static void intel_ddi_post_disable(struct intel_encoder *encoder,
+static void intel_ddi_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)
 {
@@ -3557,11 +3567,11 @@ static void intel_ddi_post_disable(struct intel_encoder *encoder,
         */
 
        if (intel_crtc_has_type(old_crtc_state, INTEL_OUTPUT_HDMI))
-               intel_ddi_post_disable_hdmi(encoder,
-                                           old_crtc_state, old_conn_state);
+               intel_ddi_post_disable_hdmi(state, encoder, old_crtc_state,
+                                           old_conn_state);
        else
-               intel_ddi_post_disable_dp(encoder,
-                                         old_crtc_state, old_conn_state);
+               intel_ddi_post_disable_dp(state, encoder, old_crtc_state,
+                                         old_conn_state);
 
        if (INTEL_GEN(dev_priv) >= 11)
                icl_unmap_plls_to_ports(encoder);
@@ -3574,7 +3584,8 @@ static void intel_ddi_post_disable(struct intel_encoder *encoder,
                intel_tc_port_put_link(dig_port);
 }
 
-void intel_ddi_fdi_post_disable(struct intel_encoder *encoder,
+void intel_ddi_fdi_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)
 {
@@ -3608,7 +3619,8 @@ void intel_ddi_fdi_post_disable(struct intel_encoder *encoder,
        intel_de_write(dev_priv, FDI_RX_CTL(PIPE_A), val);
 }
 
-static void intel_enable_ddi_dp(struct intel_encoder *encoder,
+static void intel_enable_ddi_dp(struct intel_atomic_state *state,
+                               struct intel_encoder *encoder,
                                const struct intel_crtc_state *crtc_state,
                                const struct drm_connector_state *conn_state)
 {
@@ -3649,7 +3661,8 @@ gen9_chicken_trans_reg_by_port(struct drm_i915_private *dev_priv,
        return CHICKEN_TRANS(trans[port]);
 }
 
-static void intel_enable_ddi_hdmi(struct intel_encoder *encoder,
+static void intel_enable_ddi_hdmi(struct intel_atomic_state *state,
+                                 struct intel_encoder *encoder,
                                  const struct intel_crtc_state *crtc_state,
                                  const struct drm_connector_state *conn_state)
 {
@@ -3711,7 +3724,8 @@ static void intel_enable_ddi_hdmi(struct intel_encoder *encoder,
                intel_audio_codec_enable(encoder, crtc_state, conn_state);
 }
 
-static void intel_enable_ddi(struct intel_encoder *encoder,
+static void intel_enable_ddi(struct intel_atomic_state *state,
+                            struct intel_encoder *encoder,
                             const struct intel_crtc_state *crtc_state,
                             const struct drm_connector_state *conn_state)
 {
@@ -3722,9 +3736,9 @@ static void intel_enable_ddi(struct intel_encoder *encoder,
        intel_crtc_vblank_on(crtc_state);
 
        if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_HDMI))
-               intel_enable_ddi_hdmi(encoder, crtc_state, conn_state);
+               intel_enable_ddi_hdmi(state, encoder, crtc_state, conn_state);
        else
-               intel_enable_ddi_dp(encoder, crtc_state, conn_state);
+               intel_enable_ddi_dp(state, encoder, crtc_state, conn_state);
 
        /* Enable hdcp if it's desired */
        if (conn_state->content_protection ==
@@ -3734,7 +3748,8 @@ static void intel_enable_ddi(struct intel_encoder *encoder,
                                  (u8)conn_state->hdcp_content_type);
 }
 
-static void intel_disable_ddi_dp(struct intel_encoder *encoder,
+static void intel_disable_ddi_dp(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)
 {
@@ -3754,7 +3769,8 @@ static void intel_disable_ddi_dp(struct intel_encoder *encoder,
                                              false);
 }
 
-static void intel_disable_ddi_hdmi(struct intel_encoder *encoder,
+static void intel_disable_ddi_hdmi(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)
 {
@@ -3772,19 +3788,23 @@ static void intel_disable_ddi_hdmi(struct intel_encoder *encoder,
                            connector->base.id, connector->name);
 }
 
-static void intel_disable_ddi(struct intel_encoder *encoder,
+static void intel_disable_ddi(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)
 {
        intel_hdcp_disable(to_intel_connector(old_conn_state->connector));
 
        if (intel_crtc_has_type(old_crtc_state, INTEL_OUTPUT_HDMI))
-               intel_disable_ddi_hdmi(encoder, old_crtc_state, old_conn_state);
+               intel_disable_ddi_hdmi(state, encoder, old_crtc_state,
+                                      old_conn_state);
        else
-               intel_disable_ddi_dp(encoder, old_crtc_state, old_conn_state);
+               intel_disable_ddi_dp(state, encoder, old_crtc_state,
+                                    old_conn_state);
 }
 
-static void intel_ddi_update_pipe_dp(struct intel_encoder *encoder,
+static void intel_ddi_update_pipe_dp(struct intel_atomic_state *state,
+                                    struct intel_encoder *encoder,
                                     const struct intel_crtc_state *crtc_state,
                                     const struct drm_connector_state *conn_state)
 {
@@ -3795,18 +3815,20 @@ static void intel_ddi_update_pipe_dp(struct intel_encoder *encoder,
        intel_psr_update(intel_dp, crtc_state);
        intel_edp_drrs_enable(intel_dp, crtc_state);
 
-       intel_panel_update_backlight(encoder, crtc_state, conn_state);
+       intel_panel_update_backlight(state, encoder, crtc_state, conn_state);
 }
 
-static void intel_ddi_update_pipe(struct intel_encoder *encoder,
+static void intel_ddi_update_pipe(struct intel_atomic_state *state,
+                                 struct intel_encoder *encoder,
                                  const struct intel_crtc_state *crtc_state,
                                  const struct drm_connector_state *conn_state)
 {
 
        if (!intel_crtc_has_type(crtc_state, INTEL_OUTPUT_HDMI))
-               intel_ddi_update_pipe_dp(encoder, crtc_state, conn_state);
+               intel_ddi_update_pipe_dp(state, encoder, crtc_state,
+                                        conn_state);
 
-       intel_hdcp_update_pipe(encoder, crtc_state, conn_state);
+       intel_hdcp_update_pipe(state, encoder, crtc_state, conn_state);
 }
 
 static void
@@ -3835,7 +3857,8 @@ intel_ddi_update_complete(struct intel_atomic_state *state,
 }
 
 static void
-intel_ddi_pre_pll_enable(struct intel_encoder *encoder,
+intel_ddi_pre_pll_enable(struct intel_atomic_state *state,
+                        struct intel_encoder *encoder,
                         const struct intel_crtc_state *crtc_state,
                         const struct drm_connector_state *conn_state)
 {
index 55fd72b901fe4c79ae760461449e412477784e27..de4cd877c0024225718ba965950f5854e80b7b30 100644 (file)
@@ -17,7 +17,8 @@ struct intel_dp;
 struct intel_dpll_hw_state;
 struct intel_encoder;
 
-void intel_ddi_fdi_post_disable(struct intel_encoder *intel_encoder,
+void intel_ddi_fdi_post_disable(struct intel_atomic_state *state,
+                               struct intel_encoder *intel_encoder,
                                const struct intel_crtc_state *old_crtc_state,
                                const struct drm_connector_state *old_conn_state);
 void hsw_fdi_link_train(struct intel_encoder *encoder,
index 0557fc2a94c84ea0c6c5442adbe6eb5923c93236..af23b89ae9c17368061a7e5e241c12d1a0cb1d85 100644 (file)
@@ -6689,7 +6689,8 @@ static void intel_encoders_pre_pll_enable(struct intel_atomic_state *state,
                        continue;
 
                if (encoder->pre_pll_enable)
-                       encoder->pre_pll_enable(encoder, crtc_state, conn_state);
+                       encoder->pre_pll_enable(state, encoder,
+                                               crtc_state, conn_state);
        }
 }
 
@@ -6710,7 +6711,8 @@ static void intel_encoders_pre_enable(struct intel_atomic_state *state,
                        continue;
 
                if (encoder->pre_enable)
-                       encoder->pre_enable(encoder, crtc_state, conn_state);
+                       encoder->pre_enable(state, encoder,
+                                           crtc_state, conn_state);
        }
 }
 
@@ -6731,7 +6733,8 @@ static void intel_encoders_enable(struct intel_atomic_state *state,
                        continue;
 
                if (encoder->enable)
-                       encoder->enable(encoder, crtc_state, conn_state);
+                       encoder->enable(state, encoder,
+                                       crtc_state, conn_state);
                intel_opregion_notify_encoder(encoder, true);
        }
 }
@@ -6754,7 +6757,8 @@ static void intel_encoders_disable(struct intel_atomic_state *state,
 
                intel_opregion_notify_encoder(encoder, false);
                if (encoder->disable)
-                       encoder->disable(encoder, old_crtc_state, old_conn_state);
+                       encoder->disable(state, encoder,
+                                        old_crtc_state, old_conn_state);
        }
 }
 
@@ -6775,7 +6779,8 @@ static void intel_encoders_post_disable(struct intel_atomic_state *state,
                        continue;
 
                if (encoder->post_disable)
-                       encoder->post_disable(encoder, old_crtc_state, old_conn_state);
+                       encoder->post_disable(state, encoder,
+                                             old_crtc_state, old_conn_state);
        }
 }
 
@@ -6796,7 +6801,8 @@ static void intel_encoders_post_pll_disable(struct intel_atomic_state *state,
                        continue;
 
                if (encoder->post_pll_disable)
-                       encoder->post_pll_disable(encoder, old_crtc_state, old_conn_state);
+                       encoder->post_pll_disable(state, encoder,
+                                                 old_crtc_state, old_conn_state);
        }
 }
 
@@ -6817,7 +6823,8 @@ static void intel_encoders_update_pipe(struct intel_atomic_state *state,
                        continue;
 
                if (encoder->update_pipe)
-                       encoder->update_pipe(encoder, crtc_state, conn_state);
+                       encoder->update_pipe(state, encoder,
+                                            crtc_state, conn_state);
        }
 }
 
@@ -18126,11 +18133,12 @@ static void intel_sanitize_encoder(struct intel_encoder *encoder)
                        best_encoder = connector->base.state->best_encoder;
                        connector->base.state->best_encoder = &encoder->base;
 
+                       /* FIXME NULL atomic state passed! */
                        if (encoder->disable)
-                               encoder->disable(encoder, crtc_state,
+                               encoder->disable(NULL, encoder, crtc_state,
                                                 connector->base.state);
                        if (encoder->post_disable)
-                               encoder->post_disable(encoder, crtc_state,
+                               encoder->post_disable(NULL, encoder, crtc_state,
                                                      connector->base.state);
 
                        connector->base.state->best_encoder = best_encoder;
index 176ab5f1e86790e0444c9ec4b3fdf332517f1541..2bedd626c686d877af812419b12acd430be1d17e 100644 (file)
@@ -146,28 +146,35 @@ struct intel_encoder {
        void (*update_prepare)(struct intel_atomic_state *,
                               struct intel_encoder *,
                               struct intel_crtc *);
-       void (*pre_pll_enable)(struct intel_encoder *,
+       void (*pre_pll_enable)(struct intel_atomic_state *,
+                              struct intel_encoder *,
                               const struct intel_crtc_state *,
                               const struct drm_connector_state *);
-       void (*pre_enable)(struct intel_encoder *,
+       void (*pre_enable)(struct intel_atomic_state *,
+                          struct intel_encoder *,
                           const struct intel_crtc_state *,
                           const struct drm_connector_state *);
-       void (*enable)(struct intel_encoder *,
+       void (*enable)(struct intel_atomic_state *,
+                      struct intel_encoder *,
                       const struct intel_crtc_state *,
                       const struct drm_connector_state *);
        void (*update_complete)(struct intel_atomic_state *,
                                struct intel_encoder *,
                                struct intel_crtc *);
-       void (*disable)(struct intel_encoder *,
+       void (*disable)(struct intel_atomic_state *,
+                       struct intel_encoder *,
                        const struct intel_crtc_state *,
                        const struct drm_connector_state *);
-       void (*post_disable)(struct intel_encoder *,
+       void (*post_disable)(struct intel_atomic_state *,
+                            struct intel_encoder *,
                             const struct intel_crtc_state *,
                             const struct drm_connector_state *);
-       void (*post_pll_disable)(struct intel_encoder *,
+       void (*post_pll_disable)(struct intel_atomic_state *,
+                                struct intel_encoder *,
                                 const struct intel_crtc_state *,
                                 const struct drm_connector_state *);
-       void (*update_pipe)(struct intel_encoder *,
+       void (*update_pipe)(struct intel_atomic_state *,
+                           struct intel_encoder *,
                            const struct intel_crtc_state *,
                            const struct drm_connector_state *);
        /* Read out the current hw state of this connector, returning true if
index a963f6abf76461e46379b97046794befaf28afdf..db6ae8e9af6e91bff62ea4b3317777a6d2f17d72 100644 (file)
@@ -3530,7 +3530,8 @@ static void intel_dp_get_config(struct intel_encoder *encoder,
        }
 }
 
-static void intel_disable_dp(struct intel_encoder *encoder,
+static void intel_disable_dp(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)
 {
@@ -3550,21 +3551,24 @@ static void intel_disable_dp(struct intel_encoder *encoder,
        intel_edp_panel_off(intel_dp);
 }
 
-static void g4x_disable_dp(struct intel_encoder *encoder,
+static void g4x_disable_dp(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)
 {
-       intel_disable_dp(encoder, old_crtc_state, old_conn_state);
+       intel_disable_dp(state, encoder, old_crtc_state, old_conn_state);
 }
 
-static void vlv_disable_dp(struct intel_encoder *encoder,
+static void vlv_disable_dp(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)
 {
-       intel_disable_dp(encoder, old_crtc_state, old_conn_state);
+       intel_disable_dp(state, encoder, old_crtc_state, old_conn_state);
 }
 
-static void g4x_post_disable_dp(struct intel_encoder *encoder,
+static void g4x_post_disable_dp(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)
 {
@@ -3584,14 +3588,16 @@ static void g4x_post_disable_dp(struct intel_encoder *encoder,
                ilk_edp_pll_off(intel_dp, old_crtc_state);
 }
 
-static void vlv_post_disable_dp(struct intel_encoder *encoder,
+static void vlv_post_disable_dp(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)
 {
        intel_dp_link_down(encoder, old_crtc_state);
 }
 
-static void chv_post_disable_dp(struct intel_encoder *encoder,
+static void chv_post_disable_dp(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)
 {
@@ -3717,7 +3723,8 @@ static void intel_dp_enable_port(struct intel_dp *intel_dp,
        intel_de_posting_read(dev_priv, intel_dp->output_reg);
 }
 
-static void intel_enable_dp(struct intel_encoder *encoder,
+static void intel_enable_dp(struct intel_atomic_state *state,
+                           struct intel_encoder *encoder,
                            const struct intel_crtc_state *pipe_config,
                            const struct drm_connector_state *conn_state)
 {
@@ -3763,22 +3770,25 @@ static void intel_enable_dp(struct intel_encoder *encoder,
        }
 }
 
-static void g4x_enable_dp(struct intel_encoder *encoder,
+static void g4x_enable_dp(struct intel_atomic_state *state,
+                         struct intel_encoder *encoder,
                          const struct intel_crtc_state *pipe_config,
                          const struct drm_connector_state *conn_state)
 {
-       intel_enable_dp(encoder, pipe_config, conn_state);
+       intel_enable_dp(state, encoder, pipe_config, conn_state);
        intel_edp_backlight_on(pipe_config, conn_state);
 }
 
-static void vlv_enable_dp(struct intel_encoder *encoder,
+static void vlv_enable_dp(struct intel_atomic_state *state,
+                         struct intel_encoder *encoder,
                          const struct intel_crtc_state *pipe_config,
                          const struct drm_connector_state *conn_state)
 {
        intel_edp_backlight_on(pipe_config, conn_state);
 }
 
-static void g4x_pre_enable_dp(struct intel_encoder *encoder,
+static void g4x_pre_enable_dp(struct intel_atomic_state *state,
+                             struct intel_encoder *encoder,
                              const struct intel_crtc_state *pipe_config,
                              const struct drm_connector_state *conn_state)
 {
@@ -3898,16 +3908,18 @@ static void vlv_init_panel_power_sequencer(struct intel_encoder *encoder,
        intel_dp_init_panel_power_sequencer_registers(intel_dp, true);
 }
 
-static void vlv_pre_enable_dp(struct intel_encoder *encoder,
+static void vlv_pre_enable_dp(struct intel_atomic_state *state,
+                             struct intel_encoder *encoder,
                              const struct intel_crtc_state *pipe_config,
                              const struct drm_connector_state *conn_state)
 {
        vlv_phy_pre_encoder_enable(encoder, pipe_config);
 
-       intel_enable_dp(encoder, pipe_config, conn_state);
+       intel_enable_dp(state, encoder, pipe_config, conn_state);
 }
 
-static void vlv_dp_pre_pll_enable(struct intel_encoder *encoder,
+static void vlv_dp_pre_pll_enable(struct intel_atomic_state *state,
+                                 struct intel_encoder *encoder,
                                  const struct intel_crtc_state *pipe_config,
                                  const struct drm_connector_state *conn_state)
 {
@@ -3916,19 +3928,21 @@ static void vlv_dp_pre_pll_enable(struct intel_encoder *encoder,
        vlv_phy_pre_pll_enable(encoder, pipe_config);
 }
 
-static void chv_pre_enable_dp(struct intel_encoder *encoder,
+static void chv_pre_enable_dp(struct intel_atomic_state *state,
+                             struct intel_encoder *encoder,
                              const struct intel_crtc_state *pipe_config,
                              const struct drm_connector_state *conn_state)
 {
        chv_phy_pre_encoder_enable(encoder, pipe_config);
 
-       intel_enable_dp(encoder, pipe_config, conn_state);
+       intel_enable_dp(state, encoder, pipe_config, conn_state);
 
        /* Second common lane will stay alive on its own now */
        chv_phy_release_cl2_override(encoder);
 }
 
-static void chv_dp_pre_pll_enable(struct intel_encoder *encoder,
+static void chv_dp_pre_pll_enable(struct intel_atomic_state *state,
+                                 struct intel_encoder *encoder,
                                  const struct intel_crtc_state *pipe_config,
                                  const struct drm_connector_state *conn_state)
 {
@@ -3937,7 +3951,8 @@ static void chv_dp_pre_pll_enable(struct intel_encoder *encoder,
        chv_phy_pre_pll_enable(encoder, pipe_config);
 }
 
-static void chv_dp_post_pll_disable(struct intel_encoder *encoder,
+static void chv_dp_post_pll_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)
 {
index b7db058fae158fb76951da8710ee714d3b60b630..76ec2632f8de2bde5ec4fcf20158461f44e84fbd 100644 (file)
@@ -318,7 +318,8 @@ intel_dp_mst_atomic_check(struct drm_connector *connector,
        return ret;
 }
 
-static void intel_mst_disable_dp(struct intel_encoder *encoder,
+static void intel_mst_disable_dp(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)
 {
@@ -344,7 +345,8 @@ static void intel_mst_disable_dp(struct intel_encoder *encoder,
                                          old_crtc_state, old_conn_state);
 }
 
-static void intel_mst_post_disable_dp(struct intel_encoder *encoder,
+static void intel_mst_post_disable_dp(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)
 {
@@ -410,14 +412,15 @@ static void intel_mst_post_disable_dp(struct intel_encoder *encoder,
 
        intel_mst->connector = NULL;
        if (last_mst_stream)
-               intel_dig_port->base.post_disable(&intel_dig_port->base,
+               intel_dig_port->base.post_disable(state, &intel_dig_port->base,
                                                  old_crtc_state, NULL);
 
        drm_dbg_kms(&dev_priv->drm, "active links %d\n",
                    intel_dp->active_mst_links);
 }
 
-static void intel_mst_pre_pll_enable_dp(struct intel_encoder *encoder,
+static void intel_mst_pre_pll_enable_dp(struct intel_atomic_state *state,
+                                       struct intel_encoder *encoder,
                                        const struct intel_crtc_state *pipe_config,
                                        const struct drm_connector_state *conn_state)
 {
@@ -426,11 +429,12 @@ static void intel_mst_pre_pll_enable_dp(struct intel_encoder *encoder,
        struct intel_dp *intel_dp = &intel_dig_port->dp;
 
        if (intel_dp->active_mst_links == 0)
-               intel_dig_port->base.pre_pll_enable(&intel_dig_port->base,
+               intel_dig_port->base.pre_pll_enable(state, &intel_dig_port->base,
                                                    pipe_config, NULL);
 }
 
-static void intel_mst_pre_enable_dp(struct intel_encoder *encoder,
+static void intel_mst_pre_enable_dp(struct intel_atomic_state *state,
+                                   struct intel_encoder *encoder,
                                    const struct intel_crtc_state *pipe_config,
                                    const struct drm_connector_state *conn_state)
 {
@@ -463,7 +467,7 @@ static void intel_mst_pre_enable_dp(struct intel_encoder *encoder,
        drm_dp_send_power_updown_phy(&intel_dp->mst_mgr, connector->port, true);
 
        if (first_mst_stream)
-               intel_dig_port->base.pre_enable(&intel_dig_port->base,
+               intel_dig_port->base.pre_enable(state, &intel_dig_port->base,
                                                pipe_config, NULL);
 
        ret = drm_dp_mst_allocate_vcpi(&intel_dp->mst_mgr,
@@ -494,7 +498,8 @@ static void intel_mst_pre_enable_dp(struct intel_encoder *encoder,
        intel_dp_set_m_n(pipe_config, M1_N1);
 }
 
-static void intel_mst_enable_dp(struct intel_encoder *encoder,
+static void intel_mst_enable_dp(struct intel_atomic_state *state,
+                               struct intel_encoder *encoder,
                                const struct intel_crtc_state *pipe_config,
                                const struct drm_connector_state *conn_state)
 {
index 341d5ce8b062adf318a77599a3678dec752285de..5cd09034519b3475d014f92fc3a9733e25b5ec5f 100644 (file)
@@ -183,7 +183,8 @@ static void intel_dvo_get_config(struct intel_encoder *encoder,
        pipe_config->hw.adjusted_mode.crtc_clock = pipe_config->port_clock;
 }
 
-static void intel_disable_dvo(struct intel_encoder *encoder,
+static void intel_disable_dvo(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)
 {
@@ -197,7 +198,8 @@ static void intel_disable_dvo(struct intel_encoder *encoder,
        intel_de_read(dev_priv, dvo_reg);
 }
 
-static void intel_enable_dvo(struct intel_encoder *encoder,
+static void intel_enable_dvo(struct intel_atomic_state *state,
+                            struct intel_encoder *encoder,
                             const struct intel_crtc_state *pipe_config,
                             const struct drm_connector_state *conn_state)
 {
@@ -272,7 +274,8 @@ static int intel_dvo_compute_config(struct intel_encoder *encoder,
        return 0;
 }
 
-static void intel_dvo_pre_enable(struct intel_encoder *encoder,
+static void intel_dvo_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)
 {
index cd3b686980b200a82e07ac0efa979e129d9f8195..d3ad10653b2e0cb6091c2cd41b2130462f6e2c98 100644 (file)
@@ -2076,7 +2076,8 @@ int intel_hdcp_disable(struct intel_connector *connector)
        return ret;
 }
 
-void intel_hdcp_update_pipe(struct intel_encoder *encoder,
+void intel_hdcp_update_pipe(struct intel_atomic_state *state,
+                           struct intel_encoder *encoder,
                            const struct intel_crtc_state *crtc_state,
                            const struct drm_connector_state *conn_state)
 {
index 7c12ad609b1fe47f1ae35408797b54c91235a0d8..86bbaec120cc30569510387017a95a63720e323a 100644 (file)
@@ -11,6 +11,7 @@
 struct drm_connector;
 struct drm_connector_state;
 struct drm_i915_private;
+struct intel_atomic_state;
 struct intel_connector;
 struct intel_crtc_state;
 struct intel_encoder;
@@ -26,7 +27,8 @@ int intel_hdcp_init(struct intel_connector *connector,
 int intel_hdcp_enable(struct intel_connector *connector,
                      enum transcoder cpu_transcoder, u8 content_type);
 int intel_hdcp_disable(struct intel_connector *connector);
-void intel_hdcp_update_pipe(struct intel_encoder *encoder,
+void intel_hdcp_update_pipe(struct intel_atomic_state *state,
+                           struct intel_encoder *encoder,
                            const struct intel_crtc_state *crtc_state,
                            const struct drm_connector_state *conn_state);
 bool is_hdcp_supported(struct drm_i915_private *dev_priv, enum port port);
index 0076abc63851e53e7a170ae5204c630aeca78d3f..7e37b7fdefe6da4800c572ba3a4b35f547975a7e 100644 (file)
@@ -1912,7 +1912,8 @@ static void intel_enable_hdmi_audio(struct intel_encoder *encoder,
        intel_audio_codec_enable(encoder, pipe_config, conn_state);
 }
 
-static void g4x_enable_hdmi(struct intel_encoder *encoder,
+static void g4x_enable_hdmi(struct intel_atomic_state *state,
+                           struct intel_encoder *encoder,
                            const struct intel_crtc_state *pipe_config,
                            const struct drm_connector_state *conn_state)
 {
@@ -1934,7 +1935,8 @@ static void g4x_enable_hdmi(struct intel_encoder *encoder,
                intel_enable_hdmi_audio(encoder, pipe_config, conn_state);
 }
 
-static void ibx_enable_hdmi(struct intel_encoder *encoder,
+static void ibx_enable_hdmi(struct intel_atomic_state *state,
+                           struct intel_encoder *encoder,
                            const struct intel_crtc_state *pipe_config,
                            const struct drm_connector_state *conn_state)
 {
@@ -1985,7 +1987,8 @@ static void ibx_enable_hdmi(struct intel_encoder *encoder,
                intel_enable_hdmi_audio(encoder, pipe_config, conn_state);
 }
 
-static void cpt_enable_hdmi(struct intel_encoder *encoder,
+static void cpt_enable_hdmi(struct intel_atomic_state *state,
+                           struct intel_encoder *encoder,
                            const struct intel_crtc_state *pipe_config,
                            const struct drm_connector_state *conn_state)
 {
@@ -2038,13 +2041,15 @@ static void cpt_enable_hdmi(struct intel_encoder *encoder,
                intel_enable_hdmi_audio(encoder, pipe_config, conn_state);
 }
 
-static void vlv_enable_hdmi(struct intel_encoder *encoder,
+static void vlv_enable_hdmi(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 intel_disable_hdmi(struct intel_encoder *encoder,
+static void intel_disable_hdmi(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)
 {
@@ -2102,7 +2107,8 @@ static void intel_disable_hdmi(struct intel_encoder *encoder,
        intel_dp_dual_mode_set_tmds_output(intel_hdmi, false);
 }
 
-static void g4x_disable_hdmi(struct intel_encoder *encoder,
+static void g4x_disable_hdmi(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)
 {
@@ -2110,10 +2116,11 @@ static void g4x_disable_hdmi(struct intel_encoder *encoder,
                intel_audio_codec_disable(encoder,
                                          old_crtc_state, old_conn_state);
 
-       intel_disable_hdmi(encoder, old_crtc_state, old_conn_state);
+       intel_disable_hdmi(state, encoder, old_crtc_state, old_conn_state);
 }
 
-static void pch_disable_hdmi(struct intel_encoder *encoder,
+static void pch_disable_hdmi(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)
 {
@@ -2122,11 +2129,12 @@ static void pch_disable_hdmi(struct intel_encoder *encoder,
                                          old_crtc_state, old_conn_state);
 }
 
-static void pch_post_disable_hdmi(struct intel_encoder *encoder,
+static void pch_post_disable_hdmi(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)
 {
-       intel_disable_hdmi(encoder, old_crtc_state, old_conn_state);
+       intel_disable_hdmi(state, encoder, old_crtc_state, old_conn_state);
 }
 
 static int intel_hdmi_source_max_tmds_clock(struct intel_encoder *encoder)
@@ -2515,7 +2523,8 @@ int intel_hdmi_compute_config(struct intel_encoder *encoder,
                }
        }
 
-       intel_hdmi_compute_gcp_infoframe(encoder, pipe_config, conn_state);
+       intel_hdmi_compute_gcp_infoframe(encoder, pipe_config,
+                                        conn_state);
 
        if (!intel_hdmi_compute_avi_infoframe(encoder, pipe_config, conn_state)) {
                drm_dbg_kms(&dev_priv->drm, "bad AVI infoframe\n");
@@ -2710,7 +2719,8 @@ static int intel_hdmi_get_modes(struct drm_connector *connector)
        return intel_connector_update_modes(connector, edid);
 }
 
-static void intel_hdmi_pre_enable(struct intel_encoder *encoder,
+static void intel_hdmi_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)
 {
@@ -2724,7 +2734,8 @@ static void intel_hdmi_pre_enable(struct intel_encoder *encoder,
                                       pipe_config, conn_state);
 }
 
-static void vlv_hdmi_pre_enable(struct intel_encoder *encoder,
+static void vlv_hdmi_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)
 {
@@ -2741,12 +2752,13 @@ static void vlv_hdmi_pre_enable(struct intel_encoder *encoder,
                              pipe_config->has_infoframe,
                              pipe_config, conn_state);
 
-       g4x_enable_hdmi(encoder, pipe_config, conn_state);
+       g4x_enable_hdmi(state, encoder, pipe_config, conn_state);
 
        vlv_wait_port_ready(dev_priv, dport, 0x0);
 }
 
-static void vlv_hdmi_pre_pll_enable(struct intel_encoder *encoder,
+static void vlv_hdmi_pre_pll_enable(struct intel_atomic_state *state,
+                                   struct intel_encoder *encoder,
                                    const struct intel_crtc_state *pipe_config,
                                    const struct drm_connector_state *conn_state)
 {
@@ -2755,7 +2767,8 @@ static void vlv_hdmi_pre_pll_enable(struct intel_encoder *encoder,
        vlv_phy_pre_pll_enable(encoder, pipe_config);
 }
 
-static void chv_hdmi_pre_pll_enable(struct intel_encoder *encoder,
+static void chv_hdmi_pre_pll_enable(struct intel_atomic_state *state,
+                                   struct intel_encoder *encoder,
                                    const struct intel_crtc_state *pipe_config,
                                    const struct drm_connector_state *conn_state)
 {
@@ -2764,14 +2777,16 @@ static void chv_hdmi_pre_pll_enable(struct intel_encoder *encoder,
        chv_phy_pre_pll_enable(encoder, pipe_config);
 }
 
-static void chv_hdmi_post_pll_disable(struct intel_encoder *encoder,
+static void chv_hdmi_post_pll_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)
 {
        chv_phy_post_pll_disable(encoder, old_crtc_state);
 }
 
-static void vlv_hdmi_post_disable(struct intel_encoder *encoder,
+static void vlv_hdmi_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)
 {
@@ -2779,7 +2794,8 @@ static void vlv_hdmi_post_disable(struct intel_encoder *encoder,
        vlv_phy_reset_lanes(encoder, old_crtc_state);
 }
 
-static void chv_hdmi_post_disable(struct intel_encoder *encoder,
+static void chv_hdmi_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)
 {
@@ -2794,7 +2810,8 @@ static void chv_hdmi_post_disable(struct intel_encoder *encoder,
        vlv_dpio_put(dev_priv);
 }
 
-static void chv_hdmi_pre_enable(struct intel_encoder *encoder,
+static void chv_hdmi_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)
 {
@@ -2812,7 +2829,7 @@ static void chv_hdmi_pre_enable(struct intel_encoder *encoder,
                              pipe_config->has_infoframe,
                              pipe_config, conn_state);
 
-       g4x_enable_hdmi(encoder, pipe_config, conn_state);
+       g4x_enable_hdmi(state, encoder, pipe_config, conn_state);
 
        vlv_wait_port_ready(dev_priv, dport, 0x0);
 
index 9a067effcfa09aec45100a4b31a69d0ea95f5582..fe591f82163ea85a9aee1ddbdb367c5c314762ac 100644 (file)
@@ -220,7 +220,8 @@ static void intel_lvds_pps_init_hw(struct drm_i915_private *dev_priv,
                       REG_FIELD_PREP(PP_REFERENCE_DIVIDER_MASK, pps->divider) | REG_FIELD_PREP(PANEL_POWER_CYCLE_DELAY_MASK, DIV_ROUND_UP(pps->t4, 1000) + 1));
 }
 
-static void intel_pre_enable_lvds(struct intel_encoder *encoder,
+static void intel_pre_enable_lvds(struct intel_atomic_state *state,
+                                 struct intel_encoder *encoder,
                                  const struct intel_crtc_state *pipe_config,
                                  const struct drm_connector_state *conn_state)
 {
@@ -301,7 +302,8 @@ static void intel_pre_enable_lvds(struct intel_encoder *encoder,
 /*
  * Sets the power state for the panel.
  */
-static void intel_enable_lvds(struct intel_encoder *encoder,
+static void intel_enable_lvds(struct intel_atomic_state *state,
+                             struct intel_encoder *encoder,
                              const struct intel_crtc_state *pipe_config,
                              const struct drm_connector_state *conn_state)
 {
@@ -323,7 +325,8 @@ static void intel_enable_lvds(struct intel_encoder *encoder,
        intel_panel_enable_backlight(pipe_config, conn_state);
 }
 
-static void intel_disable_lvds(struct intel_encoder *encoder,
+static void intel_disable_lvds(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)
 {
@@ -341,28 +344,31 @@ static void intel_disable_lvds(struct intel_encoder *encoder,
        intel_de_posting_read(dev_priv, lvds_encoder->reg);
 }
 
-static void gmch_disable_lvds(struct intel_encoder *encoder,
+static void gmch_disable_lvds(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)
 
 {
        intel_panel_disable_backlight(old_conn_state);
 
-       intel_disable_lvds(encoder, old_crtc_state, old_conn_state);
+       intel_disable_lvds(state, encoder, old_crtc_state, old_conn_state);
 }
 
-static void pch_disable_lvds(struct intel_encoder *encoder,
+static void pch_disable_lvds(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)
 {
        intel_panel_disable_backlight(old_conn_state);
 }
 
-static void pch_post_disable_lvds(struct intel_encoder *encoder,
+static void pch_post_disable_lvds(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)
 {
-       intel_disable_lvds(encoder, old_crtc_state, old_conn_state);
+       intel_disable_lvds(state, encoder, old_crtc_state, old_conn_state);
 }
 
 static enum drm_mode_status
index 276f438708026e1cf0846ffe9eb1e9adaa28a38d..f8ccfe67429e3bbd551d6896cfb4db8aaaa4eaff 100644 (file)
@@ -1931,7 +1931,8 @@ static int pwm_setup_backlight(struct intel_connector *connector,
        return 0;
 }
 
-void intel_panel_update_backlight(struct intel_encoder *encoder,
+void intel_panel_update_backlight(struct intel_atomic_state *state,
+                                 struct intel_encoder *encoder,
                                  const struct intel_crtc_state *crtc_state,
                                  const struct drm_connector_state *conn_state)
 {
index cedeea443336c8e3dbe50f3b0459a925c41578f5..11f2f6b628d81ca164c36a5b12353d64dc125507 100644 (file)
@@ -37,7 +37,8 @@ int intel_panel_setup_backlight(struct drm_connector *connector,
                                enum pipe pipe);
 void intel_panel_enable_backlight(const struct intel_crtc_state *crtc_state,
                                  const struct drm_connector_state *conn_state);
-void intel_panel_update_backlight(struct intel_encoder *encoder,
+void intel_panel_update_backlight(struct intel_atomic_state *state,
+                                 struct intel_encoder *encoder,
                                  const struct intel_crtc_state *crtc_state,
                                  const struct drm_connector_state *conn_state);
 void intel_panel_disable_backlight(const struct drm_connector_state *old_conn_state);
index 637d8fe2f8c296460e6282e01640ebab3c4ba3ed..e6306cbb7a3ae47b9e552659136f71c7b595aa55 100644 (file)
@@ -1430,7 +1430,8 @@ static void intel_sdvo_update_props(struct intel_sdvo *intel_sdvo,
 #undef UPDATE_PROPERTY
 }
 
-static void intel_sdvo_pre_enable(struct intel_encoder *intel_encoder,
+static void intel_sdvo_pre_enable(struct intel_atomic_state *state,
+                                 struct intel_encoder *intel_encoder,
                                  const struct intel_crtc_state *crtc_state,
                                  const struct drm_connector_state *conn_state)
 {
@@ -1727,7 +1728,8 @@ static void intel_sdvo_enable_audio(struct intel_sdvo *intel_sdvo,
                                   SDVO_AUDIO_PRESENCE_DETECT);
 }
 
-static void intel_disable_sdvo(struct intel_encoder *encoder,
+static void intel_disable_sdvo(struct intel_atomic_state *state,
+                              struct intel_encoder *encoder,
                               const struct intel_crtc_state *old_crtc_state,
                               const struct drm_connector_state *conn_state)
 {
@@ -1775,20 +1777,23 @@ static void intel_disable_sdvo(struct intel_encoder *encoder,
        }
 }
 
-static void pch_disable_sdvo(struct intel_encoder *encoder,
+static void pch_disable_sdvo(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 pch_post_disable_sdvo(struct intel_encoder *encoder,
+static void pch_post_disable_sdvo(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)
 {
-       intel_disable_sdvo(encoder, old_crtc_state, old_conn_state);
+       intel_disable_sdvo(state, encoder, old_crtc_state, old_conn_state);
 }
 
-static void intel_enable_sdvo(struct intel_encoder *encoder,
+static void intel_enable_sdvo(struct intel_atomic_state *state,
+                             struct intel_encoder *encoder,
                              const struct intel_crtc_state *pipe_config,
                              const struct drm_connector_state *conn_state)
 {
index 5de39cfce054c2abca617d23593abfad94b4e3f6..fbe12aad7d58cc18be18ed058b396d283c6e54d0 100644 (file)
@@ -914,7 +914,8 @@ intel_tv_get_hw_state(struct intel_encoder *encoder, enum pipe *pipe)
 }
 
 static void
-intel_enable_tv(struct intel_encoder *encoder,
+intel_enable_tv(struct intel_atomic_state *state,
+               struct intel_encoder *encoder,
                const struct intel_crtc_state *pipe_config,
                const struct drm_connector_state *conn_state)
 {
@@ -930,7 +931,8 @@ intel_enable_tv(struct intel_encoder *encoder,
 }
 
 static void
-intel_disable_tv(struct intel_encoder *encoder,
+intel_disable_tv(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)
 {
@@ -1414,7 +1416,8 @@ static void set_color_conversion(struct drm_i915_private *dev_priv,
                       (color_conversion->bv << 16) | color_conversion->av);
 }
 
-static void intel_tv_pre_enable(struct intel_encoder *encoder,
+static void intel_tv_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)
 {
index 456909ee37a7bbfe1d2e8af8c7ff7e24feb15d1a..4e18d4627065949dfa4be50336cdf6dd69b36344 100644 (file)
@@ -759,7 +759,8 @@ static void intel_dsi_unprepare(struct intel_encoder *encoder);
  * DSI port enable has to be done before pipe and plane enable, so we do it in
  * the pre_enable hook instead of the enable hook.
  */
-static void intel_dsi_pre_enable(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)
 {
@@ -858,7 +859,8 @@ static void intel_dsi_pre_enable(struct intel_encoder *encoder,
        intel_dsi_vbt_exec_sequence(intel_dsi, MIPI_SEQ_BACKLIGHT_ON);
 }
 
-static void bxt_dsi_enable(struct intel_encoder *encoder,
+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)
 {
@@ -871,7 +873,8 @@ static void bxt_dsi_enable(struct intel_encoder *encoder,
  * DSI port disable has to be done after pipe and plane disable, so we do it in
  * the post_disable hook.
  */
-static void intel_dsi_disable(struct intel_encoder *encoder,
+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)
 {
@@ -907,7 +910,8 @@ static void intel_dsi_clear_device_ready(struct intel_encoder *encoder)
                vlv_dsi_clear_device_ready(encoder);
 }
 
-static void intel_dsi_post_disable(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)
 {