On Tue, Oct 16, 2018 at 03:01:26PM -0700, Paulo Zanoni wrote: > The skl_compute_plane_wm_params() already completely sets the contents > of its struct, or returns plane_visible=0 or returns an error code. > There's no need to memset() it at this point for the same reason we > don't zero-initialize it up when dealing with plane 0. If old garbage in the struct is OK for the luma plane then it should be OK for chroma as well. Reviewed-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx> > > If we want to keep the memset "just to be safe", then we should also > zero initialize it when we use it for plane 0. > > Signed-off-by: Paulo Zanoni <paulo.r.zanoni@xxxxxxxxx> > --- > drivers/gpu/drm/i915/intel_pm.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c > index 9043ffe40ce8..d1dd3ae408f9 100644 > --- a/drivers/gpu/drm/i915/intel_pm.c > +++ b/drivers/gpu/drm/i915/intel_pm.c > @@ -4972,7 +4972,6 @@ static int skl_build_pipe_wm(struct intel_crtc_state *cstate, > > /* uv plane watermarks must also be validated for NV12/Planar */ > if (wm_params.is_planar) { > - memset(&wm_params, 0, sizeof(struct skl_wm_params)); > wm->is_planar = true; > > ret = skl_compute_plane_wm_params(dev_priv, cstate, > -- > 2.14.4 > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@xxxxxxxxxxxxxxxxxxxxx > https://lists.freedesktop.org/mailman/listinfo/intel-gfx -- Ville Syrjälä Intel _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx