aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_display.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/i915/intel_display.c')
-rw-r--r--drivers/gpu/drm/i915/intel_display.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 9c05e57fb7ae..2e6fc4ce8ec9 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -4716,6 +4716,27 @@ static void intel_get_pipe_timings(struct intel_crtc *crtc,
4716 pipe_config->requested_mode.hdisplay = ((tmp >> 16) & 0xffff) + 1; 4716 pipe_config->requested_mode.hdisplay = ((tmp >> 16) & 0xffff) + 1;
4717} 4717}
4718 4718
4719static void intel_crtc_mode_from_pipe_config(struct intel_crtc *intel_crtc,
4720 struct intel_crtc_config *pipe_config)
4721{
4722 struct drm_crtc *crtc = &intel_crtc->base;
4723
4724 crtc->mode.hdisplay = pipe_config->adjusted_mode.crtc_hdisplay;
4725 crtc->mode.htotal = pipe_config->adjusted_mode.crtc_htotal;
4726 crtc->mode.hsync_start = pipe_config->adjusted_mode.crtc_hsync_start;
4727 crtc->mode.hsync_end = pipe_config->adjusted_mode.crtc_hsync_end;
4728
4729 crtc->mode.vdisplay = pipe_config->adjusted_mode.crtc_vdisplay;
4730 crtc->mode.vtotal = pipe_config->adjusted_mode.crtc_vtotal;
4731 crtc->mode.vsync_start = pipe_config->adjusted_mode.crtc_vsync_start;
4732 crtc->mode.vsync_end = pipe_config->adjusted_mode.crtc_vsync_end;
4733
4734 crtc->mode.flags = pipe_config->adjusted_mode.flags;
4735
4736 crtc->mode.clock = pipe_config->adjusted_mode.clock;
4737 crtc->mode.flags |= pipe_config->adjusted_mode.flags;
4738}
4739
4719static void i9xx_set_pipeconf(struct intel_crtc *intel_crtc) 4740static void i9xx_set_pipeconf(struct intel_crtc *intel_crtc)
4720{ 4741{
4721 struct drm_device *dev = intel_crtc->base.dev; 4742 struct drm_device *dev = intel_crtc->base.dev;
@@ -9961,6 +9982,22 @@ void intel_modeset_setup_hw_state(struct drm_device *dev,
9961 9982
9962 intel_modeset_readout_hw_state(dev); 9983 intel_modeset_readout_hw_state(dev);
9963 9984
9985 /*
9986 * Now that we have the config, copy it to each CRTC struct
9987 * Note that this could go away if we move to using crtc_config
9988 * checking everywhere.
9989 */
9990 list_for_each_entry(crtc, &dev->mode_config.crtc_list,
9991 base.head) {
9992 if (crtc->active && i915_fastboot) {
9993 intel_crtc_mode_from_pipe_config(crtc, &crtc->config);
9994
9995 DRM_DEBUG_KMS("[CRTC:%d] found active mode: ",
9996 crtc->base.base.id);
9997 drm_mode_debug_printmodeline(&crtc->base.mode);
9998 }
9999 }
10000
9964 /* HW state is read out, now we need to sanitize this mess. */ 10001 /* HW state is read out, now we need to sanitize this mess. */
9965 list_for_each_entry(encoder, &dev->mode_config.encoder_list, 10002 list_for_each_entry(encoder, &dev->mode_config.encoder_list,
9966 base.head) { 10003 base.head) {