From patchwork Wed May 7 07:46:25 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: YoungJun Cho X-Patchwork-Id: 4126081 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 BD2A79FB03 for ; Wed, 7 May 2014 07:46:59 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2685C202EB for ; Wed, 7 May 2014 07:46:58 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id E66322034B for ; Wed, 7 May 2014 07:46:52 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E4B636EC41; Wed, 7 May 2014 00:46:47 -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 9F7226EC41 for ; Wed, 7 May 2014 00:46:45 -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 <0N57000IS1LVG500@mailout1.samsung.com> for dri-devel@lists.freedesktop.org; Wed, 07 May 2014 16:46:43 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [203.254.230.46]) by epcpsbgr3.samsung.com (EPCPMTA) with SMTP id 1B.BC.11120.3E4E9635; Wed, 07 May 2014 16:46:43 +0900 (KST) X-AuditID: cbfee68f-b7eff6d000002b70-2f-5369e4e3921c Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 29.26.27725.2E4E9635; Wed, 07 May 2014 16:46:43 +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 <0N5700FKJ1LRTV30@mmp2.samsung.com>; Wed, 07 May 2014 16:46:42 +0900 (KST) From: YoungJun Cho To: airlied@linux.ie, dri-devel@lists.freedesktop.org Subject: [RFC v4 PATCH 04/18] video: add command mode and command mode display timing Date: Wed, 07 May 2014 16:46:25 +0900 Message-id: <1399448799-8057-5-git-send-email-yj44.cho@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1399448799-8057-1-git-send-email-yj44.cho@samsung.com> References: <1399448799-8057-1-git-send-email-yj44.cho@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrDIsWRmVeSWpSXmKPExsVy+t8zPd3HTzKDDX61iVjcWneO1aL33Ekm i/lHgKwrX9+zWfS/Wchqce7VSkaLSfcnsFi8uHeRxaJ3wVU2i7NNb9gtOicuYbeYcX4fk8XS 6xeZLCZMX8ti0br3CLvFp48LWSxmTH7JZvFz1zwWByGPNfPWMHpc7utl8tg56y67x8rlX9g8 ZnfMZPXYtKqTzWP7twesHve7jzN59P818OjbsorR4/MmuQDuKC6blNSczLLUIn27BK6Mt43z WQpWT2Gs2DtvE1MD47KqLkZODgkBE4muCVPZIWwxiQv31rN1MXJxCAksY5Q49eExO0zRy9Pd rBCJ6YwSqya2MEM4rUwSrQe+MINUsQloSjz/uIMVxBYRMJXomLSUBaSIWWAJs8T+2Q/ARgkL hEvs+9HPBmKzCKhKPJ74FszmFXCW+N31A2gQB9A6BYk5k2xAwpwCLhIvPnxkBLGFgEourjkJ NlNCYC6HxOcHPSwQcwQkvk0+xALRKyux6QAzxNWSEgdX3GCZwCi8gJFhFaNoakFyQXFSepGx XnFibnFpXrpecn7uJkZITPbvYLx7wPoQ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JzU5NLUgtgtnCxMEp1cCYPjemcD9z jLl68UoeX82wjxo37rg+dXgSO1ea3d50ixav4RQzyyPmK6zj+qrjknlky8oO9DBy7HT+9uaE yoWdbof2nJMOSTaZs8Nzk96kd18j9RhePFO11LDRaTS/0JSqsqduR9/9BaKhhgucdzjGLvi8 S73F635dD8fK2w9XpL5cnGyYKaLEUpyRaKjFXFScCACziTxEPAMAAA== 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 dade5b7..2022244 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig @@ -36,6 +36,9 @@ config VIDEO_OUTPUT_CONTROL config VIDEOMODE_HELPERS bool +config CMDMODE_HELPERS + bool + config HDMI bool diff --git a/drivers/video/Makefile b/drivers/video/Makefile index ae17ddf..922edbd 100644 --- a/drivers/video/Makefile +++ b/drivers/video/Makefile @@ -175,6 +175,8 @@ obj-$(CONFIG_FB_VIRTUAL) += vfb.o #video output switch sysfs driver obj-$(CONFIG_VIDEO_OUTPUT_CONTROL) += output.o 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