On Tue, Nov 15, 2016 at 08:58:17AM +0000, Chris Wilson wrote: > Since an fb may have multiple VMA (due to rotations etc), we need to > wait a vblank and unpin the old VMA not if the fb itself is changed, but > if the underlying VMA is changed. > > Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> Imo we should move this into core state, iirc we're not the only ones needing it. This = fb_changed. Probably also needs to be on the plane_state. -Daniel > --- > drivers/gpu/drm/i915/intel_display.c | 10 +++++++--- > 1 file changed, 7 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c > index 4d578dc6d23f..a92adce033ab 100644 > --- a/drivers/gpu/drm/i915/intel_display.c > +++ b/drivers/gpu/drm/i915/intel_display.c > @@ -12476,9 +12476,6 @@ int intel_plane_atomic_calc_changes(struct drm_crtc_state *crtc_state, > if (!was_visible && !visible) > return 0; > > - if (fb != old_plane_state->base.fb) > - pipe_config->fb_changed = true; > - > turn_off = was_visible && (!visible || mode_changed); > turn_on = visible && (!was_visible || mode_changed); > > @@ -14228,6 +14225,13 @@ intel_prepare_plane_fb(struct drm_plane *plane, > return PTR_ERR(vma); > > to_intel_plane_state(new_state)->vma = vma; > + if (to_intel_plane_state(plane->state)->vma != vma) { > + struct intel_crtc_state *crtc_state; > + > + crtc_state = intel_atomic_get_crtc_state(new_state->state, > + to_intel_crtc(new_state->crtc)); > + crtc_state->fb_changed = true; > + } > } > > return 0; > -- > 2.10.2 > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@xxxxxxxxxxxxxxxxxxxxx > https://lists.freedesktop.org/mailman/listinfo/intel-gfx -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx