From patchwork Thu Aug 24 13:33:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrzej Hajda X-Patchwork-Id: 9920045 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 26ABE60349 for ; Thu, 24 Aug 2017 13:34:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1FC4A283E7 for ; Thu, 24 Aug 2017 13:34:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 141E128557; Thu, 24 Aug 2017 13:34:32 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI 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 AC770283E7 for ; Thu, 24 Aug 2017 13:34:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753008AbdHXNea (ORCPT ); Thu, 24 Aug 2017 09:34:30 -0400 Received: from mailout2.w1.samsung.com ([210.118.77.12]:60398 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752855AbdHXNeN (ORCPT ); Thu, 24 Aug 2017 09:34:13 -0400 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20170824133411euoutp02dfa1b69a8e56d001c1abdb491be6fa6f~dy4u0wHvi1157011570euoutp02U; Thu, 24 Aug 2017 13:34:11 +0000 (GMT) Received: from eusmges1.samsung.com (unknown [203.254.199.239]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20170824133410eucas1p1b8f9006522312979bee7578c3723c008~dy4uGOg4-2915629156eucas1p1Q; Thu, 24 Aug 2017 13:34:10 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1.samsung.com (EUCPMTA) with SMTP id E1.2A.12576.2D5DE995; Thu, 24 Aug 2017 14:34:10 +0100 (BST) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20170824133409eucas1p2f3d79b5a88ef186562abf071f06bfc44~dy4tYYHRT1013710137eucas1p2_; Thu, 24 Aug 2017 13:34:09 +0000 (GMT) X-AuditID: cbfec7ef-f79ee6d000003120-76-599ed5d2fbbb Received: from eusync4.samsung.com ( [203.254.199.214]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 09.4C.20118.1D5DE995; Thu, 24 Aug 2017 14:34:09 +0100 (BST) Received: from AMDC2768.DIGITAL.local ([106.120.43.17]) by eusync4.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OV60031EZ0V8CD0@eusync4.samsung.com>; Thu, 24 Aug 2017 14:34:09 +0100 (BST) From: Andrzej Hajda To: Inki Dae Cc: Andrzej Hajda , Bartlomiej Zolnierkiewicz , Marek Szyprowski , dri-devel@lists.freedesktop.org, linux-samsung-soc@vger.kernel.org, devicetree@vger.kernel.org, Krzysztof Kozlowski Subject: [PATCH v2 04/10] drm/exynos/dsi: propagate info about command mode from panel Date: Thu, 24 Aug 2017 15:33:53 +0200 Message-id: <1503581639-580-5-git-send-email-a.hajda@samsung.com> X-Mailer: git-send-email 2.7.4 In-reply-to: <1503581639-580-1-git-send-email-a.hajda@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrOIsWRmVeSWpSXmKPExsWy7djPc7qXrs6LNNh9S8bi1rpzrBYbZ6xn tZh/BMi68vU9m8Wk+xNYLM6f38BuMeP8PiaLtUfusjtwe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XIxeHkMAS RomOBcfYIZxGJok7B+Yzg1SxCWhK/N18kw3EFhFQlli1r50dxGYWmMkk0byHA8QWFoiQuHv6 LiOIzSKgKvHl008mEJtXwFHi3aLLjBDb5CRunusEm8kp4CRxcM8KsJlCQDVXX+9jmcDIu4CR YRWjSGppcW56brGRXnFibnFpXrpecn7uJkZgKG879nPLDsaud8GHGAU4GJV4eG9cmRcpxJpY VlyZe4hRgoNZSYR310agEG9KYmVValF+fFFpTmrxIUZToKMmMkuJJucD4yyvJN7QxNDc0tDI 2MLC3MhISZxX/XJTpJBAemJJanZqakFqEUwfEwenVANjZZjHQw2x9y7KN32cDinONmvZ63yg sd76zOrjBhev9NatnnKGSfP25Gmr7Nt9ddXZli3TWFxV8OFeg82MmK6lyTuVSueVXIotN17n 5+jc5uu3sim99kxFmkEy84JKu+V21y3eJ2iYCjz7YMN86lxYcvFHS/dfTNLNj6aKn1/xskS1 z2fGratKLMUZiYZazEXFiQC4kx6QewIAAA== X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20170824133409eucas1p2f3d79b5a88ef186562abf071f06bfc44 X-Msg-Generator: CA X-Sender-IP: 182.198.249.180 X-Local-Sender: =?UTF-8?B?QW5kcnplaiBIYWpkYRtTUlBPTC1LZXJuZWwgKFRQKRvsgrw=?= =?UTF-8?B?7ISx7KCE7J6QG1NlbmlvciBTb2Z0d2FyZSBFbmdpbmVlcg==?= X-Global-Sender: =?UTF-8?B?QW5kcnplaiBIYWpkYRtTUlBPTC1LZXJuZWwgKFRQKRtTYW1z?= =?UTF-8?B?dW5nIEVsZWN0cm9uaWNzG1NlbmlvciBTb2Z0d2FyZSBFbmdpbmVlcg==?= X-Sender-Code: =?UTF-8?B?QzEwG0VIURtDMTBDRDAyQ0QwMjczOTI=?= CMS-TYPE: 201P X-CMS-RootMailID: 20170824133409eucas1p2f3d79b5a88ef186562abf071f06bfc44 X-RootMTR: 20170824133409eucas1p2f3d79b5a88ef186562abf071f06bfc44 References: <1503581639-580-1-git-send-email-a.hajda@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 mipi_dsi framework provides information about panel's mode of work. This info should be propagated upstream to configure all elements of the pipeline. As CRTC is the common denominator of the pipeline we can put such info into its structures. Signed-off-by: Andrzej Hajda --- drivers/gpu/drm/exynos/exynos_drm_drv.h | 1 + drivers/gpu/drm/exynos/exynos_drm_dsi.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.h b/drivers/gpu/drm/exynos/exynos_drm_drv.h index a93de32..9e77809 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_drv.h +++ b/drivers/gpu/drm/exynos/exynos_drm_drv.h @@ -162,6 +162,7 @@ struct exynos_drm_crtc { const struct exynos_drm_crtc_ops *ops; void *ctx; struct exynos_drm_clk *pipe_clk; + bool i80_mode : 1; }; static inline void exynos_drm_pipe_clk_enable(struct exynos_drm_crtc *crtc, diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c index 063bac3..8c06a62 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c +++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c @@ -1543,6 +1543,8 @@ static int exynos_dsi_host_attach(struct mipi_dsi_host *host, drm_panel_attach(dsi->panel, &dsi->connector); dsi->connector.status = connector_status_connected; } + exynos_drm_crtc_get_by_type(drm, EXYNOS_DISPLAY_TYPE_LCD)->i80_mode = + !(dsi->mode_flags & MIPI_DSI_MODE_VIDEO); mutex_unlock(&drm->mode_config.mutex);