[PATCH 04/20] drm/amd/display: Know what a pageflip is

Michel Dänzer michel at daenzer.net
Wed Jan 23 09:20:03 UTC 2019


On 2019-01-22 7:28 p.m., sunpeng.li at amd.com wrote:
> From: David Francis <David.Francis at amd.com>
> 
> [Why]
> We were assuming that any commit with allow_modeset == false
> was a pageflip.  This was against drm intention and only
> worked by sheer luck
> 
> [How]
> A pageflip is the change from one framebuffer to another
> 
> Signed-off-by: David Francis <David.Francis at amd.com>
> Reviewed-by: Harry Wentland <Harry.Wentland at amd.com>
> Reviewed-by: Nicholas Kazlauskas <Nicholas.Kazlauskas at amd.com>
> Acked-by: Leo Li <sunpeng.li at amd.com>
> 
> [...]
>  
> @@ -5010,7 +5012,8 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state,
>  		if (!new_crtc_state->active)
>  			continue;
>  
> -		pflip_needed = !state->allow_modeset;
> +		pflip_needed = old_plane_state->fb &&
> +			(old_plane_state->fb != new_plane_state->fb || afb->address != old_afb->address);

The second check after the || cannot be true if old_plane_state->fb ==
new_plane_state->fb, so it's dead code.


-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer


More information about the amd-gfx mailing list