Re: [PATCH] drm/i915: Don't zero out the Y plane's watermarks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Mar 27, 2021 at 02:59:45AM +0200, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
> 
> Don't zero out the watermarks for the Y plane since we've already
> computed them when computing the UV plane's watermarks (since the
> UV plane always appears before ethe Y plane when iterating through
> the planes).
> 
> This leads to allocating no DDB for the Y plane since .min_ddb_alloc
> also gets zeroed. And that of course leads to underruns when scanning
> out planar formats.
> 
> We really need to re-enable the pre-merge pixel format tests or else
> I'll just keep breaking this stuff...

Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@xxxxxxxxx>

> 
> Cc: stable@xxxxxxxxxxxxxxx
> Cc: Stanislav Lisovskiy <stanislav.lisovskiy@xxxxxxxxx>
> Fixes: dbf71381d733 ("drm/i915: Nuke intel_atomic_crtc_state_for_each_plane_state() from skl+ wm code")
> Signed-off-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
> ---
>  drivers/gpu/drm/i915/intel_pm.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index b2aede2be89d..49c19acdb7c6 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -5511,12 +5511,12 @@ static int icl_build_plane_wm(struct intel_crtc_state *crtc_state,
>  	struct skl_plane_wm *wm = &crtc_state->wm.skl.raw.planes[plane_id];
>  	int ret;
>  
> -	memset(wm, 0, sizeof(*wm));
> -
>  	/* Watermarks calculated in master */
>  	if (plane_state->planar_slave)
>  		return 0;
>  
> +	memset(wm, 0, sizeof(*wm));
> +
>  	if (plane_state->planar_linked_plane) {
>  		const struct drm_framebuffer *fb = plane_state->hw.fb;
>  		enum plane_id y_plane_id = plane_state->planar_linked_plane->id;
> -- 
> 2.26.2
> 



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux