[PATCH 3/4] [RFC] drm/Exynos: Added 'disable' function to Exynos drm crtc module.

Prathyush prathyush.k at samsung.com
Sat Apr 14 04:52:12 PDT 2012


While freeing an fb, if the fb is being used by a crtc, the drm
driver tries to disable the CRTC. Currently there is no disable
function provided by exynos drm crtc module so the driver tries
to suspend the crtc (by calling dpms) which only works if
RUNTIME PM is enabled.

Signed-off-by: Prathyush K <prathyush.k at samsung.com>
---
 drivers/gpu/drm/exynos/exynos_drm_crtc.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/drivers/gpu/drm/exynos/exynos_drm_crtc.c b/drivers/gpu/drm/exynos/exynos_drm_crtc.c
index e3861ac..eb1e553 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_crtc.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_crtc.c
@@ -192,6 +192,16 @@ static void exynos_drm_crtc_dpms(struct drm_crtc *crtc, int mode)
 	mutex_unlock(&dev->struct_mutex);
 }
 
+static void exynos_drm_crtc_disable(struct drm_crtc *crtc)
+{
+	struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(crtc);
+	struct exynos_drm_overlay *overlay = &exynos_crtc->overlay;
+	int win = overlay->zpos;
+
+	exynos_drm_fn_encoder(crtc, &win,
+		exynos_drm_encoder_crtc_disable);
+}
+
 static void exynos_drm_crtc_prepare(struct drm_crtc *crtc)
 {
 	DRM_DEBUG_KMS("%s\n", __FILE__);
@@ -278,6 +288,7 @@ static void exynos_drm_crtc_load_lut(struct drm_crtc *crtc)
 
 static struct drm_crtc_helper_funcs exynos_crtc_helper_funcs = {
 	.dpms		= exynos_drm_crtc_dpms,
+	.disable	= exynos_drm_crtc_disable,
 	.prepare	= exynos_drm_crtc_prepare,
 	.commit		= exynos_drm_crtc_commit,
 	.mode_fixup	= exynos_drm_crtc_mode_fixup,
-- 
1.7.0.4



More information about the dri-devel mailing list