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: 4582531 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id CB0BDC0514 for ; Fri, 18 Jul 2014 10:56:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 00A2B20125 for ; Fri, 18 Jul 2014 10:56:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 09DE720103 for ; Fri, 18 Jul 2014 10:56:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761312AbaGRK4K (ORCPT ); Fri, 18 Jul 2014 06:56:10 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:41147 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756018AbaGRK4J (ORCPT ); Fri, 18 Jul 2014 06:56:09 -0400 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 linux-samsung-soc@vger.kernel.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 Cc: linux-samsung-soc@vger.kernel.org, a.hajda@samsung.com, Inki Dae 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+KLSnNSiw8xMnFwSjUw7mBq3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000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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,