summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2014-11-21 20:00:36 +0100
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-12-03 09:29:34 +0100
commitb9950a133f8bcfbe30ad11ae27ed75668fffe5cd (patch)
treef9cbe9f14101c20949a8267c91c6287ef2aed0b8 /drivers
parentdrm: rcar-du: Fix NULL encoder pointer dereference (diff)
downloadlinux-b9950a133f8bcfbe30ad11ae27ed75668fffe5cd.tar.xz
linux-b9950a133f8bcfbe30ad11ae27ed75668fffe5cd.zip
drm/i915: Don't clobber crtc->new_config when nothing changes
When doing a nop modeset we currently leave crtc->new_config point at the already freed temporary pipe_config. That will anger the sanity checks in intel_modeset_update_state() when the nop modeset gets followed by a GPU reset on gen3/4 where the display block gets fully reinitialized during the reset. So leave crtc->new_config alone until we know a modeset is actually required. Cc: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/i915/intel_display.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 853697fc4d4b..3218455a7ade 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -10907,7 +10907,6 @@ intel_modeset_compute_config(struct drm_crtc *crtc,
}
intel_dump_pipe_config(to_intel_crtc(crtc), pipe_config,
"[modeset]");
- to_intel_crtc(crtc)->new_config = pipe_config;
out:
return pipe_config;
@@ -10933,6 +10932,9 @@ static int __intel_set_mode(struct drm_crtc *crtc,
*saved_mode = crtc->mode;
+ if (modeset_pipes)
+ to_intel_crtc(crtc)->new_config = pipe_config;
+
/*
* See if the config requires any additional preparation, e.g.
* to adjust global state with pipes off. We need to do this
@@ -11466,12 +11468,12 @@ static int intel_crtc_set_config(struct drm_mode_set *set)
ret = PTR_ERR(pipe_config);
goto fail;
} else if (pipe_config) {
- if (to_intel_crtc(set->crtc)->new_config->has_audio !=
+ if (pipe_config->has_audio !=
to_intel_crtc(set->crtc)->config.has_audio)
config->mode_changed = true;
/* Force mode sets for any infoframe stuff */
- if (to_intel_crtc(set->crtc)->new_config->has_infoframe ||
+ if (pipe_config->has_infoframe ||
to_intel_crtc(set->crtc)->config.has_infoframe)
config->mode_changed = true;
}