From patchwork Wed Feb 12 11:31:13 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrzej Hajda X-Patchwork-Id: 3637491 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 54404BF13A for ; Wed, 12 Feb 2014 11:33:00 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 64B2020212 for ; Wed, 12 Feb 2014 11:32:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 178152021A for ; Wed, 12 Feb 2014 11:32:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752629AbaBLLcW (ORCPT ); Wed, 12 Feb 2014 06:32:22 -0500 Received: from mailout4.w1.samsung.com ([210.118.77.14]:19949 "EHLO mailout4.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752074AbaBLLcT (ORCPT ); Wed, 12 Feb 2014 06:32:19 -0500 Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout4.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N0V00MUZS1VWXA0@mailout4.w1.samsung.com>; Wed, 12 Feb 2014 11:32:19 +0000 (GMT) X-AuditID: cbfec7f4-b7f796d000005a13-c7-52fb5bc17ddc Received: from eusync2.samsung.com ( [203.254.199.212]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id 82.A7.23059.1CB5BF25; Wed, 12 Feb 2014 11:32:17 +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 <0N0V00CLBS14OO70@eusync2.samsung.com>; Wed, 12 Feb 2014 11:32:17 +0000 (GMT) From: Andrzej Hajda To: dri-devel@lists.freedesktop.org Cc: Andrzej Hajda , Mark Rutland , devicetree@vger.kernel.org, linux-samsung-soc@vger.kernel.org, Pawel Moll , Ian Campbell , Kyungmin Park , Rob Herring , Kumar Gala , Grant Likely , Sean Paul , Marek Szyprowski Subject: [RFC PATCH v2 06/21] drm/panel: add S6E8AA0 driver Date: Wed, 12 Feb 2014 12:31:13 +0100 Message-id: <1392204688-4591-7-git-send-email-a.hajda@samsung.com> X-Mailer: git-send-email 1.8.3.2 In-reply-to: <1392204688-4591-1-git-send-email-a.hajda@samsung.com> References: <1392204688-4591-1-git-send-email-a.hajda@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrJLMWRmVeSWpSXmKPExsVy+t/xK7oHo38HGax8Z2Fxa905Vov5R4DE la/v2Sz63yxktTjwZwejxblXKxktzja9YbeYcX4fk8XaI3fZLZZev8hkMWH6WhaL1r1H2C3u bjjL6MDrsWbeGkaP2Q0XWTwu9/Uyeaxc/oXNY9OqTjaPO9f2sHnc7z7O5NG3ZRWjx+dNcgGc UVw2Kak5mWWpRfp2CVwZi+f0MRU0tjFV3H0h3cC47yJjFyMnh4SAicSEI4+ZIWwxiQv31rN1 MXJxCAksZZR49+gQlNPHJLHj9mQ2kCo2AU2Jv5tvgtkiAsoSfyeuYgQpYhY4wyxx7e0EsISw gLXE3bc/wGwWAVWJ91Ovs4PYvAJOEo+3n2KDWKcgsezLWqDVHBycAs4Sh7t1QMJCQCVbp99j nMDIu4CRYRWjaGppckFxUnquoV5xYm5xaV66XnJ+7iZGSPB+2cG4+JjVIUYBDkYlHl4Gz19B QqyJZcWVuYcYJTiYlUR4g6J+BwnxpiRWVqUW5ccXleakFh9iZOLglGpgnCsesEln5p7Z0w1+ 2OauOtzds1bvsL6u25rMz/tvOhm1KfyW6T3DL/vftsiy5emu1JdOKw6eWHwydte9uwcPFa7d tPvIgo+yxvevBD0Pe7csLUOHwaXacDUTo8zVH1Mrnlb7Jdn4bevLPCJ+4Pjy5/tcA/vbM/kO XsuOvRkVHpOs8epgnBZXgxJLcUaioRZzUXEiABVl6Bw8AgAA 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=-4.5 required=5.0 tests=BAYES_00,KHOP_BIG_TO_CC, 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 The patch adds MIPI-DSI based S6E8AA0 AMOLED LCD panel driver. Driver uses mipi_dsi bus to communicate with panel and exposes drm_panel interface. Signed-off-by: Andrzej Hajda --- v2 - added bus error handling, - set maxmimum DSI packet size on init, - removed unsupported brightness drm_panel callbacks, - minor improvements --- drivers/gpu/drm/panel/Kconfig | 7 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-s6e8aa0.c | 1064 +++++++++++++++++++++++++++++++++ 3 files changed, 1072 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-s6e8aa0.c diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index 3e0f13d..7527557 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -16,4 +16,11 @@ config DRM_PANEL_SIMPLE that it can be automatically turned off when the panel goes into a low power state. +config DRM_PANEL_S6E8AA0 + tristate "S6E8AA0 DSI video mode panel" + depends on DRM && DRM_PANEL + depends on OF + select DRM_MIPI_DSI + select VIDEOMODE_HELPERS + endmenu diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile index af9dfa2..181265b 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -1 +1,2 @@ obj-$(CONFIG_DRM_PANEL_SIMPLE) += panel-simple.o +obj-$(CONFIG_DRM_PANEL_S6E8AA0) += panel-s6e8aa0.o diff --git a/drivers/gpu/drm/panel/panel-s6e8aa0.c b/drivers/gpu/drm/panel/panel-s6e8aa0.c new file mode 100644 index 0000000..f762c9d --- /dev/null +++ b/drivers/gpu/drm/panel/panel-s6e8aa0.c @@ -0,0 +1,1064 @@ +/* + * MIPI-DSI based s6e8aa0 AMOLED LCD 5.3 inch panel driver. + * + * Copyright (c) 2013 Samsung Electronics Co., Ltd + * + * Inki Dae, + * Donghwa Lee, + * Joongmock Shin + * Eunchul Kim + * Tomasz Figa + * + * 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