[Intel-gfx] [PATCH v3 01/20] drm/i915: Only update state on crtc's that are part of the atomic state.
Maarten Lankhorst
maarten.lankhorst at linux.intel.com
Mon Jul 13 07:30:14 PDT 2015
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 at linux.intel.com>
---
drivers/gpu/drm/i915/intel_display.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 887ba0a54352..f9b1db734502 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -12314,6 +12314,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);
@@ -12333,7 +12334,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);
--
2.1.0
More information about the Intel-gfx
mailing list