From patchwork Wed May 30 12:15:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maciej Purski X-Patchwork-Id: 10438859 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 252BD601D3 for ; Wed, 30 May 2018 12:19:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0F869289C9 for ; Wed, 30 May 2018 12:19:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 01E21289CB; Wed, 30 May 2018 12:19:03 +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 9482C289D2 for ; Wed, 30 May 2018 12:19:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753773AbeE3MTA (ORCPT ); Wed, 30 May 2018 08:19:00 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:47701 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751630AbeE3MQa (ORCPT ); Wed, 30 May 2018 08:16:30 -0400 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20180530121628euoutp0135ec624e81396bfa5a515b7dce768c4d~zazhQXbOX0936309363euoutp01a; Wed, 30 May 2018 12:16:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20180530121628euoutp0135ec624e81396bfa5a515b7dce768c4d~zazhQXbOX0936309363euoutp01a DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1527682588; bh=IUibBuDPw9eC68TAnT8cEfr/343D5SWgzYb47Gp0cZo=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=lSQVRkYSvdX+9Man1/WUk1ZfFp2PS5GUnFkCoGm5oTU+2Rt11iy/8uOwjss2lT0f3 /vfgyoe3H7/RxVVhXqSwECJjP9l/SdLWyKCaSaounNUv9ej3JM/ZcDWb5/3Kes144u ZKgcDr3Fx/N0Dmtll9/lJJDcDpUojNJNDY1jjoLI= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20180530121626eucas1p1fd682240c08f5d9eea0c8cf6cbb685df~zazf7pnez2502325023eucas1p1T; Wed, 30 May 2018 12:16:26 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id C1.D6.05700.A169E0B5; Wed, 30 May 2018 13:16:26 +0100 (BST) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20180530121625eucas1p239693227eda97d090f3bfe530ded0c52~zazehaIUM1090010900eucas1p2w; Wed, 30 May 2018 12:16:25 +0000 (GMT) X-AuditID: cbfec7f2-5ffe19c000011644-3f-5b0e961a1137 Received: from eusync1.samsung.com ( [203.254.199.211]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id FE.2A.04183.9169E0B5; Wed, 30 May 2018 13:16:25 +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 <0P9J00FMPJF35I90@eusync1.samsung.com>; Wed, 30 May 2018 13:16:25 +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 v2 04/10] drm/exynos: add non-panel path to exynos_dsi_enable() Date: Wed, 30 May 2018 14:15:55 +0200 Message-id: <1527682561-1386-5-git-send-email-m.purski@samsung.com> X-Mailer: git-send-email 2.7.4 In-reply-to: <1527682561-1386-1-git-send-email-m.purski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAAzWSfSzUcRzH+/4e7vdzc/bbYb6pWTu1RSVam2+UtaX127RVs6kx6eQ3zw+7 Q7SWh013yPPyVOPKMR2K8xRiDXOZOcQKTcxZc44YaSjkHP+93+/Pa+/P57t9aVwoI23p0KhY ThIljhDx+ERL36b2nG2hhZ/zQgWBJt9pSZSl7cdQqnyJRA3F70lU3ruXja0v81D+dC6B5n+M EChHZ8DR0FA9hQZTFymUnqekkFr3lUSj7a94qHioC0MK/SSB6nqnKFT5bQRDaZ29FCou0PPQ ZnsZcdWarS2rBexodhbGtpVOUexLeQnJqlXpPLb1zwzJTmdqMLZRmcRmN6kAu6a2u8335V8O 4iJC4znJeY8H/JBmQyEeU2ieMDM2iycDGT8DmNGQuQgbV1KwDMCnhUw1gEvNCspk1gCsaGon D6mZcgNuGlQBmKKcJExmF8D+vjd7FE3zGEdYKwsw5laMCsDG8SVgNDjzgoTD5Yb9KkvmDhxu W8WMmmBOwdyhTJ5RC5hrMGvlM2ZaZwcntOm4sdSM8YQ1Hz2MPZDJoaBSVk2ZGE/479fGwXmW cEHTdJAfh6MFmYRJR8O0n7qDPAF2ZQ0c8O6wRzOyr3HGAua3FO3vgowA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8beM03297P51tk7s6tUJB6ckr AWbdT/F8zczTkj0r5td9/LjIUnTV2zuyD5NLW573RLmGB0dof5m7m+nijZPW739df9tyu477 ZHZ6X/fv2e5TM/rs7qzV/bqM5/bFjeXBH0R4rZRYijMSDbWYi4oTASo+9AB3AgAA X-CMS-MailID: 20180530121625eucas1p239693227eda97d090f3bfe530ded0c52 X-Msg-Generator: CA CMS-TYPE: 201P X-CMS-RootMailID: 20180530121625eucas1p239693227eda97d090f3bfe530ded0c52 References: <1527682561-1386-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 As DSIM can now have a bridge connected as a peripheral, it should be possible to successfully enable exynos_dsi, when there is no panel provided. Signed-off-by: Maciej Purski --- drivers/gpu/drm/exynos/exynos_drm_dsi.c | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c index 7b50bad..7f6a0b1 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c +++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c @@ -1382,27 +1382,25 @@ static void exynos_dsi_enable(struct drm_encoder *encoder) if (dsi->state & DSIM_STATE_ENABLED) return; - pm_runtime_get_sync(dsi->dev); - - dsi->state |= DSIM_STATE_ENABLED; - - ret = drm_panel_prepare(dsi->panel); - if (ret < 0) { - dsi->state &= ~DSIM_STATE_ENABLED; - return; + if (dsi->panel) { + ret = drm_panel_prepare(dsi->panel); + if (ret < 0) + return; } exynos_dsi_set_display_mode(dsi); exynos_dsi_set_display_enable(dsi, true); - ret = drm_panel_enable(dsi->panel); - if (ret < 0) { - dsi->state &= ~DSIM_STATE_ENABLED; - exynos_dsi_set_display_enable(dsi, false); - drm_panel_unprepare(dsi->panel); - return; + if (dsi->panel) { + ret = drm_panel_enable(dsi->panel); + if (ret < 0) { + exynos_dsi_set_display_enable(dsi, false); + drm_panel_unprepare(dsi->panel); + return; + } } + dsi->state |= DSIM_STATE_ENABLED; dsi->state |= DSIM_STATE_VIDOUT_AVAILABLE; }