diff options
author | Joonyoung Shim <jy0922.shim@samsung.com> | 2012-06-27 01:27:01 -0400 |
---|---|---|
committer | Inki Dae <inki.dae@samsung.com> | 2012-07-26 22:13:53 -0400 |
commit | aeb292245af4bdfda00c0e46647d9e140e3f5cd0 (patch) | |
tree | d75db82b06b59f3dbf71c482589c58351896b5c9 /drivers/gpu | |
parent | faa3d77749ad30d2e1c48e2e4363b9c4889aca27 (diff) |
drm/exynos: fix point to call overlay_ops->mode_set
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>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_crtc.c | 12 | ||||
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_encoder.c | 9 |
2 files changed, 12 insertions, 9 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_crtc.c b/drivers/gpu/drm/exynos/exynos_drm_crtc.c index 32a34c85899b..552e0ebe60ba 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_crtc.c +++ b/drivers/gpu/drm/exynos/exynos_drm_crtc.c | |||
@@ -251,6 +251,10 @@ exynos_drm_crtc_mode_set(struct drm_crtc *crtc, struct drm_display_mode *mode, | |||
251 | struct drm_display_mode *adjusted_mode, int x, int y, | 251 | struct drm_display_mode *adjusted_mode, int x, int y, |
252 | struct drm_framebuffer *old_fb) | 252 | struct drm_framebuffer *old_fb) |
253 | { | 253 | { |
254 | struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(crtc); | ||
255 | struct exynos_drm_overlay *overlay = &exynos_crtc->overlay; | ||
256 | int ret; | ||
257 | |||
254 | DRM_DEBUG_KMS("%s\n", __FILE__); | 258 | DRM_DEBUG_KMS("%s\n", __FILE__); |
255 | 259 | ||
256 | /* | 260 | /* |
@@ -259,7 +263,13 @@ exynos_drm_crtc_mode_set(struct drm_crtc *crtc, struct drm_display_mode *mode, | |||
259 | */ | 263 | */ |
260 | memcpy(&crtc->mode, adjusted_mode, sizeof(*adjusted_mode)); | 264 | memcpy(&crtc->mode, adjusted_mode, sizeof(*adjusted_mode)); |
261 | 265 | ||
262 | return exynos_drm_crtc_update(crtc); | 266 | ret = exynos_drm_crtc_update(crtc); |
267 | if (ret) | ||
268 | return ret; | ||
269 | |||
270 | exynos_drm_fn_encoder(crtc, overlay, exynos_drm_encoder_crtc_mode_set); | ||
271 | |||
272 | return 0; | ||
263 | } | 273 | } |
264 | 274 | ||
265 | static int exynos_drm_crtc_mode_set_base(struct drm_crtc *crtc, int x, int y, | 275 | static int exynos_drm_crtc_mode_set_base(struct drm_crtc *crtc, int x, int y, |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_encoder.c b/drivers/gpu/drm/exynos/exynos_drm_encoder.c index 4a13a747f5d4..652b901d8afe 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_encoder.c +++ b/drivers/gpu/drm/exynos/exynos_drm_encoder.c | |||
@@ -136,21 +136,14 @@ static void exynos_drm_encoder_mode_set(struct drm_encoder *encoder, | |||
136 | struct drm_connector *connector; | 136 | struct drm_connector *connector; |
137 | struct exynos_drm_manager *manager = exynos_drm_get_manager(encoder); | 137 | struct exynos_drm_manager *manager = exynos_drm_get_manager(encoder); |
138 | struct exynos_drm_manager_ops *manager_ops = manager->ops; | 138 | struct exynos_drm_manager_ops *manager_ops = manager->ops; |
139 | struct exynos_drm_overlay_ops *overlay_ops = manager->overlay_ops; | ||
140 | struct exynos_drm_overlay *overlay = get_exynos_drm_overlay(dev, | ||
141 | encoder->crtc); | ||
142 | 139 | ||
143 | DRM_DEBUG_KMS("%s\n", __FILE__); | 140 | DRM_DEBUG_KMS("%s\n", __FILE__); |
144 | 141 | ||
145 | list_for_each_entry(connector, &dev->mode_config.connector_list, head) { | 142 | list_for_each_entry(connector, &dev->mode_config.connector_list, head) { |
146 | if (connector->encoder == encoder) { | 143 | if (connector->encoder == encoder) |
147 | if (manager_ops && manager_ops->mode_set) | 144 | if (manager_ops && manager_ops->mode_set) |
148 | manager_ops->mode_set(manager->dev, | 145 | manager_ops->mode_set(manager->dev, |
149 | adjusted_mode); | 146 | adjusted_mode); |
150 | |||
151 | if (overlay_ops && overlay_ops->mode_set) | ||
152 | overlay_ops->mode_set(manager->dev, overlay); | ||
153 | } | ||
154 | } | 147 | } |
155 | } | 148 | } |
156 | 149 | ||