Re: [PATCH 06/19] drm/atomic: Use new atomic iterator macros.

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

 



On Mon, Oct 17, 2016 at 02:37:05PM +0200, Maarten Lankhorst wrote:
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@xxxxxxxxxxxxxxx>
> ---
>  drivers/gpu/drm/drm_atomic.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c
> index 1915ec44f7eb..6672ea93ee73 100644
> --- a/drivers/gpu/drm/drm_atomic.c
> +++ b/drivers/gpu/drm/drm_atomic.c
> @@ -1369,7 +1369,7 @@ int drm_atomic_check_only(struct drm_atomic_state *state)
>  
>  	DRM_DEBUG_ATOMIC("checking %p\n", state);
>  
> -	for_each_plane_in_state(state, plane, plane_state, i) {
> +	for_each_new_plane_in_state(state, plane, plane_state, i) {
>  		ret = drm_atomic_plane_check(plane, plane_state);
>  		if (ret) {
>  			DRM_DEBUG_ATOMIC("[PLANE:%d:%s] atomic core check failed\n",
> @@ -1378,7 +1378,7 @@ int drm_atomic_check_only(struct drm_atomic_state *state)
>  		}
>  	}
>  
> -	for_each_crtc_in_state(state, crtc, crtc_state, i) {
> +	for_each_new_crtc_in_state(state, crtc, crtc_state, i) {
>  		ret = drm_atomic_crtc_check(crtc, crtc_state);
>  		if (ret) {
>  			DRM_DEBUG_ATOMIC("[CRTC:%d:%s] atomic core check failed\n",
> @@ -1391,7 +1391,7 @@ int drm_atomic_check_only(struct drm_atomic_state *state)
>  		ret = config->funcs->atomic_check(state->dev, state);
>  
>  	if (!state->allow_modeset) {
> -		for_each_crtc_in_state(state, crtc, crtc_state, i) {
> +		for_each_new_crtc_in_state(state, crtc, crtc_state, i) {
>  			if (drm_atomic_crtc_needs_modeset(crtc_state)) {
>  				DRM_DEBUG_ATOMIC("[CRTC:%d:%s] requires full modeset\n",
>  						 crtc->base.id, crtc->name);

All part of the check phase. Check.

> @@ -1732,7 +1732,7 @@ retry:
>  	}
>  
>  	if (arg->flags & DRM_MODE_PAGE_FLIP_EVENT) {
> -		for_each_crtc_in_state(state, crtc, crtc_state, i) {
> +		for_each_new_crtc_in_state(state, crtc, crtc_state, i) {
>  			struct drm_pending_vblank_event *e;
>  
>  			e = create_vblank_event(dev, file_priv, NULL,
> @@ -1768,7 +1768,7 @@ out:
>  		 * for TEST_ONLY too.
>  		 */
>  
> -		for_each_crtc_in_state(state, crtc, crtc_state, i) {
> +		for_each_new_crtc_in_state(state, crtc, crtc_state, i) {
>  			if (!crtc_state->event)
>  				continue;

This latter one runs after the commit, but since it's only executed when
the check/commit failed, we wouldn't have swapped the state yet.

Reviewed-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>

>  
> -- 
> 2.7.4
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux