[PATCH v3 3/7] drm/atomic: Use new atomic iterator macros.

Laurent Pinchart laurent.pinchart at ideasonboard.com
Tue Feb 14 20:07:29 UTC 2017


Hi Daniel,

On Tuesday 14 Feb 2017 21:03:07 Daniel Vetter wrote:
> On Tue, Jan 17, 2017 at 01:55:50AM +0200, Laurent Pinchart wrote:
> > On Monday 16 Jan 2017 10:37:40 Maarten Lankhorst wrote:
> > 
> > Could we please get a description ? Apart from that,
> 
> Typed something small and merged the first 3 patches from this series.

Thanks. 4 more patches to go. Maarten ? :-)

> > Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> > 
> > > Signed-off-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
> > > ---
> > > 
> > >  drivers/gpu/drm/drm_atomic.c | 16 ++++++++--------
> > >  1 file changed, 8 insertions(+), 8 deletions(-)
> > > 
> > > diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c
> > > index 18cdf2c956c6..7b61e0da9ace 100644
> > > --- a/drivers/gpu/drm/drm_atomic.c
> > > +++ b/drivers/gpu/drm/drm_atomic.c
> > > @@ -1562,7 +1562,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",
> > 
> > > @@ -1571,7 +1571,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",
> > 
> > > @@ -1584,7 +1584,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);
> > > 
> > > @@ -1668,13 +1668,13 @@ static void drm_atomic_print_state(const 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)
> > > 
> > >  		drm_atomic_plane_print_state(&p, plane_state);
> > > 
> > > -	for_each_crtc_in_state(state, crtc, crtc_state, i)
> > > +	for_each_new_crtc_in_state(state, crtc, crtc_state, i)
> > > 
> > >  		drm_atomic_crtc_print_state(&p, crtc_state);
> > > 
> > > -	for_each_connector_in_state(state, connector, connector_state, i)
> > > +	for_each_new_connector_in_state(state, connector, connector_state, i)
> > > 
> > >  		drm_atomic_connector_print_state(&p, connector_state);
> > >  
> > >  }
> > > 
> > > @@ -1961,7 +1961,7 @@ static int prepare_crtc_signaling(struct
> > > drm_device
> > > *dev, if (arg->flags & DRM_MODE_ATOMIC_TEST_ONLY)
> > > 
> > >  		return 0;
> > > 
> > > -	for_each_crtc_in_state(state, crtc, crtc_state, i) {
> > > +	for_each_new_crtc_in_state(state, crtc, crtc_state, i) {
> > > 
> > >  		u64 __user *fence_ptr;
> > >  		
> > >  		fence_ptr = get_out_fence_for_crtc(crtc_state->state, crtc);
> > > 
> > > @@ -2041,7 +2041,7 @@ static void complete_crtc_signaling(struct
> > > drm_device
> > > *dev, return;
> > > 
> > >  	}
> > > 
> > > -	for_each_crtc_in_state(state, crtc, crtc_state, i) {
> > > +	for_each_new_crtc_in_state(state, crtc, crtc_state, i) {
> > > 
> > >  		/*
> > >  		
> > >  		 * TEST_ONLY and PAGE_FLIP_EVENT are mutually
> > >  		 * exclusive, if they weren't, this code should be

-- 
Regards,

Laurent Pinchart



More information about the dri-devel mailing list