]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/i915: s/intel_crtc/crtc/
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 9 Jun 2021 08:56:32 +0000 (11:56 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 24 Jun 2021 19:05:10 +0000 (22:05 +0300)
Clear out the straggler 'intel_crtc' variables.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210609085632.22026-7-ville.syrjala@linux.intel.com
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
15 files changed:
drivers/gpu/drm/i915/display/icl_dsi.c
drivers/gpu/drm/i915/display/intel_crtc.c
drivers/gpu/drm/i915/display/intel_ddi.c
drivers/gpu/drm/i915/display/intel_display.c
drivers/gpu/drm/i915/display/intel_display_debugfs.c
drivers/gpu/drm/i915/display/intel_dp.c
drivers/gpu/drm/i915/display/intel_dp_mst.c
drivers/gpu/drm/i915/display/intel_fdi.c
drivers/gpu/drm/i915/display/intel_hdmi.c
drivers/gpu/drm/i915/display/intel_lvds.c
drivers/gpu/drm/i915/display/intel_sdvo.c
drivers/gpu/drm/i915/display/intel_tv.c
drivers/gpu/drm/i915/display/skl_scaler.c
drivers/gpu/drm/i915/display/vlv_dsi.c
drivers/gpu/drm/i915/i915_irq.c

index 970ba9e7f84e21f160efcfb4412c57ab09b4af19..43ec7fcd3f5d284c08d275640d110b69ae64a159 100644 (file)
@@ -729,8 +729,8 @@ gen11_dsi_configure_transcoder(struct intel_encoder *encoder,
 {
        struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
        struct intel_dsi *intel_dsi = enc_to_intel_dsi(encoder);
-       struct intel_crtc *intel_crtc = to_intel_crtc(pipe_config->uapi.crtc);
-       enum pipe pipe = intel_crtc->pipe;
+       struct intel_crtc *crtc = to_intel_crtc(pipe_config->uapi.crtc);
+       enum pipe pipe = crtc->pipe;
        u32 tmp;
        enum port port;
        enum transcoder dsi_trans;
index 95ff1707b4bd63e1abf024cad56d30915a030891..448c4d99ac354ed0eb72e085b4d0006b9a8b8707 100644 (file)
@@ -163,12 +163,12 @@ static void intel_crtc_free(struct intel_crtc *crtc)
        kfree(crtc);
 }
 
-static void intel_crtc_destroy(struct drm_crtc *crtc)
+static void intel_crtc_destroy(struct drm_crtc *_crtc)
 {
-       struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
+       struct intel_crtc *crtc = to_intel_crtc(_crtc);
 
-       drm_crtc_cleanup(crtc);
-       kfree(intel_crtc);
+       drm_crtc_cleanup(&crtc->base);
+       kfree(crtc);
 }
 
 static int intel_crtc_late_register(struct drm_crtc *crtc)
index 59acfc20a42c711d9ca90c16917a246242a49abb..91fd85bee1d27ee3ce2bd90cef12890f77d6e08c 100644 (file)
@@ -3525,7 +3525,7 @@ static void intel_ddi_read_func_ctl(struct intel_encoder *encoder,
                                    struct intel_crtc_state *pipe_config)
 {
        struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
-       struct intel_crtc *intel_crtc = to_intel_crtc(pipe_config->uapi.crtc);
+       struct intel_crtc *crtc = to_intel_crtc(pipe_config->uapi.crtc);
        enum transcoder cpu_transcoder = pipe_config->cpu_transcoder;
        struct intel_digital_port *dig_port = enc_to_dig_port(encoder);
        u32 temp, flags = 0;
@@ -3588,7 +3588,7 @@ static void intel_ddi_read_func_ctl(struct intel_encoder *encoder,
                        pipe_config->output_types |= BIT(INTEL_OUTPUT_DP);
                pipe_config->lane_count =
                        ((temp & DDI_PORT_WIDTH_MASK) >> DDI_PORT_WIDTH_SHIFT) + 1;
-               intel_dp_get_m_n(intel_crtc, pipe_config);
+               intel_dp_get_m_n(crtc, pipe_config);
 
                if (DISPLAY_VER(dev_priv) >= 11) {
                        i915_reg_t dp_tp_ctl = dp_tp_ctl_reg(encoder, pipe_config);
@@ -3618,7 +3618,7 @@ static void intel_ddi_read_func_ctl(struct intel_encoder *encoder,
                        pipe_config->mst_master_transcoder =
                                        REG_FIELD_GET(TRANS_DDI_MST_TRANSPORT_SELECT_MASK, temp);
 
-               intel_dp_get_m_n(intel_crtc, pipe_config);
+               intel_dp_get_m_n(crtc, pipe_config);
 
                pipe_config->infoframes.enable |=
                        intel_hdmi_infoframes_enabled(encoder, pipe_config);
index 85c97af96d389521bc69f612f1b820d217a9da79..ccedbafe5157d7456d6f41ca1303173913895b9a 100644 (file)
@@ -2717,10 +2717,10 @@ void hsw_disable_ips(const struct intel_crtc_state *crtc_state)
        intel_wait_for_vblank(dev_priv, crtc->pipe);
 }
 
-static void intel_crtc_dpms_overlay_disable(struct intel_crtc *intel_crtc)
+static void intel_crtc_dpms_overlay_disable(struct intel_crtc *crtc)
 {
-       if (intel_crtc->overlay)
-               (void) intel_overlay_switch_off(intel_crtc->overlay);
+       if (crtc->overlay)
+               (void) intel_overlay_switch_off(crtc->overlay);
 
        /* Let userspace switch the overlay on again. In most cases userspace
         * has to recompute where to put it anyway.
index db38891a9ef0f8341fb0ab47990d513b28ab439d..af9e58619667dd0c7ee1a8b54da843ddf5a8f377 100644 (file)
@@ -1229,7 +1229,7 @@ static int i915_ddb_info(struct seq_file *m, void *unused)
 
 static void drrs_status_per_crtc(struct seq_file *m,
                                 struct drm_device *dev,
-                                struct intel_crtc *intel_crtc)
+                                struct intel_crtc *crtc)
 {
        struct drm_i915_private *dev_priv = to_i915(dev);
        struct i915_drrs *drrs = &dev_priv->drrs;
@@ -1241,7 +1241,7 @@ static void drrs_status_per_crtc(struct seq_file *m,
        drm_for_each_connector_iter(connector, &conn_iter) {
                bool supported = false;
 
-               if (connector->state->crtc != &intel_crtc->base)
+               if (connector->state->crtc != &crtc->base)
                        continue;
 
                seq_printf(m, "%s:\n", connector->name);
@@ -1256,7 +1256,7 @@ static void drrs_status_per_crtc(struct seq_file *m,
 
        seq_puts(m, "\n");
 
-       if (to_intel_crtc_state(intel_crtc->base.state)->has_drrs) {
+       if (to_intel_crtc_state(crtc->base.state)->has_drrs) {
                struct intel_panel *panel;
 
                mutex_lock(&drrs->mutex);
@@ -1302,16 +1302,16 @@ static int i915_drrs_status(struct seq_file *m, void *unused)
 {
        struct drm_i915_private *dev_priv = node_to_i915(m->private);
        struct drm_device *dev = &dev_priv->drm;
-       struct intel_crtc *intel_crtc;
+       struct intel_crtc *crtc;
        int active_crtc_cnt = 0;
 
        drm_modeset_lock_all(dev);
-       for_each_intel_crtc(dev, intel_crtc) {
-               if (intel_crtc->base.state->active) {
+       for_each_intel_crtc(dev, crtc) {
+               if (crtc->base.state->active) {
                        active_crtc_cnt++;
                        seq_printf(m, "\nCRTC %d:  ", active_crtc_cnt);
 
-                       drrs_status_per_crtc(m, dev, intel_crtc);
+                       drrs_status_per_crtc(m, dev, crtc);
                }
        }
        drm_modeset_unlock_all(dev);
@@ -2068,7 +2068,7 @@ i915_fifo_underrun_reset_write(struct file *filp,
                               size_t cnt, loff_t *ppos)
 {
        struct drm_i915_private *dev_priv = filp->private_data;
-       struct intel_crtc *intel_crtc;
+       struct intel_crtc *crtc;
        struct drm_device *dev = &dev_priv->drm;
        int ret;
        bool reset;
@@ -2080,15 +2080,15 @@ i915_fifo_underrun_reset_write(struct file *filp,
        if (!reset)
                return cnt;
 
-       for_each_intel_crtc(dev, intel_crtc) {
+       for_each_intel_crtc(dev, crtc) {
                struct drm_crtc_commit *commit;
                struct intel_crtc_state *crtc_state;
 
-               ret = drm_modeset_lock_single_interruptible(&intel_crtc->base.mutex);
+               ret = drm_modeset_lock_single_interruptible(&crtc->base.mutex);
                if (ret)
                        return ret;
 
-               crtc_state = to_intel_crtc_state(intel_crtc->base.state);
+               crtc_state = to_intel_crtc_state(crtc->base.state);
                commit = crtc_state->uapi.commit;
                if (commit) {
                        ret = wait_for_completion_interruptible(&commit->hw_done);
@@ -2099,12 +2099,12 @@ i915_fifo_underrun_reset_write(struct file *filp,
                if (!ret && crtc_state->hw.active) {
                        drm_dbg_kms(&dev_priv->drm,
                                    "Re-arming FIFO underruns on pipe %c\n",
-                                   pipe_name(intel_crtc->pipe));
+                                   pipe_name(crtc->pipe));
 
-                       intel_crtc_arm_fifo_underrun(intel_crtc, crtc_state);
+                       intel_crtc_arm_fifo_underrun(crtc, crtc_state);
                }
 
-               drm_modeset_unlock(&intel_crtc->base.mutex);
+               drm_modeset_unlock(&crtc->base.mutex);
 
                if (ret)
                        return ret;
index d3312b9bcc6f5f77d9765b9767b8fa2b08314554..f74f70691247ba33be9184067db7456772047b4a 100644 (file)
@@ -4741,7 +4741,7 @@ static void intel_dp_set_drrs_state(struct drm_i915_private *dev_priv,
                                    int refresh_rate)
 {
        struct intel_dp *intel_dp = dev_priv->drrs.dp;
-       struct intel_crtc *intel_crtc = to_intel_crtc(crtc_state->uapi.crtc);
+       struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
        enum drrs_refresh_rate_type index = DRRS_HIGH_RR;
 
        if (refresh_rate <= 0) {
@@ -4755,7 +4755,7 @@ static void intel_dp_set_drrs_state(struct drm_i915_private *dev_priv,
                return;
        }
 
-       if (!intel_crtc) {
+       if (!crtc) {
                drm_dbg_kms(&dev_priv->drm,
                            "DRRS: intel_crtc not initialized\n");
                return;
index 332d2f9fda5c170435205dabe5dd748527de8b0a..8bb4b8507181cb4d38047bac607aeb3f5307492d 100644 (file)
@@ -308,9 +308,9 @@ intel_dp_mst_atomic_check(struct drm_connector *connector,
         * connector
         */
        if (new_crtc) {
-               struct intel_crtc *intel_crtc = to_intel_crtc(new_crtc);
+               struct intel_crtc *crtc = to_intel_crtc(new_crtc);
                struct intel_crtc_state *crtc_state =
-                       intel_atomic_get_new_crtc_state(state, intel_crtc);
+                       intel_atomic_get_new_crtc_state(state, crtc);
 
                if (!crtc_state ||
                    !drm_atomic_crtc_needs_modeset(&crtc_state->uapi) ||
index 15ea28726e7a3d24634af19375a2f3934c2a9084..e10b9cd8e86eb8ed312362384252193929709f2a 100644 (file)
@@ -95,10 +95,10 @@ static int ilk_check_fdi_lanes(struct drm_device *dev, enum pipe pipe,
        }
 }
 
-int ilk_fdi_compute_config(struct intel_crtc *intel_crtc,
-                                 struct intel_crtc_state *pipe_config)
+int ilk_fdi_compute_config(struct intel_crtc *crtc,
+                          struct intel_crtc_state *pipe_config)
 {
-       struct drm_device *dev = intel_crtc->base.dev;
+       struct drm_device *dev = crtc->base.dev;
        struct drm_i915_private *i915 = to_i915(dev);
        const struct drm_display_mode *adjusted_mode = &pipe_config->hw.adjusted_mode;
        int lane, link_bw, fdi_dotclock, ret;
@@ -124,7 +124,7 @@ retry:
        intel_link_compute_m_n(pipe_config->pipe_bpp, lane, fdi_dotclock,
                               link_bw, &pipe_config->fdi_m_n, false, false);
 
-       ret = ilk_check_fdi_lanes(dev, intel_crtc->pipe, pipe_config);
+       ret = ilk_check_fdi_lanes(dev, crtc->pipe, pipe_config);
        if (ret == -EDEADLK)
                return ret;
 
@@ -690,9 +690,9 @@ void hsw_fdi_link_train(struct intel_encoder *encoder,
 
 void ilk_fdi_pll_enable(const struct intel_crtc_state *crtc_state)
 {
-       struct intel_crtc *intel_crtc = to_intel_crtc(crtc_state->uapi.crtc);
-       struct drm_i915_private *dev_priv = to_i915(intel_crtc->base.dev);
-       enum pipe pipe = intel_crtc->pipe;
+       struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
+       struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
+       enum pipe pipe = crtc->pipe;
        i915_reg_t reg;
        u32 temp;
 
@@ -725,11 +725,11 @@ void ilk_fdi_pll_enable(const struct intel_crtc_state *crtc_state)
        }
 }
 
-void ilk_fdi_pll_disable(struct intel_crtc *intel_crtc)
+void ilk_fdi_pll_disable(struct intel_crtc *crtc)
 {
-       struct drm_device *dev = intel_crtc->base.dev;
+       struct drm_device *dev = crtc->base.dev;
        struct drm_i915_private *dev_priv = to_i915(dev);
-       enum pipe pipe = intel_crtc->pipe;
+       enum pipe pipe = crtc->pipe;
        i915_reg_t reg;
        u32 temp;
 
index 7e51c98c475e9a10ac5c6854fa36a81f36de7bce..852af2b2354006e0bf7a9f9d0d80943cdc03083a 100644 (file)
@@ -270,8 +270,8 @@ static void ibx_write_infoframe(struct intel_encoder *encoder,
 {
        const u32 *data = frame;
        struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
-       struct intel_crtc *intel_crtc = to_intel_crtc(crtc_state->uapi.crtc);
-       i915_reg_t reg = TVIDEO_DIP_CTL(intel_crtc->pipe);
+       struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
+       i915_reg_t reg = TVIDEO_DIP_CTL(crtc->pipe);
        u32 val = intel_de_read(dev_priv, reg);
        int i;
 
@@ -286,13 +286,13 @@ static void ibx_write_infoframe(struct intel_encoder *encoder,
        intel_de_write(dev_priv, reg, val);
 
        for (i = 0; i < len; i += 4) {
-               intel_de_write(dev_priv, TVIDEO_DIP_DATA(intel_crtc->pipe),
+               intel_de_write(dev_priv, TVIDEO_DIP_DATA(crtc->pipe),
                               *data);
                data++;
        }
        /* Write every possible data byte to force correct ECC calculation. */
        for (; i < VIDEO_DIP_DATA_SIZE; i += 4)
-               intel_de_write(dev_priv, TVIDEO_DIP_DATA(intel_crtc->pipe), 0);
+               intel_de_write(dev_priv, TVIDEO_DIP_DATA(crtc->pipe), 0);
 
        val |= g4x_infoframe_enable(type);
        val &= ~VIDEO_DIP_FREQ_MASK;
@@ -349,8 +349,8 @@ static void cpt_write_infoframe(struct intel_encoder *encoder,
 {
        const u32 *data = frame;
        struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
-       struct intel_crtc *intel_crtc = to_intel_crtc(crtc_state->uapi.crtc);
-       i915_reg_t reg = TVIDEO_DIP_CTL(intel_crtc->pipe);
+       struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
+       i915_reg_t reg = TVIDEO_DIP_CTL(crtc->pipe);
        u32 val = intel_de_read(dev_priv, reg);
        int i;
 
@@ -368,13 +368,13 @@ static void cpt_write_infoframe(struct intel_encoder *encoder,
        intel_de_write(dev_priv, reg, val);
 
        for (i = 0; i < len; i += 4) {
-               intel_de_write(dev_priv, TVIDEO_DIP_DATA(intel_crtc->pipe),
+               intel_de_write(dev_priv, TVIDEO_DIP_DATA(crtc->pipe),
                               *data);
                data++;
        }
        /* Write every possible data byte to force correct ECC calculation. */
        for (; i < VIDEO_DIP_DATA_SIZE; i += 4)
-               intel_de_write(dev_priv, TVIDEO_DIP_DATA(intel_crtc->pipe), 0);
+               intel_de_write(dev_priv, TVIDEO_DIP_DATA(crtc->pipe), 0);
 
        val |= g4x_infoframe_enable(type);
        val &= ~VIDEO_DIP_FREQ_MASK;
@@ -427,8 +427,8 @@ static void vlv_write_infoframe(struct intel_encoder *encoder,
 {
        const u32 *data = frame;
        struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
-       struct intel_crtc *intel_crtc = to_intel_crtc(crtc_state->uapi.crtc);
-       i915_reg_t reg = VLV_TVIDEO_DIP_CTL(intel_crtc->pipe);
+       struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
+       i915_reg_t reg = VLV_TVIDEO_DIP_CTL(crtc->pipe);
        u32 val = intel_de_read(dev_priv, reg);
        int i;
 
@@ -444,13 +444,13 @@ static void vlv_write_infoframe(struct intel_encoder *encoder,
 
        for (i = 0; i < len; i += 4) {
                intel_de_write(dev_priv,
-                              VLV_TVIDEO_DIP_DATA(intel_crtc->pipe), *data);
+                              VLV_TVIDEO_DIP_DATA(crtc->pipe), *data);
                data++;
        }
        /* Write every possible data byte to force correct ECC calculation. */
        for (; i < VIDEO_DIP_DATA_SIZE; i += 4)
                intel_de_write(dev_priv,
-                              VLV_TVIDEO_DIP_DATA(intel_crtc->pipe), 0);
+                              VLV_TVIDEO_DIP_DATA(crtc->pipe), 0);
 
        val |= g4x_infoframe_enable(type);
        val &= ~VIDEO_DIP_FREQ_MASK;
@@ -1040,10 +1040,10 @@ static void ibx_set_infoframes(struct intel_encoder *encoder,
                               const struct drm_connector_state *conn_state)
 {
        struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
-       struct intel_crtc *intel_crtc = to_intel_crtc(crtc_state->uapi.crtc);
+       struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
        struct intel_digital_port *dig_port = enc_to_dig_port(encoder);
        struct intel_hdmi *intel_hdmi = &dig_port->hdmi;
-       i915_reg_t reg = TVIDEO_DIP_CTL(intel_crtc->pipe);
+       i915_reg_t reg = TVIDEO_DIP_CTL(crtc->pipe);
        u32 val = intel_de_read(dev_priv, reg);
        u32 port = VIDEO_DIP_PORT(encoder->port);
 
@@ -1099,9 +1099,9 @@ static void cpt_set_infoframes(struct intel_encoder *encoder,
                               const struct drm_connector_state *conn_state)
 {
        struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
-       struct intel_crtc *intel_crtc = to_intel_crtc(crtc_state->uapi.crtc);
+       struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
        struct intel_hdmi *intel_hdmi = enc_to_intel_hdmi(encoder);
-       i915_reg_t reg = TVIDEO_DIP_CTL(intel_crtc->pipe);
+       i915_reg_t reg = TVIDEO_DIP_CTL(crtc->pipe);
        u32 val = intel_de_read(dev_priv, reg);
 
        assert_hdmi_port_disabled(intel_hdmi);
@@ -1148,9 +1148,9 @@ static void vlv_set_infoframes(struct intel_encoder *encoder,
                               const struct drm_connector_state *conn_state)
 {
        struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
-       struct intel_crtc *intel_crtc = to_intel_crtc(crtc_state->uapi.crtc);
+       struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
        struct intel_hdmi *intel_hdmi = enc_to_intel_hdmi(encoder);
-       i915_reg_t reg = VLV_TVIDEO_DIP_CTL(intel_crtc->pipe);
+       i915_reg_t reg = VLV_TVIDEO_DIP_CTL(crtc->pipe);
        u32 val = intel_de_read(dev_priv, reg);
        u32 port = VIDEO_DIP_PORT(encoder->port);
 
@@ -1465,14 +1465,12 @@ static int kbl_repositioning_enc_en_signal(struct intel_connector *connector,
 {
        struct drm_i915_private *dev_priv = to_i915(connector->base.dev);
        struct intel_digital_port *dig_port = intel_attached_dig_port(connector);
-       struct drm_crtc *crtc = connector->base.state->crtc;
-       struct intel_crtc *intel_crtc = container_of(crtc,
-                                                    struct intel_crtc, base);
+       struct intel_crtc *crtc = to_intel_crtc(connector->base.state->crtc);
        u32 scanline;
        int ret;
 
        for (;;) {
-               scanline = intel_de_read(dev_priv, PIPEDSL(intel_crtc->pipe));
+               scanline = intel_de_read(dev_priv, PIPEDSL(crtc->pipe));
                if (scanline > 100 && scanline < 200)
                        break;
                usleep_range(25, 50);
index 7f40e9f60bc2b6879f19aedd78316f7e554830d8..e0381b0fce9142a988ab8bc0eba3f4d9b44a1aba 100644 (file)
@@ -411,12 +411,12 @@ static int intel_lvds_compute_config(struct intel_encoder *intel_encoder,
        struct intel_connector *intel_connector =
                lvds_encoder->attached_connector;
        struct drm_display_mode *adjusted_mode = &pipe_config->hw.adjusted_mode;
-       struct intel_crtc *intel_crtc = to_intel_crtc(pipe_config->uapi.crtc);
+       struct intel_crtc *crtc = to_intel_crtc(pipe_config->uapi.crtc);
        unsigned int lvds_bpp;
        int ret;
 
        /* Should never happen!! */
-       if (DISPLAY_VER(dev_priv) < 4 && intel_crtc->pipe == 0) {
+       if (DISPLAY_VER(dev_priv) < 4 && crtc->pipe == 0) {
                drm_err(&dev_priv->drm, "Can't support LVDS on pipe A\n");
                return -EINVAL;
        }
index e4f91d7a5c605800904af3d6bff8f9dfe6b10b07..6cb27599ea0303e5d75e4988981e9c6c255e7947 100644 (file)
@@ -1824,7 +1824,7 @@ static void intel_enable_sdvo(struct intel_atomic_state *state,
        struct drm_device *dev = encoder->base.dev;
        struct drm_i915_private *dev_priv = to_i915(dev);
        struct intel_sdvo *intel_sdvo = to_sdvo(encoder);
-       struct intel_crtc *intel_crtc = to_intel_crtc(pipe_config->uapi.crtc);
+       struct intel_crtc *crtc = to_intel_crtc(pipe_config->uapi.crtc);
        u32 temp;
        bool input1, input2;
        int i;
@@ -1835,7 +1835,7 @@ static void intel_enable_sdvo(struct intel_atomic_state *state,
        intel_sdvo_write_sdvox(intel_sdvo, temp);
 
        for (i = 0; i < 2; i++)
-               intel_wait_for_vblank(dev_priv, intel_crtc->pipe);
+               intel_wait_for_vblank(dev_priv, crtc->pipe);
 
        success = intel_sdvo_get_trained_inputs(intel_sdvo, &input1, &input2);
        /*
index aa52af7891f0fb8c2447b9dd94d39c1e5869974c..d02f09f7e7501338e3ccc2b68eb76c5a132672ef 100644 (file)
@@ -1420,7 +1420,7 @@ static void intel_tv_pre_enable(struct intel_atomic_state *state,
                                const struct drm_connector_state *conn_state)
 {
        struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
-       struct intel_crtc *intel_crtc = to_intel_crtc(pipe_config->uapi.crtc);
+       struct intel_crtc *crtc = to_intel_crtc(pipe_config->uapi.crtc);
        struct intel_tv *intel_tv = enc_to_tv(encoder);
        const struct intel_tv_connector_state *tv_conn_state =
                to_intel_tv_connector_state(conn_state);
@@ -1466,7 +1466,7 @@ static void intel_tv_pre_enable(struct intel_atomic_state *state,
                break;
        }
 
-       tv_ctl |= TV_ENC_PIPE_SEL(intel_crtc->pipe);
+       tv_ctl |= TV_ENC_PIPE_SEL(crtc->pipe);
 
        switch (tv_mode->oversample) {
        case 8:
@@ -1571,8 +1571,7 @@ static int
 intel_tv_detect_type(struct intel_tv *intel_tv,
                      struct drm_connector *connector)
 {
-       struct drm_crtc *crtc = connector->state->crtc;
-       struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
+       struct intel_crtc *crtc = to_intel_crtc(connector->state->crtc);
        struct drm_device *dev = connector->dev;
        struct drm_i915_private *dev_priv = to_i915(dev);
        u32 tv_ctl, save_tv_ctl;
@@ -1594,7 +1593,7 @@ intel_tv_detect_type(struct intel_tv *intel_tv,
        /* Poll for TV detection */
        tv_ctl &= ~(TV_ENC_ENABLE | TV_ENC_PIPE_SEL_MASK | TV_TEST_MODE_MASK);
        tv_ctl |= TV_TEST_MODE_MONITOR_DETECT;
-       tv_ctl |= TV_ENC_PIPE_SEL(intel_crtc->pipe);
+       tv_ctl |= TV_ENC_PIPE_SEL(crtc->pipe);
 
        tv_dac &= ~(TVDAC_SENSE_MASK | DAC_A_MASK | DAC_B_MASK | DAC_C_MASK);
        tv_dac |= (TVDAC_STATE_CHG_EN |
@@ -1619,7 +1618,7 @@ intel_tv_detect_type(struct intel_tv *intel_tv,
        intel_de_write(dev_priv, TV_DAC, tv_dac);
        intel_de_posting_read(dev_priv, TV_DAC);
 
-       intel_wait_for_vblank(dev_priv, intel_crtc->pipe);
+       intel_wait_for_vblank(dev_priv, crtc->pipe);
 
        type = -1;
        tv_dac = intel_de_read(dev_priv, TV_DAC);
@@ -1652,7 +1651,7 @@ intel_tv_detect_type(struct intel_tv *intel_tv,
        intel_de_posting_read(dev_priv, TV_CTL);
 
        /* For unknown reasons the hw barfs if we don't do this vblank wait. */
-       intel_wait_for_vblank(dev_priv, intel_crtc->pipe);
+       intel_wait_for_vblank(dev_priv, crtc->pipe);
 
        /* Restore interrupt config */
        if (connector->polled & DRM_CONNECTOR_POLL_HPD) {
index 394b7bbf48d824624567c8d7e8e56bf6883789e9..911a113ee006979c63881c7632209f930afbe187 100644 (file)
@@ -96,9 +96,8 @@ skl_update_scaler(struct intel_crtc_state *crtc_state, bool force_detach,
 {
        struct intel_crtc_scaler_state *scaler_state =
                &crtc_state->scaler_state;
-       struct intel_crtc *intel_crtc =
-               to_intel_crtc(crtc_state->uapi.crtc);
-       struct drm_i915_private *dev_priv = to_i915(intel_crtc->base.dev);
+       struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
+       struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
        const struct drm_display_mode *adjusted_mode =
                &crtc_state->hw.adjusted_mode;
 
@@ -141,7 +140,7 @@ skl_update_scaler(struct intel_crtc_state *crtc_state, bool force_detach,
                        drm_dbg_kms(&dev_priv->drm,
                                    "scaler_user index %u.%u: "
                                    "Staged freeing scaler id %d scaler_users = 0x%x\n",
-                                   intel_crtc->pipe, scaler_user, *scaler_id,
+                                   crtc->pipe, scaler_user, *scaler_id,
                                    scaler_state->scaler_users);
                        *scaler_id = -1;
                }
@@ -167,7 +166,7 @@ skl_update_scaler(struct intel_crtc_state *crtc_state, bool force_detach,
                drm_dbg_kms(&dev_priv->drm,
                            "scaler_user index %u.%u: src %ux%u dst %ux%u "
                            "size is out of scaler range\n",
-                           intel_crtc->pipe, scaler_user, src_w, src_h,
+                           crtc->pipe, scaler_user, src_w, src_h,
                            dst_w, dst_h);
                return -EINVAL;
        }
@@ -176,7 +175,7 @@ skl_update_scaler(struct intel_crtc_state *crtc_state, bool force_detach,
        scaler_state->scaler_users |= (1 << scaler_user);
        drm_dbg_kms(&dev_priv->drm, "scaler_user index %u.%u: "
                    "staged scaling request for %ux%u->%ux%u scaler_users = 0x%x\n",
-                   intel_crtc->pipe, scaler_user, src_w, src_h, dst_w, dst_h,
+                   crtc->pipe, scaler_user, src_w, src_h, dst_w, dst_h,
                    scaler_state->scaler_users);
 
        return 0;
@@ -515,17 +514,17 @@ skl_program_plane_scaler(struct intel_plane *plane,
                          (crtc_w << 16) | crtc_h);
 }
 
-static void skl_detach_scaler(struct intel_crtc *intel_crtc, int id)
+static void skl_detach_scaler(struct intel_crtc *crtc, int id)
 {
-       struct drm_device *dev = intel_crtc->base.dev;
+       struct drm_device *dev = crtc->base.dev;
        struct drm_i915_private *dev_priv = to_i915(dev);
        unsigned long irqflags;
 
        spin_lock_irqsave(&dev_priv->uncore.lock, irqflags);
 
-       intel_de_write_fw(dev_priv, SKL_PS_CTRL(intel_crtc->pipe, id), 0);
-       intel_de_write_fw(dev_priv, SKL_PS_WIN_POS(intel_crtc->pipe, id), 0);
-       intel_de_write_fw(dev_priv, SKL_PS_WIN_SZ(intel_crtc->pipe, id), 0);
+       intel_de_write_fw(dev_priv, SKL_PS_CTRL(crtc->pipe, id), 0);
+       intel_de_write_fw(dev_priv, SKL_PS_WIN_POS(crtc->pipe, id), 0);
+       intel_de_write_fw(dev_priv, SKL_PS_WIN_SZ(crtc->pipe, id), 0);
 
        spin_unlock_irqrestore(&dev_priv->uncore.lock, irqflags);
 }
@@ -535,15 +534,15 @@ static void skl_detach_scaler(struct intel_crtc *intel_crtc, int id)
  */
 void skl_detach_scalers(const struct intel_crtc_state *crtc_state)
 {
-       struct intel_crtc *intel_crtc = to_intel_crtc(crtc_state->uapi.crtc);
+       struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
        const struct intel_crtc_scaler_state *scaler_state =
                &crtc_state->scaler_state;
        int i;
 
        /* loop through and disable scalers that aren't in use */
-       for (i = 0; i < intel_crtc->num_scalers; i++) {
+       for (i = 0; i < crtc->num_scalers; i++) {
                if (!scaler_state->scalers[i].in_use)
-                       skl_detach_scaler(intel_crtc, i);
+                       skl_detach_scaler(crtc, i);
        }
 }
 
index 084c9c43b2ed27d6500c71b7954967b18441b6b8..0ee4ff341e25d2cbb000501f31a3f5ea0c5d963f 100644 (file)
@@ -780,10 +780,9 @@ static void intel_dsi_pre_enable(struct intel_atomic_state *state,
                                 const struct drm_connector_state *conn_state)
 {
        struct intel_dsi *intel_dsi = enc_to_intel_dsi(encoder);
-       struct drm_crtc *crtc = pipe_config->uapi.crtc;
-       struct drm_i915_private *dev_priv = to_i915(crtc->dev);
-       struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
-       enum pipe pipe = intel_crtc->pipe;
+       struct intel_crtc *crtc = to_intel_crtc(pipe_config->uapi.crtc);
+       struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
+       enum pipe pipe = crtc->pipe;
        enum port port;
        u32 val;
        bool glk_cold_boot = false;
@@ -1389,7 +1388,7 @@ static void intel_dsi_prepare(struct intel_encoder *intel_encoder,
        struct drm_encoder *encoder = &intel_encoder->base;
        struct drm_device *dev = encoder->dev;
        struct drm_i915_private *dev_priv = to_i915(dev);
-       struct intel_crtc *intel_crtc = to_intel_crtc(pipe_config->uapi.crtc);
+       struct intel_crtc *crtc = to_intel_crtc(pipe_config->uapi.crtc);
        struct intel_dsi *intel_dsi = enc_to_intel_dsi(to_intel_encoder(encoder));
        const struct drm_display_mode *adjusted_mode = &pipe_config->hw.adjusted_mode;
        enum port port;
@@ -1397,7 +1396,7 @@ static void intel_dsi_prepare(struct intel_encoder *intel_encoder,
        u32 val, tmp;
        u16 mode_hdisplay;
 
-       drm_dbg_kms(&dev_priv->drm, "pipe %c\n", pipe_name(intel_crtc->pipe));
+       drm_dbg_kms(&dev_priv->drm, "pipe %c\n", pipe_name(crtc->pipe));
 
        mode_hdisplay = adjusted_mode->crtc_hdisplay;
 
@@ -1424,7 +1423,7 @@ static void intel_dsi_prepare(struct intel_encoder *intel_encoder,
                        intel_de_write(dev_priv, MIPI_CTRL(port),
                                       tmp | READ_REQUEST_PRIORITY_HIGH);
                } else if (IS_GEMINILAKE(dev_priv) || IS_BROXTON(dev_priv)) {
-                       enum pipe pipe = intel_crtc->pipe;
+                       enum pipe pipe = crtc->pipe;
 
                        tmp = intel_de_read(dev_priv, MIPI_CTRL(port));
                        tmp &= ~BXT_PIPE_SELECT_MASK;
index bf93344b8564a5eb3861156fe6aef6ae57ed5d32..0b7b14b6960ef4782238cf7996bce132928431c2 100644 (file)
@@ -2881,14 +2881,14 @@ static bool gen11_dsi_configure_te(struct intel_crtc *intel_crtc,
        return true;
 }
 
-int bdw_enable_vblank(struct drm_crtc *crtc)
+int bdw_enable_vblank(struct drm_crtc *_crtc)
 {
-       struct drm_i915_private *dev_priv = to_i915(crtc->dev);
-       struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
-       enum pipe pipe = intel_crtc->pipe;
+       struct intel_crtc *crtc = to_intel_crtc(_crtc);
+       struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
+       enum pipe pipe = crtc->pipe;
        unsigned long irqflags;
 
-       if (gen11_dsi_configure_te(intel_crtc, true))
+       if (gen11_dsi_configure_te(crtc, true))
                return 0;
 
        spin_lock_irqsave(&dev_priv->irq_lock, irqflags);
@@ -2899,7 +2899,7 @@ int bdw_enable_vblank(struct drm_crtc *crtc)
         * PSR is active as no frames are generated, so check only for PSR.
         */
        if (HAS_PSR(dev_priv))
-               drm_crtc_vblank_restore(crtc);
+               drm_crtc_vblank_restore(&crtc->base);
 
        return 0;
 }
@@ -2953,14 +2953,14 @@ void ilk_disable_vblank(struct drm_crtc *crtc)
        spin_unlock_irqrestore(&dev_priv->irq_lock, irqflags);
 }
 
-void bdw_disable_vblank(struct drm_crtc *crtc)
+void bdw_disable_vblank(struct drm_crtc *_crtc)
 {
-       struct drm_i915_private *dev_priv = to_i915(crtc->dev);
-       struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
-       enum pipe pipe = intel_crtc->pipe;
+       struct intel_crtc *crtc = to_intel_crtc(_crtc);
+       struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
+       enum pipe pipe = crtc->pipe;
        unsigned long irqflags;
 
-       if (gen11_dsi_configure_te(intel_crtc, false))
+       if (gen11_dsi_configure_te(crtc, false))
                return;
 
        spin_lock_irqsave(&dev_priv->irq_lock, irqflags);