From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sergei Shtylyov 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> References: <1787748.qAADjKK4gv@wasted.cogentembedded.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Return-path: In-Reply-To: <1787748.qAADjKK4gv@wasted.cogentembedded.com> Sender: linux-renesas-soc-owner@vger.kernel.org To: laurent.pinchart@ideasonboard.com, airlied@linux.ie, dri-devel@lists.freedesktop.org Cc: linux-renesas-soc@vger.kernel.org List-Id: dri-devel@lists.freedesktop.org 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