[PATCHv2 37/45] drm: omapdrm: Don't setup planes manually from CRTC .enable()/.disable()
Tomi Valkeinen
tomi.valkeinen at ti.com
Thu Jun 4 02:02:54 PDT 2015
From: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
Planes setup is handled by the DRM core through the atomic helpers,
there's no need to duplicate the code in the CRTC .enable() and
.disable() operations.
Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen at ti.com>
---
drivers/gpu/drm/omapdrm/omap_crtc.c | 20 --------------------
drivers/gpu/drm/omapdrm/omap_drv.h | 1 -
drivers/gpu/drm/omapdrm/omap_plane.c | 2 +-
3 files changed, 1 insertion(+), 22 deletions(-)
diff --git a/drivers/gpu/drm/omapdrm/omap_crtc.c b/drivers/gpu/drm/omapdrm/omap_crtc.c
index 701406e1f0ee..abfafd1600b8 100644
--- a/drivers/gpu/drm/omapdrm/omap_crtc.c
+++ b/drivers/gpu/drm/omapdrm/omap_crtc.c
@@ -391,41 +391,21 @@ static bool omap_crtc_mode_fixup(struct drm_crtc *crtc,
static void omap_crtc_enable(struct drm_crtc *crtc)
{
- struct omap_drm_private *priv = crtc->dev->dev_private;
struct omap_crtc *omap_crtc = to_omap_crtc(crtc);
- unsigned int i;
DBG("%s", omap_crtc->name);
- /* Enable all planes associated with the CRTC. */
- for (i = 0; i < priv->num_planes; i++) {
- struct drm_plane *plane = priv->planes[i];
-
- if (plane->crtc == crtc)
- WARN_ON(omap_plane_setup(plane));
- }
-
drm_crtc_vblank_on(crtc);
}
static void omap_crtc_disable(struct drm_crtc *crtc)
{
- struct omap_drm_private *priv = crtc->dev->dev_private;
struct omap_crtc *omap_crtc = to_omap_crtc(crtc);
- unsigned int i;
DBG("%s", omap_crtc->name);
omap_crtc_wait_page_flip(crtc);
drm_crtc_vblank_off(crtc);
-
- /* Disable all planes associated with the CRTC. */
- for (i = 0; i < priv->num_planes; i++) {
- struct drm_plane *plane = priv->planes[i];
-
- if (plane->crtc == crtc)
- WARN_ON(omap_plane_setup(plane));
- }
}
static void omap_crtc_mode_set_nofb(struct drm_crtc *crtc)
diff --git a/drivers/gpu/drm/omapdrm/omap_drv.h b/drivers/gpu/drm/omapdrm/omap_drv.h
index bdd54162698f..0b7a055bf007 100644
--- a/drivers/gpu/drm/omapdrm/omap_drv.h
+++ b/drivers/gpu/drm/omapdrm/omap_drv.h
@@ -150,7 +150,6 @@ struct drm_crtc *omap_crtc_init(struct drm_device *dev,
struct drm_plane *omap_plane_init(struct drm_device *dev,
int id, enum drm_plane_type type);
-int omap_plane_setup(struct drm_plane *plane);
void omap_plane_install_properties(struct drm_plane *plane,
struct drm_mode_object *obj);
diff --git a/drivers/gpu/drm/omapdrm/omap_plane.c b/drivers/gpu/drm/omapdrm/omap_plane.c
index d18fe106e256..448707669690 100644
--- a/drivers/gpu/drm/omapdrm/omap_plane.c
+++ b/drivers/gpu/drm/omapdrm/omap_plane.c
@@ -58,7 +58,7 @@ to_omap_plane_state(struct drm_plane_state *state)
return container_of(state, struct omap_plane_state, base);
}
-int omap_plane_setup(struct drm_plane *plane)
+static int omap_plane_setup(struct drm_plane *plane)
{
struct omap_plane *omap_plane = to_omap_plane(plane);
struct drm_plane_state *state = plane->state;
--
2.1.4
More information about the dri-devel
mailing list