struct rcar_du_plane *plane = &rcrtc->group->planes.planes[i];
unsigned int j;
- if (plane->crtc != &rcrtc->crtc || !plane->enabled)
+ if (plane->plane.state->crtc != &rcrtc->crtc)
continue;
/* Insert the plane in the sorted planes array. */
for (i = 0; i < ARRAY_SIZE(rcrtc->group->planes.planes); ++i) {
struct rcar_du_plane *plane = &rcrtc->group->planes.planes[i];
- if (plane->crtc != crtc || !plane->enabled)
+ if (plane->plane.state->crtc != crtc)
continue;
rcar_du_plane_setup(plane);
rcrtc->enabled = false;
rcrtc->plane = &rgrp->planes.planes[index % 2];
- rcrtc->plane->crtc = crtc;
-
ret = drm_crtc_init_with_planes(rcdu->ddev, crtc, &rcrtc->plane->plane,
NULL, &crtc_funcs);
if (ret < 0)
bool interlaced;
u32 mwr;
- interlaced = plane->crtc->mode.flags & DRM_MODE_FLAG_INTERLACE;
+ interlaced = plane->plane.state->crtc->state->adjusted_mode.flags
+ & DRM_MODE_FLAG_INTERLACE;
/* Memory pitch (expressed in pixels). Must be doubled for interlaced
* operation with 32bpp formats.
static void rcar_du_plane_disable(struct rcar_du_plane *rplane)
{
- if (!rplane->enabled)
+ if (!rplane->plane.state->crtc)
return;
- mutex_lock(&rplane->group->planes.lock);
- rplane->enabled = false;
- mutex_unlock(&rplane->group->planes.lock);
-
rcar_du_plane_release(rplane);
- rplane->crtc = NULL;
rplane->format = NULL;
}
rcar_du_plane_reserve(rplane, format);
}
- rplane->crtc = state->crtc;
rplane->format = format;
rcar_du_plane_setup(rplane);
-
- mutex_lock(&rplane->group->planes.lock);
- rplane->enabled = true;
- mutex_unlock(&rplane->group->planes.lock);
}
static const struct drm_plane_helper_funcs rcar_du_plane_helper_funcs = {