drm/exynos: fix point to call overlay_ops->mode_set
authorJoonyoung Shim <jy0922.shim@samsung.com>
Wed, 27 Jun 2012 05:27:01 +0000 (14:27 +0900)
committerInki Dae <inki.dae@samsung.com>
Fri, 27 Jul 2012 02:13:53 +0000 (11:13 +0900)
Call overlay->mode_set from crtc->mode_set instead of encoder->mode_set,
it makes codes clearly.

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

index 32a34c85899bb08aa0cf95d492830af66af6041c..552e0ebe60bab1864c05f85c08b819dfa6f22cab 100644 (file)
@@ -251,6 +251,10 @@ exynos_drm_crtc_mode_set(struct drm_crtc *crtc, struct drm_display_mode *mode,
                          struct drm_display_mode *adjusted_mode, int x, int y,
                          struct drm_framebuffer *old_fb)
 {
+       struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(crtc);
+       struct exynos_drm_overlay *overlay = &exynos_crtc->overlay;
+       int ret;
+
        DRM_DEBUG_KMS("%s\n", __FILE__);
 
        /*
@@ -259,7 +263,13 @@ exynos_drm_crtc_mode_set(struct drm_crtc *crtc, struct drm_display_mode *mode,
         */
        memcpy(&crtc->mode, adjusted_mode, sizeof(*adjusted_mode));
 
-       return exynos_drm_crtc_update(crtc);
+       ret = exynos_drm_crtc_update(crtc);
+       if (ret)
+               return ret;
+
+       exynos_drm_fn_encoder(crtc, overlay, exynos_drm_encoder_crtc_mode_set);
+
+       return 0;
 }
 
 static int exynos_drm_crtc_mode_set_base(struct drm_crtc *crtc, int x, int y,
index 4a13a747f5d4930d06d495503190ee80ea4d532d..652b901d8afeea21a89afde15255bf21bb704870 100644 (file)
@@ -136,21 +136,14 @@ static void exynos_drm_encoder_mode_set(struct drm_encoder *encoder,
        struct drm_connector *connector;
        struct exynos_drm_manager *manager = exynos_drm_get_manager(encoder);
        struct exynos_drm_manager_ops *manager_ops = manager->ops;
-       struct exynos_drm_overlay_ops *overlay_ops = manager->overlay_ops;
-       struct exynos_drm_overlay *overlay = get_exynos_drm_overlay(dev,
-                                               encoder->crtc);
 
        DRM_DEBUG_KMS("%s\n", __FILE__);
 
        list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
-               if (connector->encoder == encoder) {
+               if (connector->encoder == encoder)
                        if (manager_ops && manager_ops->mode_set)
                                manager_ops->mode_set(manager->dev,
                                                        adjusted_mode);
-
-                       if (overlay_ops && overlay_ops->mode_set)
-                               overlay_ops->mode_set(manager->dev, overlay);
-               }
        }
 }