From mboxrd@z Thu Jan 1 00:00:00 1970 From: daniel@ffwll.ch (Daniel Vetter) Date: Sun, 25 Sep 2016 22:58:09 +0200 Subject: [PATCH v2 2/2] drm: zte: add initial vou drm driver In-Reply-To: <1474727185-24180-3-git-send-email-shawn.guo@linaro.org> References: <1474727185-24180-1-git-send-email-shawn.guo@linaro.org> <1474727185-24180-3-git-send-email-shawn.guo@linaro.org> Message-ID: <20160925205809.GR20761@phenom.ffwll.local> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Sat, Sep 24, 2016 at 10:26:25PM +0800, Shawn Guo wrote: > It adds the initial ZTE VOU display controller DRM driver. There are > still some features to be added, like overlay plane, scaling, and more > output devices support. But it's already useful with dual CRTCs and > HDMI monitor working. > > It's been tested on Debian Jessie LXDE desktop with modesetting driver. > > Signed-off-by: Shawn Guo I've done a very quick read-through, looks real pretty. A few comments below and in-line. For testing, have you tried to run i-g-t validation tests per our documentation? See https://dri.freedesktop.org/docs/drm/gpu/drm-uapi.html#validating-changes-with-igt Cheers, Daniel > --- > drivers/gpu/drm/Kconfig | 2 + > drivers/gpu/drm/Makefile | 1 + > drivers/gpu/drm/zte/Kconfig | 8 + > drivers/gpu/drm/zte/Makefile | 8 + > drivers/gpu/drm/zte/zx_crtc.c | 691 +++++++++++++++++++++++++++++++++++++++ > drivers/gpu/drm/zte/zx_crtc.h | 47 +++ > drivers/gpu/drm/zte/zx_drm_drv.c | 258 +++++++++++++++ > drivers/gpu/drm/zte/zx_drm_drv.h | 22 ++ > drivers/gpu/drm/zte/zx_hdmi.c | 540 ++++++++++++++++++++++++++++++ > drivers/gpu/drm/zte/zx_plane.c | 362 ++++++++++++++++++++ > drivers/gpu/drm/zte/zx_plane.h | 26 ++ > 11 files changed, 1965 insertions(+) > create mode 100644 drivers/gpu/drm/zte/Kconfig > create mode 100644 drivers/gpu/drm/zte/Makefile > create mode 100644 drivers/gpu/drm/zte/zx_crtc.c > create mode 100644 drivers/gpu/drm/zte/zx_crtc.h > create mode 100644 drivers/gpu/drm/zte/zx_drm_drv.c > create mode 100644 drivers/gpu/drm/zte/zx_drm_drv.h > create mode 100644 drivers/gpu/drm/zte/zx_hdmi.c > create mode 100644 drivers/gpu/drm/zte/zx_plane.c > create mode 100644 drivers/gpu/drm/zte/zx_plane.h New entry in MAINTAINERS listening you (and probably dri-devel as the m-l) is missing. > > diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig > index 483059a22b1b..a91f8cecbe0f 100644 > --- a/drivers/gpu/drm/Kconfig > +++ b/drivers/gpu/drm/Kconfig > @@ -223,6 +223,8 @@ source "drivers/gpu/drm/hisilicon/Kconfig" > > source "drivers/gpu/drm/mediatek/Kconfig" > > +source "drivers/gpu/drm/zte/Kconfig" > + > # Keep legacy drivers last > > menuconfig DRM_LEGACY > diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile > index 439d89b25ae0..fe461c94d266 100644 > --- a/drivers/gpu/drm/Makefile > +++ b/drivers/gpu/drm/Makefile > @@ -85,3 +85,4 @@ obj-$(CONFIG_DRM_FSL_DCU) += fsl-dcu/ > obj-$(CONFIG_DRM_ETNAVIV) += etnaviv/ > obj-$(CONFIG_DRM_ARCPGU)+= arc/ > obj-y += hisilicon/ > +obj-$(CONFIG_DRM_ZTE) += zte/ > diff --git a/drivers/gpu/drm/zte/Kconfig b/drivers/gpu/drm/zte/Kconfig > new file mode 100644 > index 000000000000..4065b2840f1c > --- /dev/null > +++ b/drivers/gpu/drm/zte/Kconfig > @@ -0,0 +1,8 @@ > +config DRM_ZTE > + tristate "DRM Support for ZTE SoCs" > + depends on DRM && ARCH_ZX > + select DRM_KMS_CMA_HELPER > + select DRM_KMS_FB_HELPER > + select DRM_KMS_HELPER > + help > + Choose this option to enable DRM on ZTE ZX SoCs. > diff --git a/drivers/gpu/drm/zte/Makefile b/drivers/gpu/drm/zte/Makefile > new file mode 100644 > index 000000000000..b40968dc749f > --- /dev/null > +++ b/drivers/gpu/drm/zte/Makefile > @@ -0,0 +1,8 @@ > +zxdrm-y := \ > + zx_drm_drv.o \ > + zx_crtc.o \ > + zx_plane.o \ > + zx_hdmi.o > + > +obj-$(CONFIG_DRM_ZTE) += zxdrm.o > + > diff --git a/drivers/gpu/drm/zte/zx_crtc.c b/drivers/gpu/drm/zte/zx_crtc.c > new file mode 100644 > index 000000000000..818bf9072573 > --- /dev/null > +++ b/drivers/gpu/drm/zte/zx_crtc.c > @@ -0,0 +1,691 @@ > +/* > + * Copyright 2016 Linaro Ltd. > + * Copyright 2016 ZTE Corporation. > + * > + * 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 > +#include > +#include > +#include > +#include > +#include > +#include