diff options
author | Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com> | 2015-01-15 07:55:22 -0500 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2015-01-27 03:50:48 -0500 |
commit | 2d112de7db9d2cb0bd43f67120acd6c028bb60e8 (patch) | |
tree | d14633773369d33598fda44a647a84e72a119aa8 /drivers/gpu/drm/i915 | |
parent | 5cec258b4f185a5011165099a49757516f90de2b (diff) |
drm/i915: Embedded struct drm_crtc_state in intel_crtc_state
And get rid of the duplicate mode structures. This patch was generated
with the following semantic patch:
@@ @@
struct intel_crtc_state {
+struct drm_crtc_state base;
+
...
-struct drm_display_mode requested_mode;
-struct drm_display_mode adjusted_mode;
...
}
@@ struct intel_crtc_state *state; @@
-state->adjusted_mode
+state->base.adjusted_mode
@@ struct intel_crtc_state *state; @@
-state->requested_mode
+state->base.mode
@@ struct intel_crtc_state state; @@
-state.adjusted_mode
+state.base.adjusted_mode
@@ struct intel_crtc_state state; @@
-state.requested_mode
+state.base.mode
@@ struct drm_crtc *crtc; @@
-to_intel_crtc(crtc)->config.adjusted_mode
+to_intel_crtc(crtc)->config.base.adjusted_mode
@@ identifier member; expression E; @@
-PIPE_CONF_CHECK_FLAGS(adjusted_mode.member, E);
+PIPE_CONF_CHECK_FLAGS(base.adjusted_mode.member, E);
@@ identifier member; @@
-PIPE_CONF_CHECK_I(adjusted_mode.member);
+PIPE_CONF_CHECK_I(base.adjusted_mode.member);
@@ identifier member; @@
-PIPE_CONF_CHECK_CLOCK_FUZZY(adjusted_mode.member);
+PIPE_CONF_CHECK_CLOCK_FUZZY(base.adjusted_mode.member);
v2: Completely generate the patch with cocci. (Ander)
Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915')
-rw-r--r-- | drivers/gpu/drm/i915/i915_irq.c | 8 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_audio.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_crt.c | 10 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_ddi.c | 18 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_display.c | 147 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_dp.c | 8 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_dp_mst.c | 4 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_drv.h | 12 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_dsi.c | 8 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_dvo.c | 12 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_fbc.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_fbdev.c | 8 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_hdmi.c | 16 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_lvds.c | 8 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_panel.c | 8 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_pm.c | 28 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_psr.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_sdvo.c | 12 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_sprite.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_tv.c | 6 |
20 files changed, 157 insertions, 164 deletions
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c index 8fe5a87705f7..d6a15e5c1f2f 100644 --- a/drivers/gpu/drm/i915/i915_irq.c +++ b/drivers/gpu/drm/i915/i915_irq.c | |||
@@ -593,7 +593,7 @@ static u32 i915_get_vblank_counter(struct drm_device *dev, int pipe) | |||
593 | struct intel_crtc *intel_crtc = | 593 | struct intel_crtc *intel_crtc = |
594 | to_intel_crtc(dev_priv->pipe_to_crtc_mapping[pipe]); | 594 | to_intel_crtc(dev_priv->pipe_to_crtc_mapping[pipe]); |
595 | const struct drm_display_mode *mode = | 595 | const struct drm_display_mode *mode = |
596 | &intel_crtc->config.adjusted_mode; | 596 | &intel_crtc->config.base.adjusted_mode; |
597 | 597 | ||
598 | htotal = mode->crtc_htotal; | 598 | htotal = mode->crtc_htotal; |
599 | hsync_start = mode->crtc_hsync_start; | 599 | hsync_start = mode->crtc_hsync_start; |
@@ -664,7 +664,7 @@ static int __intel_get_crtc_scanline(struct intel_crtc *crtc) | |||
664 | { | 664 | { |
665 | struct drm_device *dev = crtc->base.dev; | 665 | struct drm_device *dev = crtc->base.dev; |
666 | struct drm_i915_private *dev_priv = dev->dev_private; | 666 | struct drm_i915_private *dev_priv = dev->dev_private; |
667 | const struct drm_display_mode *mode = &crtc->config.adjusted_mode; | 667 | const struct drm_display_mode *mode = &crtc->config.base.adjusted_mode; |
668 | enum pipe pipe = crtc->pipe; | 668 | enum pipe pipe = crtc->pipe; |
669 | int position, vtotal; | 669 | int position, vtotal; |
670 | 670 | ||
@@ -691,7 +691,7 @@ static int i915_get_crtc_scanoutpos(struct drm_device *dev, int pipe, | |||
691 | struct drm_i915_private *dev_priv = dev->dev_private; | 691 | struct drm_i915_private *dev_priv = dev->dev_private; |
692 | struct drm_crtc *crtc = dev_priv->pipe_to_crtc_mapping[pipe]; | 692 | struct drm_crtc *crtc = dev_priv->pipe_to_crtc_mapping[pipe]; |
693 | struct intel_crtc *intel_crtc = to_intel_crtc(crtc); | 693 | struct intel_crtc *intel_crtc = to_intel_crtc(crtc); |
694 | const struct drm_display_mode *mode = &intel_crtc->config.adjusted_mode; | 694 | const struct drm_display_mode *mode = &intel_crtc->config.base.adjusted_mode; |
695 | int position; | 695 | int position; |
696 | int vbl_start, vbl_end, hsync_start, htotal, vtotal; | 696 | int vbl_start, vbl_end, hsync_start, htotal, vtotal; |
697 | bool in_vbl = true; | 697 | bool in_vbl = true; |
@@ -849,7 +849,7 @@ static int i915_get_vblank_timestamp(struct drm_device *dev, int pipe, | |||
849 | return drm_calc_vbltimestamp_from_scanoutpos(dev, pipe, max_error, | 849 | return drm_calc_vbltimestamp_from_scanoutpos(dev, pipe, max_error, |
850 | vblank_time, flags, | 850 | vblank_time, flags, |
851 | crtc, | 851 | crtc, |
852 | &to_intel_crtc(crtc)->config.adjusted_mode); | 852 | &to_intel_crtc(crtc)->config.base.adjusted_mode); |
853 | } | 853 | } |
854 | 854 | ||
855 | static bool intel_hpd_irq_event(struct drm_device *dev, | 855 | static bool intel_hpd_irq_event(struct drm_device *dev, |
diff --git a/drivers/gpu/drm/i915/intel_audio.c b/drivers/gpu/drm/i915/intel_audio.c index ee41b882e71a..2a3f8cb3f35b 100644 --- a/drivers/gpu/drm/i915/intel_audio.c +++ b/drivers/gpu/drm/i915/intel_audio.c | |||
@@ -400,7 +400,7 @@ void intel_audio_codec_enable(struct intel_encoder *intel_encoder) | |||
400 | { | 400 | { |
401 | struct drm_encoder *encoder = &intel_encoder->base; | 401 | struct drm_encoder *encoder = &intel_encoder->base; |
402 | struct intel_crtc *crtc = to_intel_crtc(encoder->crtc); | 402 | struct intel_crtc *crtc = to_intel_crtc(encoder->crtc); |
403 | struct drm_display_mode *mode = &crtc->config.adjusted_mode; | 403 | struct drm_display_mode *mode = &crtc->config.base.adjusted_mode; |
404 | struct drm_connector *connector; | 404 | struct drm_connector *connector; |
405 | struct drm_device *dev = encoder->dev; | 405 | struct drm_device *dev = encoder->dev; |
406 | struct drm_i915_private *dev_priv = dev->dev_private; | 406 | struct drm_i915_private *dev_priv = dev->dev_private; |
diff --git a/drivers/gpu/drm/i915/intel_crt.c b/drivers/gpu/drm/i915/intel_crt.c index 675b85a8ad7d..e4f6d4983251 100644 --- a/drivers/gpu/drm/i915/intel_crt.c +++ b/drivers/gpu/drm/i915/intel_crt.c | |||
@@ -115,14 +115,14 @@ static void intel_crt_get_config(struct intel_encoder *encoder, | |||
115 | struct drm_device *dev = encoder->base.dev; | 115 | struct drm_device *dev = encoder->base.dev; |
116 | int dotclock; | 116 | int dotclock; |
117 | 117 | ||
118 | pipe_config->adjusted_mode.flags |= intel_crt_get_flags(encoder); | 118 | pipe_config->base.adjusted_mode.flags |= intel_crt_get_flags(encoder); |
119 | 119 | ||
120 | dotclock = pipe_config->port_clock; | 120 | dotclock = pipe_config->port_clock; |
121 | 121 | ||
122 | if (HAS_PCH_SPLIT(dev)) | 122 | if (HAS_PCH_SPLIT(dev)) |
123 | ironlake_check_encoder_dotclock(pipe_config, dotclock); | 123 | ironlake_check_encoder_dotclock(pipe_config, dotclock); |
124 | 124 | ||
125 | pipe_config->adjusted_mode.crtc_clock = dotclock; | 125 | pipe_config->base.adjusted_mode.crtc_clock = dotclock; |
126 | } | 126 | } |
127 | 127 | ||
128 | static void hsw_crt_get_config(struct intel_encoder *encoder, | 128 | static void hsw_crt_get_config(struct intel_encoder *encoder, |
@@ -130,11 +130,11 @@ static void hsw_crt_get_config(struct intel_encoder *encoder, | |||
130 | { | 130 | { |
131 | intel_ddi_get_config(encoder, pipe_config); | 131 | intel_ddi_get_config(encoder, pipe_config); |
132 | 132 | ||
133 | pipe_config->adjusted_mode.flags &= ~(DRM_MODE_FLAG_PHSYNC | | 133 | pipe_config->base.adjusted_mode.flags &= ~(DRM_MODE_FLAG_PHSYNC | |
134 | DRM_MODE_FLAG_NHSYNC | | 134 | DRM_MODE_FLAG_NHSYNC | |
135 | DRM_MODE_FLAG_PVSYNC | | 135 | DRM_MODE_FLAG_PVSYNC | |
136 | DRM_MODE_FLAG_NVSYNC); | 136 | DRM_MODE_FLAG_NVSYNC); |
137 | pipe_config->adjusted_mode.flags |= intel_crt_get_flags(encoder); | 137 | pipe_config->base.adjusted_mode.flags |= intel_crt_get_flags(encoder); |
138 | } | 138 | } |
139 | 139 | ||
140 | static void hsw_crt_pre_enable(struct intel_encoder *encoder) | 140 | static void hsw_crt_pre_enable(struct intel_encoder *encoder) |
@@ -157,7 +157,7 @@ static void intel_crt_set_dpms(struct intel_encoder *encoder, int mode) | |||
157 | struct drm_i915_private *dev_priv = dev->dev_private; | 157 | struct drm_i915_private *dev_priv = dev->dev_private; |
158 | struct intel_crt *crt = intel_encoder_to_crt(encoder); | 158 | struct intel_crt *crt = intel_encoder_to_crt(encoder); |
159 | struct intel_crtc *crtc = to_intel_crtc(encoder->base.crtc); | 159 | struct intel_crtc *crtc = to_intel_crtc(encoder->base.crtc); |
160 | struct drm_display_mode *adjusted_mode = &crtc->config.adjusted_mode; | 160 | struct drm_display_mode *adjusted_mode = &crtc->config.base.adjusted_mode; |
161 | u32 adpa; | 161 | u32 adpa; |
162 | 162 | ||
163 | if (INTEL_INFO(dev)->gen >= 5) | 163 | if (INTEL_INFO(dev)->gen >= 5) |
diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c index 1cc38eb8206c..7de71ee3b9d1 100644 --- a/drivers/gpu/drm/i915/intel_ddi.c +++ b/drivers/gpu/drm/i915/intel_ddi.c | |||
@@ -768,11 +768,11 @@ static void skl_ddi_clock_get(struct intel_encoder *encoder, | |||
768 | pipe_config->port_clock = link_clock; | 768 | pipe_config->port_clock = link_clock; |
769 | 769 | ||
770 | if (pipe_config->has_dp_encoder) | 770 | if (pipe_config->has_dp_encoder) |
771 | pipe_config->adjusted_mode.crtc_clock = | 771 | pipe_config->base.adjusted_mode.crtc_clock = |
772 | intel_dotclock_calculate(pipe_config->port_clock, | 772 | intel_dotclock_calculate(pipe_config->port_clock, |
773 | &pipe_config->dp_m_n); | 773 | &pipe_config->dp_m_n); |
774 | else | 774 | else |
775 | pipe_config->adjusted_mode.crtc_clock = pipe_config->port_clock; | 775 | pipe_config->base.adjusted_mode.crtc_clock = pipe_config->port_clock; |
776 | } | 776 | } |
777 | 777 | ||
778 | static void hsw_ddi_clock_get(struct intel_encoder *encoder, | 778 | static void hsw_ddi_clock_get(struct intel_encoder *encoder, |
@@ -820,15 +820,15 @@ static void hsw_ddi_clock_get(struct intel_encoder *encoder, | |||
820 | pipe_config->port_clock = link_clock * 2; | 820 | pipe_config->port_clock = link_clock * 2; |
821 | 821 | ||
822 | if (pipe_config->has_pch_encoder) | 822 | if (pipe_config->has_pch_encoder) |
823 | pipe_config->adjusted_mode.crtc_clock = | 823 | pipe_config->base.adjusted_mode.crtc_clock = |
824 | intel_dotclock_calculate(pipe_config->port_clock, | 824 | intel_dotclock_calculate(pipe_config->port_clock, |
825 | &pipe_config->fdi_m_n); | 825 | &pipe_config->fdi_m_n); |
826 | else if (pipe_config->has_dp_encoder) | 826 | else if (pipe_config->has_dp_encoder) |
827 | pipe_config->adjusted_mode.crtc_clock = | 827 | pipe_config->base.adjusted_mode.crtc_clock = |
828 | intel_dotclock_calculate(pipe_config->port_clock, | 828 | intel_dotclock_calculate(pipe_config->port_clock, |
829 | &pipe_config->dp_m_n); | 829 | &pipe_config->dp_m_n); |
830 | else | 830 | else |
831 | pipe_config->adjusted_mode.crtc_clock = pipe_config->port_clock; | 831 | pipe_config->base.adjusted_mode.crtc_clock = pipe_config->port_clock; |
832 | } | 832 | } |
833 | 833 | ||
834 | void intel_ddi_clock_get(struct intel_encoder *encoder, | 834 | void intel_ddi_clock_get(struct intel_encoder *encoder, |
@@ -1261,9 +1261,9 @@ void intel_ddi_enable_transcoder_func(struct drm_crtc *crtc) | |||
1261 | BUG(); | 1261 | BUG(); |
1262 | } | 1262 | } |
1263 | 1263 | ||
1264 | if (intel_crtc->config.adjusted_mode.flags & DRM_MODE_FLAG_PVSYNC) | 1264 | if (intel_crtc->config.base.adjusted_mode.flags & DRM_MODE_FLAG_PVSYNC) |
1265 | temp |= TRANS_DDI_PVSYNC; | 1265 | temp |= TRANS_DDI_PVSYNC; |
1266 | if (intel_crtc->config.adjusted_mode.flags & DRM_MODE_FLAG_PHSYNC) | 1266 | if (intel_crtc->config.base.adjusted_mode.flags & DRM_MODE_FLAG_PHSYNC) |
1267 | temp |= TRANS_DDI_PHSYNC; | 1267 | temp |= TRANS_DDI_PHSYNC; |
1268 | 1268 | ||
1269 | if (cpu_transcoder == TRANSCODER_EDP) { | 1269 | if (cpu_transcoder == TRANSCODER_EDP) { |
@@ -1533,7 +1533,7 @@ static void intel_ddi_pre_enable(struct intel_encoder *intel_encoder) | |||
1533 | 1533 | ||
1534 | intel_hdmi->set_infoframes(encoder, | 1534 | intel_hdmi->set_infoframes(encoder, |
1535 | crtc->config.has_hdmi_sink, | 1535 | crtc->config.has_hdmi_sink, |
1536 | &crtc->config.adjusted_mode); | 1536 | &crtc->config.base.adjusted_mode); |
1537 | } | 1537 | } |
1538 | } | 1538 | } |
1539 | 1539 | ||
@@ -2045,7 +2045,7 @@ void intel_ddi_get_config(struct intel_encoder *encoder, | |||
2045 | else | 2045 | else |
2046 | flags |= DRM_MODE_FLAG_NVSYNC; | 2046 | flags |= DRM_MODE_FLAG_NVSYNC; |
2047 | 2047 | ||
2048 | pipe_config->adjusted_mode.flags |= flags; | 2048 | pipe_config->base.adjusted_mode.flags |= flags; |
2049 | 2049 | ||
2050 | switch (temp & TRANS_DDI_BPC_MASK) { | 2050 | switch (temp & TRANS_DDI_BPC_MASK) { |
2051 | case TRANS_DDI_BPC_6: | 2051 | case TRANS_DDI_BPC_6: |
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 536a66a9e71a..1a56d50b3c03 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
@@ -897,7 +897,7 @@ bool intel_crtc_active(struct drm_crtc *crtc) | |||
897 | * properly reconstruct framebuffers. | 897 | * properly reconstruct framebuffers. |
898 | */ | 898 | */ |
899 | return intel_crtc->active && crtc->primary->fb && | 899 | return intel_crtc->active && crtc->primary->fb && |
900 | intel_crtc->config.adjusted_mode.crtc_clock; | 900 | intel_crtc->config.base.adjusted_mode.crtc_clock; |
901 | } | 901 | } |
902 | 902 | ||
903 | enum transcoder intel_pipe_to_cpu_transcoder(struct drm_i915_private *dev_priv, | 903 | enum transcoder intel_pipe_to_cpu_transcoder(struct drm_i915_private *dev_priv, |
@@ -2941,7 +2941,7 @@ static void intel_update_pipe_size(struct intel_crtc *crtc) | |||
2941 | * then update the pipesrc and pfit state, even on the flip path. | 2941 | * then update the pipesrc and pfit state, even on the flip path. |
2942 | */ | 2942 | */ |
2943 | 2943 | ||
2944 | adjusted_mode = &crtc->config.adjusted_mode; | 2944 | adjusted_mode = &crtc->config.base.adjusted_mode; |
2945 | 2945 | ||
2946 | I915_WRITE(PIPESRC(crtc->pipe), | 2946 | I915_WRITE(PIPESRC(crtc->pipe), |
2947 | ((adjusted_mode->crtc_hdisplay - 1) << 16) | | 2947 | ((adjusted_mode->crtc_hdisplay - 1) << 16) | |
@@ -3577,7 +3577,7 @@ static void lpt_program_iclkip(struct drm_crtc *crtc) | |||
3577 | { | 3577 | { |
3578 | struct drm_device *dev = crtc->dev; | 3578 | struct drm_device *dev = crtc->dev; |
3579 | struct drm_i915_private *dev_priv = dev->dev_private; | 3579 | struct drm_i915_private *dev_priv = dev->dev_private; |
3580 | int clock = to_intel_crtc(crtc)->config.adjusted_mode.crtc_clock; | 3580 | int clock = to_intel_crtc(crtc)->config.base.adjusted_mode.crtc_clock; |
3581 | u32 divsel, phaseinc, auxdiv, phasedir = 0; | 3581 | u32 divsel, phaseinc, auxdiv, phasedir = 0; |
3582 | u32 temp; | 3582 | u32 temp; |
3583 | 3583 | ||
@@ -4908,7 +4908,7 @@ static int intel_mode_max_pixclk(struct drm_i915_private *dev_priv) | |||
4908 | for_each_intel_crtc(dev, intel_crtc) { | 4908 | for_each_intel_crtc(dev, intel_crtc) { |
4909 | if (intel_crtc->new_enabled) | 4909 | if (intel_crtc->new_enabled) |
4910 | max_pixclk = max(max_pixclk, | 4910 | max_pixclk = max(max_pixclk, |
4911 | intel_crtc->new_config->adjusted_mode.crtc_clock); | 4911 | intel_crtc->new_config->base.adjusted_mode.crtc_clock); |
4912 | } | 4912 | } |
4913 | 4913 | ||
4914 | return max_pixclk; | 4914 | return max_pixclk; |
@@ -5429,7 +5429,7 @@ static int ironlake_fdi_compute_config(struct intel_crtc *intel_crtc, | |||
5429 | struct intel_crtc_state *pipe_config) | 5429 | struct intel_crtc_state *pipe_config) |
5430 | { | 5430 | { |
5431 | struct drm_device *dev = intel_crtc->base.dev; | 5431 | struct drm_device *dev = intel_crtc->base.dev; |
5432 | struct drm_display_mode *adjusted_mode = &pipe_config->adjusted_mode; | 5432 | struct drm_display_mode *adjusted_mode = &pipe_config->base.adjusted_mode; |
5433 | int lane, link_bw, fdi_dotclock; | 5433 | int lane, link_bw, fdi_dotclock; |
5434 | bool setup_ok, needs_recompute = false; | 5434 | bool setup_ok, needs_recompute = false; |
5435 | 5435 | ||
@@ -5484,7 +5484,7 @@ static int intel_crtc_compute_config(struct intel_crtc *crtc, | |||
5484 | { | 5484 | { |
5485 | struct drm_device *dev = crtc->base.dev; | 5485 | struct drm_device *dev = crtc->base.dev; |
5486 | struct drm_i915_private *dev_priv = dev->dev_private; | 5486 | struct drm_i915_private *dev_priv = dev->dev_private; |
5487 | struct drm_display_mode *adjusted_mode = &pipe_config->adjusted_mode; | 5487 | struct drm_display_mode *adjusted_mode = &pipe_config->base.adjusted_mode; |
5488 | 5488 | ||
5489 | /* FIXME should check pixel clock limits on all platforms */ | 5489 | /* FIXME should check pixel clock limits on all platforms */ |
5490 | if (INTEL_INFO(dev)->gen < 4) { | 5490 | if (INTEL_INFO(dev)->gen < 4) { |
@@ -6206,7 +6206,7 @@ static void intel_set_pipe_timings(struct intel_crtc *intel_crtc) | |||
6206 | enum pipe pipe = intel_crtc->pipe; | 6206 | enum pipe pipe = intel_crtc->pipe; |
6207 | enum transcoder cpu_transcoder = intel_crtc->config.cpu_transcoder; | 6207 | enum transcoder cpu_transcoder = intel_crtc->config.cpu_transcoder; |
6208 | struct drm_display_mode *adjusted_mode = | 6208 | struct drm_display_mode *adjusted_mode = |
6209 | &intel_crtc->config.adjusted_mode; | 6209 | &intel_crtc->config.base.adjusted_mode; |
6210 | uint32_t crtc_vtotal, crtc_vblank_end; | 6210 | uint32_t crtc_vtotal, crtc_vblank_end; |
6211 | int vsyncshift = 0; | 6211 | int vsyncshift = 0; |
6212 | 6212 | ||
@@ -6277,56 +6277,56 @@ static void intel_get_pipe_timings(struct intel_crtc *crtc, | |||
6277 | uint32_t tmp; | 6277 | uint32_t tmp; |
6278 | 6278 | ||
6279 | tmp = I915_READ(HTOTAL(cpu_transcoder)); | 6279 | tmp = I915_READ(HTOTAL(cpu_transcoder)); |
6280 | pipe_config->adjusted_mode.crtc_hdisplay = (tmp & 0xffff) + 1; | 6280 | pipe_config->base.adjusted_mode.crtc_hdisplay = (tmp & 0xffff) + 1; |
6281 | pipe_config->adjusted_mode.crtc_htotal = ((tmp >> 16) & 0xffff) + 1; | 6281 | pipe_config->base.adjusted_mode.crtc_htotal = ((tmp >> 16) & 0xffff) + 1; |
6282 | tmp = I915_READ(HBLANK(cpu_transcoder)); | 6282 | tmp = I915_READ(HBLANK(cpu_transcoder)); |
6283 | pipe_config->adjusted_mode.crtc_hblank_start = (tmp & 0xffff) + 1; | 6283 | pipe_config->base.adjusted_mode.crtc_hblank_start = (tmp & 0xffff) + 1; |
6284 | pipe_config->adjusted_mode.crtc_hblank_end = ((tmp >> 16) & 0xffff) + 1; | 6284 | pipe_config->base.adjusted_mode.crtc_hblank_end = ((tmp >> 16) & 0xffff) + 1; |
6285 | tmp = I915_READ(HSYNC(cpu_transcoder)); | 6285 | tmp = I915_READ(HSYNC(cpu_transcoder)); |
6286 | pipe_config->adjusted_mode.crtc_hsync_start = (tmp & 0xffff) + 1; | 6286 | pipe_config->base.adjusted_mode.crtc_hsync_start = (tmp & 0xffff) + 1; |
6287 | pipe_config->adjusted_mode.crtc_hsync_end = ((tmp >> 16) & 0xffff) + 1; | 6287 | pipe_config->base.adjusted_mode.crtc_hsync_end = ((tmp >> 16) & 0xffff) + 1; |
6288 | 6288 | ||
6289 | tmp = I915_READ(VTOTAL(cpu_transcoder)); | 6289 | tmp = I915_READ(VTOTAL(cpu_transcoder)); |
6290 | pipe_config->adjusted_mode.crtc_vdisplay = (tmp & 0xffff) + 1; | 6290 | pipe_config->base.adjusted_mode.crtc_vdisplay = (tmp & 0xffff) + 1; |
6291 | pipe_config->adjusted_mode.crtc_vtotal = ((tmp >> 16) & 0xffff) + 1; | 6291 | pipe_config->base.adjusted_mode.crtc_vtotal = ((tmp >> 16) & 0xffff) + 1; |
6292 | tmp = I915_READ(VBLANK(cpu_transcoder)); | 6292 | tmp = I915_READ(VBLANK(cpu_transcoder)); |
6293 | pipe_config->adjusted_mode.crtc_vblank_start = (tmp & 0xffff) + 1; | 6293 | pipe_config->base.adjusted_mode.crtc_vblank_start = (tmp & 0xffff) + 1; |
6294 | pipe_config->adjusted_mode.crtc_vblank_end = ((tmp >> 16) & 0xffff) + 1; | 6294 | pipe_config->base.adjusted_mode.crtc_vblank_end = ((tmp >> 16) & 0xffff) + 1; |
6295 | tmp = I915_READ(VSYNC(cpu_transcoder)); | 6295 | tmp = I915_READ(VSYNC(cpu_transcoder)); |
6296 | pipe_config->adjusted_mode.crtc_vsync_start = (tmp & 0xffff) + 1; | 6296 | pipe_config->base.adjusted_mode.crtc_vsync_start = (tmp & 0xffff) + 1; |
6297 | pipe_config->adjusted_mode.crtc_vsync_end = ((tmp >> 16) & 0xffff) + 1; | 6297 | pipe_config->base.adjusted_mode.crtc_vsync_end = ((tmp >> 16) & 0xffff) + 1; |
6298 | 6298 | ||
6299 | if (I915_READ(PIPECONF(cpu_transcoder)) & PIPECONF_INTERLACE_MASK) { | 6299 | if (I915_READ(PIPECONF(cpu_transcoder)) & PIPECONF_INTERLACE_MASK) { |
6300 | pipe_config->adjusted_mode.flags |= DRM_MODE_FLAG_INTERLACE; | 6300 | pipe_config->base.adjusted_mode.flags |= DRM_MODE_FLAG_INTERLACE; |
6301 | pipe_config->adjusted_mode.crtc_vtotal += 1; | 6301 | pipe_config->base.adjusted_mode.crtc_vtotal += 1; |
6302 | pipe_config->adjusted_mode.crtc_vblank_end += 1; | 6302 | pipe_config->base.adjusted_mode.crtc_vblank_end += 1; |
6303 | } | 6303 | } |
6304 | 6304 | ||
6305 | tmp = I915_READ(PIPESRC(crtc->pipe)); | 6305 | tmp = I915_READ(PIPESRC(crtc->pipe)); |
6306 | pipe_config->pipe_src_h = (tmp & 0xffff) + 1; | 6306 | pipe_config->pipe_src_h = (tmp & 0xffff) + 1; |
6307 | pipe_config->pipe_src_w = ((tmp >> 16) & 0xffff) + 1; | 6307 | pipe_config->pipe_src_w = ((tmp >> 16) & 0xffff) + 1; |
6308 | 6308 | ||
6309 | pipe_config->requested_mode.vdisplay = pipe_config->pipe_src_h; | 6309 | pipe_config->base.mode.vdisplay = pipe_config->pipe_src_h; |
6310 | pipe_config->requested_mode.hdisplay = pipe_config->pipe_src_w; | 6310 | pipe_config->base.mode.hdisplay = pipe_config->pipe_src_w; |
6311 | } | 6311 | } |
6312 | 6312 | ||
6313 | void intel_mode_from_pipe_config(struct drm_display_mode *mode, | 6313 | void intel_mode_from_pipe_config(struct drm_display_mode *mode, |
6314 | struct intel_crtc_state *pipe_config) | 6314 | struct intel_crtc_state *pipe_config) |
6315 | { | 6315 | { |
6316 | mode->hdisplay = pipe_config->adjusted_mode.crtc_hdisplay; | 6316 | mode->hdisplay = pipe_config->base.adjusted_mode.crtc_hdisplay; |
6317 | mode->htotal = pipe_config->adjusted_mode.crtc_htotal; | 6317 | mode->htotal = pipe_config->base.adjusted_mode.crtc_htotal; |
6318 | mode->hsync_start = pipe_config->adjusted_mode.crtc_hsync_start; | 6318 | mode->hsync_start = pipe_config->base.adjusted_mode.crtc_hsync_start; |
6319 | mode->hsync_end = pipe_config->adjusted_mode.crtc_hsync_end; | 6319 | mode->hsync_end = pipe_config->base.adjusted_mode.crtc_hsync_end; |
6320 | 6320 | ||
6321 | mode->vdisplay = pipe_config->adjusted_mode.crtc_vdisplay; | 6321 | mode->vdisplay = pipe_config->base.adjusted_mode.crtc_vdisplay; |
6322 | mode->vtotal = pipe_config->adjusted_mode.crtc_vtotal; | 6322 | mode->vtotal = pipe_config->base.adjusted_mode.crtc_vtotal; |
6323 | mode->vsync_start = pipe_config->adjusted_mode.crtc_vsync_start; | 6323 | mode->vsync_start = pipe_config->base.adjusted_mode.crtc_vsync_start; |
6324 | mode->vsync_end = pipe_config->adjusted_mode.crtc_vsync_end; | 6324 | mode->vsync_end = pipe_config->base.adjusted_mode.crtc_vsync_end; |
6325 | 6325 | ||
6326 | mode->flags = pipe_config->adjusted_mode.flags; | 6326 | mode->flags = pipe_config->base.adjusted_mode.flags; |
6327 | 6327 | ||
6328 | mode->clock = pipe_config->adjusted_mode.crtc_clock; | 6328 | mode->clock = pipe_config->base.adjusted_mode.crtc_clock; |
6329 | mode->flags |= pipe_config->adjusted_mode.flags; | 6329 | mode->flags |= pipe_config->base.adjusted_mode.flags; |
6330 | } | 6330 | } |
6331 | 6331 | ||
6332 | static void i9xx_set_pipeconf(struct intel_crtc *intel_crtc) | 6332 | static void i9xx_set_pipeconf(struct intel_crtc *intel_crtc) |
@@ -6376,7 +6376,7 @@ static void i9xx_set_pipeconf(struct intel_crtc *intel_crtc) | |||
6376 | } | 6376 | } |
6377 | } | 6377 | } |
6378 | 6378 | ||
6379 | if (intel_crtc->config.adjusted_mode.flags & DRM_MODE_FLAG_INTERLACE) { | 6379 | if (intel_crtc->config.base.adjusted_mode.flags & DRM_MODE_FLAG_INTERLACE) { |
6380 | if (INTEL_INFO(dev)->gen < 4 || | 6380 | if (INTEL_INFO(dev)->gen < 4 || |
6381 | intel_pipe_has_type(intel_crtc, INTEL_OUTPUT_SDVO)) | 6381 | intel_pipe_has_type(intel_crtc, INTEL_OUTPUT_SDVO)) |
6382 | pipeconf |= PIPECONF_INTERLACE_W_FIELD_INDICATION; | 6382 | pipeconf |= PIPECONF_INTERLACE_W_FIELD_INDICATION; |
@@ -7133,7 +7133,7 @@ static void ironlake_set_pipeconf(struct drm_crtc *crtc) | |||
7133 | if (intel_crtc->config.dither) | 7133 | if (intel_crtc->config.dither) |
7134 | val |= (PIPECONF_DITHER_EN | PIPECONF_DITHER_TYPE_SP); | 7134 | val |= (PIPECONF_DITHER_EN | PIPECONF_DITHER_TYPE_SP); |
7135 | 7135 | ||
7136 | if (intel_crtc->config.adjusted_mode.flags & DRM_MODE_FLAG_INTERLACE) | 7136 | if (intel_crtc->config.base.adjusted_mode.flags & DRM_MODE_FLAG_INTERLACE) |
7137 | val |= PIPECONF_INTERLACED_ILK; | 7137 | val |= PIPECONF_INTERLACED_ILK; |
7138 | else | 7138 | else |
7139 | val |= PIPECONF_PROGRESSIVE; | 7139 | val |= PIPECONF_PROGRESSIVE; |
@@ -7223,7 +7223,7 @@ static void haswell_set_pipeconf(struct drm_crtc *crtc) | |||
7223 | if (IS_HASWELL(dev) && intel_crtc->config.dither) | 7223 | if (IS_HASWELL(dev) && intel_crtc->config.dither) |
7224 | val |= (PIPECONF_DITHER_EN | PIPECONF_DITHER_TYPE_SP); | 7224 | val |= (PIPECONF_DITHER_EN | PIPECONF_DITHER_TYPE_SP); |
7225 | 7225 | ||
7226 | if (intel_crtc->config.adjusted_mode.flags & DRM_MODE_FLAG_INTERLACE) | 7226 | if (intel_crtc->config.base.adjusted_mode.flags & DRM_MODE_FLAG_INTERLACE) |
7227 | val |= PIPECONF_INTERLACED_ILK; | 7227 | val |= PIPECONF_INTERLACED_ILK; |
7228 | else | 7228 | else |
7229 | val |= PIPECONF_PROGRESSIVE; | 7229 | val |= PIPECONF_PROGRESSIVE; |
@@ -8789,7 +8789,7 @@ static void ironlake_pch_clock_get(struct intel_crtc *crtc, | |||
8789 | * agree once we know their relationship in the encoder's | 8789 | * agree once we know their relationship in the encoder's |
8790 | * get_config() function. | 8790 | * get_config() function. |
8791 | */ | 8791 | */ |
8792 | pipe_config->adjusted_mode.crtc_clock = | 8792 | pipe_config->base.adjusted_mode.crtc_clock = |
8793 | intel_dotclock_calculate(intel_fdi_link_freq(dev) * 10000, | 8793 | intel_dotclock_calculate(intel_fdi_link_freq(dev) * 10000, |
8794 | &pipe_config->fdi_m_n); | 8794 | &pipe_config->fdi_m_n); |
8795 | } | 8795 | } |
@@ -9981,10 +9981,10 @@ static void intel_dump_pipe_config(struct intel_crtc *crtc, | |||
9981 | pipe_config->has_infoframe); | 9981 | pipe_config->has_infoframe); |
9982 | 9982 | ||
9983 | DRM_DEBUG_KMS("requested mode:\n"); | 9983 | DRM_DEBUG_KMS("requested mode:\n"); |
9984 | drm_mode_debug_printmodeline(&pipe_config->requested_mode); | 9984 | drm_mode_debug_printmodeline(&pipe_config->base.mode); |
9985 | DRM_DEBUG_KMS("adjusted mode:\n"); | 9985 | DRM_DEBUG_KMS("adjusted mode:\n"); |
9986 | drm_mode_debug_printmodeline(&pipe_config->adjusted_mode); | 9986 | drm_mode_debug_printmodeline(&pipe_config->base.adjusted_mode); |
9987 | intel_dump_crtc_timings(&pipe_config->adjusted_mode); | 9987 | intel_dump_crtc_timings(&pipe_config->base.adjusted_mode); |
9988 | DRM_DEBUG_KMS("port clock: %d\n", pipe_config->port_clock); | 9988 | DRM_DEBUG_KMS("port clock: %d\n", pipe_config->port_clock); |
9989 | DRM_DEBUG_KMS("pipe src size: %dx%d\n", | 9989 | DRM_DEBUG_KMS("pipe src size: %dx%d\n", |
9990 | pipe_config->pipe_src_w, pipe_config->pipe_src_h); | 9990 | pipe_config->pipe_src_w, pipe_config->pipe_src_h); |
@@ -10108,8 +10108,8 @@ intel_modeset_pipe_config(struct drm_crtc *crtc, | |||
10108 | if (!pipe_config) | 10108 | if (!pipe_config) |
10109 | return ERR_PTR(-ENOMEM); | 10109 | return ERR_PTR(-ENOMEM); |
10110 | 10110 | ||
10111 | drm_mode_copy(&pipe_config->adjusted_mode, mode); | 10111 | drm_mode_copy(&pipe_config->base.adjusted_mode, mode); |
10112 | drm_mode_copy(&pipe_config->requested_mode, mode); | 10112 | drm_mode_copy(&pipe_config->base.mode, mode); |
10113 | 10113 | ||
10114 | pipe_config->cpu_transcoder = | 10114 | pipe_config->cpu_transcoder = |
10115 | (enum transcoder) to_intel_crtc(crtc)->pipe; | 10115 | (enum transcoder) to_intel_crtc(crtc)->pipe; |
@@ -10120,13 +10120,13 @@ intel_modeset_pipe_config(struct drm_crtc *crtc, | |||
10120 | * positive or negative polarity is requested, treat this as meaning | 10120 | * positive or negative polarity is requested, treat this as meaning |
10121 | * negative polarity. | 10121 | * negative polarity. |
10122 | */ | 10122 | */ |
10123 | if (!(pipe_config->adjusted_mode.flags & | 10123 | if (!(pipe_config->base.adjusted_mode.flags & |
10124 | (DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_NHSYNC))) | 10124 | (DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_NHSYNC))) |
10125 | pipe_config->adjusted_mode.flags |= DRM_MODE_FLAG_NHSYNC; | 10125 | pipe_config->base.adjusted_mode.flags |= DRM_MODE_FLAG_NHSYNC; |
10126 | 10126 | ||
10127 | if (!(pipe_config->adjusted_mode.flags & | 10127 | if (!(pipe_config->base.adjusted_mode.flags & |
10128 | (DRM_MODE_FLAG_PVSYNC | DRM_MODE_FLAG_NVSYNC))) | 10128 | (DRM_MODE_FLAG_PVSYNC | DRM_MODE_FLAG_NVSYNC))) |
10129 | pipe_config->adjusted_mode.flags |= DRM_MODE_FLAG_NVSYNC; | 10129 | pipe_config->base.adjusted_mode.flags |= DRM_MODE_FLAG_NVSYNC; |
10130 | 10130 | ||
10131 | /* Compute a starting value for pipe_config->pipe_bpp taking the source | 10131 | /* Compute a starting value for pipe_config->pipe_bpp taking the source |
10132 | * plane pixel format and any sink constraints into account. Returns the | 10132 | * plane pixel format and any sink constraints into account. Returns the |
@@ -10145,7 +10145,7 @@ intel_modeset_pipe_config(struct drm_crtc *crtc, | |||
10145 | * computation to clearly distinguish it from the adjusted mode, which | 10145 | * computation to clearly distinguish it from the adjusted mode, which |
10146 | * can be changed by the connectors in the below retry loop. | 10146 | * can be changed by the connectors in the below retry loop. |
10147 | */ | 10147 | */ |
10148 | drm_crtc_get_hv_timing(&pipe_config->requested_mode, | 10148 | drm_crtc_get_hv_timing(&pipe_config->base.mode, |
10149 | &pipe_config->pipe_src_w, | 10149 | &pipe_config->pipe_src_w, |
10150 | &pipe_config->pipe_src_h); | 10150 | &pipe_config->pipe_src_h); |
10151 | 10151 | ||
@@ -10155,7 +10155,8 @@ encoder_retry: | |||
10155 | pipe_config->pixel_multiplier = 1; | 10155 | pipe_config->pixel_multiplier = 1; |
10156 | 10156 | ||
10157 | /* Fill in default crtc timings, allow encoders to overwrite them. */ | 10157 | /* Fill in default crtc timings, allow encoders to overwrite them. */ |
10158 | drm_mode_set_crtcinfo(&pipe_config->adjusted_mode, CRTC_STEREO_DOUBLE); | 10158 | drm_mode_set_crtcinfo(&pipe_config->base.adjusted_mode, |
10159 | CRTC_STEREO_DOUBLE); | ||
10159 | 10160 | ||
10160 | /* Pass our mode to the connectors and the CRTC to give them a chance to | 10161 | /* Pass our mode to the connectors and the CRTC to give them a chance to |
10161 | * adjust it according to limitations or connector properties, and also | 10162 | * adjust it according to limitations or connector properties, and also |
@@ -10175,7 +10176,7 @@ encoder_retry: | |||
10175 | /* Set default port clock if not overwritten by the encoder. Needs to be | 10176 | /* Set default port clock if not overwritten by the encoder. Needs to be |
10176 | * done afterwards in case the encoder adjusts the mode. */ | 10177 | * done afterwards in case the encoder adjusts the mode. */ |
10177 | if (!pipe_config->port_clock) | 10178 | if (!pipe_config->port_clock) |
10178 | pipe_config->port_clock = pipe_config->adjusted_mode.crtc_clock | 10179 | pipe_config->port_clock = pipe_config->base.adjusted_mode.crtc_clock |
10179 | * pipe_config->pixel_multiplier; | 10180 | * pipe_config->pixel_multiplier; |
10180 | 10181 | ||
10181 | ret = intel_crtc_compute_config(to_intel_crtc(crtc), pipe_config); | 10182 | ret = intel_crtc_compute_config(to_intel_crtc(crtc), pipe_config); |
@@ -10476,19 +10477,19 @@ intel_pipe_config_compare(struct drm_device *dev, | |||
10476 | PIPE_CONF_CHECK_I_ALT(dp_m_n.tu, dp_m2_n2.tu); | 10477 | PIPE_CONF_CHECK_I_ALT(dp_m_n.tu, dp_m2_n2.tu); |
10477 | } | 10478 | } |
10478 | 10479 | ||
10479 | PIPE_CONF_CHECK_I(adjusted_mode.crtc_hdisplay); | 10480 | PIPE_CONF_CHECK_I(base.adjusted_mode.crtc_hdisplay); |
10480 | PIPE_CONF_CHECK_I(adjusted_mode.crtc_htotal); | 10481 | PIPE_CONF_CHECK_I(base.adjusted_mode.crtc_htotal); |
10481 | PIPE_CONF_CHECK_I(adjusted_mode.crtc_hblank_start); | 10482 | PIPE_CONF_CHECK_I(base.adjusted_mode.crtc_hblank_start); |
10482 | PIPE_CONF_CHECK_I(adjusted_mode.crtc_hblank_end); | 10483 | PIPE_CONF_CHECK_I(base.adjusted_mode.crtc_hblank_end); |
10483 | PIPE_CONF_CHECK_I(adjusted_mode.crtc_hsync_start); | 10484 | PIPE_CONF_CHECK_I(base.adjusted_mode.crtc_hsync_start); |
10484 | PIPE_CONF_CHECK_I(adjusted_mode.crtc_hsync_end); | 10485 | PIPE_CONF_CHECK_I(base.adjusted_mode.crtc_hsync_end); |
10485 | 10486 | ||
10486 | PIPE_CONF_CHECK_I(adjusted_mode.crtc_vdisplay); | 10487 | PIPE_CONF_CHECK_I(base.adjusted_mode.crtc_vdisplay); |
10487 | PIPE_CONF_CHECK_I(adjusted_mode.crtc_vtotal); | 10488 | PIPE_CONF_CHECK_I(base.adjusted_mode.crtc_vtotal); |
10488 | PIPE_CONF_CHECK_I(adjusted_mode.crtc_vblank_start); | 10489 | PIPE_CONF_CHECK_I(base.adjusted_mode.crtc_vblank_start); |
10489 | PIPE_CONF_CHECK_I(adjusted_mode.crtc_vblank_end); | 10490 | PIPE_CONF_CHECK_I(base.adjusted_mode.crtc_vblank_end); |
10490 | PIPE_CONF_CHECK_I(adjusted_mode.crtc_vsync_start); | 10491 | PIPE_CONF_CHECK_I(base.adjusted_mode.crtc_vsync_start); |
10491 | PIPE_CONF_CHECK_I(adjusted_mode.crtc_vsync_end); | 10492 | PIPE_CONF_CHECK_I(base.adjusted_mode.crtc_vsync_end); |
10492 | 10493 | ||
10493 | PIPE_CONF_CHECK_I(pixel_multiplier); | 10494 | PIPE_CONF_CHECK_I(pixel_multiplier); |
10494 | PIPE_CONF_CHECK_I(has_hdmi_sink); | 10495 | PIPE_CONF_CHECK_I(has_hdmi_sink); |
@@ -10499,17 +10500,17 @@ intel_pipe_config_compare(struct drm_device *dev, | |||
10499 | 10500 | ||
10500 | PIPE_CONF_CHECK_I(has_audio); | 10501 | PIPE_CONF_CHECK_I(has_audio); |
10501 | 10502 | ||
10502 | PIPE_CONF_CHECK_FLAGS(adjusted_mode.flags, | 10503 | PIPE_CONF_CHECK_FLAGS(base.adjusted_mode.flags, |
10503 | DRM_MODE_FLAG_INTERLACE); | 10504 | DRM_MODE_FLAG_INTERLACE); |
10504 | 10505 | ||
10505 | if (!PIPE_CONF_QUIRK(PIPE_CONFIG_QUIRK_MODE_SYNC_FLAGS)) { | 10506 | if (!PIPE_CONF_QUIRK(PIPE_CONFIG_QUIRK_MODE_SYNC_FLAGS)) { |
10506 | PIPE_CONF_CHECK_FLAGS(adjusted_mode.flags, | 10507 | PIPE_CONF_CHECK_FLAGS(base.adjusted_mode.flags, |
10507 | DRM_MODE_FLAG_PHSYNC); | 10508 | DRM_MODE_FLAG_PHSYNC); |
10508 | PIPE_CONF_CHECK_FLAGS(adjusted_mode.flags, | 10509 | PIPE_CONF_CHECK_FLAGS(base.adjusted_mode.flags, |
10509 | DRM_MODE_FLAG_NHSYNC); | 10510 | DRM_MODE_FLAG_NHSYNC); |
10510 | PIPE_CONF_CHECK_FLAGS(adjusted_mode.flags, | 10511 | PIPE_CONF_CHECK_FLAGS(base.adjusted_mode.flags, |
10511 | DRM_MODE_FLAG_PVSYNC); | 10512 | DRM_MODE_FLAG_PVSYNC); |
10512 | PIPE_CONF_CHECK_FLAGS(adjusted_mode.flags, | 10513 | PIPE_CONF_CHECK_FLAGS(base.adjusted_mode.flags, |
10513 | DRM_MODE_FLAG_NVSYNC); | 10514 | DRM_MODE_FLAG_NVSYNC); |
10514 | } | 10515 | } |
10515 | 10516 | ||
@@ -10559,7 +10560,7 @@ intel_pipe_config_compare(struct drm_device *dev, | |||
10559 | if (IS_G4X(dev) || INTEL_INFO(dev)->gen >= 5) | 10560 | if (IS_G4X(dev) || INTEL_INFO(dev)->gen >= 5) |
10560 | PIPE_CONF_CHECK_I(pipe_bpp); | 10561 | PIPE_CONF_CHECK_I(pipe_bpp); |
10561 | 10562 | ||
10562 | PIPE_CONF_CHECK_CLOCK_FUZZY(adjusted_mode.crtc_clock); | 10563 | PIPE_CONF_CHECK_CLOCK_FUZZY(base.adjusted_mode.crtc_clock); |
10563 | PIPE_CONF_CHECK_CLOCK_FUZZY(port_clock); | 10564 | PIPE_CONF_CHECK_CLOCK_FUZZY(port_clock); |
10564 | 10565 | ||
10565 | #undef PIPE_CONF_CHECK_X | 10566 | #undef PIPE_CONF_CHECK_X |
@@ -10835,9 +10836,9 @@ void ironlake_check_encoder_dotclock(const struct intel_crtc_state *pipe_config, | |||
10835 | * FDI already provided one idea for the dotclock. | 10836 | * FDI already provided one idea for the dotclock. |
10836 | * Yell if the encoder disagrees. | 10837 | * Yell if the encoder disagrees. |
10837 | */ | 10838 | */ |
10838 | WARN(!intel_fuzzy_clock_check(pipe_config->adjusted_mode.crtc_clock, dotclock), | 10839 | WARN(!intel_fuzzy_clock_check(pipe_config->base.adjusted_mode.crtc_clock, dotclock), |
10839 | "FDI dotclock and encoder dotclock mismatch, fdi: %i, encoder: %i\n", | 10840 | "FDI dotclock and encoder dotclock mismatch, fdi: %i, encoder: %i\n", |
10840 | pipe_config->adjusted_mode.crtc_clock, dotclock); | 10841 | pipe_config->base.adjusted_mode.crtc_clock, dotclock); |
10841 | } | 10842 | } |
10842 | 10843 | ||
10843 | static void update_scanline_offset(struct intel_crtc *crtc) | 10844 | static void update_scanline_offset(struct intel_crtc *crtc) |
@@ -10863,7 +10864,7 @@ static void update_scanline_offset(struct intel_crtc *crtc) | |||
10863 | * one to the value. | 10864 | * one to the value. |
10864 | */ | 10865 | */ |
10865 | if (IS_GEN2(dev)) { | 10866 | if (IS_GEN2(dev)) { |
10866 | const struct drm_display_mode *mode = &crtc->config.adjusted_mode; | 10867 | const struct drm_display_mode *mode = &crtc->config.base.adjusted_mode; |
10867 | int vtotal; | 10868 | int vtotal; |
10868 | 10869 | ||
10869 | vtotal = mode->crtc_vtotal; | 10870 | vtotal = mode->crtc_vtotal; |
@@ -10992,7 +10993,7 @@ static int __intel_set_mode(struct drm_crtc *crtc, | |||
10992 | * timestamping. They are derived from true hwmode. | 10993 | * timestamping. They are derived from true hwmode. |
10993 | */ | 10994 | */ |
10994 | drm_calc_timestamping_constants(crtc, | 10995 | drm_calc_timestamping_constants(crtc, |
10995 | &pipe_config->adjusted_mode); | 10996 | &pipe_config->base.adjusted_mode); |
10996 | } | 10997 | } |
10997 | 10998 | ||
10998 | /* Only after disabling all output pipelines that will be changed can we | 10999 | /* Only after disabling all output pipelines that will be changed can we |
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 28ba283888d3..737ea1681d10 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c | |||
@@ -1155,7 +1155,7 @@ intel_dp_compute_config(struct intel_encoder *encoder, | |||
1155 | { | 1155 | { |
1156 | struct drm_device *dev = encoder->base.dev; | 1156 | struct drm_device *dev = encoder->base.dev; |
1157 | struct drm_i915_private *dev_priv = dev->dev_private; | 1157 | struct drm_i915_private *dev_priv = dev->dev_private; |
1158 | struct drm_display_mode *adjusted_mode = &pipe_config->adjusted_mode; | 1158 | struct drm_display_mode *adjusted_mode = &pipe_config->base.adjusted_mode; |
1159 | struct intel_dp *intel_dp = enc_to_intel_dp(&encoder->base); | 1159 | struct intel_dp *intel_dp = enc_to_intel_dp(&encoder->base); |
1160 | enum port port = dp_to_dig_port(intel_dp)->port; | 1160 | enum port port = dp_to_dig_port(intel_dp)->port; |
1161 | struct intel_crtc *intel_crtc = encoder->new_crtc; | 1161 | struct intel_crtc *intel_crtc = encoder->new_crtc; |
@@ -1324,7 +1324,7 @@ static void intel_dp_prepare(struct intel_encoder *encoder) | |||
1324 | struct intel_dp *intel_dp = enc_to_intel_dp(&encoder->base); | 1324 | struct intel_dp *intel_dp = enc_to_intel_dp(&encoder->base); |
1325 | enum port port = dp_to_dig_port(intel_dp)->port; | 1325 | enum port port = dp_to_dig_port(intel_dp)->port; |
1326 | struct intel_crtc *crtc = to_intel_crtc(encoder->base.crtc); | 1326 | struct intel_crtc *crtc = to_intel_crtc(encoder->base.crtc); |
1327 | struct drm_display_mode *adjusted_mode = &crtc->config.adjusted_mode; | 1327 | struct drm_display_mode *adjusted_mode = &crtc->config.base.adjusted_mode; |
1328 | 1328 | ||
1329 | /* | 1329 | /* |
1330 | * There are four kinds of DP registers: | 1330 | * There are four kinds of DP registers: |
@@ -2050,7 +2050,7 @@ static void intel_dp_get_config(struct intel_encoder *encoder, | |||
2050 | flags |= DRM_MODE_FLAG_NVSYNC; | 2050 | flags |= DRM_MODE_FLAG_NVSYNC; |
2051 | } | 2051 | } |
2052 | 2052 | ||
2053 | pipe_config->adjusted_mode.flags |= flags; | 2053 | pipe_config->base.adjusted_mode.flags |= flags; |
2054 | 2054 | ||
2055 | if (!HAS_PCH_SPLIT(dev) && !IS_VALLEYVIEW(dev) && | 2055 | if (!HAS_PCH_SPLIT(dev) && !IS_VALLEYVIEW(dev) && |
2056 | tmp & DP_COLOR_RANGE_16_235) | 2056 | tmp & DP_COLOR_RANGE_16_235) |
@@ -2073,7 +2073,7 @@ static void intel_dp_get_config(struct intel_encoder *encoder, | |||
2073 | if (HAS_PCH_SPLIT(dev_priv->dev) && port != PORT_A) | 2073 | if (HAS_PCH_SPLIT(dev_priv->dev) && port != PORT_A) |
2074 | ironlake_check_encoder_dotclock(pipe_config, dotclock); | 2074 | ironlake_check_encoder_dotclock(pipe_config, dotclock); |
2075 | 2075 | ||
2076 | pipe_config->adjusted_mode.crtc_clock = dotclock; | 2076 | pipe_config->base.adjusted_mode.crtc_clock = dotclock; |
2077 | 2077 | ||
2078 | if (is_edp(intel_dp) && dev_priv->vbt.edp_bpp && | 2078 | if (is_edp(intel_dp) && dev_priv->vbt.edp_bpp && |
2079 | pipe_config->pipe_bpp > dev_priv->vbt.edp_bpp) { | 2079 | pipe_config->pipe_bpp > dev_priv->vbt.edp_bpp) { |
diff --git a/drivers/gpu/drm/i915/intel_dp_mst.c b/drivers/gpu/drm/i915/intel_dp_mst.c index 2e8951a20a9b..629a6265eaef 100644 --- a/drivers/gpu/drm/i915/intel_dp_mst.c +++ b/drivers/gpu/drm/i915/intel_dp_mst.c | |||
@@ -38,7 +38,7 @@ static bool intel_dp_mst_compute_config(struct intel_encoder *encoder, | |||
38 | struct drm_device *dev = encoder->base.dev; | 38 | struct drm_device *dev = encoder->base.dev; |
39 | int bpp; | 39 | int bpp; |
40 | int lane_count, slots; | 40 | int lane_count, slots; |
41 | struct drm_display_mode *adjusted_mode = &pipe_config->adjusted_mode; | 41 | struct drm_display_mode *adjusted_mode = &pipe_config->base.adjusted_mode; |
42 | struct intel_connector *found = NULL, *intel_connector; | 42 | struct intel_connector *found = NULL, *intel_connector; |
43 | int mst_pbn; | 43 | int mst_pbn; |
44 | 44 | ||
@@ -254,7 +254,7 @@ static void intel_dp_mst_enc_get_config(struct intel_encoder *encoder, | |||
254 | default: | 254 | default: |
255 | break; | 255 | break; |
256 | } | 256 | } |
257 | pipe_config->adjusted_mode.flags |= flags; | 257 | pipe_config->base.adjusted_mode.flags |= flags; |
258 | intel_dp_get_m_n(crtc, pipe_config); | 258 | intel_dp_get_m_n(crtc, pipe_config); |
259 | 259 | ||
260 | intel_ddi_clock_get(&intel_dig_port->base, pipe_config); | 260 | intel_ddi_clock_get(&intel_dig_port->base, pipe_config); |
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h index 9ecac5544fed..725acb5e491a 100644 --- a/drivers/gpu/drm/i915/intel_drv.h +++ b/drivers/gpu/drm/i915/intel_drv.h | |||
@@ -264,6 +264,8 @@ struct intel_plane_config { | |||
264 | }; | 264 | }; |
265 | 265 | ||
266 | struct intel_crtc_state { | 266 | struct intel_crtc_state { |
267 | struct drm_crtc_state base; | ||
268 | |||
267 | /** | 269 | /** |
268 | * quirks - bitfield with hw state readout quirks | 270 | * quirks - bitfield with hw state readout quirks |
269 | * | 271 | * |
@@ -276,16 +278,6 @@ struct intel_crtc_state { | |||
276 | #define PIPE_CONFIG_QUIRK_INHERITED_MODE (1<<1) /* mode inherited from firmware */ | 278 | #define PIPE_CONFIG_QUIRK_INHERITED_MODE (1<<1) /* mode inherited from firmware */ |
277 | unsigned long quirks; | 279 | unsigned long quirks; |
278 | 280 | ||
279 | /* User requested mode, only valid as a starting point to | ||
280 | * compute adjusted_mode, except in the case of (S)DVO where | ||
281 | * it's also for the output timings of the (S)DVO chip. | ||
282 | * adjusted_mode will then correspond to the S(DVO) chip's | ||
283 | * preferred input timings. */ | ||
284 | struct drm_display_mode requested_mode; | ||
285 | /* Actual pipe timings ie. what we program into the pipe timing | ||
286 | * registers. adjusted_mode.crtc_clock is the pipe pixel clock. */ | ||
287 | struct drm_display_mode adjusted_mode; | ||
288 | |||
289 | /* Pipe source size (ie. panel fitter input size) | 281 | /* Pipe source size (ie. panel fitter input size) |
290 | * All planes will be positioned inside this space, | 282 | * All planes will be positioned inside this space, |
291 | * and get clipped at the edges. */ | 283 | * and get clipped at the edges. */ |
diff --git a/drivers/gpu/drm/i915/intel_dsi.c b/drivers/gpu/drm/i915/intel_dsi.c index ac49daa11070..ba1c81b4824f 100644 --- a/drivers/gpu/drm/i915/intel_dsi.c +++ b/drivers/gpu/drm/i915/intel_dsi.c | |||
@@ -84,8 +84,8 @@ static bool intel_dsi_compute_config(struct intel_encoder *encoder, | |||
84 | base); | 84 | base); |
85 | struct intel_connector *intel_connector = intel_dsi->attached_connector; | 85 | struct intel_connector *intel_connector = intel_dsi->attached_connector; |
86 | struct drm_display_mode *fixed_mode = intel_connector->panel.fixed_mode; | 86 | struct drm_display_mode *fixed_mode = intel_connector->panel.fixed_mode; |
87 | struct drm_display_mode *adjusted_mode = &config->adjusted_mode; | 87 | struct drm_display_mode *adjusted_mode = &config->base.adjusted_mode; |
88 | struct drm_display_mode *mode = &config->requested_mode; | 88 | struct drm_display_mode *mode = &config->base.mode; |
89 | 89 | ||
90 | DRM_DEBUG_KMS("\n"); | 90 | DRM_DEBUG_KMS("\n"); |
91 | 91 | ||
@@ -452,7 +452,7 @@ static void intel_dsi_get_config(struct intel_encoder *encoder, | |||
452 | if (!pclk) | 452 | if (!pclk) |
453 | return; | 453 | return; |
454 | 454 | ||
455 | pipe_config->adjusted_mode.crtc_clock = pclk; | 455 | pipe_config->base.adjusted_mode.crtc_clock = pclk; |
456 | pipe_config->port_clock = pclk; | 456 | pipe_config->port_clock = pclk; |
457 | } | 457 | } |
458 | 458 | ||
@@ -566,7 +566,7 @@ static void intel_dsi_prepare(struct intel_encoder *intel_encoder) | |||
566 | struct intel_crtc *intel_crtc = to_intel_crtc(encoder->crtc); | 566 | struct intel_crtc *intel_crtc = to_intel_crtc(encoder->crtc); |
567 | struct intel_dsi *intel_dsi = enc_to_intel_dsi(encoder); | 567 | struct intel_dsi *intel_dsi = enc_to_intel_dsi(encoder); |
568 | struct drm_display_mode *adjusted_mode = | 568 | struct drm_display_mode *adjusted_mode = |
569 | &intel_crtc->config.adjusted_mode; | 569 | &intel_crtc->config.base.adjusted_mode; |
570 | enum port port; | 570 | enum port port; |
571 | unsigned int bpp = intel_crtc->config.pipe_bpp; | 571 | unsigned int bpp = intel_crtc->config.pipe_bpp; |
572 | u32 val, tmp; | 572 | u32 val, tmp; |
diff --git a/drivers/gpu/drm/i915/intel_dvo.c b/drivers/gpu/drm/i915/intel_dvo.c index 34bee56b4b0f..108f0583beba 100644 --- a/drivers/gpu/drm/i915/intel_dvo.c +++ b/drivers/gpu/drm/i915/intel_dvo.c | |||
@@ -160,9 +160,9 @@ static void intel_dvo_get_config(struct intel_encoder *encoder, | |||
160 | else | 160 | else |
161 | flags |= DRM_MODE_FLAG_NVSYNC; | 161 | flags |= DRM_MODE_FLAG_NVSYNC; |
162 | 162 | ||
163 | pipe_config->adjusted_mode.flags |= flags; | 163 | pipe_config->base.adjusted_mode.flags |= flags; |
164 | 164 | ||
165 | pipe_config->adjusted_mode.crtc_clock = pipe_config->port_clock; | 165 | pipe_config->base.adjusted_mode.crtc_clock = pipe_config->port_clock; |
166 | } | 166 | } |
167 | 167 | ||
168 | static void intel_disable_dvo(struct intel_encoder *encoder) | 168 | static void intel_disable_dvo(struct intel_encoder *encoder) |
@@ -186,8 +186,8 @@ static void intel_enable_dvo(struct intel_encoder *encoder) | |||
186 | u32 temp = I915_READ(dvo_reg); | 186 | u32 temp = I915_READ(dvo_reg); |
187 | 187 | ||
188 | intel_dvo->dev.dev_ops->mode_set(&intel_dvo->dev, | 188 | intel_dvo->dev.dev_ops->mode_set(&intel_dvo->dev, |
189 | &crtc->config.requested_mode, | 189 | &crtc->config.base.mode, |
190 | &crtc->config.adjusted_mode); | 190 | &crtc->config.base.adjusted_mode); |
191 | 191 | ||
192 | I915_WRITE(dvo_reg, temp | DVO_ENABLE); | 192 | I915_WRITE(dvo_reg, temp | DVO_ENABLE); |
193 | I915_READ(dvo_reg); | 193 | I915_READ(dvo_reg); |
@@ -264,7 +264,7 @@ static bool intel_dvo_compute_config(struct intel_encoder *encoder, | |||
264 | struct intel_crtc_state *pipe_config) | 264 | struct intel_crtc_state *pipe_config) |
265 | { | 265 | { |
266 | struct intel_dvo *intel_dvo = enc_to_dvo(encoder); | 266 | struct intel_dvo *intel_dvo = enc_to_dvo(encoder); |
267 | struct drm_display_mode *adjusted_mode = &pipe_config->adjusted_mode; | 267 | struct drm_display_mode *adjusted_mode = &pipe_config->base.adjusted_mode; |
268 | 268 | ||
269 | /* If we have timings from the BIOS for the panel, put them in | 269 | /* If we have timings from the BIOS for the panel, put them in |
270 | * to the adjusted mode. The CRTC will be set up for this mode, | 270 | * to the adjusted mode. The CRTC will be set up for this mode, |
@@ -295,7 +295,7 @@ static void intel_dvo_pre_enable(struct intel_encoder *encoder) | |||
295 | struct drm_device *dev = encoder->base.dev; | 295 | struct drm_device *dev = encoder->base.dev; |
296 | struct drm_i915_private *dev_priv = dev->dev_private; | 296 | struct drm_i915_private *dev_priv = dev->dev_private; |
297 | struct intel_crtc *crtc = to_intel_crtc(encoder->base.crtc); | 297 | struct intel_crtc *crtc = to_intel_crtc(encoder->base.crtc); |
298 | struct drm_display_mode *adjusted_mode = &crtc->config.adjusted_mode; | 298 | struct drm_display_mode *adjusted_mode = &crtc->config.base.adjusted_mode; |
299 | struct intel_dvo *intel_dvo = enc_to_dvo(encoder); | 299 | struct intel_dvo *intel_dvo = enc_to_dvo(encoder); |
300 | int pipe = crtc->pipe; | 300 | int pipe = crtc->pipe; |
301 | u32 dvo_val; | 301 | u32 dvo_val; |
diff --git a/drivers/gpu/drm/i915/intel_fbc.c b/drivers/gpu/drm/i915/intel_fbc.c index 4daceaeeb30d..cbd828eb194b 100644 --- a/drivers/gpu/drm/i915/intel_fbc.c +++ b/drivers/gpu/drm/i915/intel_fbc.c | |||
@@ -542,7 +542,7 @@ void intel_fbc_update(struct drm_device *dev) | |||
542 | intel_crtc = to_intel_crtc(crtc); | 542 | intel_crtc = to_intel_crtc(crtc); |
543 | fb = crtc->primary->fb; | 543 | fb = crtc->primary->fb; |
544 | obj = intel_fb_obj(fb); | 544 | obj = intel_fb_obj(fb); |
545 | adjusted_mode = &intel_crtc->config.adjusted_mode; | 545 | adjusted_mode = &intel_crtc->config.base.adjusted_mode; |
546 | 546 | ||
547 | if (i915.enable_fbc < 0) { | 547 | if (i915.enable_fbc < 0) { |
548 | if (set_no_fbc_reason(dev_priv, FBC_CHIP_DEFAULT)) | 548 | if (set_no_fbc_reason(dev_priv, FBC_CHIP_DEFAULT)) |
diff --git a/drivers/gpu/drm/i915/intel_fbdev.c b/drivers/gpu/drm/i915/intel_fbdev.c index 850cf7d6578c..04d582b50364 100644 --- a/drivers/gpu/drm/i915/intel_fbdev.c +++ b/drivers/gpu/drm/i915/intel_fbdev.c | |||
@@ -581,7 +581,7 @@ static bool intel_fbdev_init_bios(struct drm_device *dev, | |||
581 | * pipe. Note we need to use the selected fb's pitch and bpp | 581 | * pipe. Note we need to use the selected fb's pitch and bpp |
582 | * rather than the current pipe's, since they differ. | 582 | * rather than the current pipe's, since they differ. |
583 | */ | 583 | */ |
584 | cur_size = intel_crtc->config.adjusted_mode.crtc_hdisplay; | 584 | cur_size = intel_crtc->config.base.adjusted_mode.crtc_hdisplay; |
585 | cur_size = cur_size * fb->base.bits_per_pixel / 8; | 585 | cur_size = cur_size * fb->base.bits_per_pixel / 8; |
586 | if (fb->base.pitches[0] < cur_size) { | 586 | if (fb->base.pitches[0] < cur_size) { |
587 | DRM_DEBUG_KMS("fb not wide enough for plane %c (%d vs %d)\n", | 587 | DRM_DEBUG_KMS("fb not wide enough for plane %c (%d vs %d)\n", |
@@ -592,13 +592,13 @@ static bool intel_fbdev_init_bios(struct drm_device *dev, | |||
592 | break; | 592 | break; |
593 | } | 593 | } |
594 | 594 | ||
595 | cur_size = intel_crtc->config.adjusted_mode.crtc_vdisplay; | 595 | cur_size = intel_crtc->config.base.adjusted_mode.crtc_vdisplay; |
596 | cur_size = ALIGN(cur_size, plane_config->tiled ? (IS_GEN2(dev) ? 16 : 8) : 1); | 596 | cur_size = ALIGN(cur_size, plane_config->tiled ? (IS_GEN2(dev) ? 16 : 8) : 1); |
597 | cur_size *= fb->base.pitches[0]; | 597 | cur_size *= fb->base.pitches[0]; |
598 | DRM_DEBUG_KMS("pipe %c area: %dx%d, bpp: %d, size: %d\n", | 598 | DRM_DEBUG_KMS("pipe %c area: %dx%d, bpp: %d, size: %d\n", |
599 | pipe_name(intel_crtc->pipe), | 599 | pipe_name(intel_crtc->pipe), |
600 | intel_crtc->config.adjusted_mode.crtc_hdisplay, | 600 | intel_crtc->config.base.adjusted_mode.crtc_hdisplay, |
601 | intel_crtc->config.adjusted_mode.crtc_vdisplay, | 601 | intel_crtc->config.base.adjusted_mode.crtc_vdisplay, |
602 | fb->base.bits_per_pixel, | 602 | fb->base.bits_per_pixel, |
603 | cur_size); | 603 | cur_size); |
604 | 604 | ||
diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c index 657452b471ec..02ff3e2de88b 100644 --- a/drivers/gpu/drm/i915/intel_hdmi.c +++ b/drivers/gpu/drm/i915/intel_hdmi.c | |||
@@ -700,7 +700,7 @@ static void intel_hdmi_prepare(struct intel_encoder *encoder) | |||
700 | struct drm_i915_private *dev_priv = dev->dev_private; | 700 | struct drm_i915_private *dev_priv = dev->dev_private; |
701 | struct intel_crtc *crtc = to_intel_crtc(encoder->base.crtc); | 701 | struct intel_crtc *crtc = to_intel_crtc(encoder->base.crtc); |
702 | struct intel_hdmi *intel_hdmi = enc_to_intel_hdmi(&encoder->base); | 702 | struct intel_hdmi *intel_hdmi = enc_to_intel_hdmi(&encoder->base); |
703 | struct drm_display_mode *adjusted_mode = &crtc->config.adjusted_mode; | 703 | struct drm_display_mode *adjusted_mode = &crtc->config.base.adjusted_mode; |
704 | u32 hdmi_val; | 704 | u32 hdmi_val; |
705 | 705 | ||
706 | hdmi_val = SDVO_ENCODING_HDMI; | 706 | hdmi_val = SDVO_ENCODING_HDMI; |
@@ -792,7 +792,7 @@ static void intel_hdmi_get_config(struct intel_encoder *encoder, | |||
792 | tmp & HDMI_COLOR_RANGE_16_235) | 792 | tmp & HDMI_COLOR_RANGE_16_235) |
793 | pipe_config->limited_color_range = true; | 793 | pipe_config->limited_color_range = true; |
794 | 794 | ||
795 | pipe_config->adjusted_mode.flags |= flags; | 795 | pipe_config->base.adjusted_mode.flags |= flags; |
796 | 796 | ||
797 | if ((tmp & SDVO_COLOR_FORMAT_MASK) == HDMI_COLOR_FORMAT_12bpc) | 797 | if ((tmp & SDVO_COLOR_FORMAT_MASK) == HDMI_COLOR_FORMAT_12bpc) |
798 | dotclock = pipe_config->port_clock * 2 / 3; | 798 | dotclock = pipe_config->port_clock * 2 / 3; |
@@ -802,7 +802,7 @@ static void intel_hdmi_get_config(struct intel_encoder *encoder, | |||
802 | if (HAS_PCH_SPLIT(dev_priv->dev)) | 802 | if (HAS_PCH_SPLIT(dev_priv->dev)) |
803 | ironlake_check_encoder_dotclock(pipe_config, dotclock); | 803 | ironlake_check_encoder_dotclock(pipe_config, dotclock); |
804 | 804 | ||
805 | pipe_config->adjusted_mode.crtc_clock = dotclock; | 805 | pipe_config->base.adjusted_mode.crtc_clock = dotclock; |
806 | } | 806 | } |
807 | 807 | ||
808 | static void intel_enable_hdmi(struct intel_encoder *encoder) | 808 | static void intel_enable_hdmi(struct intel_encoder *encoder) |
@@ -979,8 +979,8 @@ bool intel_hdmi_compute_config(struct intel_encoder *encoder, | |||
979 | { | 979 | { |
980 | struct intel_hdmi *intel_hdmi = enc_to_intel_hdmi(&encoder->base); | 980 | struct intel_hdmi *intel_hdmi = enc_to_intel_hdmi(&encoder->base); |
981 | struct drm_device *dev = encoder->base.dev; | 981 | struct drm_device *dev = encoder->base.dev; |
982 | struct drm_display_mode *adjusted_mode = &pipe_config->adjusted_mode; | 982 | struct drm_display_mode *adjusted_mode = &pipe_config->base.adjusted_mode; |
983 | int clock_12bpc = pipe_config->adjusted_mode.crtc_clock * 3 / 2; | 983 | int clock_12bpc = pipe_config->base.adjusted_mode.crtc_clock * 3 / 2; |
984 | int portclock_limit = hdmi_portclock_limit(intel_hdmi, false); | 984 | int portclock_limit = hdmi_portclock_limit(intel_hdmi, false); |
985 | int desired_bpp; | 985 | int desired_bpp; |
986 | 986 | ||
@@ -1252,7 +1252,7 @@ static void intel_hdmi_pre_enable(struct intel_encoder *encoder) | |||
1252 | struct intel_hdmi *intel_hdmi = enc_to_intel_hdmi(&encoder->base); | 1252 | struct intel_hdmi *intel_hdmi = enc_to_intel_hdmi(&encoder->base); |
1253 | struct intel_crtc *intel_crtc = to_intel_crtc(encoder->base.crtc); | 1253 | struct intel_crtc *intel_crtc = to_intel_crtc(encoder->base.crtc); |
1254 | struct drm_display_mode *adjusted_mode = | 1254 | struct drm_display_mode *adjusted_mode = |
1255 | &intel_crtc->config.adjusted_mode; | 1255 | &intel_crtc->config.base.adjusted_mode; |
1256 | 1256 | ||
1257 | intel_hdmi_prepare(encoder); | 1257 | intel_hdmi_prepare(encoder); |
1258 | 1258 | ||
@@ -1270,7 +1270,7 @@ static void vlv_hdmi_pre_enable(struct intel_encoder *encoder) | |||
1270 | struct intel_crtc *intel_crtc = | 1270 | struct intel_crtc *intel_crtc = |
1271 | to_intel_crtc(encoder->base.crtc); | 1271 | to_intel_crtc(encoder->base.crtc); |
1272 | struct drm_display_mode *adjusted_mode = | 1272 | struct drm_display_mode *adjusted_mode = |
1273 | &intel_crtc->config.adjusted_mode; | 1273 | &intel_crtc->config.base.adjusted_mode; |
1274 | enum dpio_channel port = vlv_dport_to_channel(dport); | 1274 | enum dpio_channel port = vlv_dport_to_channel(dport); |
1275 | int pipe = intel_crtc->pipe; | 1275 | int pipe = intel_crtc->pipe; |
1276 | u32 val; | 1276 | u32 val; |
@@ -1467,7 +1467,7 @@ static void chv_hdmi_pre_enable(struct intel_encoder *encoder) | |||
1467 | struct intel_crtc *intel_crtc = | 1467 | struct intel_crtc *intel_crtc = |
1468 | to_intel_crtc(encoder->base.crtc); | 1468 | to_intel_crtc(encoder->base.crtc); |
1469 | struct drm_display_mode *adjusted_mode = | 1469 | struct drm_display_mode *adjusted_mode = |
1470 | &intel_crtc->config.adjusted_mode; | 1470 | &intel_crtc->config.base.adjusted_mode; |
1471 | enum dpio_channel ch = vlv_dport_to_channel(dport); | 1471 | enum dpio_channel ch = vlv_dport_to_channel(dport); |
1472 | int pipe = intel_crtc->pipe; | 1472 | int pipe = intel_crtc->pipe; |
1473 | int data, i; | 1473 | int data, i; |
diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c index f8e2f1309ae9..9d174cf9c746 100644 --- a/drivers/gpu/drm/i915/intel_lvds.c +++ b/drivers/gpu/drm/i915/intel_lvds.c | |||
@@ -115,7 +115,7 @@ static void intel_lvds_get_config(struct intel_encoder *encoder, | |||
115 | else | 115 | else |
116 | flags |= DRM_MODE_FLAG_PVSYNC; | 116 | flags |= DRM_MODE_FLAG_PVSYNC; |
117 | 117 | ||
118 | pipe_config->adjusted_mode.flags |= flags; | 118 | pipe_config->base.adjusted_mode.flags |= flags; |
119 | 119 | ||
120 | /* gen2/3 store dither state in pfit control, needs to match */ | 120 | /* gen2/3 store dither state in pfit control, needs to match */ |
121 | if (INTEL_INFO(dev)->gen < 4) { | 121 | if (INTEL_INFO(dev)->gen < 4) { |
@@ -129,7 +129,7 @@ static void intel_lvds_get_config(struct intel_encoder *encoder, | |||
129 | if (HAS_PCH_SPLIT(dev_priv->dev)) | 129 | if (HAS_PCH_SPLIT(dev_priv->dev)) |
130 | ironlake_check_encoder_dotclock(pipe_config, dotclock); | 130 | ironlake_check_encoder_dotclock(pipe_config, dotclock); |
131 | 131 | ||
132 | pipe_config->adjusted_mode.crtc_clock = dotclock; | 132 | pipe_config->base.adjusted_mode.crtc_clock = dotclock; |
133 | } | 133 | } |
134 | 134 | ||
135 | static void intel_pre_enable_lvds(struct intel_encoder *encoder) | 135 | static void intel_pre_enable_lvds(struct intel_encoder *encoder) |
@@ -139,7 +139,7 @@ static void intel_pre_enable_lvds(struct intel_encoder *encoder) | |||
139 | struct drm_i915_private *dev_priv = dev->dev_private; | 139 | struct drm_i915_private *dev_priv = dev->dev_private; |
140 | struct intel_crtc *crtc = to_intel_crtc(encoder->base.crtc); | 140 | struct intel_crtc *crtc = to_intel_crtc(encoder->base.crtc); |
141 | const struct drm_display_mode *adjusted_mode = | 141 | const struct drm_display_mode *adjusted_mode = |
142 | &crtc->config.adjusted_mode; | 142 | &crtc->config.base.adjusted_mode; |
143 | int pipe = crtc->pipe; | 143 | int pipe = crtc->pipe; |
144 | u32 temp; | 144 | u32 temp; |
145 | 145 | ||
@@ -284,7 +284,7 @@ static bool intel_lvds_compute_config(struct intel_encoder *intel_encoder, | |||
284 | to_lvds_encoder(&intel_encoder->base); | 284 | to_lvds_encoder(&intel_encoder->base); |
285 | struct intel_connector *intel_connector = | 285 | struct intel_connector *intel_connector = |
286 | &lvds_encoder->attached_connector->base; | 286 | &lvds_encoder->attached_connector->base; |
287 | struct drm_display_mode *adjusted_mode = &pipe_config->adjusted_mode; | 287 | struct drm_display_mode *adjusted_mode = &pipe_config->base.adjusted_mode; |
288 | struct intel_crtc *intel_crtc = lvds_encoder->base.new_crtc; | 288 | struct intel_crtc *intel_crtc = lvds_encoder->base.new_crtc; |
289 | unsigned int lvds_bpp; | 289 | unsigned int lvds_bpp; |
290 | 290 | ||
diff --git a/drivers/gpu/drm/i915/intel_panel.c b/drivers/gpu/drm/i915/intel_panel.c index c3c5ed416a73..d7be68a7bbda 100644 --- a/drivers/gpu/drm/i915/intel_panel.c +++ b/drivers/gpu/drm/i915/intel_panel.c | |||
@@ -104,7 +104,7 @@ intel_pch_panel_fitting(struct intel_crtc *intel_crtc, | |||
104 | struct drm_display_mode *adjusted_mode; | 104 | struct drm_display_mode *adjusted_mode; |
105 | int x, y, width, height; | 105 | int x, y, width, height; |
106 | 106 | ||
107 | adjusted_mode = &pipe_config->adjusted_mode; | 107 | adjusted_mode = &pipe_config->base.adjusted_mode; |
108 | 108 | ||
109 | x = y = width = height = 0; | 109 | x = y = width = height = 0; |
110 | 110 | ||
@@ -226,7 +226,7 @@ static inline u32 panel_fitter_scaling(u32 source, u32 target) | |||
226 | static void i965_scale_aspect(struct intel_crtc_state *pipe_config, | 226 | static void i965_scale_aspect(struct intel_crtc_state *pipe_config, |
227 | u32 *pfit_control) | 227 | u32 *pfit_control) |
228 | { | 228 | { |
229 | struct drm_display_mode *adjusted_mode = &pipe_config->adjusted_mode; | 229 | struct drm_display_mode *adjusted_mode = &pipe_config->base.adjusted_mode; |
230 | u32 scaled_width = adjusted_mode->hdisplay * | 230 | u32 scaled_width = adjusted_mode->hdisplay * |
231 | pipe_config->pipe_src_h; | 231 | pipe_config->pipe_src_h; |
232 | u32 scaled_height = pipe_config->pipe_src_w * | 232 | u32 scaled_height = pipe_config->pipe_src_w * |
@@ -247,7 +247,7 @@ static void i9xx_scale_aspect(struct intel_crtc_state *pipe_config, | |||
247 | u32 *pfit_control, u32 *pfit_pgm_ratios, | 247 | u32 *pfit_control, u32 *pfit_pgm_ratios, |
248 | u32 *border) | 248 | u32 *border) |
249 | { | 249 | { |
250 | struct drm_display_mode *adjusted_mode = &pipe_config->adjusted_mode; | 250 | struct drm_display_mode *adjusted_mode = &pipe_config->base.adjusted_mode; |
251 | u32 scaled_width = adjusted_mode->hdisplay * | 251 | u32 scaled_width = adjusted_mode->hdisplay * |
252 | pipe_config->pipe_src_h; | 252 | pipe_config->pipe_src_h; |
253 | u32 scaled_height = pipe_config->pipe_src_w * | 253 | u32 scaled_height = pipe_config->pipe_src_w * |
@@ -308,7 +308,7 @@ void intel_gmch_panel_fitting(struct intel_crtc *intel_crtc, | |||
308 | u32 pfit_control = 0, pfit_pgm_ratios = 0, border = 0; | 308 | u32 pfit_control = 0, pfit_pgm_ratios = 0, border = 0; |
309 | struct drm_display_mode *adjusted_mode; | 309 | struct drm_display_mode *adjusted_mode; |
310 | 310 | ||
311 | adjusted_mode = &pipe_config->adjusted_mode; | 311 | adjusted_mode = &pipe_config->base.adjusted_mode; |
312 | 312 | ||
313 | /* Native modes don't need fitting */ | 313 | /* Native modes don't need fitting */ |
314 | if (adjusted_mode->hdisplay == pipe_config->pipe_src_w && | 314 | if (adjusted_mode->hdisplay == pipe_config->pipe_src_w && |
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c index 933b32c5760b..40ce07d2cd55 100644 --- a/drivers/gpu/drm/i915/intel_pm.c +++ b/drivers/gpu/drm/i915/intel_pm.c | |||
@@ -539,7 +539,7 @@ static void pineview_update_wm(struct drm_crtc *unused_crtc) | |||
539 | int pixel_size = crtc->primary->fb->bits_per_pixel / 8; | 539 | int pixel_size = crtc->primary->fb->bits_per_pixel / 8; |
540 | int clock; | 540 | int clock; |
541 | 541 | ||
542 | adjusted_mode = &to_intel_crtc(crtc)->config.adjusted_mode; | 542 | adjusted_mode = &to_intel_crtc(crtc)->config.base.adjusted_mode; |
543 | clock = adjusted_mode->crtc_clock; | 543 | clock = adjusted_mode->crtc_clock; |
544 | 544 | ||
545 | /* Display SR */ | 545 | /* Display SR */ |
@@ -608,7 +608,7 @@ static bool g4x_compute_wm0(struct drm_device *dev, | |||
608 | return false; | 608 | return false; |
609 | } | 609 | } |
610 | 610 | ||
611 | adjusted_mode = &to_intel_crtc(crtc)->config.adjusted_mode; | 611 | adjusted_mode = &to_intel_crtc(crtc)->config.base.adjusted_mode; |
612 | clock = adjusted_mode->crtc_clock; | 612 | clock = adjusted_mode->crtc_clock; |
613 | htotal = adjusted_mode->crtc_htotal; | 613 | htotal = adjusted_mode->crtc_htotal; |
614 | hdisplay = to_intel_crtc(crtc)->config.pipe_src_w; | 614 | hdisplay = to_intel_crtc(crtc)->config.pipe_src_w; |
@@ -695,7 +695,7 @@ static bool g4x_compute_srwm(struct drm_device *dev, | |||
695 | } | 695 | } |
696 | 696 | ||
697 | crtc = intel_get_crtc_for_plane(dev, plane); | 697 | crtc = intel_get_crtc_for_plane(dev, plane); |
698 | adjusted_mode = &to_intel_crtc(crtc)->config.adjusted_mode; | 698 | adjusted_mode = &to_intel_crtc(crtc)->config.base.adjusted_mode; |
699 | clock = adjusted_mode->crtc_clock; | 699 | clock = adjusted_mode->crtc_clock; |
700 | htotal = adjusted_mode->crtc_htotal; | 700 | htotal = adjusted_mode->crtc_htotal; |
701 | hdisplay = to_intel_crtc(crtc)->config.pipe_src_w; | 701 | hdisplay = to_intel_crtc(crtc)->config.pipe_src_w; |
@@ -729,7 +729,7 @@ static bool vlv_compute_drain_latency(struct drm_crtc *crtc, | |||
729 | { | 729 | { |
730 | struct drm_device *dev = crtc->dev; | 730 | struct drm_device *dev = crtc->dev; |
731 | int entries; | 731 | int entries; |
732 | int clock = to_intel_crtc(crtc)->config.adjusted_mode.crtc_clock; | 732 | int clock = to_intel_crtc(crtc)->config.base.adjusted_mode.crtc_clock; |
733 | 733 | ||
734 | if (WARN(clock == 0, "Pixel clock is zero!\n")) | 734 | if (WARN(clock == 0, "Pixel clock is zero!\n")) |
735 | return false; | 735 | return false; |
@@ -1059,7 +1059,7 @@ static void i965_update_wm(struct drm_crtc *unused_crtc) | |||
1059 | /* self-refresh has much higher latency */ | 1059 | /* self-refresh has much higher latency */ |
1060 | static const int sr_latency_ns = 12000; | 1060 | static const int sr_latency_ns = 12000; |
1061 | const struct drm_display_mode *adjusted_mode = | 1061 | const struct drm_display_mode *adjusted_mode = |
1062 | &to_intel_crtc(crtc)->config.adjusted_mode; | 1062 | &to_intel_crtc(crtc)->config.base.adjusted_mode; |
1063 | int clock = adjusted_mode->crtc_clock; | 1063 | int clock = adjusted_mode->crtc_clock; |
1064 | int htotal = adjusted_mode->crtc_htotal; | 1064 | int htotal = adjusted_mode->crtc_htotal; |
1065 | int hdisplay = to_intel_crtc(crtc)->config.pipe_src_w; | 1065 | int hdisplay = to_intel_crtc(crtc)->config.pipe_src_w; |
@@ -1144,7 +1144,7 @@ static void i9xx_update_wm(struct drm_crtc *unused_crtc) | |||
1144 | if (IS_GEN2(dev)) | 1144 | if (IS_GEN2(dev)) |
1145 | cpp = 4; | 1145 | cpp = 4; |
1146 | 1146 | ||
1147 | adjusted_mode = &to_intel_crtc(crtc)->config.adjusted_mode; | 1147 | adjusted_mode = &to_intel_crtc(crtc)->config.base.adjusted_mode; |
1148 | planea_wm = intel_calculate_wm(adjusted_mode->crtc_clock, | 1148 | planea_wm = intel_calculate_wm(adjusted_mode->crtc_clock, |
1149 | wm_info, fifo_size, cpp, | 1149 | wm_info, fifo_size, cpp, |
1150 | pessimal_latency_ns); | 1150 | pessimal_latency_ns); |
@@ -1166,7 +1166,7 @@ static void i9xx_update_wm(struct drm_crtc *unused_crtc) | |||
1166 | if (IS_GEN2(dev)) | 1166 | if (IS_GEN2(dev)) |
1167 | cpp = 4; | 1167 | cpp = 4; |
1168 | 1168 | ||
1169 | adjusted_mode = &to_intel_crtc(crtc)->config.adjusted_mode; | 1169 | adjusted_mode = &to_intel_crtc(crtc)->config.base.adjusted_mode; |
1170 | planeb_wm = intel_calculate_wm(adjusted_mode->crtc_clock, | 1170 | planeb_wm = intel_calculate_wm(adjusted_mode->crtc_clock, |
1171 | wm_info, fifo_size, cpp, | 1171 | wm_info, fifo_size, cpp, |
1172 | pessimal_latency_ns); | 1172 | pessimal_latency_ns); |
@@ -1205,7 +1205,7 @@ static void i9xx_update_wm(struct drm_crtc *unused_crtc) | |||
1205 | /* self-refresh has much higher latency */ | 1205 | /* self-refresh has much higher latency */ |
1206 | static const int sr_latency_ns = 6000; | 1206 | static const int sr_latency_ns = 6000; |
1207 | const struct drm_display_mode *adjusted_mode = | 1207 | const struct drm_display_mode *adjusted_mode = |
1208 | &to_intel_crtc(enabled)->config.adjusted_mode; | 1208 | &to_intel_crtc(enabled)->config.base.adjusted_mode; |
1209 | int clock = adjusted_mode->crtc_clock; | 1209 | int clock = adjusted_mode->crtc_clock; |
1210 | int htotal = adjusted_mode->crtc_htotal; | 1210 | int htotal = adjusted_mode->crtc_htotal; |
1211 | int hdisplay = to_intel_crtc(enabled)->config.pipe_src_w; | 1211 | int hdisplay = to_intel_crtc(enabled)->config.pipe_src_w; |
@@ -1261,7 +1261,7 @@ static void i845_update_wm(struct drm_crtc *unused_crtc) | |||
1261 | if (crtc == NULL) | 1261 | if (crtc == NULL) |
1262 | return; | 1262 | return; |
1263 | 1263 | ||
1264 | adjusted_mode = &to_intel_crtc(crtc)->config.adjusted_mode; | 1264 | adjusted_mode = &to_intel_crtc(crtc)->config.base.adjusted_mode; |
1265 | planea_wm = intel_calculate_wm(adjusted_mode->crtc_clock, | 1265 | planea_wm = intel_calculate_wm(adjusted_mode->crtc_clock, |
1266 | &i845_wm_info, | 1266 | &i845_wm_info, |
1267 | dev_priv->display.get_fifo_size(dev, 0), | 1267 | dev_priv->display.get_fifo_size(dev, 0), |
@@ -1280,7 +1280,7 @@ static uint32_t ilk_pipe_pixel_rate(struct drm_device *dev, | |||
1280 | struct intel_crtc *intel_crtc = to_intel_crtc(crtc); | 1280 | struct intel_crtc *intel_crtc = to_intel_crtc(crtc); |
1281 | uint32_t pixel_rate; | 1281 | uint32_t pixel_rate; |
1282 | 1282 | ||
1283 | pixel_rate = intel_crtc->config.adjusted_mode.crtc_clock; | 1283 | pixel_rate = intel_crtc->config.base.adjusted_mode.crtc_clock; |
1284 | 1284 | ||
1285 | /* We only use IF-ID interlacing. If we ever use PF-ID we'll need to | 1285 | /* We only use IF-ID interlacing. If we ever use PF-ID we'll need to |
1286 | * adjust the pixel_rate here. */ | 1286 | * adjust the pixel_rate here. */ |
@@ -1643,7 +1643,7 @@ hsw_compute_linetime_wm(struct drm_device *dev, struct drm_crtc *crtc) | |||
1643 | { | 1643 | { |
1644 | struct drm_i915_private *dev_priv = dev->dev_private; | 1644 | struct drm_i915_private *dev_priv = dev->dev_private; |
1645 | struct intel_crtc *intel_crtc = to_intel_crtc(crtc); | 1645 | struct intel_crtc *intel_crtc = to_intel_crtc(crtc); |
1646 | struct drm_display_mode *mode = &intel_crtc->config.adjusted_mode; | 1646 | struct drm_display_mode *mode = &intel_crtc->config.base.adjusted_mode; |
1647 | u32 linetime, ips_linetime; | 1647 | u32 linetime, ips_linetime; |
1648 | 1648 | ||
1649 | if (!intel_crtc_active(crtc)) | 1649 | if (!intel_crtc_active(crtc)) |
@@ -1903,7 +1903,7 @@ static void ilk_compute_wm_parameters(struct drm_crtc *crtc, | |||
1903 | return; | 1903 | return; |
1904 | 1904 | ||
1905 | p->active = true; | 1905 | p->active = true; |
1906 | p->pipe_htotal = intel_crtc->config.adjusted_mode.crtc_htotal; | 1906 | p->pipe_htotal = intel_crtc->config.base.adjusted_mode.crtc_htotal; |
1907 | p->pixel_rate = ilk_pipe_pixel_rate(dev, crtc); | 1907 | p->pixel_rate = ilk_pipe_pixel_rate(dev, crtc); |
1908 | p->pri.bytes_per_pixel = crtc->primary->fb->bits_per_pixel / 8; | 1908 | p->pri.bytes_per_pixel = crtc->primary->fb->bits_per_pixel / 8; |
1909 | p->cur.bytes_per_pixel = 4; | 1909 | p->cur.bytes_per_pixel = 4; |
@@ -2559,7 +2559,7 @@ skl_allocate_pipe_ddb(struct drm_crtc *crtc, | |||
2559 | static uint32_t skl_pipe_pixel_rate(const struct intel_crtc_state *config) | 2559 | static uint32_t skl_pipe_pixel_rate(const struct intel_crtc_state *config) |
2560 | { | 2560 | { |
2561 | /* TODO: Take into account the scalers once we support them */ | 2561 | /* TODO: Take into account the scalers once we support them */ |
2562 | return config->adjusted_mode.crtc_clock; | 2562 | return config->base.adjusted_mode.crtc_clock; |
2563 | } | 2563 | } |
2564 | 2564 | ||
2565 | /* | 2565 | /* |
@@ -2647,7 +2647,7 @@ static void skl_compute_wm_pipe_parameters(struct drm_crtc *crtc, | |||
2647 | 2647 | ||
2648 | p->active = intel_crtc_active(crtc); | 2648 | p->active = intel_crtc_active(crtc); |
2649 | if (p->active) { | 2649 | if (p->active) { |
2650 | p->pipe_htotal = intel_crtc->config.adjusted_mode.crtc_htotal; | 2650 | p->pipe_htotal = intel_crtc->config.base.adjusted_mode.crtc_htotal; |
2651 | p->pixel_rate = skl_pipe_pixel_rate(&intel_crtc->config); | 2651 | p->pixel_rate = skl_pipe_pixel_rate(&intel_crtc->config); |
2652 | 2652 | ||
2653 | /* | 2653 | /* |
diff --git a/drivers/gpu/drm/i915/intel_psr.c b/drivers/gpu/drm/i915/intel_psr.c index 5ae193ec464a..a97775db2481 100644 --- a/drivers/gpu/drm/i915/intel_psr.c +++ b/drivers/gpu/drm/i915/intel_psr.c | |||
@@ -270,7 +270,7 @@ static bool intel_psr_match_conditions(struct intel_dp *intel_dp) | |||
270 | } | 270 | } |
271 | 271 | ||
272 | if (IS_HASWELL(dev) && | 272 | if (IS_HASWELL(dev) && |
273 | intel_crtc->config.adjusted_mode.flags & DRM_MODE_FLAG_INTERLACE) { | 273 | intel_crtc->config.base.adjusted_mode.flags & DRM_MODE_FLAG_INTERLACE) { |
274 | DRM_DEBUG_KMS("PSR condition failed: Interlaced is Enabled\n"); | 274 | DRM_DEBUG_KMS("PSR condition failed: Interlaced is Enabled\n"); |
275 | return false; | 275 | return false; |
276 | } | 276 | } |
diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c index cced048b6307..953abec08a0f 100644 --- a/drivers/gpu/drm/i915/intel_sdvo.c +++ b/drivers/gpu/drm/i915/intel_sdvo.c | |||
@@ -1115,8 +1115,8 @@ static bool intel_sdvo_compute_config(struct intel_encoder *encoder, | |||
1115 | struct intel_crtc_state *pipe_config) | 1115 | struct intel_crtc_state *pipe_config) |
1116 | { | 1116 | { |
1117 | struct intel_sdvo *intel_sdvo = to_sdvo(encoder); | 1117 | struct intel_sdvo *intel_sdvo = to_sdvo(encoder); |
1118 | struct drm_display_mode *adjusted_mode = &pipe_config->adjusted_mode; | 1118 | struct drm_display_mode *adjusted_mode = &pipe_config->base.adjusted_mode; |
1119 | struct drm_display_mode *mode = &pipe_config->requested_mode; | 1119 | struct drm_display_mode *mode = &pipe_config->base.mode; |
1120 | 1120 | ||
1121 | DRM_DEBUG_KMS("forcing bpc to 8 for SDVO\n"); | 1121 | DRM_DEBUG_KMS("forcing bpc to 8 for SDVO\n"); |
1122 | pipe_config->pipe_bpp = 8*3; | 1122 | pipe_config->pipe_bpp = 8*3; |
@@ -1181,8 +1181,8 @@ static void intel_sdvo_pre_enable(struct intel_encoder *intel_encoder) | |||
1181 | struct drm_i915_private *dev_priv = dev->dev_private; | 1181 | struct drm_i915_private *dev_priv = dev->dev_private; |
1182 | struct intel_crtc *crtc = to_intel_crtc(intel_encoder->base.crtc); | 1182 | struct intel_crtc *crtc = to_intel_crtc(intel_encoder->base.crtc); |
1183 | struct drm_display_mode *adjusted_mode = | 1183 | struct drm_display_mode *adjusted_mode = |
1184 | &crtc->config.adjusted_mode; | 1184 | &crtc->config.base.adjusted_mode; |
1185 | struct drm_display_mode *mode = &crtc->config.requested_mode; | 1185 | struct drm_display_mode *mode = &crtc->config.base.mode; |
1186 | struct intel_sdvo *intel_sdvo = to_sdvo(intel_encoder); | 1186 | struct intel_sdvo *intel_sdvo = to_sdvo(intel_encoder); |
1187 | u32 sdvox; | 1187 | u32 sdvox; |
1188 | struct intel_sdvo_in_out_map in_out; | 1188 | struct intel_sdvo_in_out_map in_out; |
@@ -1370,7 +1370,7 @@ static void intel_sdvo_get_config(struct intel_encoder *encoder, | |||
1370 | flags |= DRM_MODE_FLAG_NVSYNC; | 1370 | flags |= DRM_MODE_FLAG_NVSYNC; |
1371 | } | 1371 | } |
1372 | 1372 | ||
1373 | pipe_config->adjusted_mode.flags |= flags; | 1373 | pipe_config->base.adjusted_mode.flags |= flags; |
1374 | 1374 | ||
1375 | /* | 1375 | /* |
1376 | * pixel multiplier readout is tricky: Only on i915g/gm it is stored in | 1376 | * pixel multiplier readout is tricky: Only on i915g/gm it is stored in |
@@ -1392,7 +1392,7 @@ static void intel_sdvo_get_config(struct intel_encoder *encoder, | |||
1392 | if (HAS_PCH_SPLIT(dev)) | 1392 | if (HAS_PCH_SPLIT(dev)) |
1393 | ironlake_check_encoder_dotclock(pipe_config, dotclock); | 1393 | ironlake_check_encoder_dotclock(pipe_config, dotclock); |
1394 | 1394 | ||
1395 | pipe_config->adjusted_mode.crtc_clock = dotclock; | 1395 | pipe_config->base.adjusted_mode.crtc_clock = dotclock; |
1396 | 1396 | ||
1397 | /* Cross check the port pixel multiplier with the sdvo encoder state. */ | 1397 | /* Cross check the port pixel multiplier with the sdvo encoder state. */ |
1398 | if (intel_sdvo_get_value(intel_sdvo, SDVO_CMD_GET_CLOCK_RATE_MULT, | 1398 | if (intel_sdvo_get_value(intel_sdvo, SDVO_CMD_GET_CLOCK_RATE_MULT, |
diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c index dca3f70ef1ba..a0a3a060752c 100644 --- a/drivers/gpu/drm/i915/intel_sprite.c +++ b/drivers/gpu/drm/i915/intel_sprite.c | |||
@@ -80,7 +80,7 @@ static int usecs_to_scanlines(const struct drm_display_mode *mode, int usecs) | |||
80 | bool intel_pipe_update_start(struct intel_crtc *crtc, uint32_t *start_vbl_count) | 80 | bool intel_pipe_update_start(struct intel_crtc *crtc, uint32_t *start_vbl_count) |
81 | { | 81 | { |
82 | struct drm_device *dev = crtc->base.dev; | 82 | struct drm_device *dev = crtc->base.dev; |
83 | const struct drm_display_mode *mode = &crtc->config.adjusted_mode; | 83 | const struct drm_display_mode *mode = &crtc->config.base.adjusted_mode; |
84 | enum pipe pipe = crtc->pipe; | 84 | enum pipe pipe = crtc->pipe; |
85 | long timeout = msecs_to_jiffies_timeout(1); | 85 | long timeout = msecs_to_jiffies_timeout(1); |
86 | int scanline, min, max, vblank_start; | 86 | int scanline, min, max, vblank_start; |
diff --git a/drivers/gpu/drm/i915/intel_tv.c b/drivers/gpu/drm/i915/intel_tv.c index 1a57236badb2..10e7ebd79f5a 100644 --- a/drivers/gpu/drm/i915/intel_tv.c +++ b/drivers/gpu/drm/i915/intel_tv.c | |||
@@ -910,7 +910,7 @@ static void | |||
910 | intel_tv_get_config(struct intel_encoder *encoder, | 910 | intel_tv_get_config(struct intel_encoder *encoder, |
911 | struct intel_crtc_state *pipe_config) | 911 | struct intel_crtc_state *pipe_config) |
912 | { | 912 | { |
913 | pipe_config->adjusted_mode.crtc_clock = pipe_config->port_clock; | 913 | pipe_config->base.adjusted_mode.crtc_clock = pipe_config->port_clock; |
914 | } | 914 | } |
915 | 915 | ||
916 | static bool | 916 | static bool |
@@ -923,12 +923,12 @@ intel_tv_compute_config(struct intel_encoder *encoder, | |||
923 | if (!tv_mode) | 923 | if (!tv_mode) |
924 | return false; | 924 | return false; |
925 | 925 | ||
926 | pipe_config->adjusted_mode.crtc_clock = tv_mode->clock; | 926 | pipe_config->base.adjusted_mode.crtc_clock = tv_mode->clock; |
927 | DRM_DEBUG_KMS("forcing bpc to 8 for TV\n"); | 927 | DRM_DEBUG_KMS("forcing bpc to 8 for TV\n"); |
928 | pipe_config->pipe_bpp = 8*3; | 928 | pipe_config->pipe_bpp = 8*3; |
929 | 929 | ||
930 | /* TV has it's own notion of sync and other mode flags, so clear them. */ | 930 | /* TV has it's own notion of sync and other mode flags, so clear them. */ |
931 | pipe_config->adjusted_mode.flags = 0; | 931 | pipe_config->base.adjusted_mode.flags = 0; |
932 | 932 | ||
933 | /* | 933 | /* |
934 | * FIXME: We don't check whether the input mode is actually what we want | 934 | * FIXME: We don't check whether the input mode is actually what we want |