summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/rcar-du/rcar_du_plane.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2015-02-22 19:24:59 +0200
committerLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2015-03-03 16:16:25 +0200
commit47094194f070a5099854141bdbd54eae68e5ffd5 (patch)
treecd2020325481e9db10b26a9897fbfb0a6c559f60 /drivers/gpu/drm/rcar-du/rcar_du_plane.c
parentf398f344eb59cd9803091ee08bee77b4e473971e (diff)
downloadblackbird-obmc-linux-47094194f070a5099854141bdbd54eae68e5ffd5.tar.gz
blackbird-obmc-linux-47094194f070a5099854141bdbd54eae68e5ffd5.zip
drm: rcar-du: Replace plane crtc and enabled fields by plane state
The crtc and enabled fields duplicates information stored in the plane state. Use the plane state instead and remove the fields. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Diffstat (limited to 'drivers/gpu/drm/rcar-du/rcar_du_plane.c')
-rw-r--r--drivers/gpu/drm/rcar-du/rcar_du_plane.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/drivers/gpu/drm/rcar-du/rcar_du_plane.c b/drivers/gpu/drm/rcar-du/rcar_du_plane.c
index f28d13dc6fc9..c5cb2ade2722 100644
--- a/drivers/gpu/drm/rcar-du/rcar_du_plane.c
+++ b/drivers/gpu/drm/rcar-du/rcar_du_plane.c
@@ -140,7 +140,8 @@ static void rcar_du_plane_setup_fb(struct rcar_du_plane *plane)
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.
@@ -354,16 +355,11 @@ static int rcar_du_plane_atomic_check(struct drm_plane *plane,
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;
}
@@ -391,14 +387,9 @@ static void rcar_du_plane_atomic_update(struct drm_plane *plane,
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 = {
OpenPOWER on IntegriCloud