diff options
Diffstat (limited to 'drivers/gpu/drm/i915/intel_display.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_display.c | 147 |
1 files changed, 74 insertions, 73 deletions
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 |