From patchwork Mon Nov 18 16:25:23 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrzej Hajda X-Patchwork-Id: 3197121 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 5573A9F3A0 for ; Mon, 18 Nov 2013 16:25:59 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id ABAB6205D1 for ; Mon, 18 Nov 2013 16:25:57 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id A3709205AA for ; Mon, 18 Nov 2013 16:25:55 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D6A3DFB07C; Mon, 18 Nov 2013 08:25:50 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by gabe.freedesktop.org (Postfix) with ESMTP id 30124FB083 for ; Mon, 18 Nov 2013 08:25:45 -0800 (PST) Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) by mailout1.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MWG00IMJWAIFZC0@mailout1.w1.samsung.com> for dri-devel@lists.freedesktop.org; Mon, 18 Nov 2013 16:25:42 +0000 (GMT) X-AuditID: cbfec7f5-b7fe66d00000432e-cb-528a3f860815 Received: from eusync2.samsung.com ( [203.254.199.212]) by eucpsbgm2.samsung.com (EUCPMTA) with SMTP id 14.2A.17198.68F3A825; Mon, 18 Nov 2013 16:25:42 +0000 (GMT) Received: from AMDC1061.digital.local ([106.116.147.88]) by eusync2.samsung.com (Oracle Communications Messaging Server 7u4-23.01 (7.0.4.23.0) 64bit (built Aug 10 2011)) with ESMTPA id <0MWG00ATNWAQVZ50@eusync2.samsung.com>; Mon, 18 Nov 2013 16:25:42 +0000 (GMT) From: Andrzej Hajda To: Thierry Reding Subject: [RFC v2 PATCH] mipi-dsi-bus: add MIPI DSI bus support Date: Mon, 18 Nov 2013 17:25:23 +0100 Message-id: <1384791923-11424-1-git-send-email-a.hajda@samsung.com> X-Mailer: git-send-email 1.8.3.2 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrCJMWRmVeSWpSXmKPExsVy+t/xK7pt9l1BBksP6lvcWneO1aL33Ekm i1mbfzJaXPn6ns3ibNMbdov182+xWdz+zefA7jHr/lk2j+3fHrB63O8+zuTR2/yOzaNvyypG j+M3tjMFsEVx2aSk5mSWpRbp2yVwZTTcv8hWMK224nTrJvYGxs6MLkZODgkBE4mLJ4+zQdhi EhfurQeyuTiEBJYyStyac5kRwuljkji1YxIzSBWbgKbE3803wTpEBNQlJrxcywJSxCxwk1Hi /bdTrCAJYQE7id5F7WBFLAKqEq8er2QEsXkFnCV2zFzDArFOQWLZl7XMExi5FzAyrGIUTS1N LihOSs810itOzC0uzUvXS87P3cQICZmvOxiXHrM6xCjAwajEw6sR1hkkxJpYVlyZe4hRgoNZ SYR3rUVXkBBvSmJlVWpRfnxRaU5q8SFGJg5OqQZG47U/fmfd1MkLrgmyy/DdkBYZZMj9688D uSwJvXNWy7aFup23b/396CUPc78fh+i8c8eZg5/fC3lYe3QyX6B2xZPHNdyHEm6s5X2wf7V2 p7h9yTS2rJbp2loLL67vu9NueGFvjkic2OnnXMkMqQozzFknz+o6cIRn3j3OHwbarm6rJmo7 fN6nxFKckWioxVxUnAgAryYNafcBAAA= Cc: dri-devel@lists.freedesktop.org, Andrzej Hajda , Kyungmin Park , tomi.valkeinen@ti.com X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org X-Spam-Status: No, score=-4.7 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 MIPI DSI bus allows to model DSI hosts and DSI devices using Linux bus. Signed-off-by: Andrzej Hajda Signed-off-by: Kyungmin Park --- Hi, This is my implementation of mipi dsi bus. The first time it was posted as a part of CDF infrastructure [1], but if it can be merged independently I will be glad. I have not addressed yet Bert's comments, but I think it should be easy, once we have agreement how to implement it. There are also working drivers which uses this bus: - Exynos DSI master, - s6e8aa0 panel. I will post them later. [1] http://www.mail-archive.com/dri-devel@lists.freedesktop.org/msg45252.html Changes: v2: - set_power callback removed (its role is passed to RUNTIME_PM), - changed transfer ops parameters to struct, - changed source location, - minor fixes Regards Andrzej --- drivers/gpu/drm/Kconfig | 4 + drivers/gpu/drm/Makefile | 2 + drivers/gpu/drm/drm_mipi_dsi.c | 344 +++++++++++++++++++++++++++++++++++++++++ include/drm/drm_mipi_dsi.h | 154 ++++++++++++++++++ 4 files changed, 504 insertions(+) create mode 100644 drivers/gpu/drm/drm_mipi_dsi.c create mode 100644 include/drm/drm_mipi_dsi.h diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig index f864275..58a603d 100644 --- a/drivers/gpu/drm/Kconfig +++ b/drivers/gpu/drm/Kconfig @@ -20,6 +20,10 @@ menuconfig DRM details. You should also select and configure AGP (/dev/agpgart) support if it is available for your platform. +config DRM_MIPI_DSI + tristate + default y + config DRM_USB tristate depends on DRM diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile index cc08b84..6bab99c 100644 --- a/drivers/gpu/drm/Makefile +++ b/drivers/gpu/drm/Makefile @@ -19,6 +19,7 @@ drm-$(CONFIG_COMPAT) += drm_ioc32.o drm-$(CONFIG_DRM_GEM_CMA_HELPER) += drm_gem_cma_helper.o drm-$(CONFIG_PCI) += ati_pcigart.o +drm-mipi-dsi-y := drm_mipi_dsi.o drm-usb-y := drm_usb.o drm_kms_helper-y := drm_crtc_helper.o drm_dp_helper.o @@ -31,6 +32,7 @@ obj-$(CONFIG_DRM_KMS_HELPER) += drm_kms_helper.o CFLAGS_drm_trace_points.o := -I$(src) obj-$(CONFIG_DRM) += drm.o +obj-$(CONFIG_DRM_MIPI_DSI) += drm_mipi_dsi.o obj-$(CONFIG_DRM_USB) += drm_usb.o obj-$(CONFIG_DRM_TTM) += ttm/ obj-$(CONFIG_DRM_TDFX) += tdfx/ diff --git a/drivers/gpu/drm/drm_mipi_dsi.c b/drivers/gpu/drm/drm_mipi_dsi.c new file mode 100644 index 0000000..ead35da --- /dev/null +++ b/drivers/gpu/drm/drm_mipi_dsi.c @@ -0,0 +1,344 @@ +/* + * MIPI DSI Bus + * + * Copyright (C) 2012, Samsung Electronics, Co., Ltd. + * Andrzej Hajda + * + * 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 +#include +#include +#include +#include +#include +#include +#include +#include