Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756010AbaJHKmT (ORCPT ); Wed, 8 Oct 2014 06:42:19 -0400 Received: from eusmtp01.atmel.com ([212.144.249.243]:8356 "EHLO eusmtp01.atmel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754354AbaJHKmO (ORCPT ); Wed, 8 Oct 2014 06:42:14 -0400 Message-ID: <543514FF.8070504@atmel.com> Date: Wed, 8 Oct 2014 12:42:07 +0200 From: Nicolas Ferre Organization: atmel User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Boris Brezillon , David Airlie , , "Jean-Christophe Plagniol-Villard" , Alexandre Belloni , Andrew Victor , Samuel Ortiz , Lee Jones , Thierry Reding , , "Rob Clark" CC: , Rob Herring , Pawel Moll , Mark Rutland , "Ian Campbell" , Kumar Gala , , , Mark Yao Subject: Re: [PATCH v7 05/11] drm: add Atmel HLCDC Display Controller support References: <1412175188-28278-1-git-send-email-boris.brezillon@free-electrons.com> <1412175188-28278-6-git-send-email-boris.brezillon@free-electrons.com> In-Reply-To: <1412175188-28278-6-git-send-email-boris.brezillon@free-electrons.com> X-Enigmail-Version: 1.5.2 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.161.30.18] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/10/2014 16:53, Boris Brezillon : > From: Boris BREZILLON > > The Atmel HLCDC (HLCD Controller) IP available on some Atmel SoCs (i.e. > at91sam9n12, at91sam9x5 family or sama5d3 family) provides a display > controller device. > > This display controller supports at least one primary plane and might > provide several overlays and an hardware cursor depending on the IP > version. > > At the moment, this driver only implements an RGB connector to interface > with LCD panels, but support for other kind of external devices might be > added later. > > Signed-off-by: Boris Brezillon > Reviewed-by: Rob Clark > Tested-by: Anthony Harivel > Tested-by: Ludovic Desroches > --- > drivers/gpu/drm/Kconfig | 2 + > drivers/gpu/drm/Makefile | 1 + > drivers/gpu/drm/atmel-hlcdc/Kconfig | 13 + > drivers/gpu/drm/atmel-hlcdc/Makefile | 7 + > drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c | 390 +++++++++++ > drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c | 531 +++++++++++++++ > drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h | 216 ++++++ > drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_layer.c | 638 +++++++++++++++++ > drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_layer.h | 394 +++++++++++ > drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c | 443 ++++++++++++ > drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c | 831 +++++++++++++++++++++++ > 11 files changed, 3466 insertions(+) > create mode 100644 drivers/gpu/drm/atmel-hlcdc/Kconfig > create mode 100644 drivers/gpu/drm/atmel-hlcdc/Makefile > create mode 100644 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c > create mode 100644 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c > create mode 100644 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h > create mode 100644 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_layer.c > create mode 100644 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_layer.h > create mode 100644 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c > create mode 100644 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c > > diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig > index b066bb3..2d97f7e 100644 > --- a/drivers/gpu/drm/Kconfig > +++ b/drivers/gpu/drm/Kconfig > @@ -185,6 +185,8 @@ source "drivers/gpu/drm/cirrus/Kconfig" > > source "drivers/gpu/drm/armada/Kconfig" > > +source "drivers/gpu/drm/atmel-hlcdc/Kconfig" > + > source "drivers/gpu/drm/rcar-du/Kconfig" > > source "drivers/gpu/drm/shmobile/Kconfig" > diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile > index 4a55d59..abb4f29 100644 > --- a/drivers/gpu/drm/Makefile > +++ b/drivers/gpu/drm/Makefile > @@ -56,6 +56,7 @@ obj-$(CONFIG_DRM_GMA500) += gma500/ > obj-$(CONFIG_DRM_UDL) += udl/ > obj-$(CONFIG_DRM_AST) += ast/ > obj-$(CONFIG_DRM_ARMADA) += armada/ > +obj-$(CONFIG_DRM_ATMEL_HLCDC) += atmel-hlcdc/ > obj-$(CONFIG_DRM_RCAR_DU) += rcar-du/ > obj-$(CONFIG_DRM_SHMOBILE) +=shmobile/ > obj-$(CONFIG_DRM_OMAP) += omapdrm/ > diff --git a/drivers/gpu/drm/atmel-hlcdc/Kconfig b/drivers/gpu/drm/atmel-hlcdc/Kconfig > new file mode 100644 > index 0000000..942407f > --- /dev/null > +++ b/drivers/gpu/drm/atmel-hlcdc/Kconfig > @@ -0,0 +1,13 @@ > +config DRM_ATMEL_HLCDC > + tristate "DRM Support for ATMEL HLCDC Display Controller" > + depends on DRM && OF && COMMON_CLK > + select DRM_GEM_CMA_HELPER > + select DRM_KMS_HELPER > + select DRM_KMS_FB_HELPER > + select DRM_KMS_CMA_HELPER > + select DRM_PANEL > + select MFD_ATMEL_HLCDC > + depends on OF > + help > + Choose this option if you have an ATMEL SoC with an HLCDC display > + controller (i.e. at91sam9n12, at91sam9x5 family or sama5d3 family). > diff --git a/drivers/gpu/drm/atmel-hlcdc/Makefile b/drivers/gpu/drm/atmel-hlcdc/Makefile > new file mode 100644 > index 0000000..10ae426 > --- /dev/null > +++ b/drivers/gpu/drm/atmel-hlcdc/Makefile > @@ -0,0 +1,7 @@ > +atmel-hlcdc-dc-y := atmel_hlcdc_crtc.o \ > + atmel_hlcdc_dc.o \ > + atmel_hlcdc_layer.o \ > + atmel_hlcdc_output.o \ > + atmel_hlcdc_plane.o > + > +obj-$(CONFIG_DRM_ATMEL_HLCDC) += atmel-hlcdc-dc.o > diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c > new file mode 100644 > index 0000000..02f7a98 > --- /dev/null > +++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c > @@ -0,0 +1,390 @@ > +/* > + * Copyright (C) 2014 Traphandler > + * Copyright (C) 2014 Free Electrons > + * > + * Author: Jean-Jacques Hiblot > + * Author: Boris BREZILLON > + * > + * 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. > + * > + * This program is distributed in the hope that it will be useful, but WITHOUT > + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or > + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for > + * more details. > + * > + * You should have received a copy of the GNU General Public License along with > + * this program. If not, see . > + */ > + > +#include > +#include > +#include > + > +#include > +#include > +#include > + > +#include