From mboxrd@z Thu Jan 1 00:00:00 1970 From: maxime.ripard@free-electrons.com (Maxime Ripard) Date: Wed, 22 Feb 2017 12:09:47 -0800 Subject: [PATCH 4/8] drm/sun4i: add support for sun8i DE2 mixers and display engines In-Reply-To: <20170222152310.3719-5-icenowy@aosc.xyz> References: <20170222152310.3719-5-icenowy@aosc.xyz> Message-ID: <20170222200947.3ikrhvv76ymfu5tv@lukather> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Hi, On Wed, Feb 22, 2017 at 11:23:06PM +0800, Icenowy Zheng wrote: > Allwinner have a new "Display Engine 2.0" in there new SoCs, which comes > in a new "Display Engine" (mixers instead of old backends and > frontends). > > Add support for the mixer on Allwinner V3s SoC; it's the simplest one. > > Signed-off-by: Icenowy Zheng > --- > drivers/gpu/drm/sun4i/Kconfig | 8 + > drivers/gpu/drm/sun4i/Makefile | 1 + > drivers/gpu/drm/sun4i/sun4i_crtc.c | 6 +- > drivers/gpu/drm/sun4i/sun4i_drv.c | 38 +++- > drivers/gpu/drm/sun4i/sun4i_drv.h | 1 + > drivers/gpu/drm/sun4i/sun4i_layer.c | 92 ++++++-- > drivers/gpu/drm/sun4i/sun4i_layer.h | 1 + > drivers/gpu/drm/sun4i/sun8i_mixer.c | 417 ++++++++++++++++++++++++++++++++++++ > drivers/gpu/drm/sun4i/sun8i_mixer.h | 133 ++++++++++++ > 9 files changed, 674 insertions(+), 23 deletions(-) > create mode 100644 drivers/gpu/drm/sun4i/sun8i_mixer.c > create mode 100644 drivers/gpu/drm/sun4i/sun8i_mixer.h > > diff --git a/drivers/gpu/drm/sun4i/Kconfig b/drivers/gpu/drm/sun4i/Kconfig > index a4b357db8856..8df401fff145 100644 > --- a/drivers/gpu/drm/sun4i/Kconfig > +++ b/drivers/gpu/drm/sun4i/Kconfig > @@ -12,3 +12,11 @@ config DRM_SUN4I > Choose this option if you have an Allwinner SoC with a > Display Engine. If M is selected the module will be called > sun4i-drm. > + > +config DRM_SUN4I_DE2 > + bool "Support Display Engine 2.0" > + depends on DRM_SUN4I > + default MACH_SUN8I > + help > + Choose this option if you have an Allwinner SoC with a > + "Display Engine 2.0". > diff --git a/drivers/gpu/drm/sun4i/Makefile b/drivers/gpu/drm/sun4i/Makefile > index d625a82a6e5f..890e6e50dfee 100644 > --- a/drivers/gpu/drm/sun4i/Makefile > +++ b/drivers/gpu/drm/sun4i/Makefile > @@ -9,5 +9,6 @@ sun4i-tcon-y += sun4i_dotclock.o > > obj-$(CONFIG_DRM_SUN4I) += sun4i-drm.o sun4i-tcon.o > obj-$(CONFIG_DRM_SUN4I) += sun4i_backend.o > +obj-$(CONFIG_DRM_SUN4I) += sun8i_mixer.o > obj-$(CONFIG_DRM_SUN4I) += sun6i_drc.o > obj-$(CONFIG_DRM_SUN4I) += sun4i_tv.o > diff --git a/drivers/gpu/drm/sun4i/sun4i_crtc.c b/drivers/gpu/drm/sun4i/sun4i_crtc.c > index 4a192210574f..4d2228454726 100644 > --- a/drivers/gpu/drm/sun4i/sun4i_crtc.c > +++ b/drivers/gpu/drm/sun4i/sun4i_crtc.c > @@ -25,6 +25,7 @@ > #include