@@ -69,7 +69,6 @@ struct decon_context {
6969 void __iomem * regs ;
7070 unsigned long irq_flags ;
7171 bool i80_if ;
72- bool suspended ;
7372 wait_queue_head_t wait_vsync_queue ;
7473 atomic_t wait_vsync_event ;
7574
@@ -132,9 +131,6 @@ static void decon_shadow_protect_win(struct decon_context *ctx,
132131
133132static void decon_wait_for_vblank (struct decon_context * ctx )
134133{
135- if (ctx -> suspended )
136- return ;
137-
138134 atomic_set (& ctx -> wait_vsync_event , 1 );
139135
140136 /*
@@ -210,9 +206,6 @@ static void decon_commit(struct exynos_drm_crtc *crtc)
210206 struct drm_display_mode * mode = & crtc -> base .state -> adjusted_mode ;
211207 u32 val , clkdiv ;
212208
213- if (ctx -> suspended )
214- return ;
215-
216209 /* nothing to do if we haven't set the mode yet */
217210 if (mode -> htotal == 0 || mode -> vtotal == 0 )
218211 return ;
@@ -274,9 +267,6 @@ static int decon_enable_vblank(struct exynos_drm_crtc *crtc)
274267 struct decon_context * ctx = crtc -> ctx ;
275268 u32 val ;
276269
277- if (ctx -> suspended )
278- return - EPERM ;
279-
280270 if (!test_and_set_bit (0 , & ctx -> irq_flags )) {
281271 val = readl (ctx -> regs + VIDINTCON0 );
282272
@@ -299,9 +289,6 @@ static void decon_disable_vblank(struct exynos_drm_crtc *crtc)
299289 struct decon_context * ctx = crtc -> ctx ;
300290 u32 val ;
301291
302- if (ctx -> suspended )
303- return ;
304-
305292 if (test_and_clear_bit (0 , & ctx -> irq_flags )) {
306293 val = readl (ctx -> regs + VIDINTCON0 );
307294
@@ -404,9 +391,6 @@ static void decon_atomic_begin(struct exynos_drm_crtc *crtc)
404391 struct decon_context * ctx = crtc -> ctx ;
405392 int i ;
406393
407- if (ctx -> suspended )
408- return ;
409-
410394 for (i = 0 ; i < WINDOWS_NR ; i ++ )
411395 decon_shadow_protect_win (ctx , i , true);
412396}
@@ -427,9 +411,6 @@ static void decon_update_plane(struct exynos_drm_crtc *crtc,
427411 unsigned int pitch = fb -> pitches [0 ];
428412 unsigned int vidw_addr0_base = ctx -> data -> vidw_buf_start_base ;
429413
430- if (ctx -> suspended )
431- return ;
432-
433414 /*
434415 * SHADOWCON/PRTCON register is used for enabling timing.
435416 *
@@ -517,9 +498,6 @@ static void decon_disable_plane(struct exynos_drm_crtc *crtc,
517498 unsigned int win = plane -> index ;
518499 u32 val ;
519500
520- if (ctx -> suspended )
521- return ;
522-
523501 /* protect windows */
524502 decon_shadow_protect_win (ctx , win , true);
525503
@@ -538,9 +516,6 @@ static void decon_atomic_flush(struct exynos_drm_crtc *crtc)
538516 struct decon_context * ctx = crtc -> ctx ;
539517 int i ;
540518
541- if (ctx -> suspended )
542- return ;
543-
544519 for (i = 0 ; i < WINDOWS_NR ; i ++ )
545520 decon_shadow_protect_win (ctx , i , false);
546521 exynos_crtc_handle_event (crtc );
@@ -568,9 +543,6 @@ static void decon_atomic_enable(struct exynos_drm_crtc *crtc)
568543 struct decon_context * ctx = crtc -> ctx ;
569544 int ret ;
570545
571- if (!ctx -> suspended )
572- return ;
573-
574546 ret = pm_runtime_resume_and_get (ctx -> dev );
575547 if (ret < 0 ) {
576548 DRM_DEV_ERROR (ctx -> dev , "failed to enable DECON device.\n" );
@@ -584,18 +556,13 @@ static void decon_atomic_enable(struct exynos_drm_crtc *crtc)
584556 decon_enable_vblank (ctx -> crtc );
585557
586558 decon_commit (ctx -> crtc );
587-
588- ctx -> suspended = false;
589559}
590560
591561static void decon_atomic_disable (struct exynos_drm_crtc * crtc )
592562{
593563 struct decon_context * ctx = crtc -> ctx ;
594564 int i ;
595565
596- if (ctx -> suspended )
597- return ;
598-
599566 /*
600567 * We need to make sure that all windows are disabled before we
601568 * suspend that connector. Otherwise we might try to scan from
@@ -605,8 +572,6 @@ static void decon_atomic_disable(struct exynos_drm_crtc *crtc)
605572 decon_disable_plane (crtc , & ctx -> planes [i ]);
606573
607574 pm_runtime_put_sync (ctx -> dev );
608-
609- ctx -> suspended = true;
610575}
611576
612577static const struct exynos_drm_crtc_ops decon_crtc_ops = {
@@ -727,7 +692,6 @@ static int decon_probe(struct platform_device *pdev)
727692 return - ENOMEM ;
728693
729694 ctx -> dev = dev ;
730- ctx -> suspended = true;
731695 ctx -> data = of_device_get_match_data (dev );
732696
733697 i80_if_timings = of_get_child_by_name (dev -> of_node , "i80-if-timings" );
0 commit comments