static void decon_disable(struct exynos_drm_crtc *crtc) { struct decon_context *ctx = crtc->ctx; int i; if (ctx->suspended) return; /* * We need to make sure that all windows are disabled before we * suspend that connector. Otherwise we might try to scan from * a destroyed buffer later. */ for (i = 0; i < WINDOWS_NR; i++) decon_disable_plane(crtc, &ctx->planes[i]); decon_swreset(ctx); for (i = 0; i < ARRAY_SIZE(decon_clks_name); i++) clk_disable_unprepare(ctx->clks[i]); clear_bit(BIT_CLKS_ENABLED, &ctx->enabled); pm_runtime_put_sync(ctx->dev); ctx->suspended = true; }
static void decon_disable(struct exynos_drm_crtc *crtc) { struct decon_context *ctx = crtc->ctx; int i; if (test_bit(BIT_SUSPENDED, &ctx->flags)) return; /* * We need to make sure that all windows are disabled before we * suspend that connector. Otherwise we might try to scan from * a destroyed buffer later. */ for (i = ctx->first_win; i < WINDOWS_NR; i++) decon_disable_plane(crtc, &ctx->planes[i]); decon_swreset(ctx); clear_bit(BIT_CLKS_ENABLED, &ctx->flags); exynos_drm_pipe_clk_enable(crtc, false); pm_runtime_put_sync(ctx->dev); set_bit(BIT_SUSPENDED, &ctx->flags); }