From mboxrd@z Thu Jan 1 00:00:00 1970 From: Archit Taneja Subject: Re: [PATCH 1/8] drm: bridge: Add LVDS encoder driver Date: Fri, 21 Oct 2016 10:51:59 +0530 Message-ID: <92a46ca2-2138-bb3d-ee19-4cb297c85bab@codeaurora.org> References: <1476887143-24831-1-git-send-email-laurent.pinchart+renesas@ideasonboard.com> <1476887143-24831-2-git-send-email-laurent.pinchart+renesas@ideasonboard.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1476887143-24831-2-git-send-email-laurent.pinchart+renesas@ideasonboard.com> Sender: linux-renesas-soc-owner@vger.kernel.org To: Laurent Pinchart , dri-devel@lists.freedesktop.org Cc: linux-renesas-soc@vger.kernel.org, devicetree@vger.kernel.org List-Id: devicetree@vger.kernel.org On 10/19/2016 07:55 PM, Laurent Pinchart wrote: > The LVDS encoder driver is a DRM bridge driver that supports the > parallel to LVDS encoders that don't require any configuration. The > driver thus doesn't interact with the device, but creates an LVDS > connector for the panel and exposes its size and timing based on > information retrieved from DT. > > Cc: devicetree@vger.kernel.org > Signed-off-by: Laurent Pinchart > --- > .../bindings/display/bridge/lvds-transmitter.txt | 64 +++++++ > drivers/gpu/drm/bridge/Kconfig | 8 + > drivers/gpu/drm/bridge/Makefile | 1 + > drivers/gpu/drm/bridge/lvds-encoder.c | 203 +++++++++++++++++++++ > 4 files changed, 276 insertions(+) > create mode 100644 Documentation/devicetree/bindings/display/bridge/lvds-transmitter.txt > create mode 100644 drivers/gpu/drm/bridge/lvds-encoder.c > > diff --git a/Documentation/devicetree/bindings/display/bridge/lvds-transmitter.txt b/Documentation/devicetree/bindings/display/bridge/lvds-transmitter.txt > new file mode 100644 > index 000000000000..fd39ad34c383 > --- /dev/null > +++ b/Documentation/devicetree/bindings/display/bridge/lvds-transmitter.txt > @@ -0,0 +1,64 @@ > +Parallel to LVDS Encoder > +------------------------ > + > +This binding supports the parallel to LVDS encoders that don't require any > +configuration. > + > +LVDS is a physical layer specification defined in ANSI/TIA/EIA-644-A. Multiple > +incompatible data link layers have been used over time to transmit image data > +to LVDS panels. This binding targets devices compatible with the following > +specifications only. > + > +[JEIDA] "Digital Interface Standards for Monitor", JEIDA-59-1999, February > +1999 (Version 1.0), Japan Electronic Industry Development Association (JEIDA) > +[LDI] "Open LVDS Display Interface", May 1999 (Version 0.95), National > +Semiconductor > +[VESA] "VESA Notebook Panel Standard", October 2007 (Version 1.0), Video > +Electronics Standards Association (VESA) > + > +Those devices have been marketed under the FPD-Link and FlatLink brand names > +among others. > + > + > +Required properties: > + > +- compatible: Must be "lvds-encoder" > + > +Required nodes: > + > +This device has two video ports. Their connections are modeled using the OF > +graph bindings specified in Documentation/devicetree/bindings/graph.txt. > + > +- Video port 0 for parallel input > +- Video port 1 for LVDS output > + > + > +Example > +------- > + > +lvds-encoder { > + compatible = "lvds-encoder"; > + #address-cells = <1>; > + #size-cells = <0>; > + > + ports { > + #address-cells = <1>; > + #size-cells = <0>; > + > + port@0 { > + reg = <0>; > + > + lvds_enc_in: endpoint { > + remote-endpoint = <&display_out_rgb>; > + }; > + }; > + > + port@1 { > + reg = <1>; > + > + lvds_enc_out: endpoint { > + remote-endpoint = <&lvds_panel_in>; > + }; > + }; > + }; > +}; > diff --git a/drivers/gpu/drm/bridge/Kconfig b/drivers/gpu/drm/bridge/Kconfig > index 10e12e74fc9f..5dafad7817ad 100644 > --- a/drivers/gpu/drm/bridge/Kconfig > +++ b/drivers/gpu/drm/bridge/Kconfig > @@ -24,6 +24,14 @@ config DRM_DUMB_VGA_DAC > help > Support for RGB to VGA DAC based bridges > > +config DRM_LVDS_ENCODER > + tristate "Transparent parallel to LVDS encoder support" > + depends on OF > + select DRM_KMS_HELPER > + help > + Support for transparent parallel to LVDS encoders that don't require > + any configuration. > + > config DRM_DW_HDMI > tristate > select DRM_KMS_HELPER > diff --git a/drivers/gpu/drm/bridge/Makefile b/drivers/gpu/drm/bridge/Makefile > index cdf3a3cf765d..bbaf583581ac 100644 > --- a/drivers/gpu/drm/bridge/Makefile > +++ b/drivers/gpu/drm/bridge/Makefile > @@ -2,6 +2,7 @@ ccflags-y := -Iinclude/drm > > obj-$(CONFIG_DRM_ANALOGIX_ANX78XX) += analogix-anx78xx.o > obj-$(CONFIG_DRM_DUMB_VGA_DAC) += dumb-vga-dac.o > +obj-$(CONFIG_DRM_LVDS_ENCODER) += lvds-encoder.o > obj-$(CONFIG_DRM_DW_HDMI) += dw-hdmi.o > obj-$(CONFIG_DRM_DW_HDMI_AHB_AUDIO) += dw-hdmi-ahb-audio.o > obj-$(CONFIG_DRM_NXP_PTN3460) += nxp-ptn3460.o > diff --git a/drivers/gpu/drm/bridge/lvds-encoder.c b/drivers/gpu/drm/bridge/lvds-encoder.c > new file mode 100644 > index 000000000000..33e8025c8a6d > --- /dev/null > +++ b/drivers/gpu/drm/bridge/lvds-encoder.c > @@ -0,0 +1,203 @@ > +/* > + * Copyright (C) 2016 Laurent Pinchart > + * > + * 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 > + > +#include > + > +#include