From mboxrd@z Thu Jan 1 00:00:00 1970 From: maxime.ripard@free-electrons.com (Maxime Ripard) Date: Mon, 20 Mar 2017 11:26:26 +0100 Subject: [PATCH v2 4/8] drm/sun4i: add support for sun8i DE2 mixers and display engines In-Reply-To: <20170316204748.8596-5-icenowy@aosc.xyz> References: <20170316204748.8596-1-icenowy@aosc.xyz> <20170316204748.8596-5-icenowy@aosc.xyz> Message-ID: <20170320102626.24awzyrq32gomntt@lukather> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Hi, On Fri, Mar 17, 2017 at 04:47:44AM +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. > > Currently a lot of functions are still missing -- more investigations > are needed to gain enough infomation for them. > > Signed-off-by: Icenowy Zheng > --- > Changes in v2: > - Rebase on current linux-next (with Chen-Yu's some refactors) > - Removed currently broken overlay plane. > > drivers/gpu/drm/sun4i/Kconfig | 9 + > drivers/gpu/drm/sun4i/Makefile | 3 +- > drivers/gpu/drm/sun4i/sun4i_crtc.c | 14 +- > drivers/gpu/drm/sun4i/sun4i_crtc.h | 2 + > drivers/gpu/drm/sun4i/sun4i_drv.c | 1 + > drivers/gpu/drm/sun4i/sun4i_drv.h | 1 + > drivers/gpu/drm/sun4i/sun4i_layer.c | 94 +++++++-- > drivers/gpu/drm/sun4i/sun4i_layer.h | 3 + > drivers/gpu/drm/sun4i/sun4i_tcon.c | 2 +- > drivers/gpu/drm/sun4i/sun8i_mixer.c | 385 ++++++++++++++++++++++++++++++++++++ > drivers/gpu/drm/sun4i/sun8i_mixer.h | 166 ++++++++++++++++ > 11 files changed, 658 insertions(+), 22 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..0fa989f955e7 100644 > --- a/drivers/gpu/drm/sun4i/Kconfig > +++ b/drivers/gpu/drm/sun4i/Kconfig > @@ -12,3 +12,12 @@ 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 > + select SUN8I_DE2_CCU > + 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 59b757350a1f..3e7e2b2eb386 100644 > --- a/drivers/gpu/drm/sun4i/Makefile > +++ b/drivers/gpu/drm/sun4i/Makefile > @@ -1,5 +1,7 @@ > sun4i-drm-y += sun4i_drv.o > sun4i-drm-y += sun4i_framebuffer.o > +sun4i-drm-y += sun4i_backend.o > +sun4i-drm-$(CONFIG_DRM_SUN4I_DE2) += sun8i_mixer.o > > sun4i-tcon-y += sun4i_tcon.o > sun4i-tcon-y += sun4i_rgb.o > @@ -8,6 +10,5 @@ sun4i-tcon-y += sun4i_crtc.o > sun4i-tcon-y += sun4i_layer.o > > obj-$(CONFIG_DRM_SUN4I) += sun4i-drm.o sun4i-tcon.o > -obj-$(CONFIG_DRM_SUN4I) += sun4i_backend.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 3c876c3a356a..bf2aa0ffd35c 100644 > --- a/drivers/gpu/drm/sun4i/sun4i_crtc.c > +++ b/drivers/gpu/drm/sun4i/sun4i_crtc.c > @@ -26,8 +26,8 @@ > #include