[Intel-gfx] [PATCH 04/19] drm/blend: Use new atomic iterator macros.
Ville Syrjälä
ville.syrjala at linux.intel.com
Thu Nov 3 15:26:26 UTC 2016
On Mon, Oct 17, 2016 at 02:37:03PM +0200, Maarten Lankhorst wrote:
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
Patches 02-04 looks sane to me, so for them
Reviewed-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
> ---
> drivers/gpu/drm/drm_blend.c | 22 +++++++++++-----------
> 1 file changed, 11 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_blend.c b/drivers/gpu/drm/drm_blend.c
> index 85172a977bf3..70c03eb032fc 100644
> --- a/drivers/gpu/drm/drm_blend.c
> +++ b/drivers/gpu/drm/drm_blend.c
> @@ -367,27 +367,27 @@ int drm_atomic_normalize_zpos(struct drm_device *dev,
> struct drm_atomic_state *state)
> {
> struct drm_crtc *crtc;
> - struct drm_crtc_state *crtc_state;
> + struct drm_crtc_state *old_crtc_state, *new_crtc_state;
> struct drm_plane *plane;
> - struct drm_plane_state *plane_state;
> + struct drm_plane_state *old_plane_state, *new_plane_state;
> int i, ret = 0;
>
> - for_each_plane_in_state(state, plane, plane_state, i) {
> - crtc = plane_state->crtc;
> + for_each_oldnew_plane_in_state(state, plane, old_plane_state, new_plane_state, i) {
> + crtc = new_plane_state->crtc;
> if (!crtc)
> continue;
> - if (plane->state->zpos != plane_state->zpos) {
> - crtc_state =
> + if (old_plane_state->zpos != new_plane_state->zpos) {
> + new_crtc_state =
> drm_atomic_get_existing_crtc_state(state, crtc);
> - crtc_state->zpos_changed = true;
> + new_crtc_state->zpos_changed = true;
> }
> }
>
> - for_each_crtc_in_state(state, crtc, crtc_state, i) {
> - if (crtc_state->plane_mask != crtc->state->plane_mask ||
> - crtc_state->zpos_changed) {
> + for_each_oldnew_crtc_in_state(state, crtc, old_crtc_state, new_crtc_state, i) {
> + if (old_crtc_state->plane_mask != new_crtc_state->plane_mask ||
> + new_crtc_state->zpos_changed) {
> ret = drm_atomic_helper_crtc_normalize_zpos(crtc,
> - crtc_state);
> + new_crtc_state);
> if (ret)
> return ret;
> }
> --
> 2.7.4
>
> _______________________________________________
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
--
Ville Syrjälä
Intel OTC
More information about the Intel-gfx
mailing list