Lines Matching refs:iter
223 drm_atomic_helper_damage_iter_init(struct drm_atomic_helper_damage_iter *iter, in drm_atomic_helper_damage_iter_init() argument
228 memset(iter, 0, sizeof(*iter)); in drm_atomic_helper_damage_iter_init()
233 iter->clips = (struct drm_rect *)drm_plane_get_damage_clips(state); in drm_atomic_helper_damage_iter_init()
234 iter->num_clips = drm_plane_get_damage_clips_count(state); in drm_atomic_helper_damage_iter_init()
239 iter->plane_src.x1 = src.x1 >> 16; in drm_atomic_helper_damage_iter_init()
240 iter->plane_src.y1 = src.y1 >> 16; in drm_atomic_helper_damage_iter_init()
241 iter->plane_src.x2 = (src.x2 >> 16) + !!(src.x2 & 0xFFFF); in drm_atomic_helper_damage_iter_init()
242 iter->plane_src.y2 = (src.y2 >> 16) + !!(src.y2 & 0xFFFF); in drm_atomic_helper_damage_iter_init()
244 if (!iter->clips || !drm_rect_equals(&state->src, &old_state->src)) { in drm_atomic_helper_damage_iter_init()
245 iter->clips = NULL; in drm_atomic_helper_damage_iter_init()
246 iter->num_clips = 0; in drm_atomic_helper_damage_iter_init()
247 iter->full_update = true; in drm_atomic_helper_damage_iter_init()
269 drm_atomic_helper_damage_iter_next(struct drm_atomic_helper_damage_iter *iter, in drm_atomic_helper_damage_iter_next() argument
274 if (iter->full_update) { in drm_atomic_helper_damage_iter_next()
275 *rect = iter->plane_src; in drm_atomic_helper_damage_iter_next()
276 iter->full_update = false; in drm_atomic_helper_damage_iter_next()
280 while (iter->curr_clip < iter->num_clips) { in drm_atomic_helper_damage_iter_next()
281 *rect = iter->clips[iter->curr_clip]; in drm_atomic_helper_damage_iter_next()
282 iter->curr_clip++; in drm_atomic_helper_damage_iter_next()
284 if (drm_rect_intersect(rect, &iter->plane_src)) { in drm_atomic_helper_damage_iter_next()
313 struct drm_atomic_helper_damage_iter iter; in drm_atomic_helper_damage_merged() local
322 drm_atomic_helper_damage_iter_init(&iter, old_state, state); in drm_atomic_helper_damage_merged()
323 drm_atomic_for_each_plane_damage(&iter, &clip) { in drm_atomic_helper_damage_merged()