aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915
diff options
context:
space:
mode:
authorAnder Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>2015-03-20 10:18:04 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2015-03-26 11:18:20 -0400
commitdb7542dd402ad7be8e337ab483350f8795a3c7b0 (patch)
tree0885e030ef8a2035d1d6b998282073022870b8b2 /drivers/gpu/drm/i915
parent83a57153f5de299c7672d0cb241289c349b784d4 (diff)
drm/i915: Allocate a crtc_state also when the crtc is being disabled
For consistency, allocate a new crtc_state for a crtc that is being disabled. Previously only the enabled value of the current state would change. v2: Rebase on v5 of previous patch. (Ander) Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com> [danvet: Resolve rebase conflict.] Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915')
-rw-r--r--drivers/gpu/drm/i915/intel_display.c30
1 files changed, 22 insertions, 8 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 66cf0996b881..c7e95745ac6b 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -11291,13 +11291,20 @@ intel_modeset_compute_config(struct drm_crtc *crtc,
11291 unsigned *prepare_pipes, 11291 unsigned *prepare_pipes,
11292 unsigned *disable_pipes) 11292 unsigned *disable_pipes)
11293{ 11293{
11294 struct drm_device *dev = crtc->dev;
11294 struct intel_crtc_state *pipe_config = NULL; 11295 struct intel_crtc_state *pipe_config = NULL;
11296 struct intel_crtc *intel_crtc;
11295 11297
11296 intel_modeset_affected_pipes(crtc, modeset_pipes, 11298 intel_modeset_affected_pipes(crtc, modeset_pipes,
11297 prepare_pipes, disable_pipes); 11299 prepare_pipes, disable_pipes);
11298 11300
11299 if ((*modeset_pipes) == 0) 11301 for_each_intel_crtc_masked(dev, *disable_pipes, intel_crtc) {
11300 return NULL; 11302 pipe_config = intel_atomic_get_crtc_state(state, intel_crtc);
11303 if (IS_ERR(pipe_config))
11304 return pipe_config;
11305
11306 pipe_config->base.enable = false;
11307 }
11301 11308
11302 /* 11309 /*
11303 * Note this needs changes when we start tracking multiple modes 11310 * Note this needs changes when we start tracking multiple modes
@@ -11305,14 +11312,21 @@ intel_modeset_compute_config(struct drm_crtc *crtc,
11305 * (i.e. one pipe_config for each crtc) rather than just the one 11312 * (i.e. one pipe_config for each crtc) rather than just the one
11306 * for this crtc. 11313 * for this crtc.
11307 */ 11314 */
11308 pipe_config = intel_modeset_pipe_config(crtc, fb, mode, state); 11315 for_each_intel_crtc_masked(dev, *modeset_pipes, intel_crtc) {
11309 if (IS_ERR(pipe_config)) 11316 /* FIXME: For now we still expect modeset_pipes has at most
11310 return pipe_config; 11317 * one bit set. */
11318 if (WARN_ON(&intel_crtc->base != crtc))
11319 continue;
11311 11320
11312 intel_dump_pipe_config(to_intel_crtc(crtc), pipe_config, 11321 pipe_config = intel_modeset_pipe_config(crtc, fb, mode, state);
11313 "[modeset]"); 11322 if (IS_ERR(pipe_config))
11323 return pipe_config;
11314 11324
11315 return pipe_config; 11325 intel_dump_pipe_config(to_intel_crtc(crtc), pipe_config,
11326 "[modeset]");
11327 }
11328
11329 return intel_atomic_get_crtc_state(state, to_intel_crtc(crtc));;
11316} 11330}
11317 11331
11318static int __intel_set_mode_setup_plls(struct drm_device *dev, 11332static int __intel_set_mode_setup_plls(struct drm_device *dev,