From patchwork Wed May 21 04:42:56 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: YoungJun Cho X-Patchwork-Id: 4214481 Return-Path: X-Original-To: patchwork-dri-devel@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 C8373BEEAC for ; Wed, 21 May 2014 04:43:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5F24720396 for ; Wed, 21 May 2014 04:43:39 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 031CA20394 for ; Wed, 21 May 2014 04:43:34 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 23C716E9D2; Tue, 20 May 2014 21:43:23 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mailout4.samsung.com (mailout4.samsung.com [203.254.224.34]) by gabe.freedesktop.org (Postfix) with ESMTP id 3B58E6E9B6 for ; Tue, 20 May 2014 21:43:16 -0700 (PDT) Received: from epcpsbgr5.samsung.com (u145.gpu120.samsung.co.kr [203.254.230.145]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N5W00M9UQG2GBA0@mailout4.samsung.com> for dri-devel@lists.freedesktop.org; Wed, 21 May 2014 13:43:15 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [203.254.230.41]) by epcpsbgr5.samsung.com (EPCPMTA) with SMTP id 89.46.16580.2EE2C735; Wed, 21 May 2014 13:43:14 +0900 (KST) X-AuditID: cbfee691-b7f2f6d0000040c4-f3-537c2ee29e65 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 64.7B.08203.2EE2C735; Wed, 21 May 2014 13:43:14 +0900 (KST) Received: from localhost.localdomain ([10.252.75.90]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0N5W00K72QFYOO20@mmp2.samsung.com>; Wed, 21 May 2014 13:43:14 +0900 (KST) From: YoungJun Cho To: airlied@linux.ie, dri-devel@lists.freedesktop.org Subject: [PATCH v2 04/18] video: add command mode and command mode display timing Date: Wed, 21 May 2014 13:42:56 +0900 Message-id: <1400647390-26590-5-git-send-email-yj44.cho@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1400647390-26590-1-git-send-email-yj44.cho@samsung.com> References: <1400647390-26590-1-git-send-email-yj44.cho@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrKIsWRmVeSWpSXmKPExsVy+t8zTd1HejXBBq96zC1urTvHatF77iST xfwjQFbjjPmsFle+vmez6H+zkNXi3KuVjBaT7k9gsXhx7yKLRe+Cq2wWZ5vesFt0TlzCbjHj /D4mi6XXLzJZTJi+lsWide8RdotPHxeyWMyY/JLN4ueueSwOwh5r5q1h9JjdcJHF43JfL5PH zll32T1WLv/C5jG7Yyarx6ZVnWwe2789YPW4332cyaP/r4FH35ZVjB6fN8kF8ERx2aSk5mSW pRbp2yVwZUze/YO14NxkxorbNwUaGM9UdjFyckgImEhcvrGPHcIWk7hwbz1bFyMXh5DAMkaJ vkcPGWGKXq+cywSRmM4oMW3xURYIp5VJ4lTPHTaQKjYBTYnnH3ewgtgiAqYSHZOWghUxC+xh lti5dCnYDmGBYIllF7vAGlgEVCU2rJjDDGLzCrhIvFg2HSjOAbROQWLOJBuQMKeAq8T5/2/B WoWASprWTAM7T0JgJYfEtR332SHmCEh8m3yIBaJXVmLTAWaIqyUlDq64wTKBUXgBI8MqRtHU guSC4qT0IlO94sTc4tK8dL3k/NxNj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jE3NiYNGElcd4DrdaBQgLpiSWp2ampBalFMFuYODil GhhZa02vzjzS4LT43tOEozzXHOb0/9a9+jn3E8fiTcta1zJ+vu7+aWfnV0vOI1v1oyQmygU2 n3O97O4v3/inQ0vtlZ93RAxPs53p/rarylM0dcu6Dv24enOx1Aehrvw/Z5OXfmdfu6Xx/LwD 7Zy8WZN0phfs0+T/3f4hfGt3fujRF3YqWzY9lVZUYinOSDTUYi4qTgQA1JpKlEUDAAA= DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Cc: mark.rutland@arm.com, devicetree@vger.kernel.org, linux-samsung-soc@vger.kernel.org, pawel.moll@arm.com, ijc+devicetree@hellion.org.uk, sw0312.kim@samsung.com, a.hajda@samsung.com, kyungmin.park@samsung.com, robh+dt@kernel.org, laurent.pinchart@ideasonboard.com, galak@codeaurora.org, kgene.kim@samsung.com, s.trumtrar@pengutronix.de 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.8 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 is based on videomode and display_timing relevant codes. To support command mode panel, it does not need to guide its timing information to the display controller like video mode panel, but it requires signal timings to transfer video data. So this patch adds cmdmode struct, cmdmode_display_timing struct and the according helper functions to convert cmdmode_display_timing to a generic cmdmode. Signed-off-by: YoungJun Cho Acked-by: Inki Dae Acked-by: Kyungmin Park --- drivers/video/Kconfig | 3 + drivers/video/Makefile | 2 + drivers/video/cmdmode.c | 42 ++++++ drivers/video/cmdmode_display_timing.c | 26 ++++ drivers/video/of_cmdmode.c | 55 ++++++++ drivers/video/of_cmdmode_display_timing.c | 212 +++++++++++++++++++++++++++++ include/video/cmdmode.h | 67 +++++++++ include/video/cmdmode_display_timing.h | 59 ++++++++ include/video/of_cmdmode.h | 19 +++ include/video/of_cmdmode_display_timing.h | 26 ++++ 10 files changed, 511 insertions(+) create mode 100644 drivers/video/cmdmode.c create mode 100644 drivers/video/cmdmode_display_timing.c create mode 100644 drivers/video/of_cmdmode.c create mode 100644 drivers/video/of_cmdmode_display_timing.c create mode 100644 include/video/cmdmode.h create mode 100644 include/video/cmdmode_display_timing.h create mode 100644 include/video/of_cmdmode.h create mode 100644 include/video/of_cmdmode_display_timing.h diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index c7b4f0f..7090ee5 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig @@ -38,6 +38,9 @@ config VGASTATE config VIDEOMODE_HELPERS bool +config CMDMODE_HELPERS + bool + config HDMI bool diff --git a/drivers/video/Makefile b/drivers/video/Makefile index 9ad3c17..619dd99 100644 --- a/drivers/video/Makefile +++ b/drivers/video/Makefile @@ -8,6 +8,8 @@ obj-y += backlight/ obj-y += fbdev/ obj-$(CONFIG_VIDEOMODE_HELPERS) += display_timing.o videomode.o +obj-$(CONFIG_CMDMODE_HELPERS) += cmdmode_display_timing.o cmdmode.o ifeq ($(CONFIG_OF),y) obj-$(CONFIG_VIDEOMODE_HELPERS) += of_display_timing.o of_videomode.o +obj-$(CONFIG_CMDMODE_HELPERS) += of_cmdmode_display_timing.o of_cmdmode.o endif diff --git a/drivers/video/cmdmode.c b/drivers/video/cmdmode.c new file mode 100644 index 0000000..3d3eeb8 --- /dev/null +++ b/drivers/video/cmdmode.c @@ -0,0 +1,42 @@ +/* + * generic cmdmode display timing functions + * + * Copyright (c) 2014 YoungJun Cho + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#include +#include +#include