]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
drm/exynos: fix dpms operation for mode set
authorJoonyoung Shim <jy0922.shim@samsung.com>
Wed, 27 Jun 2012 05:27:07 +0000 (14:27 +0900)
committerInki Dae <inki.dae@samsung.com>
Fri, 27 Jul 2012 02:13:54 +0000 (11:13 +0900)
When we do mode set, the dpms mode should be ON. Don't control dpms in
crtc commit function.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
drivers/gpu/drm/exynos/exynos_drm_crtc.c
drivers/gpu/drm/exynos/exynos_drm_encoder.c
drivers/gpu/drm/exynos/exynos_drm_encoder.h

index 7f6584227682530b6d2f6eb325233278536bf080..a5c594b3ee57702a94fc24a1618361b465267dce 100644 (file)
@@ -105,28 +105,6 @@ static void exynos_drm_crtc_commit(struct drm_crtc *crtc)
 
        DRM_DEBUG_KMS("%s\n", __FILE__);
 
-       /*
-        * when set_crtc is requested from user or at booting time,
-        * crtc->commit would be called without dpms call so if dpms is
-        * no power on then crtc->dpms should be called
-        * with DRM_MODE_DPMS_ON for the hardware power to be on.
-        */
-       if (exynos_crtc->dpms != DRM_MODE_DPMS_ON) {
-               int mode = DRM_MODE_DPMS_ON;
-
-               /*
-                * enable hardware(power on) to all encoders hdmi connected
-                * to current crtc.
-                */
-               exynos_drm_crtc_dpms(crtc, mode);
-               /*
-                * enable dma to all encoders connected to current crtc and
-                * lcd panel.
-                */
-               exynos_drm_fn_encoder(crtc, &mode,
-                                       exynos_drm_encoder_dpms_from_crtc);
-       }
-
        exynos_plane_commit(exynos_crtc->plane);
 }
 
@@ -155,6 +133,8 @@ exynos_drm_crtc_mode_set(struct drm_crtc *crtc, struct drm_display_mode *mode,
 
        DRM_DEBUG_KMS("%s\n", __FILE__);
 
+       exynos_drm_crtc_dpms(crtc, DRM_MODE_DPMS_ON);
+
        /*
         * copy the mode data adjusted by mode_fixup() into crtc->mode
         * so that hardware can be seet to proper mode.
@@ -196,7 +176,7 @@ static int exynos_drm_crtc_mode_set_base(struct drm_crtc *crtc, int x, int y,
        if (ret)
                return ret;
 
-       exynos_plane_commit(exynos_crtc->plane);
+       exynos_drm_crtc_commit(crtc);
 
        return 0;
 }
index c25bd4812594140896ddc9b21c5072fa399845fc..2304d083fb8914a1c23a47cf375e32ae167f4d82 100644 (file)
@@ -138,6 +138,8 @@ static void exynos_drm_encoder_mode_set(struct drm_encoder *encoder,
 
        DRM_DEBUG_KMS("%s\n", __FILE__);
 
+       exynos_drm_encoder_dpms(encoder, DRM_MODE_DPMS_ON);
+
        list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
                if (connector->encoder == encoder)
                        if (manager_ops && manager_ops->mode_set)
@@ -323,18 +325,6 @@ void exynos_drm_disable_vblank(struct drm_encoder *encoder, void *data)
                manager_ops->disable_vblank(manager->dev);
 }
 
-void exynos_drm_encoder_dpms_from_crtc(struct drm_encoder *encoder, void *data)
-{
-       struct exynos_drm_encoder *exynos_encoder = to_exynos_encoder(encoder);
-       int mode = *(int *)data;
-
-       DRM_DEBUG_KMS("%s\n", __FILE__);
-
-       exynos_drm_encoder_dpms(encoder, mode);
-
-       exynos_encoder->dpms = mode;
-}
-
 void exynos_drm_encoder_crtc_dpms(struct drm_encoder *encoder, void *data)
 {
        struct drm_device *dev = encoder->dev;
index cabe3ebb3d12aa3ef8f0893358083efaa326b0f0..7692ee4a958a2ae996178b1b99fbcdf2fb74e68e 100644 (file)
@@ -40,8 +40,6 @@ void exynos_drm_fn_encoder(struct drm_crtc *crtc, void *data,
                            void (*fn)(struct drm_encoder *, void *));
 void exynos_drm_enable_vblank(struct drm_encoder *encoder, void *data);
 void exynos_drm_disable_vblank(struct drm_encoder *encoder, void *data);
-void exynos_drm_encoder_dpms_from_crtc(struct drm_encoder *encoder,
-                                       void *data);
 void exynos_drm_encoder_crtc_dpms(struct drm_encoder *encoder, void *data);
 void exynos_drm_encoder_crtc_pipe(struct drm_encoder *encoder, void *data);
 void exynos_drm_encoder_plane_mode_set(struct drm_encoder *encoder, void *data);