From patchwork Mon May 28 09:47:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maciej Purski X-Patchwork-Id: 10430355 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4B700601BE for ; Mon, 28 May 2018 09:49:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3B759289C2 for ; Mon, 28 May 2018 09:49:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2FD3B289DC; Mon, 28 May 2018 09:49:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A226C289C2 for ; Mon, 28 May 2018 09:49:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932073AbeE1Jrf (ORCPT ); Mon, 28 May 2018 05:47:35 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:55004 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754200AbeE1Jr1 (ORCPT ); Mon, 28 May 2018 05:47:27 -0400 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20180528094725euoutp01b8a2d04b382ec919adf499b919f641e7~yxe0B3Vaj1908919089euoutp01C; Mon, 28 May 2018 09:47:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20180528094725euoutp01b8a2d04b382ec919adf499b919f641e7~yxe0B3Vaj1908919089euoutp01C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1527500845; bh=nFT9xCIfoL/2Nbmd/CI5l707pwXEYiNZ90YuN2geRhA=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=qidBVVeDfEcPEO7LJJTflzvn8uunD/W2Q/ympNNUtzqbrm4mbjQh8gkqaSZPfGWgQ b//6BwbKzx8yfGswnm1GenA95yNqAdy7yuOpYrcdreSZ5Fg/L1HsrkyPrV5rSAVY0L o4yobq1NjidQjqdWbf0Gi7M2+V1tf9dIC/4z20V8= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20180528094724eucas1p184cfd78bbdb8f1d89ec38cee7d695857~yxezLI7x10415504155eucas1p1T; Mon, 28 May 2018 09:47:24 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id BA.71.05700.C20DB0B5; Mon, 28 May 2018 10:47:24 +0100 (BST) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20180528094723eucas1p1776829e0b57d2ec6c4e28be872cf88fc~yxeyZsxZJ0416404164eucas1p1Q; Mon, 28 May 2018 09:47:23 +0000 (GMT) X-AuditID: cbfec7f2-5ffe19c000011644-b7-5b0bd02cadfa Received: from eusync1.samsung.com ( [203.254.199.211]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id B7.61.04178.B20DB0B5; Mon, 28 May 2018 10:47:23 +0100 (BST) Received: from AMDC2075.DIGITAL.local ([106.120.51.25]) by eusync1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0P9F00D27N6R5P70@eusync1.samsung.com>; Mon, 28 May 2018 10:47:23 +0100 (BST) From: Maciej Purski To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org Cc: David Airlie , Rob Herring , Mark Rutland , Thierry Reding , Kukjin Kim , Krzysztof Kozlowski , Archit Taneja , Andrzej Hajda , Laurent Pinchart , Inki Dae , Joonyoung Shim , Seung-Woo Kim , Kyungmin Park , Marek Szyprowski , Bartlomiej Zolnierkiewicz , Maciej Purski Subject: [PATCH 02/12] drm/exynos: move pm_runtime_get_sync() to exynos_dsi_init() Date: Mon, 28 May 2018 11:47:06 +0200 Message-id: <1527500833-16005-3-git-send-email-m.purski@samsung.com> X-Mailer: git-send-email 2.7.4 In-reply-to: <1527500833-16005-1-git-send-email-m.purski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpjleLIzCtJLcpLzFFi42LZduzneV2dC9zRBl/+c1jcWneO1aL33Ekm i6aOt6wWG2esZ7WYfwQoduXrezaLSfcnsFi8uHeRxaL/8Wtmi/PnN7BbnG16w27ROXEJu8Wm x9dYLS7vmsNmMeP8PiaLBS9vsVisPXKX3WLp9YtMFq17j7BbzJj8ks3i5655LA6iHmvmrWH0 uNzXy+Sxc9Zddo/ZHTNZPTat6mTz2P7tAavH/e7jTB6bl9R79G1ZxejxeZNcAFcUl01Kak5m WWqRvl0CV0bf2262ggW8FV97trM2ME7k7mLk5JAQMJE4ffkpYxcjF4eQwApGid2/ljNBOJ8Z JWZc38cOU7VzwmY2iMQyRolfPY9YIJz/jBLHF74AquLgYBPQkljTHg8SFxFYxSix+cZbsLnM AlNZJS7Mf80KMkpYIETix4ZdbCANLAKqEj//+4KEeQVcJN58b2SE2CYncfNcJzOIzSngKnF5 bxvYZgmBbnaJt+vPM4P0SgA1TOpkhagXlnh1fAvUpTISnR0HmSDsfInWZ4+h4hUS+3pPQ9Vb Sxw+fhHMZhbgk5i0bTrUSF6JjjYhiBIPiaaGh1APz2CUeHD5E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XtZ/k5jG75zC7PYnISTG7Wf HX69IPBhWPffU6LLP6bo/n/1VGNfYZBufbhf5QPGixmXrSoX/VARXtG1+lfGi2KXCBOT4ich J7RcL6htOczSETp13zrlSweerWN4cfVQtRJLcUaioRZzUXEiAJDlcSh3AgAA X-CMS-MailID: 20180528094723eucas1p1776829e0b57d2ec6c4e28be872cf88fc X-Msg-Generator: CA CMS-TYPE: 201P X-CMS-RootMailID: 20180528094723eucas1p1776829e0b57d2ec6c4e28be872cf88fc References: <1527500833-16005-1-git-send-email-m.purski@samsung.com> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP In order to allow bridge drivers to use DSI transfers in their pre_enable callbacks, pm_runtime_get_sync() should be performed before exynos_dsi_enable(). DSIM_STATE_ENABLED flag now should not guard from calling dsi_host_transfer() before enabling. Signed-off-by: Maciej Purski --- drivers/gpu/drm/exynos/exynos_drm_dsi.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c index 9599e6b..94460b0 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c +++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c @@ -1312,6 +1312,7 @@ static int exynos_dsi_init(struct exynos_dsi *dsi) { const struct exynos_dsi_driver_data *driver_data = dsi->driver_data; + pm_runtime_get_sync(dsi->dev); exynos_dsi_reset(dsi); exynos_dsi_enable_irq(dsi); @@ -1388,7 +1389,6 @@ static void exynos_dsi_enable(struct drm_encoder *encoder) ret = drm_panel_prepare(dsi->panel); if (ret < 0) { dsi->state &= ~DSIM_STATE_ENABLED; - pm_runtime_put_sync(dsi->dev); return; } @@ -1400,7 +1400,6 @@ static void exynos_dsi_enable(struct drm_encoder *encoder) dsi->state &= ~DSIM_STATE_ENABLED; exynos_dsi_set_display_enable(dsi, false); drm_panel_unprepare(dsi->panel); - pm_runtime_put_sync(dsi->dev); return; } @@ -1566,9 +1565,6 @@ static ssize_t exynos_dsi_host_transfer(struct mipi_dsi_host *host, struct exynos_dsi_transfer xfer; int ret; - if (!(dsi->state & DSIM_STATE_ENABLED)) - return -EINVAL; - if (!(dsi->state & DSIM_STATE_INITIALIZED)) { ret = exynos_dsi_init(dsi); if (ret)