From patchwork Mon May 28 09:47:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maciej Purski X-Patchwork-Id: 10430385 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 1A007601BE for ; Mon, 28 May 2018 09:50:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0A223289C2 for ; Mon, 28 May 2018 09:50:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F0B5F289F4; Mon, 28 May 2018 09:50:42 +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 71F97289C2 for ; Mon, 28 May 2018 09:50:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932287AbeE1JuE (ORCPT ); Mon, 28 May 2018 05:50:04 -0400 Received: from mailout2.w1.samsung.com ([210.118.77.12]:40570 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754237AbeE1Jr3 (ORCPT ); Mon, 28 May 2018 05:47:29 -0400 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20180528094727euoutp028443f87c575d8b53f6dda611f3d2899a~yxe1t9eMS1508215082euoutp02P; Mon, 28 May 2018 09:47:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20180528094727euoutp028443f87c575d8b53f6dda611f3d2899a~yxe1t9eMS1508215082euoutp02P DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1527500847; bh=rmVLiS2EjRrd9fxf6vHmpqYPVAZ9jC2KBUSIwuj99Bw=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=c5VG09C3SHkGa2oKiCOOnCC1boHiG5FJBbRancsyBDEuPODOJAa5dGzILcJpBgKvS W22K1w6mwqaKF3aQvuPQoRwwAtnK1meODBH1f1790zwiDK6SyZRqEQF/GkwbpMHV0w N8IUf+FbgmhBPOI2l05s4nBXEdnFLxZFcOAznAbk= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20180528094726eucas1p288a48281f451e29d2317d5b10817d7f9~yxe00Iudj3055530555eucas1p2d; Mon, 28 May 2018 09:47:26 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id 17.F7.10409.D20DB0B5; Mon, 28 May 2018 10:47:25 +0100 (BST) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20180528094725eucas1p2e80e551edb29dd4ab437246f4896d108~yxez-l3Aw3051230512eucas1p2f; Mon, 28 May 2018 09:47:25 +0000 (GMT) X-AuditID: cbfec7f5-b5fff700000028a9-fc-5b0bd02d5633 Received: from eusync1.samsung.com ( [203.254.199.211]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 93.A2.04183.D20DB0B5; Mon, 28 May 2018 10:47: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 <0P9F00D27N6R5P70@eusync1.samsung.com>; Mon, 28 May 2018 10:47: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 04/12] drm/exynos: add non-panel path to exynos_dsi_enable() Date: Mon, 28 May 2018 11:47:08 +0200 Message-id: <1527500833-16005-5-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: H4sIAAAAAAAAAzWSa0iTURjHO3uvTlcv0/JoIToKwrsYcsRuHxy9kh/60ocUtJUvaumUzWuE mqLpvObIZuU1DVnLdIql4ZIlzkttykRLNAtTvCZhBqZkzte+/Z7f+fM8zzkcGhPnEq50vDyF U8hlCRJSiHcNbJl9fEbtI/0HChCaajUTqNQ8JEC5hWsEate8IlBd/54b31wnUeVsBY4Wv4zh qHxuBUMWSxuFPuauUqjoQROF9HMTBLL2PCWRxmIQoPqlKRy97J+hUPPkmADl9/ZTSKNeItFW Ty1+8Sirq9UB1lpWKmC7H89Q7JPCaoLVa4tI9vXvrwQ7W2wSsB1N2WxZpxawG3q3K8II4dkY LiE+jVP4nb8ujFstXyaS6xwyCqeH8RxQLFQBOxoyZ2DruAq3sZhpAdA0D1VAuMcbAG4NVpEq QO+Har6F8P45gM9mpkm+2AXQvFsCbCGS8YS6+9E278RoAez4tAZsBcY8JOBo3QphCzky4XCy +5wNceYUXDSk2AaLmFA4VFVC8Au5wc/mIszGdowUWnsLSN6XU7BPreA5FC7UWDGeHeGyqZPi +QS0qotxnpNg/sLcgc+AhtKRg/4h8L1pbJ8x5jCs7HqE8XcUwcICMR9h4bx2kOTfRANg5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77Va3423Z 9L9cor2RBrf3JHPu2rsgZ9c66XZGgem/XdcvFC590L/eV6UnSeDb7octvznCRf9pHZm3ye6u YEhXh7vw97y+J08P/Gs056xzTH//VnnlxZs7lFiKMxINtZiLihMBu92pr3YCAAA= X-CMS-MailID: 20180528094725eucas1p2e80e551edb29dd4ab437246f4896d108 X-Msg-Generator: CA CMS-TYPE: 201P X-CMS-RootMailID: 20180528094725eucas1p2e80e551edb29dd4ab437246f4896d108 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 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 | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c index 8957faf..7d92e50 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c +++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c @@ -1382,27 +1382,26 @@ 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; }