diff options
Diffstat (limited to 'drivers/gpu/drm/i915')
-rw-r--r-- | drivers/gpu/drm/i915/intel_display.c | 30 |
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 | ||
11318 | static int __intel_set_mode_setup_plls(struct drm_device *dev, | 11332 | static int __intel_set_mode_setup_plls(struct drm_device *dev, |