2014-05-22 11:48 GMT-03:00 <ville.syrjala@xxxxxxxxxxxxxxx>: > From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx> > > ILK and IVB don't like switching between sprite only and primary only > configurations when LP1+ watermarks have been enabled in the recent > past. Like WaCxSRDisabledForSpriteScaling we can avoid the flash > by disabling LP1+ watermarks for one frame before the critical plane > reconfiguration. > > Signed-off-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx> > --- > drivers/gpu/drm/i915/intel_pm.c | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c > index 66af79d..ea1f990 100644 > --- a/drivers/gpu/drm/i915/intel_pm.c > +++ b/drivers/gpu/drm/i915/intel_pm.c > @@ -3175,9 +3175,18 @@ static int ilk_update_sprite_wm(struct intel_plane *plane, > * when scaling is disabled. > * > * WaCxSRDisabledForSpriteScaling:ivb > + * > + * We also seem to need something similar when switching between > + * primary only and sprite only configurations. Otherwise the screen > + * flashes black. No underrun reported though. > */ > if (IS_IVYBRIDGE(dev) && config->spr.scaled && ilk_disable_lp_wm(crtc)) > intel_wait_for_vblank(dev, plane->pipe); > + else if (config->pri.enabled != config->spr.enabled && > + config->pri.enabled != params.pri.enabled && > + config->spr.enabled != params.spr.enabled && > + ilk_disable_lp_wm(crtc)) > + intel_wait_for_vblank(dev, plane->pipe); Those names are bad. It is not clear at all which one is the "curent" one and which one is the one we're going to set (between config->x and params->x). I hope we can fix this later. Still, the patch seems correct: Reviewed-by: Paulo Zanoni <paulo.r.zanoni@xxxxxxxxx>. > > params.pri = config->pri; > params.spr = config->spr; > -- > 1.8.5.5 > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@xxxxxxxxxxxxxxxxxxxxx > http://lists.freedesktop.org/mailman/listinfo/intel-gfx -- Paulo Zanoni _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/intel-gfx