[Intel-gfx] [PATCH 48/59] drm/arc: Drop fb/crtc check in arc_pgu_update

Sam Ravnborg sam at ravnborg.org
Fri Apr 24 17:45:22 UTC 2020


Hi Daniel.

On Wed, Apr 15, 2020 at 09:40:23AM +0200, Daniel Vetter wrote:
> First it's redundant, fb and crtc are only ever both set or not set.


> 2nd, the atomic_check code in simple display pipe helpers guarantees
> that this never happens.
I looked at drm_simple_kms_plane_atomic_check() - which I assume you
refer to. And I see no code that will guarantee both.

What have I missed?

	Sam


So nice bugfix for arcpgu driver here, since
> it was lacking a call to drm_atomic_helper_check_plane_state().
> 
> Signed-off-by: Daniel Vetter <daniel.vetter at intel.com>
> Cc: Alexey Brodkin <abrodkin at synopsys.com>
> ---
>  drivers/gpu/drm/arc/arcpgu_crtc.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/arc/arcpgu_crtc.c b/drivers/gpu/drm/arc/arcpgu_crtc.c
> index 5c6d7e34ca73..4655f03e37f1 100644
> --- a/drivers/gpu/drm/arc/arcpgu_crtc.c
> +++ b/drivers/gpu/drm/arc/arcpgu_crtc.c
> @@ -143,9 +143,6 @@ static void arc_pgu_update(struct drm_simple_display_pipe *pipe,
>  	struct arcpgu_drm_private *arcpgu;
>  	struct drm_gem_cma_object *gem;
>  
> -	if (!pipe->plane.state->crtc || !pipe->plane.state->fb)
> -		return;
> -
>  	arcpgu = pipe_to_arcpgu_priv(pipe);
>  	gem = drm_fb_cma_get_gem_obj(pipe->plane.state->fb, 0);
>  	arc_pgu_write(arcpgu, ARCPGU_REG_BUF0_ADDR, gem->paddr);
> -- 
> 2.25.1
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel


More information about the Intel-gfx mailing list