From patchwork Wed May 14 06:26:51 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: YoungJun Cho X-Patchwork-Id: 4172921 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 3EBB3BFF02 for ; Wed, 14 May 2014 06:27:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B6F562035E for ; Wed, 14 May 2014 06:27:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2DAEB2035C for ; Wed, 14 May 2014 06:27:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751407AbaENG13 (ORCPT ); Wed, 14 May 2014 02:27:29 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:50034 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751181AbaENG1S (ORCPT ); Wed, 14 May 2014 02:27:18 -0400 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 <0N5J003FCWL9BAB0@mailout4.samsung.com>; Wed, 14 May 2014 15:27:09 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [203.254.230.42]) by epcpsbgr5.samsung.com (EPCPMTA) with SMTP id D0.F6.11496.DBC03735; Wed, 14 May 2014 15:27:09 +0900 (KST) X-AuditID: cbfee691-b7f3e6d000002ce8-71-53730cbd95e2 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 99.7B.25708.CBC03735; Wed, 14 May 2014 15:27:09 +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 <0N5J009Z6WL5U190@mmp2.samsung.com>; Wed, 14 May 2014 15:27:08 +0900 (KST) From: YoungJun Cho To: airlied@linux.ie, dri-devel@lists.freedesktop.org Cc: devicetree@vger.kernel.org, robh+dt@kernel.org, pawel.moll@arm.com, mark.rutland@arm.com, ijc+devicetree@hellion.org.uk, galak@codeaurora.org, linux-samsung-soc@vger.kernel.org, thierry.reding@gmail.com, laurent.pinchart@ideasonboard.com, s.trumtrar@pengutronix.de, kyungmin.park@samsung.com, inki.dae@samsung.com, kgene.kim@samsung.com, jy0922.shim@samsung.com, sw0312.kim@samsung.com, a.hajda@samsung.com Subject: [PATCH 04/18] video: add command mode and command mode display timing Date: Wed, 14 May 2014 15:26:51 +0900 Message-id: <1400048825-6052-5-git-send-email-yj44.cho@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1400048825-6052-1-git-send-email-yj44.cho@samsung.com> References: <1400048825-6052-1-git-send-email-yj44.cho@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrBIsWRmVeSWpSXmKPExsVy+t8zLd29PMXBBjffC1jcWneO1aL33Ekm i/lHgKwrX9+zWfS/Wchqce7VSkaLSfcnsFi8uHeRxaJ3wVU2i7NNb9gtOicuYbeYcX4fk8XS 6xeZLCZMX8ti0br3CLvFp48LWSxmTH7JZvFz1zwWByGPNfPWMHpc7utl8tg56y67x8rlX9g8 ZnfMZPXYtKqTzWP7twesHve7jzN59P818OjbsorR4/MmuQDuKC6blNSczLLUIn27BK6Mybt/ sBacm8xYcfumQAPjmcouRg4OCQETiR1tol2MnECmmMSFe+vZuhi5OIQEljFKHHlxlQkiYSLR d/wsO0RiOqPE1jOHoKpamSRWT7jADlLFJqAp8fzjDlYQW0TAVKJj0lIWkCJmgSXMEnvbV7GB J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k9JzjfSKE3OLS/PS9ZLzczcxgmP9mfQOxlUNFocYBTgYlXh4 bzgXBQuxJpYVV+YeYpTgYFYS4S3fAhTiTUmsrEotyo8vKs1JLT7EmAx00kRmKdHkfGAayiuJ NzQ2MTOyNDIzNjE3NiZNWEmc92CrdaCQQHpiSWp2ampBahHMFiYOTqkGxsLe4n3OPzd91D9T aGin7CTBKlWT8EE/54TiEmcGIV9By7lltv2Calevbrfp5zDgPG7c6bQrM+Gmd9/VS/rW9kpl zSt5dsr+FJ0WqFv264oy//MF2q9Spi7eqP13kdrXtm1yTyOXqZfdus3/MHGvY8np8zNmaJpu 1q7Y2ZpQuyon2c/ejVFciaU4I9FQi7moOBEAeeRBRjkDAAA= DLP-Filter: Pass X-MTR: 20000000000000000@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=-7.5 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 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