aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/imx-drm
diff options
context:
space:
mode:
authorShawn Guo <shawn.guo@freescale.com>2014-09-10 22:10:43 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-09-23 23:36:27 -0700
commitb46355f0f77f6553ad6079ffd6ee5adfb8ca7a8b (patch)
tree3090d15c6eae9710a3aeaa81650a152e3fa886bb /drivers/staging/imx-drm
parentstaging: ft1000-pcmcia: Don't initialise static to 0 (diff)
downloadlinux-dev-b46355f0f77f6553ad6079ffd6ee5adfb8ca7a8b.tar.xz
linux-dev-b46355f0f77f6553ad6079ffd6ee5adfb8ca7a8b.zip
imx-drm: ipuv3-plane: remove function ipu_plane_dpms()
All those ipu_*_put() calls in ipu_plane_dpms() are unnecessary, because the only occurrence of ipu_plane_dpms() with 'mode' not being DRM_MODE_DPMS_ON is in function ipu_disable_plane(), which already has a ipu_plane_put_resources() call to put those ipu resources right after ipu_plane_dpms(). So with those redundant ipu_*_put() calls removed from ipu_plane_dpms(), the only left code in the function is ipu_plane_enable|disable(). Thus, we can just call ipu_plane_enable|disable() as needed directly and remove the ipu_plane_dpms() function completely. Suggested-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Shawn Guo <shawn.guo@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/imx-drm')
-rw-r--r--drivers/staging/imx-drm/ipuv3-plane.c29
1 files changed, 4 insertions, 25 deletions
diff --git a/drivers/staging/imx-drm/ipuv3-plane.c b/drivers/staging/imx-drm/ipuv3-plane.c
index 697aad25b82d..944962b692bb 100644
--- a/drivers/staging/imx-drm/ipuv3-plane.c
+++ b/drivers/staging/imx-drm/ipuv3-plane.c
@@ -259,29 +259,6 @@ void ipu_plane_disable(struct ipu_plane *ipu_plane)
ipu_dp_disable(ipu_plane->ipu);
}
-static void ipu_plane_dpms(struct ipu_plane *ipu_plane, int mode)
-{
- bool enable;
-
- DRM_DEBUG_KMS("mode = %d", mode);
-
- enable = (mode == DRM_MODE_DPMS_ON);
-
- if (enable == ipu_plane->enabled)
- return;
-
- if (enable) {
- ipu_plane_enable(ipu_plane);
- } else {
- ipu_plane_disable(ipu_plane);
-
- ipu_idmac_put(ipu_plane->ipu_ch);
- ipu_dmfc_put(ipu_plane->dmfc);
- if (ipu_plane->dp)
- ipu_dp_put(ipu_plane->dp);
- }
-}
-
/*
* drm_plane API
*/
@@ -315,7 +292,8 @@ static int ipu_update_plane(struct drm_plane *plane, struct drm_crtc *crtc,
plane->crtc, crtc);
plane->crtc = crtc;
- ipu_plane_dpms(ipu_plane, DRM_MODE_DPMS_ON);
+ if (!ipu_plane->enabled)
+ ipu_plane_enable(ipu_plane);
return 0;
}
@@ -326,7 +304,8 @@ static int ipu_disable_plane(struct drm_plane *plane)
DRM_DEBUG_KMS("[%d] %s\n", __LINE__, __func__);
- ipu_plane_dpms(ipu_plane, DRM_MODE_DPMS_OFF);
+ if (ipu_plane->enabled)
+ ipu_plane_disable(ipu_plane);
ipu_plane_put_resources(ipu_plane);