From mboxrd@z Thu Jan 1 00:00:00 1970 From: Liviu Dudau Subject: Re: [RFC][PATCH 2/2] drm/arm: Add support for Mali Display Processors Date: Tue, 12 Apr 2016 18:16:54 +0100 Message-ID: <20160412171654.GL16063@e106497-lin.cambridge.arm.com> References: <1459527712-9488-1-git-send-email-Liviu.Dudau@arm.com> <1459527712-9488-3-git-send-email-Liviu.Dudau@arm.com> <20160412155810.GH2510@phenom.ffwll.local> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Content-Disposition: inline In-Reply-To: <20160412155810.GH2510-dv86pmgwkMBes7Z6vYuT8azUEOm+Xw19@public.gmane.org> Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Dave Airlie , Daniel Stone , David Brown , Brian Starkey , devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, LKML , DRI devel List-Id: devicetree@vger.kernel.org On Tue, Apr 12, 2016 at 05:58:11PM +0200, Daniel Vetter wrote: > On Fri, Apr 01, 2016 at 05:21:52PM +0100, Liviu Dudau wrote: > > Add support for the new family of Display Processors from ARM Ltd. > > This commit adds basic support for Mali DP500, DP550 and DP650 > > parts, with only the display engine being supported at the moment. > >=20 > > Cc: David Brown > > Cc: Brian Starkey > >=20 > > Signed-off-by: Liviu Dudau >=20 > Ok, on 2nd look something puzzling: Where are the > drm_encoder/drm_connectors in this driver? Somehow I think just these > parts here won't light up a lot ... The magic of component based drivers, heh :) On my test system I'm using the NXP TDA19988 HDMI and the driver works out of box once the DT describes the proper port/endpoint dance. For models/qemu style environment I have a generic DRM encoder driver that = I'm going to post for review that only reads display timings from DT and be= haves as if it connected to a real monitor. Best regards, Liviu > -Daniel >=20 > > --- > > drivers/gpu/drm/arm/Kconfig | 15 + > > drivers/gpu/drm/arm/Makefile | 2 + > > drivers/gpu/drm/arm/malidp_crtc.c | 276 +++++++++++++ > > drivers/gpu/drm/arm/malidp_drv.c | 486 ++++++++++++++++++++++ > > drivers/gpu/drm/arm/malidp_drv.h | 49 +++ > > drivers/gpu/drm/arm/malidp_hw.c | 777 ++++++++++++++++++++++++= ++++++++++++ > > drivers/gpu/drm/arm/malidp_hw.h | 192 +++++++++ > > drivers/gpu/drm/arm/malidp_planes.c | 342 ++++++++++++++++ > > drivers/gpu/drm/arm/malidp_regs.h | 172 ++++++++ > > 9 files changed, 2311 insertions(+) > > create mode 100644 drivers/gpu/drm/arm/malidp_crtc.c > > create mode 100644 drivers/gpu/drm/arm/malidp_drv.c > > create mode 100644 drivers/gpu/drm/arm/malidp_drv.h > > create mode 100644 drivers/gpu/drm/arm/malidp_hw.c > > create mode 100644 drivers/gpu/drm/arm/malidp_hw.h > > create mode 100644 drivers/gpu/drm/arm/malidp_planes.c > > create mode 100644 drivers/gpu/drm/arm/malidp_regs.h > >=20 > > diff --git a/drivers/gpu/drm/arm/Kconfig b/drivers/gpu/drm/arm/Kcon= fig > > index eaed454..e5b5b6b 100644 > > --- a/drivers/gpu/drm/arm/Kconfig > > +++ b/drivers/gpu/drm/arm/Kconfig > > @@ -25,3 +25,18 @@ config DRM_HDLCD_SHOW_UNDERRUN > > Enable this option to show in red colour the pixels that the > > HDLCD device did not fetch from framebuffer due to underrun > > conditions. > > + > > +config DRM_MALI_DISPLAY > > + tristate "ARM Mali Display Processor" > > + depends on DRM && OF && (ARM || ARM64) > > + depends on COMMON_CLK > > + select DRM_ARM > > + select DRM_KMS_HELPER > > + select DRM_KMS_CMA_HELPER > > + select DRM_GEM_CMA_HELPER > > + select VIDEOMODE_HELPERS > > + help > > + Choose this option if you want to compile the ARM Mali Display > > + Processor driver. It supports all the variants of the hardware. > > + > > + If compiled as a module it will be called malidp. > > diff --git a/drivers/gpu/drm/arm/Makefile b/drivers/gpu/drm/arm/Mak= efile > > index 89dcb7b..3e76e6c 100644 > > --- a/drivers/gpu/drm/arm/Makefile > > +++ b/drivers/gpu/drm/arm/Makefile > > @@ -1,2 +1,4 @@ > > hdlcd-y :=3D hdlcd_drv.o hdlcd_crtc.o > > obj-$(CONFIG_DRM_HDLCD) +=3D hdlcd.o > > +malidp-y :=3D malidp_drv.o malidp_hw.o malidp_planes.o malidp_crtc= =2Eo > > +obj-$(CONFIG_DRM_MALI_DISPLAY) +=3D malidp.o > > diff --git a/drivers/gpu/drm/arm/malidp_crtc.c b/drivers/gpu/drm/ar= m/malidp_crtc.c > > new file mode 100644 > > index 0000000..aa49fd4 > > --- /dev/null > > +++ b/drivers/gpu/drm/arm/malidp_crtc.c > > @@ -0,0 +1,276 @@ > > +/* > > + * (C) COPYRIGHT 2016 ARM Limited. All rights reserved. > > + * Author: Liviu Dudau > > + * > > + * This program is free software and is provided to you under the = terms of the > > + * GNU General Public License version 2 as published by the Free S= oftware > > + * Foundation, and any use by you of this program is subject to th= e terms > > + * of such GNU licence. > > + * > > + * ARM Mali DP500/DP550/DP650 driver (crtc operations) > > + */ > > + > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include