From patchwork Fri Jul 18 10:56:03 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Inki Dae X-Patchwork-Id: 4582541 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 582D99F37C for ; Fri, 18 Jul 2014 10:56:13 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8B246201BA for ; Fri, 18 Jul 2014 10:56:12 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 342232018E for ; Fri, 18 Jul 2014 10:56:11 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 222626E009; Fri, 18 Jul 2014 03:56:09 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mailout1.samsung.com (mailout1.samsung.com [203.254.224.24]) by gabe.freedesktop.org (Postfix) with ESMTP id 3CF8C6E009 for ; Fri, 18 Jul 2014 03:56:08 -0700 (PDT) Received: from epcpsbgr3.samsung.com (u143.gpu120.samsung.co.kr [203.254.230.143]) by mailout1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N8W008XAMDHZH80@mailout1.samsung.com> for dri-devel@lists.freedesktop.org; Fri, 18 Jul 2014 19:56:05 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [172.20.52.114]) by epcpsbgr3.samsung.com (EPCPMTA) with SMTP id 47.6D.14704.54DF8C35; Fri, 18 Jul 2014 19:56:05 +0900 (KST) X-AuditID: cbfee68f-b7fef6d000003970-b7-53c8fd453b12 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id A1.0F.05196.54DF8C35; Fri, 18 Jul 2014 19:56:05 +0900 (KST) Received: from daeinki-desktop.10.32.193.11 ([10.252.83.67]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0N8W005VCMDGBK90@mmp2.samsung.com>; Fri, 18 Jul 2014 19:56:05 +0900 (KST) From: Inki Dae To: airlied@linux.ie, dri-devel@lists.freedesktop.org Subject: [PATCH 1/2] drm/mipi-dsi: add (LPM) Low Power Mode transfer support Date: Fri, 18 Jul 2014 19:56:03 +0900 Message-id: <1405680964-6869-2-git-send-email-inki.dae@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1405680964-6869-1-git-send-email-inki.dae@samsung.com> References: <1405680964-6869-1-git-send-email-inki.dae@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrMLMWRmVeSWpSXmKPExsWyRsSkSNf174lgg8bzsha31p1jteg9d5LJ 4srX92wWk+5PYLGYcX4fkwOrx/ZvD1g97ncfZ/Lo27KK0ePzJrkAligum5TUnMyy1CJ9uwSu jFXt/cwFBwUqbpz2bGC8ytvFyMkhIWAi0TPtPzuELSZx4d56ti5GLg4hgaWMEhcmvmCEKdoy aSY7RGI6o8SM2ReZQBJCAt1MEn+eG4HYbAKqEhNX3GcDsUUETCU6Ji1lAbGZBWIlzt/eBBYX FvCRmLlyMZDNwcECVP+tRwIkzCvgLLFuw2ewsISAgsScSTYgYU4BF4nGd9OYQcJCQCVzHyuD XCAh8J9N4tieR6wgNSwCAhLfJh9igWiVldh0gBniYkmJgytusExgFF7AyLCKUTS1ILmgOCm9 yFivODG3uDQvXS85P3cTIzCAT/971r+D8e4B60OMyUDjJjJLiSbnAyMgryTe0NjMyMLUxNTY yNzSjDRhJXHe+w+TgoQE0hNLUrNTUwtSi+KLSnNSiw8xMnFwSjUw7mBq3um1STLY5K5K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S X-CFilter-Loop: Reflected Cc: a.hajda@samsung.com, linux-samsung-soc@vger.kernel.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch adds below two flags for LPM transfer, and it attaches LPM flags to a msg in accordance with master's mode_flags set by LCD Panel driver. MIPI_DSI_MODE_CMD_LPM: low power command transfer MIPI_DSI_MODE_VIDEO_LPM: low power video transfer MIPI DSI spec says, "the host processor controls the desired mode of clock operation. Host protocol and applications control Clock Lane operating mode (High Speed or Low Power mode). System designers are responsible for understanding the clock requirements for peripherals attached to DSI and controlling clock behavior in accordance with those requirements." Some LCD Panel devices, nt35502a, would need LPM transfer support because they should receive some initial commands with LPM by default hardware setting. Signed-off-by: Inki Dae Acked-by: Kyungmin Park --- drivers/gpu/drm/drm_mipi_dsi.c | 3 +++ include/drm/drm_mipi_dsi.h | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/drivers/gpu/drm/drm_mipi_dsi.c b/drivers/gpu/drm/drm_mipi_dsi.c index e633df2..6b2bbda 100644 --- a/drivers/gpu/drm/drm_mipi_dsi.c +++ b/drivers/gpu/drm/drm_mipi_dsi.c @@ -232,6 +232,9 @@ int mipi_dsi_dcs_write(struct mipi_dsi_device *dsi, unsigned int channel, break; } + if (dsi->mode_flags & MIPI_DSI_MODE_CMD_LPM) + msg.flags = MIPI_DSI_MSG_USE_LPM; + return ops->transfer(dsi->host, &msg); } EXPORT_SYMBOL(mipi_dsi_dcs_write); diff --git a/include/drm/drm_mipi_dsi.h b/include/drm/drm_mipi_dsi.h index 944f33f..1c41e49 100644 --- a/include/drm/drm_mipi_dsi.h +++ b/include/drm/drm_mipi_dsi.h @@ -94,6 +94,10 @@ void mipi_dsi_host_unregister(struct mipi_dsi_host *host); #define MIPI_DSI_MODE_VSYNC_FLUSH BIT(8) /* disable EoT packets in HS mode */ #define MIPI_DSI_MODE_EOT_PACKET BIT(9) +/* command low power mode */ +#define MIPI_DSI_MODE_CMD_LPM BIT(10) +/* video low power mode */ +#define MIPI_DSI_MODE_VIDEO_LPM BIT(11) enum mipi_dsi_pixel_format { MIPI_DSI_FMT_RGB888,