aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGustavo Padovan <gustavo.padovan@collabora.co.uk>2015-08-15 12:26:10 -0400
committerInki Dae <daeinki@gmail.com>2015-08-30 11:27:36 -0400
commitbb0fa93523b8d7f89b6ee61ab8e9b926ff7a9779 (patch)
tree405c3cdf877ee32720a5cb99e02fea887b78a11e
parent92cffd56b21c825579f3b37bc7803e4c37073076 (diff)
drm/exynos: don't track enabled state at exynos_crtc
struct drm_crtc already stores the enabled state of the crtc thus we don't need to replicate enabled in exynos_drm_crtc. Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Signed-off-by: Inki Dae <inki.dae@samsung.com>
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_crtc.c16
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_drv.h1
2 files changed, 0 insertions, 17 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_crtc.c b/drivers/gpu/drm/exynos/exynos_drm_crtc.c
index c47899738eb4..94eb8313cfa5 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_crtc.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_crtc.c
@@ -25,14 +25,9 @@ static void exynos_drm_crtc_enable(struct drm_crtc *crtc)
25{ 25{
26 struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(crtc); 26 struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(crtc);
27 27
28 if (exynos_crtc->enabled)
29 return;
30
31 if (exynos_crtc->ops->enable) 28 if (exynos_crtc->ops->enable)
32 exynos_crtc->ops->enable(exynos_crtc); 29 exynos_crtc->ops->enable(exynos_crtc);
33 30
34 exynos_crtc->enabled = true;
35
36 drm_crtc_vblank_on(crtc); 31 drm_crtc_vblank_on(crtc);
37} 32}
38 33
@@ -40,9 +35,6 @@ static void exynos_drm_crtc_disable(struct drm_crtc *crtc)
40{ 35{
41 struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(crtc); 36 struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(crtc);
42 37
43 if (!exynos_crtc->enabled)
44 return;
45
46 /* wait for the completion of page flip. */ 38 /* wait for the completion of page flip. */
47 if (!wait_event_timeout(exynos_crtc->pending_flip_queue, 39 if (!wait_event_timeout(exynos_crtc->pending_flip_queue,
48 (exynos_crtc->event == NULL), HZ/20)) 40 (exynos_crtc->event == NULL), HZ/20))
@@ -52,8 +44,6 @@ static void exynos_drm_crtc_disable(struct drm_crtc *crtc)
52 44
53 if (exynos_crtc->ops->disable) 45 if (exynos_crtc->ops->disable)
54 exynos_crtc->ops->disable(exynos_crtc); 46 exynos_crtc->ops->disable(exynos_crtc);
55
56 exynos_crtc->enabled = false;
57} 47}
58 48
59static bool 49static bool
@@ -172,9 +162,6 @@ int exynos_drm_crtc_enable_vblank(struct drm_device *dev, int pipe)
172 struct exynos_drm_crtc *exynos_crtc = 162 struct exynos_drm_crtc *exynos_crtc =
173 to_exynos_crtc(private->crtc[pipe]); 163 to_exynos_crtc(private->crtc[pipe]);
174 164
175 if (!exynos_crtc->enabled)
176 return -EPERM;
177
178 if (exynos_crtc->ops->enable_vblank) 165 if (exynos_crtc->ops->enable_vblank)
179 return exynos_crtc->ops->enable_vblank(exynos_crtc); 166 return exynos_crtc->ops->enable_vblank(exynos_crtc);
180 167
@@ -187,9 +174,6 @@ void exynos_drm_crtc_disable_vblank(struct drm_device *dev, int pipe)
187 struct exynos_drm_crtc *exynos_crtc = 174 struct exynos_drm_crtc *exynos_crtc =
188 to_exynos_crtc(private->crtc[pipe]); 175 to_exynos_crtc(private->crtc[pipe]);
189 176
190 if (!exynos_crtc->enabled)
191 return;
192
193 if (exynos_crtc->ops->disable_vblank) 177 if (exynos_crtc->ops->disable_vblank)
194 exynos_crtc->ops->disable_vblank(exynos_crtc); 178 exynos_crtc->ops->disable_vblank(exynos_crtc);
195} 179}
diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.h b/drivers/gpu/drm/exynos/exynos_drm_drv.h
index 6b8a30f23473..a993aac3a5d0 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_drv.h
+++ b/drivers/gpu/drm/exynos/exynos_drm_drv.h
@@ -136,7 +136,6 @@ struct exynos_drm_crtc {
136 struct drm_crtc base; 136 struct drm_crtc base;
137 enum exynos_drm_output_type type; 137 enum exynos_drm_output_type type;
138 unsigned int pipe; 138 unsigned int pipe;
139 bool enabled;
140 wait_queue_head_t pending_flip_queue; 139 wait_queue_head_t pending_flip_queue;
141 struct drm_pending_vblank_event *event; 140 struct drm_pending_vblank_event *event;
142 const struct exynos_drm_crtc_ops *ops; 141 const struct exynos_drm_crtc_ops *ops;