From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx> --- drivers/gpu/drm/i915/intel_atomic.c | 23 ++++++++++++----------- 1 files changed, 12 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_atomic.c b/drivers/gpu/drm/i915/intel_atomic.c index e439c04..e9eaa8a 100644 --- a/drivers/gpu/drm/i915/intel_atomic.c +++ b/drivers/gpu/drm/i915/intel_atomic.c @@ -907,6 +907,7 @@ static int apply_config(struct drm_device *dev, for (i = 0; i < dev->mode_config.num_crtc; i++) { struct intel_crtc_state *st = &s->crtc[i]; struct intel_crtc *intel_crtc = to_intel_crtc(st->crtc); + int j; if (st->mode_dirty) { ret = crtc_mode_set(st->crtc); @@ -925,21 +926,21 @@ static int apply_config(struct drm_device *dev, intel_crtc->cursor_height, intel_crtc->cursor_bo, intel_crtc->cursor_addr); - } - for (i = 0; i < dev->mode_config.num_plane; i++) { - struct intel_plane_state *st = &s->plane[i]; - struct drm_plane *plane = st->plane; + for (j = 0; j < dev->mode_config.num_plane; j++) { + struct intel_plane_state *pst = &s->plane[j]; + struct drm_plane *plane = pst->plane; - if (!s->plane[i].dirty) - continue; + if (!pst->dirty) + continue; - if (!plane->crtc) - continue; + if (plane->crtc != st->crtc) + continue; - ret = intel_commit_plane(plane, plane->crtc, plane->fb, &st->coords, false); - if (ret) - return ret; + ret = intel_commit_plane(plane, plane->crtc, plane->fb, &pst->coords, false); + if (ret) + return ret; + } } for (i = 0; i < dev->mode_config.num_crtc; i++) { -- 1.7.8.6 _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/dri-devel