From patchwork Thu Apr 28 21:04:33 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 8978211 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.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id B1DC1BF29F for ; Fri, 29 Apr 2016 07:58:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A0AE02024D for ; Fri, 29 Apr 2016 07:58:40 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 8D35A2021B for ; Fri, 29 Apr 2016 07:58:39 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9E9FD6E1A8; Fri, 29 Apr 2016 07:58:24 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lf0-x22e.google.com (mail-lf0-x22e.google.com [IPv6:2a00:1450:4010:c07::22e]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6366A6E056 for ; Thu, 28 Apr 2016 21:04:38 +0000 (UTC) Received: by mail-lf0-x22e.google.com with SMTP id y84so98111364lfc.0 for ; Thu, 28 Apr 2016 14:04:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cogentembedded-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:organization:user-agent :in-reply-to:references:mime-version:content-transfer-encoding; bh=b58HfBWmhHubgCjQEthWOtss7G8gHW2UqtFDsE5aaNc=; b=T5X83uHB8ljlTTbLDwGyE6jOvi+16R4Ib8jZ5ThtLmXYVUkPSO7wNzet/iZXpeYz5o nZL4Ou7gE4ZlCi2GrB7tDUyu5ikRDQU78DD4XvsKsacdnmQXVqIDTNjCZD9gSQoZN3Xg F5Uziqtvk+rTlg7sk/+MgacIETxYjyvEqlwGt5Ug0WCDQpX7ggXKICENLt4GmvnMMGCb gq0B2xpHYZ/TMdVr7qHEDpiXKllqnb8ybU5wbRoFIC2Po8FrDFoZ/j3o/VVoBnqyXWd9 c5k7KKN2kCm9DOPs4geQocRoXVb+TDnxtHpEIsulRpGm/mn8OhtQ1g+HK9TIyO8iibGH A4dA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding; bh=b58HfBWmhHubgCjQEthWOtss7G8gHW2UqtFDsE5aaNc=; b=BUAssEpJ136DvO2uyJqMT7F34TmH3XbU1kjuLa1mA79A9lAQyRTg7snq78yc9ZmPyM kccBlZ9iv0VsjLrwQizDZQSjYpFditIua0mLrwzKC6qsRHrd/6ILONTgSghUtbV+YZsv YbWPXQYWougxTtwj6GRepf50QIJCWzbkOTzOUsPEpqZ46yZmBG8Hrpu+hXtAFaUsfanO bU9VZ7JYqy8hamLBtIyryn8WdXyt7F50XHoJLg4JAyJj89dEZ1h8uEk8NQji0DNb6dDN aetA6MM3M1SGusoXUJ/Z/S0SggzG7BVYA3AcuGvhKeJCkH5boD12yosGMr+nnlguAEqT hOjg== X-Gm-Message-State: AOPr4FVTbPl3QzB1FSK6wtiVCQT4Y74INnAPsy3AslVhGhazd0uP3RfXy4ntFoIB5Wvr9w== X-Received: by 10.112.160.199 with SMTP id xm7mr5949258lbb.32.1461877476009; Thu, 28 Apr 2016 14:04:36 -0700 (PDT) Received: from wasted.cogentembedded.com ([31.173.83.119]) by smtp.gmail.com with ESMTPSA id v4sm1934124lbi.20.2016.04.28.14.04.34 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 28 Apr 2016 14:04:35 -0700 (PDT) From: Sergei Shtylyov To: laurent.pinchart@ideasonboard.com, airlied@linux.ie, dri-devel@lists.freedesktop.org Subject: [PATCH 3/4] rcar-du: add TCON connector driver Date: Fri, 29 Apr 2016 00:04:33 +0300 Message-ID: <2114462.VbyThWBxQO@wasted.cogentembedded.com> Organization: Cogent Embedded Inc. User-Agent: KMail/4.14.10 (Linux/4.4.6-201.fc22.x86_64; KDE/4.14.17; x86_64; ; ) In-Reply-To: <1787748.qAADjKK4gv@wasted.cogentembedded.com> References: <1787748.qAADjKK4gv@wasted.cogentembedded.com> MIME-Version: 1.0 X-Mailman-Approved-At: Fri, 29 Apr 2016 07:58:21 +0000 Cc: linux-renesas-soc@vger.kernel.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,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 Renesas R-Car SoCs include the timing controller (TCON) that can directly drive LCDs. It receives the H/VSYNC, etc. from the Display Unit (DU) and converts them to the set of signals that a LCD panel can understand (the RBG signals are effectively passed thru). Add the DRM connector driver for the LCDs connected via the TCON interface... Based on a large patch by Andrey Gusakov. Signed-off-by: Andrey Gusakov Signed-off-by: Sergei Shtylyov --- drivers/gpu/drm/rcar-du/Makefile | 1 drivers/gpu/drm/rcar-du/rcar_du_encoder.c | 5 + drivers/gpu/drm/rcar-du/rcar_du_tconcon.c | 125 ++++++++++++++++++++++++++++++ drivers/gpu/drm/rcar-du/rcar_du_tconcon.h | 23 +++++ 4 files changed, 154 insertions(+) Index: linux/drivers/gpu/drm/rcar-du/Makefile =================================================================== --- linux.orig/drivers/gpu/drm/rcar-du/Makefile +++ linux/drivers/gpu/drm/rcar-du/Makefile @@ -4,6 +4,7 @@ rcar-du-drm-y := rcar_du_crtc.o \ rcar_du_group.o \ rcar_du_kms.o \ rcar_du_lvdscon.o \ + rcar_du_tconcon.o \ rcar_du_plane.o \ rcar_du_vgacon.o Index: linux/drivers/gpu/drm/rcar-du/rcar_du_encoder.c =================================================================== --- linux.orig/drivers/gpu/drm/rcar-du/rcar_du_encoder.c +++ linux/drivers/gpu/drm/rcar-du/rcar_du_encoder.c @@ -24,6 +24,7 @@ #include "rcar_du_kms.h" #include "rcar_du_lvdscon.h" #include "rcar_du_lvdsenc.h" +#include "rcar_du_tconcon.h" #include "rcar_du_tconenc.h" #include "rcar_du_vgacon.h" @@ -194,6 +195,10 @@ int rcar_du_encoder_init(struct rcar_du_ ret = rcar_du_vga_connector_init(rcdu, renc); break; + case RCAR_DU_ENCODER_TCON: + ret = rcar_du_tcon_connector_init(rcdu, renc, con_node); + break; + case DRM_MODE_ENCODER_TMDS: ret = rcar_du_hdmi_connector_init(rcdu, renc); break; Index: linux/drivers/gpu/drm/rcar-du/rcar_du_tconcon.c =================================================================== --- /dev/null +++ linux/drivers/gpu/drm/rcar-du/rcar_du_tconcon.c @@ -0,0 +1,125 @@ +/* + * rcar_du_tconcon.c -- R-Car Display Unit TCON Connector + * + * Copyright (C) 2015-2016 Cogent Embedded, Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + */ + +#include +#include +#include +#include +#include + +#include