Skip to content

Commit

Permalink
drm/i915: Only update state on crtc's that are part of the atomic state.
Browse files Browse the repository at this point in the history
This is probably hard to hit right now because in most cases all
atomic locks are taken, but after conversion to atomic this will make
it more likely to corrupt the crtc->config pointer, resulting in hard
to find bugs.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
  • Loading branch information
Maarten Lankhorst authored and Daniel Vetter committed Jul 14, 2015
1 parent cc017fb commit 8a75d15
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/gpu/drm/i915/intel_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -12312,6 +12312,7 @@ intel_modeset_update_state(struct drm_atomic_state *state)
struct drm_crtc *crtc;
struct drm_crtc_state *crtc_state;
struct drm_connector *connector;
int i;

intel_shared_dpll_commit(state);

Expand All @@ -12331,7 +12332,7 @@ intel_modeset_update_state(struct drm_atomic_state *state)
intel_modeset_update_staged_output_state(state->dev);

/* Double check state. */
for_each_crtc(dev, crtc) {
for_each_crtc_in_state(state, crtc, crtc_state, i) {
WARN_ON(crtc->state->enable != intel_crtc_in_use(crtc));

to_intel_crtc(crtc)->config = to_intel_crtc_state(crtc->state);
Expand Down

0 comments on commit 8a75d15

Please sign in to comment.