[PATCH v9 3/4] arm/dts/ls1021a: Add DCU dts node

2015-07-17 Thread Wang J.W.


> -Original Message-
> From: Thierry Reding [mailto:thierry.reding at gmail.com]
> Sent: Tuesday, July 14, 2015 7:00 PM
> To: Wang Jianwei-B52261
> Cc: dri-devel at lists.freedesktop.org; linux-kernel at vger.kernel.org; 
> linux-
> arm-kernel at lists.infradead.org; devicetree at vger.kernel.org;
> airlied at linux.ie; daniel.vetter at ffwll.ch; mark.yao at rock-chips.com; 
> Wood
> Scott-B07421; Wang Huan-B18965; Xiubo Li; Wang Jianwei-B52261
> Subject: Re: [PATCH v9 3/4] arm/dts/ls1021a: Add DCU dts node
> 
> On Mon, Jul 13, 2015 at 06:51:31PM +0800, Jianwei Wang wrote:
> > Add DCU node, DCU is a display controller of Freescale named 2D-ACE.
> >
> > Signed-off-by: Alison Wang 
> > Signed-off-by: Xiubo Li 
> > Signed-off-by: Jianwei Wang 
> > Reviewed-by: Alison Wang 
> > ---
> >  .../devicetree/bindings/drm/fsl-dcu/fsl,dcu.txt  | 20
> 
> >  MAINTAINERS  |  1 +
> >  arch/arm/boot/dts/ls1021a.dtsi   | 10 ++
> >  3 files changed, 31 insertions(+)
> >  create mode 100644
> > Documentation/devicetree/bindings/drm/fsl-dcu/fsl,dcu.txt
> >
> > diff --git a/Documentation/devicetree/bindings/drm/fsl-dcu/fsl,dcu.txt
> > b/Documentation/devicetree/bindings/drm/fsl-dcu/fsl,dcu.txt
> > new file mode 100644
> > index 000..eb61ea5
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/drm/fsl-dcu/fsl,dcu.txt
> 
> That's not the proper location for this file. DRM is a Linux-specific
> subsystem and hence shouldn't be used in anything devicetree-related.
> Documentation/devicetree/bindings/video would be a better location.
> 
> Yes, I know other DRM drivers put their binding in the drm subdirectory
> but that just makes them equally wrong. I'll make a note to move these
> around at some point.
> 

Ok!

> Also the binding really belongs in the same patch as the driver, or a
> separate patch altogether.
> 

Ok!


> And, no need for the extra fsl-dcu subdirectory if you have only a single
> document in it.
> 

Ok


> > @@ -0,0 +1,20 @@
> > +Device Tree bindings for Freescale DCU DRM Driver
> > +
> > +Required properties:
> > +- compatible:   Should be one of
> > +   * "fsl,ls1021a-dcu".
> > +   * "fsl,vf610-dcu".
> > +- reg:  Address and length of the register set for dcu.
> > +- clocks:   From common clock binding: handle to dcu clock.
> > +- clock-names:  From common clock binding: Shall be "dcu".
> > +- panel:   The phandle to panel node.
> 
> This isn't a standard property and hence should be prefixed by the vendor
> prefix. That is: "fsl,panel".
> 
> Also the above uses a weird mix of spaces and tabs for padding. Please be
> more consistent.
> 

Ok


> > +
> > +Examples:
> > +dcu: dcu at 2ce {
> > +   compatible = "fsl,ls1021a-dcu";
> > +   reg = <0x0 0x2ce 0x0 0x1>;
> > +   clocks = <_clk 0>;
> > +   clock-names = "dcu";
> > +   big-endian;
> 
> This property isn't mentioned above. I know it's pretty obvious what it
> does, but might still be worth briefly describing what it is. I'm also
> wondering if that's not something that could be inferred from the
> compatible string.
> 

OK!
Different SoCs maybe different endian.
For example, on some powerpc SoC, DCU is little endian

Thanks
Jianwei

> > +   panel = <>;
> > +};
> > diff --git a/MAINTAINERS b/MAINTAINERS index e191ded..fffb8c9 100644
> > --- a/MAINTAINERS
> > +++ b/MAINTAINERS
> > @@ -3410,6 +3410,7 @@ M:Alison Wang 
> >  L: dri-devel at lists.freedesktop.org
> >  S: Supported
> >  F: drivers/gpu/drm/fsl-dcu/
> > +F:  Documentation/devicetree/bindings/drm/fsl-dcu/
> 
> You might want to shuffle around some of these hunks, so that this
> particular hunk is included in the driver patch along with the binding and
> the panel patch doesn't remove it only for it to be readded here.
> 
> Thierry
> 
> >  F:  Documentation/devicetree/bindings/panel/nec,nl4827hc19_05b.txt
> >
> >  DRM DRIVERS FOR NVIDIA TEGRA
> > diff --git a/arch/arm/boot/dts/ls1021a.dtsi
> > b/arch/arm/boot/dts/ls1021a.dtsi index c70bb27..6d6e3e2 100644
> > --- a/arch/arm/boot/dts/ls1021a.dtsi
> > +++ b/arch/arm/boot/dts/ls1021a.dtsi
> > @@ -383,6 +383,16 @@
> >  <_clk 1>;
> > };
> >
> > +   dcu: dcu at 2ce {
> > +   compatible = "fsl,ls1021a-dcu";
> > +   reg = <0x0 0x2ce 0x0 0x1>;
> > +   interrupts = ;
> > +   clocks = <_clk 0>;
> > +   clock-names = "dcu";
> > +   big-endian;
> > +   status = "disabled";
> > +   };
> > +
> > mdio0: mdio at 2d24000 {
> > compatible = "gianfar";
> > device_type = "mdio";
> > --
> > 2.1.0.27.g96db324
> >


[PATCH v9 1/4] drm/layerscape: Add Freescale DCU DRM driver

2015-07-17 Thread Wang J.W.


> -Original Message-
> From: Thierry Reding [mailto:thierry.reding at gmail.com]
> Sent: Thursday, July 16, 2015 7:31 PM
> To: Wang Jianwei-B52261
> Cc: dri-devel at lists.freedesktop.org; linux-kernel at vger.kernel.org; 
> linux-
> arm-kernel at lists.infradead.org; devicetree at vger.kernel.org;
> airlied at linux.ie; daniel.vetter at ffwll.ch; mark.yao at rock-chips.com; 
> Wood
> Scott-B07421; Wang Huan-B18965; Xiubo Li
> Subject: Re: [PATCH v9 1/4] drm/layerscape: Add Freescale DCU DRM driver
> 
> On Thu, Jul 16, 2015 at 11:10:29AM +, Wang J.W. wrote:
> [...]
> > > -Original Message-
> > > From: Thierry Reding [mailto:thierry.reding at gmail.com]
> [...]
> > > On Mon, Jul 13, 2015 at 06:51:29PM +0800, Jianwei Wang wrote:
> [...]
> > > >  DRM DRIVERS FOR NVIDIA TEGRA
> > > >  M: Thierry Reding 
> > > >  M: Terje Bergström 
> > > > diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
> > > > index c46ca31..9cfd14e 100644
> > > > --- a/drivers/gpu/drm/Kconfig
> > > > +++ b/drivers/gpu/drm/Kconfig
> > > > @@ -231,6 +231,8 @@ source "drivers/gpu/drm/virtio/Kconfig"
> > > >
> > > >  source "drivers/gpu/drm/msm/Kconfig"
> > > >
> > > > +source "drivers/gpu/drm/fsl-dcu/Kconfig"
> > > > +
> > >
> > > As mentioned in a different email, I'm somewhat annoyed by the
> > > random placement of these source statements. But we can probably
> > > clean that up in one go and insist on proper ordering when there is
> one.
> > >
> >
> > Ok, I plan to move it to the last line. Is it ok?
> 
> It doesn't really matter, it will be inconsistent no matter what because
> the current ordering isn't consistent. Keep it where it is for now. I'll
> prepare a set of patches to get some consistency into this file.
> 
> > > > +int fsl_dcu_drm_connector_create(struct fsl_dcu_drm_device *fsl_dev,
> > > > +struct drm_encoder *encoder) {
> > > > +   struct drm_connector *connector = _dev-
> >connector.connector;
> > > > +   struct device_node *panel_node;
> > > > +   int ret;
> > > > +
> > > > +   fsl_dev->connector.encoder = encoder;
> > >
> > > Why do you need this? The DRM core should set this for you when
> > > setting the initial configuration.
> > >
> >
> > This connector is a private structure fsl_dcu_drm_connector. I set it
> > for select best encoder.
> 
> That doesn't sound right. Technically the DRM core or userspace is going
> to select the encoder for your connector, so it'd be better to derive the
> pointer to your driver-private structure from struct drm_encoder *,
> otherwise you'll end up getting you private copy of the assignment out of
> sync with what the DRM core and/or userspace set up.
> 

Maybe this is a misunderstanding.

fsl_dev->connector.encoder = encoder;
In this sentence fsl_dev and connector are all driver-private structures

Fsl_dev define:
177 struct fsl_dcu_drm_device {
178 struct device *dev;
179 struct device_node *np;
180 struct regmap *regmap;
181 int irq;
182 struct clk *clk;
183 /*protects hardware register*/
184 spinlock_t irq_lock;
185 struct drm_device *drm;
186 struct drm_fbdev_cma *fbdev;
187 struct drm_crtc crtc;
188 struct drm_encoder encoder;
189 struct fsl_dcu_drm_connector connector;  connector is here
190 };

fsl_dcu_drm_connector define:
15 struct fsl_dcu_drm_connector {
16 struct drm_connector base;
17 struct drm_encoder *encoder;
18 struct drm_panel *panel;
19 };

And this will be used in .best_encoder hooker

91 static struct drm_encoder *
92 fsl_dcu_drm_connector_best_encoder(struct drm_connector *connector)
93 {
94 struct fsl_dcu_drm_connector *fsl_con = 
to_fsl_dcu_connector(connector);
95
96 return fsl_con->encoder;
97 }

I see some other also do it like this. Is it ok?



> Note that you might not run into problems now because you only have a
> single encoder. But if you ever add support for another you're going to
> run into problems with this kind of static assignment.
> 
> > > > +   dev->irq_enabled = true;
> > > > +   dev->vblank_disable_allowed = true;
> > > > +
> > > > +   ret = regmap_write(fsl_dev->regmap, DCU_INT_STATUS, 0);
> > > > +   if (ret)
> > > > +   dev_err(>dev, "set DCU_INT_STATUS failed\n");
&g

[PATCH v9 2/4] drm/panel: simple: Add support for NEC NL4827HC19-05B 480x272 panel

2015-07-16 Thread Wang J.W.


> -Original Message-
> From: Thierry Reding [mailto:thierry.reding at gmail.com]
> Sent: Tuesday, July 14, 2015 6:54 PM
> To: Wang Jianwei-B52261
> Cc: dri-devel at lists.freedesktop.org; linux-kernel at vger.kernel.org; 
> linux-
> arm-kernel at lists.infradead.org; devicetree at vger.kernel.org;
> airlied at linux.ie; daniel.vetter at ffwll.ch; mark.yao at rock-chips.com; 
> Wood
> Scott-B07421; Wang Huan-B18965; Xiubo Li
> Subject: Re: [PATCH v9 2/4] drm/panel: simple: Add support for NEC
> NL4827HC19-05B 480x272 panel
> 
> On Mon, Jul 13, 2015 at 06:51:30PM +0800, Jianwei Wang wrote:
> > This adds support for the NEC NL4827HC19-05B 480x272 panel to the DRM
> > simple panel driver.
> >
> > Signed-off-by: Alison Wang 
> > Signed-off-by: Xiubo Li 
> > Signed-off-by: Jianwei Wang 
> > Acked-by: Daniel Vetter 
> > ---
> >  .../bindings/panel/nec,nl4827hc19_05b.txt  |  7 ++
> >  .../devicetree/bindings/vendor-prefixes.txt|  1 +
> >  MAINTAINERS|  1 -
> >  drivers/gpu/drm/panel/panel-simple.c   | 26
> ++
> >  4 files changed, 34 insertions(+), 1 deletion(-)  create mode 100644
> > Documentation/devicetree/bindings/panel/nec,nl4827hc19_05b.txt
> >
> > diff --git
> > a/Documentation/devicetree/bindings/panel/nec,nl4827hc19_05b.txt
> > b/Documentation/devicetree/bindings/panel/nec,nl4827hc19_05b.txt
> > new file mode 100644
> > index 000..20e9473
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/panel/nec,nl4827hc19_05b.txt
> > @@ -0,0 +1,7 @@
> > +NEC LCD Technologies,Ltd. WQVGA TFT LCD panel
> > +
> > +Required properties:
> > +- compatible: should be "nec,nl4827hc19_05b"
> > +
> > +This binding is compatible with the simple-panel binding, which is
> > +specified in simple-panel.txt in this directory.
> > diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt
> > b/Documentation/devicetree/bindings/vendor-prefixes.txt
> > index 8033919..9f22b3e 100644
> > --- a/Documentation/devicetree/bindings/vendor-prefixes.txt
> > +++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
> > @@ -131,6 +131,7 @@ mundoreader Mundo Reader S.L.
> >  murata Murata Manufacturing Co., Ltd.
> >  mxicy  Macronix International Co., Ltd.
> >  national   National Semiconductor
> > +necNEC LCD Technologies, Ltd.
> >  neonodeNeonode Inc.
> >  netgearNETGEAR
> >  netlogic   Broadcom Corporation (formerly NetLogic Microsystems)
> 
> This belongs in a separate patch.
> 

Ok!

> > diff --git a/MAINTAINERS b/MAINTAINERS index fffb8c9..e191ded 100644
> > --- a/MAINTAINERS
> > +++ b/MAINTAINERS
> > @@ -3410,7 +3410,6 @@ M:Alison Wang 
> >  L: dri-devel at lists.freedesktop.org
> >  S: Supported
> >  F: drivers/gpu/drm/fsl-dcu/
> > -F:  Documentation/devicetree/bindings/drm/fsl-dcu/
> 
> What's this doing here?
> 


It's a mistake. I must be very careful next time.



> >  F:  Documentation/devicetree/bindings/panel/nec,nl4827hc19_05b.txt
> >
> >  DRM DRIVERS FOR NVIDIA TEGRA
> > diff --git a/drivers/gpu/drm/panel/panel-simple.c
> > b/drivers/gpu/drm/panel/panel-simple.c
> > index f94201b..eb12fe4 100644
> > --- a/drivers/gpu/drm/panel/panel-simple.c
> > +++ b/drivers/gpu/drm/panel/panel-simple.c
> > @@ -1036,6 +1036,29 @@ static const struct panel_desc
> shelly_sca07010_bfn_lnn = {
> > .bus_format = MEDIA_BUS_FMT_RGB666_1X18,  };
> >
> > +static const struct drm_display_mode nec_nl4827hc19_05b_mode = {
> > +   .clock = 10870,
> > +   .hdisplay = 480,
> > +   .hsync_start = 480 + 2,
> > +   .hsync_end = 480 + 2 + 41,
> > +   .htotal = 480 + 2 + 41 + 2,
> > +   .vdisplay = 272,
> > +   .vsync_start = 272 + 2,
> > +   .vsync_end = 272 + 2 + 4,
> > +   .vtotal = 272 + 2 + 4 + 2,
> > +   .vrefresh = 74,
> > +};
> > +
> > +static const struct panel_desc nec_nl4827hc19_05b = {
> > +   .modes = _nl4827hc19_05b_mode,
> > +   .num_modes = 1,
> > +   .size = {
> > +   .width = 95,
> > +   .height = 54,
> > +   },
> > +   .bus_format = MEDIA_BUS_FMT_RGB888_1X24 };
> > +
> 
> Please keep these...
> 
> >  static const struct of_device_id platform_of_match[] = {
> > {
> > .compatible = "ampire,am800480r3tmqwa1h", @@ -1125,6 +1148,9
> @@
> > static const struct of_device_id platform_of_match[] = {
> > .compatible = "shelly,sca07010-bfn-lnn",
> > .data = _sca07010_bfn_lnn,
> > }, {
> > +   .compatible = "nec,nl4827hc19_05b",
> > +   .data = _nl4827hc19_05b,
> > +   }, {
> 
> and this sorted alphabetically.
> 
> Thierry

Ok!

Thanks for your guidance
Jianwei





[PATCH v9 1/4] drm/layerscape: Add Freescale DCU DRM driver

2015-07-16 Thread Wang J.W.
Hi Thierry,

Thank you very much for your patient and careful guidance. I'm updating my 
driver according to your comments.

> -Original Message-
> From: Thierry Reding [mailto:thierry.reding at gmail.com]
> Sent: Tuesday, July 14, 2015 6:49 PM
> To: Wang Jianwei-B52261
> Cc: dri-devel at lists.freedesktop.org; linux-kernel at vger.kernel.org; 
> linux-
> arm-kernel at lists.infradead.org; devicetree at vger.kernel.org;
> airlied at linux.ie; daniel.vetter at ffwll.ch; mark.yao at rock-chips.com; 
> Wood
> Scott-B07421; Wang Huan-B18965; Xiubo Li; Wang Jianwei-B52261
> Subject: Re: [PATCH v9 1/4] drm/layerscape: Add Freescale DCU DRM driver
> 
> On Mon, Jul 13, 2015 at 06:51:29PM +0800, Jianwei Wang wrote:
> > This patch add support for Two Dimensional Animation and Compositing
> > Engine (2D-ACE) on the Freescale SoCs.
> >
> > 2D-ACE is a Freescale display controller. 2D-ACE describes the
> > functionality of the module extremely well its name is a value that
> > cannot be used as a token in programming languages.
> > Instead the valid token "DCU" is used to tag the register names and
> > function names.
> >
> > The Display Controller Unit (DCU) module is a system master that
> > fetches graphics stored in internal or external memory and displays
> > them on a TFT LCD panel. A wide range of panel sizes is supported and
> > the timing of the interface signals is highly configurable.
> > Graphics are read directly from memory and then blended in real-time,
> > which allows for dynamic content creation with minimal CPU
> > intervention.
> 
> Is this for some non-i.MX SoC? 

Yes. Ls1021a and i.MX use different video IP modules.

> 
> > The features:
> > (1) Full RGB888 output to TFT LCD panel.
> > (2) For the current LCD panel, WQVGA "480x272" is supported.
> 
> Would be more useful to describe the actual capabilities of the display
> controller rather than what's supported by the panel that you happened to
> have attached to it.

Ok, I'll remove it


> 
> > (3) Blending of each pixel using up to 4 source layers dependent on
> > size of panel.
> > (4) Each graphic layer can be placed with one pixel resolution in
> > either axis.
> > (5) Each graphic layer support RGB565 and RGB888 direct colors without
> > alpha channel and BGRA BGRA ARGB1555 direct colors with an
> > alpha channel and YUV422 format.
> > (6) Each graphic layer support alpha blending with 8-bit resolution.
> >
> > This is a simplified version, only one primary plane, one framebuffer,
> > one crtc, one connector and one encoder for TFT LCD panel.
> >
> > Signed-off-by: Alison Wang 
> > Signed-off-by: Xiubo Li 
> > Signed-off-by: Jianwei Wang 
> > Acked-by: Daniel Vetter 
> > Reviewed-by: Alison Wang 
> [...]
> > diff --git a/MAINTAINERS b/MAINTAINERS index 6761318..fffb8c9 100644
> > --- a/MAINTAINERS
> > +++ b/MAINTAINERS
> > @@ -3404,6 +3404,15 @@ S:   Maintained
> >  F: drivers/gpu/drm/imx/
> >  F: Documentation/devicetree/bindings/drm/imx/
> >
> > +DRM DRIVERS FOR FREESCALE DCU
> > +M: Jianwei Wang 
> > +M: Alison Wang 
> > +L: dri-devel at lists.freedesktop.org
> > +S: Supported
> > +F: drivers/gpu/drm/fsl-dcu/
> > +F:  Documentation/devicetree/bindings/drm/fsl-dcu/
> > +F:  Documentation/devicetree/bindings/panel/nec,nl4827hc19_05b.txt
> 
> This binding has got nothing to do with the display driver, so it
> shouldn't be listed here.
> 
> Also, please use tabs consistently (the above two lines use spaces).


Sorry, I made this mistake when formatting patches. I'll be more careful next 
time.


> 
> >  DRM DRIVERS FOR NVIDIA TEGRA
> >  M: Thierry Reding 
> >  M: Terje Bergström 
> > diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig index
> > c46ca31..9cfd14e 100644
> > --- a/drivers/gpu/drm/Kconfig
> > +++ b/drivers/gpu/drm/Kconfig
> > @@ -231,6 +231,8 @@ source "drivers/gpu/drm/virtio/Kconfig"
> >
> >  source "drivers/gpu/drm/msm/Kconfig"
> >
> > +source "drivers/gpu/drm/fsl-dcu/Kconfig"
> > +
> 
> As mentioned in a different email, I'm somewhat annoyed by the random
> placement of these source statements. But we can probably clean that up in
> one go and insist on proper ordering when there is one.
> 

Ok, I plan to move it to the last line. Is it ok?



> > diff --git a/drivers/gpu/drm/fsl-dcu/Makefile
> > b/drivers/gpu/drm/fsl-dcu/Makefile
> > new file mode 100644
> > index 000..336b4a6
> > --- /dev/null
> > +++ b/drivers/gpu/drm/fsl-dcu/Makefile
> > @@ -0,0 +1,7 @@
> > +fsl-dcu-drm-y := fsl_dcu_drm_drv.o \
> > +  fsl_dcu_drm_kms.o \
> > +  fsl_dcu_drm_connector.o \
> > +  fsl_dcu_drm_plane.o \
> > +  fsl_dcu_drm_crtc.o \
> > +  fsl_dcu_drm_fbdev.o
> 
> I don't get what kind of indentation this is supposed to be. Either align
> everything with the first object file, or use a single tab rather than a
> tab followed by a couple of spaces.
> 

OK!


> > +obj-$(CONFIG_DRM_FSL_DCU)  += fsl-dcu-drm.o
> > diff --git 

[PATCH v8 1/4] drm/layerscape: Add Freescale DCU DRM driver

2015-07-13 Thread Wang J.W.
Hi Mark,

Many thanks! I'll update according your comments!

From: Mark yao [mailto:mark@rock-chips.com] 
Sent: Monday, July 13, 2015 3:57 PM
To: Wang Jianwei-B52261; dri-devel at lists.freedesktop.org
Cc: linux-kernel at vger.kernel.org; linux-arm-kernel at lists.infradead.org; 
devicetree at vger.kernel.org; airlied at linux.ie; daniel.vetter at ffwll.ch; 
Wood Scott-B07421; thierry.reding at gmail.com; Wang Huan-B18965; Xiubo Li
Subject: Re: [PATCH v8 1/4] drm/layerscape: Add Freescale DCU DRM driver

On 2015年07月13日 14:00, Jianwei Wang wrote:
This patch add support for Two Dimensional Animation and Compositing
Engine (2D-ACE) on the Freescale SoCs.

2D-ACE is a Freescale display controller. 2D-ACE describes
the functionality of the module extremely well its name is a value
that cannot be used as a token in programming languages.
Instead the valid token "DCU" is used to tag the register names and
function names.

The Display Controller Unit (DCU) module is a system master that
fetches graphics stored in internal or external memory and displays
them on a TFT LCD panel. A wide range of panel sizes is supported
and the timing of the interface signals is highly configurable.
Graphics are read directly from memory and then blended in real-time,
which allows for dynamic content creation with minimal CPU
intervention.

The features:
(1) Full RGB888 output to TFT LCD panel.
(2) For the current LCD panel, WQVGA "480x272" is supported.
(3) Blending of each pixel using up to 4 source layers
dependent on size of panel.
(4) Each graphic layer can be placed with one pixel resolution
in either axis.
(5) Each graphic layer support RGB565 and RGB888 direct colors
without alpha
channel and BGRA BGRA ARGB1555 direct colors with an
alpha channel and YUV422 format.
(6) Each graphic layer support alpha blending with 8-bit
resolution.

This is a simplified version, only one primary plane, one
framebuffer, one crtc, one connector and one encoder for TFT LCD panel.

Signed-off-by: Alison Wang 
Signed-off-by: Xiubo Li 
Signed-off-by: Jianwei Wang 
Acked-by: Daniel Vetter 
Reviewed-by: Alison Wang 
---


hanged in V8
- Remove useless code
  #define DRIVER_NAME "fsl-dcu-drm"
  MODULE_ALIAS("platform:fsl-dcu-drm");
Adviced by Paul Bolle

Changed in V7

- Remove redundant functions and replace deprecated hooker
Adviced by Daniel Vetter
- Replace drm_platform_init with drm_dev_alloc/register
Adviced by Daniel Vetter

Changed in V6

- Add NEC nl4827hc19_05b panel to panel-simple.c
Adviced by Mark Yao
- Add DRIVER_ATOMIC for driver_features
Adviced by Mark Yao
- check fsl_dev if it's NULL at PM suspend/resume
Adviced by Mark Yao

Changed in V5

- Update commit message
- Add layer registers initialization
- Remove unused functions
- Rename driver folder
Adviced by Stefan Agner
- Move pixel clock control functions to fsl_dcu_drm_drv.c
- remove redundant enable the clock implicitly using regmap
Adviced by Stefan Agner
- Add maintainer message

Changed in V4:

-This version doesn't have functionality changed
 Just a minor adjustment.

Changed in V3:

- Test driver on Vybrid board and add compatible string
- Remove unused functions
- set default crtc for encoder
- replace legacy functions with atomic help functions
Adviced by Daniel Vetter
- Set the unique name of the DRM device
- Implement irq handle function for vblank interrupt

Changed in v2: 
- Add atomic support
Adviced by Daniel Vetter
- Modify bindings file
- Rename node for compatibility
- Move platform related code out for compatibility
Adviced by Stefan Agner

[snip]



+int fsl_dcu_drm_connector_create(struct fsl_dcu_drm_device *fsl_dev,
+struct drm_encoder *encoder)
+{
+   struct drm_connector *connector = _dev->connector.connector;
+   struct device_node *panel_node;
+   int ret;
+
+   fsl_dev->connector.encoder = encoder;
+
+   connector->display_info.width_mm = 0;
+   connector->display_info.height_mm = 0;
+
+   ret = drm_connector_init(fsl_dev->ddev, connector,
+_dcu_drm_connector_funcs,
+DRM_MODE_CONNECTOR_LVDS);
+   if (ret < 0)
+   return ret;
+
+   connector->dpms = DRM_MODE_DPMS_OFF;
+   drm_connector_helper_add(connector, _helper_funcs);
+   ret = drm_connector_register(connector);
+   if (ret < 0)
+   goto err_cleanup;
+
+   ret = drm_mode_connector_attach_encoder(connector, encoder);
+   if (ret < 0)
+   goto err_sysfs;
+
+   connector->encoder = encoder;
+
+   drm_object_property_set_value
+   (>base, fsl_dev->ddev->mode_config.dpms_property,
+   DRM_MODE_DPMS_OFF);
+
+   panel_node = of_parse_phandle(fsl_dev->np, "panel", 0);
+   if (panel_node) {
+   fsl_dev->connector.panel = of_drm_find_panel(panel_node);
+   if (!fsl_dev->connector.panel)
+   return -EPROBE_DEFER;
+   

[PATCH v7 1/4] drm/layerscape: Add Freescale DCU DRM driver

2015-07-13 Thread Wang J.W.
Hi Paul,

Thank you for your review.

> -Original Message-
> From: Paul Bolle [mailto:pebolle at tiscali.nl]
> Sent: Saturday, July 11, 2015 9:16 PM
> To: Wang Jianwei-B52261
> Cc: dri-devel at lists.freedesktop.org; linux-kernel at vger.kernel.org; 
> linux-
> arm-kernel at lists.infradead.org; devicetree at vger.kernel.org;
> airlied at linux.ie; daniel.vetter at ffwll.ch; mark.yao at rock-chips.com; 
> Wood
> Scott-B07421; thierry.reding at gmail.com; Wang Huan-B18965; Xiubo Li
> Subject: Re: [PATCH v7 1/4] drm/layerscape: Add Freescale DCU DRM driver
> 
> A question and a nit follow.
> 
> On vr, 2015-07-10 at 19:17 +0800, Jianwei Wang wrote:
> > --- /dev/null
> > +++ b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c
> 
> > +MODULE_ALIAS("platform:fsl-dcu-drm");
> 
> Question: this appears to be only useful if there's a corresponding struct
> platform_device. That is, a platform_device with a "fsl-dcu-drm"
> .name. It will fire off a "MODALIAS=platform:fsl-dcu-drm" uevent when it's
> created.
> 
> I couldn't find this corresponding platform_device. Does it exist? Or is
> this alias needed for some other reason?
> 
> > --- /dev/null
> > +++ b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.h
> 
> > +#define DRIVER_NAME"fsl-dcu-drm"
> 
> Nit: I don't think DRIVER_NAME is actually used anywhere. 
> 

Yes, you are right. Both are useless, I'll remove them.
I copied source code from other DRM driver at first, and forgot to remove them.
Thanks for your kindly remind.


BR.
Jianwei

> Thanks,
> 
> 
> Paul Bolle


[PATCH v6 1/4] drm/layerscape: Add Freescale DCU DRM driver

2015-07-10 Thread Wang J.W.
Hi Emil,

Thank you for your guidance. I'll pay attention about this next time.

BR.
Jianwei

> -Original Message-
> From: linux-kernel-owner at vger.kernel.org [mailto:linux-kernel-
> owner at vger.kernel.org] On Behalf Of Emil Velikov
> Sent: Friday, July 10, 2015 4:42 PM
> To: Wang Jianwei-B52261
> Cc: mark.yao; devicetree at vger.kernel.org; Xiubo Li; Wang Huan-B18965;
> daniel.vetter at ffwll.ch; linux-kernel at vger.kernel.org; dri-
> devel at lists.freedesktop.org; Wood Scott-B07421; linux-arm-
> kernel at lists.infradead.org
> Subject: Re: [PATCH v6 1/4] drm/layerscape: Add Freescale DCU DRM driver
> 
> Hi Jianwei,
> 
> On 10 July 2015 at 08:47, Wang J.W.  wrote:
> > Hi Mark,
> >
> > Thank you very much for your review! I have update my DRM driver.
> > All your three comments have been applied in this latest version.
> > I replied the last email several times, but all refused the mailist.
> I'd suspect that the ML automatically refused the email due to its size.
> To avoid that in the future you can trim the email to include only the
> relevant parts (not applicable in this case I know). At the same time it
> makes reading a bit easier, and missing buried comments harder :-)
> 
> Hope that helps,
> Emil
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo at vger.kernel.org More majordomo info at
> http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/


[PATCH v6 1/4] drm/layerscape: Add Freescale DCU DRM driver

2015-07-10 Thread Wang J.W.
Hi Daniel,

Thank you very much for your review!
See below...

> -Original Message-
> From: Daniel Vetter [mailto:daniel.vetter at ffwll.ch] On Behalf Of Daniel
> Vetter
> Sent: Friday, July 10, 2015 4:00 PM
> To: Wang Jianwei-B52261
> Cc: dri-devel at lists.freedesktop.org; linux-kernel at vger.kernel.org; 
> linux-
> arm-kernel at lists.infradead.org; devicetree at vger.kernel.org;
> airlied at linux.ie; daniel.vetter at ffwll.ch; mark.yao at rock-chips.com; 
> Wood
> Scott-B07421; Wang Huan-B18965; Xiubo Li
> Subject: Re: [PATCH v6 1/4] drm/layerscape: Add Freescale DCU DRM driver
> 
> On Fri, Jul 10, 2015 at 03:26:52PM +0800, Jianwei Wang wrote:
> > This patch add support for Two Dimensional Animation and Compositing
> > Engine (2D-ACE) on the Freescale SoCs.
> >
> > 2D-ACE is a Freescale display controller. 2D-ACE describes
> > the functionality of the module extremely well its name is a value
> > that cannot be used as a token in programming languages.
> > Instead the valid token "DCU" is used to tag the register names and
> > function names.
> >
> > The Display Controller Unit (DCU) module is a system master that
> > fetches graphics stored in internal or external memory and displays
> > them on a TFT LCD panel. A wide range of panel sizes is supported
> > and the timing of the interface signals is highly configurable.
> > Graphics are read directly from memory and then blended in real-time,
> > which allows for dynamic content creation with minimal CPU
> > intervention.
> >
> > The features:
> > (1) Full RGB888 output to TFT LCD panel.
> > (2) For the current LCD panel, WQVGA "480x272" is supported.
> > (3) Blending of each pixel using up to 4 source layers
> > dependent on size of panel.
> > (4) Each graphic layer can be placed with one pixel resolution
> > in either axis.
> > (5) Each graphic layer support RGB565 and RGB888 direct colors
> > without alpha
> > channel and BGRA BGRA ARGB1555 direct colors with an
> > alpha channel and
> > YUV422 format.
> > (6) Each graphic layer support alpha blending with 8-bit
> > resolution.
> >
> > This is a simplified version, only one primary plane, one
> > framebuffer created for
> > fbdev, one crtc, one connector for TFT LCD panel, an encoder.
> >
> > Signed-off-by: Alison Wang 
> > Signed-off-by: Xiubo Li 
> > Signed-off-by: Jianwei Wang 
> 
> A few small things to polish that I spotted.
> -Daniel
> 
> > ---
> >
> >
> > Changed in V6
> >
> > - Add NEC nl4827hc19_05b panel to panel-simple.c
> > Adviced by Mark Yao
> > - Add DRIVER_ATOMIC for driver_features
> > Adviced by Mark Yao
> > - check fsl_dev if it's NULL at PM suspend/resume
> > Adviced by Mark Yao
> >
> > Changed in V5
> >
> > - Update commit message
> > - Add layer registers initialization
> > - Remove unused functions
> > - Rename driver folder
> > Adviced by Stefan Agner
> > - Move pixel clock control functions to fsl_dcu_drm_drv.c
> > - remove redundant enable the clock implicitly using regmap
> > - Add maintainer message
> >
> > Changed in V4:
> >
> > -This version doesn't have functionality changed
> > Just a minor adjustment.
> >
> > Changed in V3:
> >
> > - Test driver on Vybrid board and add compatible string
> > - Remove unused functions
> > - set default crtc for encoder
> > - replace legacy functions with atomic help functions
> > Adviced by Daniel Vetter
> > - Set the unique name of the DRM device
> > - Implement irq handle function for vblank interrupt
> >
> > Changed in v2:
> > - Add atomic support
> > Adviced by Daniel Vetter
> > - Modify bindings file
> > - Rename node for compatibility
> > - Move platform related code out for compatibility
> > Adviced by Stefan Agner
> >
> >
> >  MAINTAINERS |   7 +
> >  drivers/gpu/drm/Kconfig |   2 +
> >  drivers/gpu/drm/Makefile|   1 +
> >  drivers/gpu/drm/fsl-dcu/Kconfig |  18 ++
> >  drivers/gpu/drm/fsl-dcu/Makefile|   7 +
> >  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_connector.c | 200 +
> >  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_connector.h |  31 ++
> >  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c  | 172 +++
> >  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.h  |  22 ++
> >  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c   | 379
> 
> >  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.h   | 223 ++
> >  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_fbdev.c |  26 ++
> >  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.c   |  42 +++
> >  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.h   |  17 ++
> >  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c | 195 
> >  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.h |  23 ++
> >  16 files changed, 1365 insertions(+)
> >  create mode 100644 drivers/gpu/drm/fsl-dcu/Kconfig
> >  create mode 100644 drivers/gpu/drm/fsl-dcu/Makefile
> >  create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_connector.c
> >  create mode 100644 

[PATCH v6 1/4] drm/layerscape: Add Freescale DCU DRM driver

2015-07-10 Thread Wang J.W.
Hi Mark,

Thank you very much for your review! I have update my DRM driver.
All your three comments have been applied in this latest version.
I replied the last email several times, but all refused the mailist.
Any other comments for this driver?

BR.
Jianwei

> -Original Message-
> From: Jianwei Wang [mailto:jianwei.wang at freescale.com]
> Sent: Friday, July 10, 2015 3:27 PM
> To: dri-devel at lists.freedesktop.org
> Cc: linux-kernel at vger.kernel.org; linux-arm-kernel at lists.infradead.org;
> devicetree at vger.kernel.org; airlied at linux.ie; daniel.vetter at ffwll.ch;
> mark.yao at rock-chips.com; Wood Scott-B07421; Wang Jianwei-B52261; Wang
> Huan-B18965; Xiubo Li
> Subject: [PATCH v6 1/4] drm/layerscape: Add Freescale DCU DRM driver
> 
> This patch add support for Two Dimensional Animation and Compositing
> Engine (2D-ACE) on the Freescale SoCs.
> 
> 2D-ACE is a Freescale display controller. 2D-ACE describes the
> functionality of the module extremely well its name is a value that cannot
> be used as a token in programming languages.
> Instead the valid token "DCU" is used to tag the register names and
> function names.
> 
> The Display Controller Unit (DCU) module is a system master that fetches
> graphics stored in internal or external memory and displays them on a TFT
> LCD panel. A wide range of panel sizes is supported and the timing of the
> interface signals is highly configurable.
> Graphics are read directly from memory and then blended in real-time,
> which allows for dynamic content creation with minimal CPU intervention.
> 
> The features:
> (1) Full RGB888 output to TFT LCD panel.
> (2) For the current LCD panel, WQVGA "480x272" is supported.
> (3) Blending of each pixel using up to 4 source layers dependent on size
> of panel.
> (4) Each graphic layer can be placed with one pixel resolution in either
> axis.
> (5) Each graphic layer support RGB565 and RGB888 direct colors without
> alpha channel and BGRA BGRA ARGB1555 direct colors with an alpha
> channel and
> YUV422 format.
> (6) Each graphic layer support alpha blending with 8-bit resolution.
> 
> This is a simplified version, only one primary plane, one framebuffer
> created for fbdev, one crtc, one connector for TFT LCD panel, an encoder.
> 
> Signed-off-by: Alison Wang 
> Signed-off-by: Xiubo Li 
> Signed-off-by: Jianwei Wang 
> ---
> 
> 
> Changed in V6
> 
> - Add NEC nl4827hc19_05b panel to panel-simple.c Adviced by Mark Yao
> - Add DRIVER_ATOMIC for driver_features
> Adviced by Mark Yao
> - check fsl_dev if it's NULL at PM suspend/resume Adviced by Mark Yao
> 
> Changed in V5
> 
> - Update commit message
> - Add layer registers initialization
> - Remove unused functions
> - Rename driver folder
> Adviced by Stefan Agner
> - Move pixel clock control functions to fsl_dcu_drm_drv.c
> - remove redundant enable the clock implicitly using regmap
> - Add maintainer message
> 
> Changed in V4:
> 
> -This version doesn't have functionality changed Just a minor adjustment.
> 
> Changed in V3:
> 
> - Test driver on Vybrid board and add compatible string
> - Remove unused functions
> - set default crtc for encoder
> - replace legacy functions with atomic help functions Adviced by Daniel
> Vetter
> - Set the unique name of the DRM device
> - Implement irq handle function for vblank interrupt
> 
> Changed in v2:
> - Add atomic support
> Adviced by Daniel Vetter
> - Modify bindings file
> - Rename node for compatibility
> - Move platform related code out for compatibility Adviced by Stefan Agner
> 
> 
>  MAINTAINERS |   7 +
>  drivers/gpu/drm/Kconfig |   2 +
>  drivers/gpu/drm/Makefile|   1 +
>  drivers/gpu/drm/fsl-dcu/Kconfig |  18 ++
>  drivers/gpu/drm/fsl-dcu/Makefile|   7 +
>  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_connector.c | 200 +
> drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_connector.h |  31 ++
>  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c  | 172 +++
>  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.h  |  22 ++
>  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c   | 379
> 
>  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.h   | 223 ++
>  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_fbdev.c |  26 ++
>  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.c   |  42 +++
>  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.h   |  17 ++
>  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c | 195 
>  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.h |  23 ++
>  16 files changed, 1365 insertions(+)
>  create mode 100644 drivers/gpu/drm/fsl-dcu/Kconfig  create mode 100644
> drivers/gpu/drm/fsl-dcu/Makefile  create mode 100644 drivers/gpu/drm/fsl-
> dcu/fsl_dcu_drm_connector.c
>  create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_connector.h
>  create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c
>  create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.h
>  

[PATCH v5 1/3] drm/layerscape: Add Freescale DCU DRM driver

2015-07-09 Thread Wang J.W.
Hi Mark,

Thank you very much for your review!

From: Mark yao [mailto:mark@rock-chips.com] 
Sent: Wednesday, July 01, 2015 9:59 AM
To: Wang Jianwei-B52261
Cc: David Airlie; daniel.vetter at intel.com; stefan at agner.ch; dri-devel; 
linux-kernel; linux-arm-kernel at lists.infradead.org; Wang Jianwei-B52261
Subject: Re: [PATCH v5 1/3] drm/layerscape: Add Freescale DCU DRM driver

On 2015年06月30日 18:01, Wang J.W. wrote:

From: Jianwei Wang <b52...@freescale.com>

This patch add support for Two Dimensional Animation and Compositing Engine 
(2D-ACE) on the Freescale SoCs.

2D-ACE is a Freescale display controller. 2D-ACE describes the functionality of 
the module extremely well its name is a value that cannot be used as a token in 
programming languages.
Instead the valid token "DCU" is used to tag the register names and function 
names.

The Display Controller Unit (DCU) module is a system master that fetches 
graphics stored in internal or external memory and displays them on a TFT LCD 
panel. A wide range of panel sizes is supported and the timing of the interface 
signals is highly configurable.
Graphics are read directly from memory and then blended in real-time, which 
allows for dynamic content creation with minimal CPU intervention.

The features:
(1) Full RGB888 output to TFT LCD panel.
(2) For the current LCD panel, WQVGA "480x272" is supported.
(3) Blending of each pixel using up to 4 source layers dependent on size of 
panel.
(4) Each graphic layer can be placed with one pixel resolution in either axis.
(5) Each graphic layer support RGB565 and RGB888 direct colors without alpha 
channel and BGRA BGRA ARGB1555 direct colors with an alpha channel and 
YUV422 format.
(6) Each graphic layer support alpha blending with 8-bit resolution.

This is a simplified version, only one primary plane, one framebuffer created 
for fbdev, one crtc, one connector for TFT LCD panel, an encoder.

Signed-off-by: Alison Wang 
Signed-off-by: Xiubo Li 
Signed-off-by: Jianwei Wang 
---

Changed in V5

- Update commit message
- Add layer registers initialization
- Remove unused functions
- Rename driver folder
- Move pixel clock control functions to fsl_dcu_drm_drv.c
- remove redundant enable the clock implicitly using regmap
- Add maintainer message

Changed in V4:

-This version doesn't have functionality changed  Just a minor adjustment.

Changed in V3:

- Test driver on Vybrid board and add compatible string
- Remove unused functions
- set default crtc for encoder
- replace legacy functions with atomic help functions
- Set the unique name of the DRM device
- Implement irq handle function for vblank interrupt

Changed in v2:
- Add atomic support
- Modify bindings file
- Rename node for compatibility
- Move platform related code out for compatibility

 .../devicetree/bindings/drm/fsl-dcu/fsl,dcu.txt|  50 +++
 MAINTAINERS|   8 +
 drivers/gpu/drm/Kconfig|   2 +
 drivers/gpu/drm/Makefile   |   1 +
 drivers/gpu/drm/fsl-dcu/Kconfig|  17 +
 drivers/gpu/drm/fsl-dcu/Makefile   |   7 +
 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_connector.c| 194 +++
 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_connector.h|  30 ++
 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c | 172 ++
 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.h |  22 ++
 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c  | 373 +
 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.h  | 223 
 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_fbdev.c|  26 ++
 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.c  |  42 +++
 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.h  |  17 +
 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c| 192 +++
 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.h|  23 ++
 17 files changed, 1399 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/drm/fsl-dcu/fsl,dcu.txt
 create mode 100644 drivers/gpu/drm/fsl-dcu/Kconfig  create mode 100644 
drivers/gpu/drm/fsl-dcu/Makefile  create mode 100644 
drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_connector.c
 create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_connector.h
 create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c
 create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.h
 create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c
 create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.h
 create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_fbdev.c
 create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.c
 create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.h
 create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c
 create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.h

diff --git a/Documentation/devicetree/bindings/drm/fsl-dcu/fsl,dcu.txt 
b/Documentation/devicetree/bindings/drm/fsl-dcu/fsl,dcu.txt
new file mode 100

[PATCH v5 1/3] drm/layerscape: Add Freescale DCU DRM driver

2015-07-09 Thread Wang J.W.
Hi Mark,

Thank you very much for your review!

> -Original Message-
> From: Wang Jianwei-B52261
> Sent: Thursday, July 09, 2015 9:28 AM
> To: Wang Jianwei-B52261
> Subject: FW: [PATCH v5 1/3] drm/layerscape: Add Freescale DCU DRM driver
> 
> 
> From: Jianwei Wang 
> 
> This patch add support for Two Dimensional Animation and Compositing
> Engine (2D-ACE) on the Freescale SoCs.
> 
> 2D-ACE is a Freescale display controller. 2D-ACE describes the
> functionality of the module extremely well its name is a value that cannot
> be used as a token in programming languages.
> Instead the valid token "DCU" is used to tag the register names and
> function names.
> 
> The Display Controller Unit (DCU) module is a system master that fetches
> graphics stored in internal or external memory and displays them on a TFT
> LCD panel. A wide range of panel sizes is supported and the timing of the
> interface signals is highly configurable.
> Graphics are read directly from memory and then blended in real-time,
> which allows for dynamic content creation with minimal CPU intervention.
> 
> The features:
> (1) Full RGB888 output to TFT LCD panel.
> (2) For the current LCD panel, WQVGA "480x272" is supported.
> (3) Blending of each pixel using up to 4 source layers dependent on size
> of panel.
> (4) Each graphic layer can be placed with one pixel resolution in either
> axis.
> (5) Each graphic layer support RGB565 and RGB888 direct colors without
> alpha channel and BGRA BGRA ARGB1555 direct colors with an alpha
> channel and YUV422 format.
> (6) Each graphic layer support alpha blending with 8-bit resolution.
> 
> This is a simplified version, only one primary plane, one framebuffer
> created for fbdev, one crtc, one connector for TFT LCD panel, an encoder.
> 
> Signed-off-by: Alison Wang 
> Signed-off-by: Xiubo Li 
> Signed-off-by: Jianwei Wang 
> ---
> 
> Changed in V5
> 
> - Update commit message
> - Add layer registers initialization
> - Remove unused functions
> - Rename driver folder
> - Move pixel clock control functions to fsl_dcu_drm_drv.c
> - remove redundant enable the clock implicitly using regmap
> - Add maintainer message
> 
> Changed in V4:
> 
> -This version doesn't have functionality changed  Just a minor adjustment.
> 
> Changed in V3:
> 
> - Test driver on Vybrid board and add compatible string
> - Remove unused functions
> - set default crtc for encoder
> - replace legacy functions with atomic help functions
> - Set the unique name of the DRM device
> - Implement irq handle function for vblank interrupt
> 
> Changed in v2:
> - Add atomic support
> - Modify bindings file
> - Rename node for compatibility
> - Move platform related code out for compatibility
> 
>  .../devicetree/bindings/drm/fsl-dcu/fsl,dcu.txt|  50 +++
>  MAINTAINERS|   8 +
>  drivers/gpu/drm/Kconfig|   2 +
>  drivers/gpu/drm/Makefile   |   1 +
>  drivers/gpu/drm/fsl-dcu/Kconfig|  17 +
>  drivers/gpu/drm/fsl-dcu/Makefile   |   7 +
>  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_connector.c| 194 +++
>  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_connector.h|  30 ++
>  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c | 172 ++
>  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.h |  22 ++
>  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c  | 373
> +
>  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.h  | 223 
>  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_fbdev.c|  26 ++
>  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.c  |  42 +++
>  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.h  |  17 +
>  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c| 192 +++
>  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.h|  23 ++
>  17 files changed, 1399 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/drm/fsl-
> dcu/fsl,dcu.txt
>  create mode 100644 drivers/gpu/drm/fsl-dcu/Kconfig  create mode 100644
> drivers/gpu/drm/fsl-dcu/Makefile  create mode 100644 drivers/gpu/drm/fsl-
> dcu/fsl_dcu_drm_connector.c
>  create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_connector.h
>  create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c
>  create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.h
>  create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c
>  create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.h
>  create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_fbdev.c
>  create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.c
>  create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.h
>  create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c
>  create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.h
> 
> diff --git a/Documentation/devicetree/bindings/drm/fsl-dcu/fsl,dcu.txt
> b/Documentation/devicetree/bindings/drm/fsl-dcu/fsl,dcu.txt
> new file mode 100644
> index 000..bdc7d5b
> --- 

[PATCH v5 1/3] drm/layerscape: Add Freescale DCU DRM driver

2015-07-09 Thread Wang J.W.
Hi Mark,

Thank you very much for your review!

From: Mark yao [mailto:mark@rock-chips.com]
Sent: Wednesday, July 01, 2015 9:59 AM
To: Wang Jianwei-B52261
Cc: David Airlie; daniel.vetter at intel.com; stefan at agner.ch; dri-devel; 
linux-kernel; linux-arm-kernel at lists.infradead.org; Wang Jianwei-B52261
Subject: Re: [PATCH v5 1/3] drm/layerscape: Add Freescale DCU DRM driver



From: Jianwei Wang 



This patch add support for Two Dimensional Animation and Compositing Engine 
(2D-ACE) on the Freescale SoCs.



2D-ACE is a Freescale display controller. 2D-ACE describes the functionality of 
the module extremely well its name is a value that cannot be used as a token in 
programming languages.

Instead the valid token "DCU" is used to tag the register names and function 
names.



The Display Controller Unit (DCU) module is a system master that fetches 
graphics stored in internal or external memory and displays them on a TFT LCD 
panel. A wide range of panel sizes is supported and the timing of the interface 
signals is highly configurable.

Graphics are read directly from memory and then blended in real-time, which 
allows for dynamic content creation with minimal CPU intervention.



The features:

(1) Full RGB888 output to TFT LCD panel.

(2) For the current LCD panel, WQVGA "480x272" is supported.

(3) Blending of each pixel using up to 4 source layers dependent on size of 
panel.

(4) Each graphic layer can be placed with one pixel resolution in either axis.

(5) Each graphic layer support RGB565 and RGB888 direct colors without alpha 
channel and BGRA BGRA ARGB1555 direct colors with an alpha channel and 
YUV422 format.

(6) Each graphic layer support alpha blending with 8-bit resolution.



This is a simplified version, only one primary plane, one framebuffer created 
for fbdev, one crtc, one connector for TFT LCD panel, an encoder.



Signed-off-by: Alison Wang 

Signed-off-by: Xiubo Li 

Signed-off-by: Jianwei Wang 

---



Changed in V5



- Update commit message

- Add layer registers initialization

- Remove unused functions

- Rename driver folder

- Move pixel clock control functions to fsl_dcu_drm_drv.c

- remove redundant enable the clock implicitly using regmap

- Add maintainer message



Changed in V4:



-This version doesn't have functionality changed  Just a minor adjustment.



Changed in V3:



- Test driver on Vybrid board and add compatible string

- Remove unused functions

- set default crtc for encoder

- replace legacy functions with atomic help functions

- Set the unique name of the DRM device

- Implement irq handle function for vblank interrupt



Changed in v2:

- Add atomic support

- Modify bindings file

- Rename node for compatibility

- Move platform related code out for compatibility



 .../devicetree/bindings/drm/fsl-dcu/fsl,dcu.txt|  50 +++

 MAINTAINERS|   8 +

 drivers/gpu/drm/Kconfig|   2 +

 drivers/gpu/drm/Makefile   |   1 +

 drivers/gpu/drm/fsl-dcu/Kconfig|  17 +

 drivers/gpu/drm/fsl-dcu/Makefile   |   7 +

 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_connector.c| 194 +++

 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_connector.h|  30 ++

 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c | 172 ++

 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.h |  22 ++

 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c  | 373 +

 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.h  | 223 

 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_fbdev.c|  26 ++

 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.c  |  42 +++

 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.h  |  17 +

 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c| 192 +++

 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.h|  23 ++

 17 files changed, 1399 insertions(+)

 create mode 100644 Documentation/devicetree/bindings/drm/fsl-dcu/fsl,dcu.txt

 create mode 100644 drivers/gpu/drm/fsl-dcu/Kconfig  create mode 100644 
drivers/gpu/drm/fsl-dcu/Makefile  create mode 100644 
drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_connector.c

 create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_connector.h

 create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c

 create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.h

 create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c

 create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.h

 create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_fbdev.c

 create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.c

 create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.h

 create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c

 create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.h



diff --git 

[PATCH v5 1/3] drm/layerscape: Add Freescale DCU DRM driver

2015-06-23 Thread Wang J.W.
Hi all,

Anybody have any comments for this series of patches? Any comments are 
welcomed. They had been send out for more than two monthes. Thanks.

BR.
Jianwei

> -Original Message-
> From: Jianwei Wang [mailto:jianwei.wang at freescale.com]
> Sent: Friday, April 17, 2015 2:36 PM
> To: airlied at linux.ie; daniel.vetter at intel.com; stefan at agner.ch; Wood
> Scott-B07421; dri-devel at lists.freedesktop.org
> Cc: linux-kernel at vger.kernel.org; linux-arm-kernel at lists.infradead.org;
> Jin Zhengxiong-R64188; Wang Jianwei-B52261; Wang Huan-B18965; Xiubo Li;
> Wang Jianwei-B52261
> Subject: [PATCH v5 1/3] drm/layerscape: Add Freescale DCU DRM driver
> 
> From: Jianwei Wang 
> 
> This patch add support for Two Dimensional Animation and Compositing
> Engine (2D-ACE) on the Freescale SoCs.
> 
> 2D-ACE is a Freescale display controller. 2D-ACE describes the
> functionality of the module extremely well its name is a value that cannot
> be used as a token in programming languages.
> Instead the valid token "DCU" is used to tag the register names and
> function names.
> 
> The Display Controller Unit (DCU) module is a system master that fetches
> graphics stored in internal or external memory and displays them on a TFT
> LCD panel. A wide range of panel sizes is supported and the timing of the
> interface signals is highly configurable.
> Graphics are read directly from memory and then blended in real-time,
> which allows for dynamic content creation with minimal CPU intervention.
> 
> The features:
> (1) Full RGB888 output to TFT LCD panel.
> (2) For the current LCD panel, WQVGA "480x272" is supported.
> (3) Blending of each pixel using up to 4 source layers dependent on size
> of panel.
> (4) Each graphic layer can be placed with one pixel resolution in either
> axis.
> (5) Each graphic layer support RGB565 and RGB888 direct colors without
> alpha channel and BGRA BGRA ARGB1555 direct colors with an alpha
> channel and YUV422 format.
> (6) Each graphic layer support alpha blending with 8-bit resolution.
> 
> This is a simplified version, only one primary plane, one framebuffer
> created for fbdev, one crtc, one connector for TFT LCD panel, an encoder.
> 
> Signed-off-by: Alison Wang 
> Signed-off-by: Xiubo Li 
> Signed-off-by: Jianwei Wang 
> ---
> 
> Changed in V5
> 
> - Update commit message
> - Add layer registers initialization
> - Remove unused functions
> - Rename driver folder
> - Move pixel clock control functions to fsl_dcu_drm_drv.c
> - remove redundant enable the clock implicitly using regmap
> - Add maintainer message
> 
> Changed in V4:
> 
> -This version doesn't have functionality changed  Just a minor adjustment.
> 
> Changed in V3:
> 
> - Test driver on Vybrid board and add compatible string
> - Remove unused functions
> - set default crtc for encoder
> - replace legacy functions with atomic help functions
> - Set the unique name of the DRM device
> - Implement irq handle function for vblank interrupt
> 
> Changed in v2:
> - Add atomic support
> - Modify bindings file
> - Rename node for compatibility
> - Move platform related code out for compatibility
> 
>  .../devicetree/bindings/drm/fsl-dcu/fsl,dcu.txt|  50 +++
>  MAINTAINERS|   8 +
>  drivers/gpu/drm/Kconfig|   2 +
>  drivers/gpu/drm/Makefile   |   1 +
>  drivers/gpu/drm/fsl-dcu/Kconfig|  17 +
>  drivers/gpu/drm/fsl-dcu/Makefile   |   7 +
>  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_connector.c| 194 +++
>  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_connector.h|  30 ++
>  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c | 172 ++
>  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.h |  22 ++
>  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c  | 373
> +
>  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.h  | 223 
>  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_fbdev.c|  26 ++
>  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.c  |  42 +++
>  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.h  |  17 +
>  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c| 192 +++
>  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.h|  23 ++
>  17 files changed, 1399 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/drm/fsl-
> dcu/fsl,dcu.txt
>  create mode 100644 drivers/gpu/drm/fsl-dcu/Kconfig  create mode 100644
> drivers/gpu/drm/fsl-dcu/Makefile  create mode 100644 drivers/gpu/drm/fsl-
> dcu/fsl_dcu_drm_connector.c
>  create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_connector.h
>  create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c
>  create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.h
>  create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c
>  create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.h
>  create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_fbdev.c
>  create mode 100644 

[PATCH v5 1/3] drm/layerscape: Add Freescale DCU DRM driver

2015-06-02 Thread Wang J.W.
Hi Daniel,

Any comments about this new version? Thanks a lot!

Thanks,
Jianwei

> -Original Message-
> From: Jianwei Wang [mailto:jianwei.wang at freescale.com]
> Sent: Friday, April 17, 2015 2:36 PM
> To: airlied at linux.ie; daniel.vetter at intel.com; stefan at agner.ch; Wood
> Scott-B07421; dri-devel at lists.freedesktop.org
> Cc: linux-kernel at vger.kernel.org; linux-arm-kernel at lists.infradead.org;
> Jin Zhengxiong-R64188; Wang Jianwei-B52261; Wang Huan-B18965; Xiubo Li;
> Wang Jianwei-B52261
> Subject: [PATCH v5 1/3] drm/layerscape: Add Freescale DCU DRM driver
> 
> From: Jianwei Wang 
> 
> This patch add support for Two Dimensional Animation and Compositing
> Engine (2D-ACE) on the Freescale SoCs.
> 
> 2D-ACE is a Freescale display controller. 2D-ACE describes the
> functionality of the module extremely well its name is a value that cannot
> be used as a token in programming languages.
> Instead the valid token "DCU" is used to tag the register names and
> function names.
> 
> The Display Controller Unit (DCU) module is a system master that fetches
> graphics stored in internal or external memory and displays them on a TFT
> LCD panel. A wide range of panel sizes is supported and the timing of the
> interface signals is highly configurable.
> Graphics are read directly from memory and then blended in real-time,
> which allows for dynamic content creation with minimal CPU intervention.
> 
> The features:
> (1) Full RGB888 output to TFT LCD panel.
> (2) For the current LCD panel, WQVGA "480x272" is supported.
> (3) Blending of each pixel using up to 4 source layers dependent on size
> of panel.
> (4) Each graphic layer can be placed with one pixel resolution in either
> axis.
> (5) Each graphic layer support RGB565 and RGB888 direct colors without
> alpha channel and BGRA BGRA ARGB1555 direct colors with an alpha
> channel and YUV422 format.
> (6) Each graphic layer support alpha blending with 8-bit resolution.
> 
> This is a simplified version, only one primary plane, one framebuffer
> created for fbdev, one crtc, one connector for TFT LCD panel, an encoder.
> 
> Signed-off-by: Alison Wang 
> Signed-off-by: Xiubo Li 
> Signed-off-by: Jianwei Wang 
> ---
> 
> Changed in V5
> 
> - Update commit message
> - Add layer registers initialization
> - Remove unused functions
> - Rename driver folder
> - Move pixel clock control functions to fsl_dcu_drm_drv.c
> - remove redundant enable the clock implicitly using regmap
> - Add maintainer message
> 
> Changed in V4:
> 
> -This version doesn't have functionality changed  Just a minor adjustment.
> 
> Changed in V3:
> 
> - Test driver on Vybrid board and add compatible string
> - Remove unused functions
> - set default crtc for encoder
> - replace legacy functions with atomic help functions
> - Set the unique name of the DRM device
> - Implement irq handle function for vblank interrupt
> 
> Changed in v2:
> - Add atomic support
> - Modify bindings file
> - Rename node for compatibility
> - Move platform related code out for compatibility
> 
>  .../devicetree/bindings/drm/fsl-dcu/fsl,dcu.txt|  50 +++
>  MAINTAINERS|   8 +
>  drivers/gpu/drm/Kconfig|   2 +
>  drivers/gpu/drm/Makefile   |   1 +
>  drivers/gpu/drm/fsl-dcu/Kconfig|  17 +
>  drivers/gpu/drm/fsl-dcu/Makefile   |   7 +
>  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_connector.c| 194 +++
>  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_connector.h|  30 ++
>  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c | 172 ++
>  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.h |  22 ++
>  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c  | 373
> +
>  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.h  | 223 
>  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_fbdev.c|  26 ++
>  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.c  |  42 +++
>  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.h  |  17 +
>  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c| 192 +++
>  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.h|  23 ++
>  17 files changed, 1399 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/drm/fsl-
> dcu/fsl,dcu.txt
>  create mode 100644 drivers/gpu/drm/fsl-dcu/Kconfig  create mode 100644
> drivers/gpu/drm/fsl-dcu/Makefile  create mode 100644 drivers/gpu/drm/fsl-
> dcu/fsl_dcu_drm_connector.c
>  create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_connector.h
>  create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c
>  create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.h
>  create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c
>  create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.h
>  create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_fbdev.c
>  create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.c
>  create mode 100644 

[PATCH v5 1/3] drm/layerscape: Add Freescale DCU DRM driver

2015-05-29 Thread Wang J.W.
Hi Dave,

Could you help me review this driver? If you don’t have other comments , 
could you help to merge it?

Jianwei

> -Original Message-
> From: Wang Jianwei-B52261
> Sent: Thursday, May 21, 2015 10:47 AM
> To: Wang Jianwei-B52261; airlied at linux.ie; daniel.vetter at intel.com;
> stefan at agner.ch; Wood Scott-B07421; dri-devel at lists.freedesktop.org
> Cc: linux-kernel at vger.kernel.org; linux-arm-kernel at lists.infradead.org;
> Jin Zhengxiong-R64188; Wang Huan-B18965; Xiubo Li
> Subject: RE: [PATCH v5 1/3] drm/layerscape: Add Freescale DCU DRM driver
> 
>  Hi Dave,
> 
> Can you help me review this patch please? Thanks.
> 
> Jianwei
> 
> > -Original Message-
> > From: Wang Jianwei-B52261
> > Sent: Thursday, May 07, 2015 2:29 PM
> > To: Wang Jianwei-B52261; airlied at linux.ie; daniel.vetter at intel.com;
> > stefan at agner.ch; Wood Scott-B07421; dri-devel at lists.freedesktop.org
> > Cc: linux-kernel at vger.kernel.org; linux-arm-kernel at 
> > lists.infradead.org;
> > Jin Zhengxiong-R64188; Wang Huan-B18965; Xiubo Li
> > Subject: RE: [PATCH v5 1/3] drm/layerscape: Add Freescale DCU DRM driver
> >
> > Hi Dave,
> >
> > Can you help me to review this patch? Thanks.
> >
> > Jianwei
> >
> > > -Original Message-
> > > From: Jianwei Wang [mailto:jianwei.wang at freescale.com]
> > > Sent: Friday, April 17, 2015 2:36 PM
> > > To: airlied at linux.ie; daniel.vetter at intel.com; stefan at agner.ch; 
> > > Wood
> > > Scott-B07421; dri-devel at lists.freedesktop.org
> > > Cc: linux-kernel at vger.kernel.org; linux-arm-kernel at 
> > > lists.infradead.org;
> > > Jin Zhengxiong-R64188; Wang Jianwei-B52261; Wang Huan-B18965; Xiubo Li;
> > > Wang Jianwei-B52261
> > > Subject: [PATCH v5 1/3] drm/layerscape: Add Freescale DCU DRM driver
> > >
> > > From: Jianwei Wang 
> > >
> > > This patch add support for Two Dimensional Animation and Compositing
> > > Engine (2D-ACE) on the Freescale SoCs.
> > >
> > > 2D-ACE is a Freescale display controller. 2D-ACE describes the
> > > functionality of the module extremely well its name is a value that
> > cannot
> > > be used as a token in programming languages.
> > > Instead the valid token "DCU" is used to tag the register names and
> > > function names.
> > >
> > > The Display Controller Unit (DCU) module is a system master that
> fetches
> > > graphics stored in internal or external memory and displays them on a
> > TFT
> > > LCD panel. A wide range of panel sizes is supported and the timing of
> > the
> > > interface signals is highly configurable.
> > > Graphics are read directly from memory and then blended in real-time,
> > > which allows for dynamic content creation with minimal CPU
> intervention.
> > >
> > > The features:
> > > (1) Full RGB888 output to TFT LCD panel.
> > > (2) For the current LCD panel, WQVGA "480x272" is supported.
> > > (3) Blending of each pixel using up to 4 source layers dependent on
> size
> > > of panel.
> > > (4) Each graphic layer can be placed with one pixel resolution in
> either
> > > axis.
> > > (5) Each graphic layer support RGB565 and RGB888 direct colors without
> > > alpha channel and BGRA BGRA ARGB1555 direct colors with an
> alpha
> > > channel and YUV422 format.
> > > (6) Each graphic layer support alpha blending with 8-bit resolution.
> > >
> > > This is a simplified version, only one primary plane, one framebuffer
> > > created for fbdev, one crtc, one connector for TFT LCD panel, an
> encoder.
> > >
> > > Signed-off-by: Alison Wang 
> > > Signed-off-by: Xiubo Li 
> > > Signed-off-by: Jianwei Wang 
> > > ---
> > >
> > > Changed in V5
> > >
> > > - Update commit message
> > > - Add layer registers initialization
> > > - Remove unused functions
> > > - Rename driver folder
> > > - Move pixel clock control functions to fsl_dcu_drm_drv.c
> > > - remove redundant enable the clock implicitly using regmap
> > > - Add maintainer message
> > >
> > > Changed in V4:
> > >
> > > -This version doesn't have functionality changed  Just a minor
> > adjustment.
> > >
> > > Changed in V3:
> > >
> > > - Test driver on Vybrid board and add compatible string
> > > - Remove unused functions
> > > - set default crtc for encoder
> > > - replace legacy functions with atomic help functions
> > > - Set the unique name of the DRM device
> > > - Implement irq handle function for vblank interrupt
> > >
> > > Changed in v2:
> > > - Add atomic support
> > > - Modify bindings file
> > > - Rename node for compatibility
> > > - Move platform related code out for compatibility
> > >
> > >  .../devicetree/bindings/drm/fsl-dcu/fsl,dcu.txt|  50 +++
> > >  MAINTAINERS|   8 +
> > >  drivers/gpu/drm/Kconfig|   2 +
> > >  drivers/gpu/drm/Makefile   |   1 +
> > >  drivers/gpu/drm/fsl-dcu/Kconfig|  17 +
> > >  drivers/gpu/drm/fsl-dcu/Makefile   |   7 +
> > >  

[PATCH v5 1/3] drm/layerscape: Add Freescale DCU DRM driver

2015-05-21 Thread Wang J.W.
 Hi Dave,

Can you help me review this patch please? Thanks.

Jianwei

> -Original Message-
> From: Wang Jianwei-B52261
> Sent: Thursday, May 07, 2015 2:29 PM
> To: Wang Jianwei-B52261; airlied at linux.ie; daniel.vetter at intel.com;
> stefan at agner.ch; Wood Scott-B07421; dri-devel at lists.freedesktop.org
> Cc: linux-kernel at vger.kernel.org; linux-arm-kernel at lists.infradead.org;
> Jin Zhengxiong-R64188; Wang Huan-B18965; Xiubo Li
> Subject: RE: [PATCH v5 1/3] drm/layerscape: Add Freescale DCU DRM driver
> 
> Hi Dave,
> 
> Can you help me to review this patch? Thanks.
> 
> Jianwei
> 
> > -Original Message-
> > From: Jianwei Wang [mailto:jianwei.wang at freescale.com]
> > Sent: Friday, April 17, 2015 2:36 PM
> > To: airlied at linux.ie; daniel.vetter at intel.com; stefan at agner.ch; 
> > Wood
> > Scott-B07421; dri-devel at lists.freedesktop.org
> > Cc: linux-kernel at vger.kernel.org; linux-arm-kernel at 
> > lists.infradead.org;
> > Jin Zhengxiong-R64188; Wang Jianwei-B52261; Wang Huan-B18965; Xiubo Li;
> > Wang Jianwei-B52261
> > Subject: [PATCH v5 1/3] drm/layerscape: Add Freescale DCU DRM driver
> >
> > From: Jianwei Wang 
> >
> > This patch add support for Two Dimensional Animation and Compositing
> > Engine (2D-ACE) on the Freescale SoCs.
> >
> > 2D-ACE is a Freescale display controller. 2D-ACE describes the
> > functionality of the module extremely well its name is a value that
> cannot
> > be used as a token in programming languages.
> > Instead the valid token "DCU" is used to tag the register names and
> > function names.
> >
> > The Display Controller Unit (DCU) module is a system master that fetches
> > graphics stored in internal or external memory and displays them on a
> TFT
> > LCD panel. A wide range of panel sizes is supported and the timing of
> the
> > interface signals is highly configurable.
> > Graphics are read directly from memory and then blended in real-time,
> > which allows for dynamic content creation with minimal CPU intervention.
> >
> > The features:
> > (1) Full RGB888 output to TFT LCD panel.
> > (2) For the current LCD panel, WQVGA "480x272" is supported.
> > (3) Blending of each pixel using up to 4 source layers dependent on size
> > of panel.
> > (4) Each graphic layer can be placed with one pixel resolution in either
> > axis.
> > (5) Each graphic layer support RGB565 and RGB888 direct colors without
> > alpha channel and BGRA BGRA ARGB1555 direct colors with an alpha
> > channel and YUV422 format.
> > (6) Each graphic layer support alpha blending with 8-bit resolution.
> >
> > This is a simplified version, only one primary plane, one framebuffer
> > created for fbdev, one crtc, one connector for TFT LCD panel, an encoder.
> >
> > Signed-off-by: Alison Wang 
> > Signed-off-by: Xiubo Li 
> > Signed-off-by: Jianwei Wang 
> > ---
> >
> > Changed in V5
> >
> > - Update commit message
> > - Add layer registers initialization
> > - Remove unused functions
> > - Rename driver folder
> > - Move pixel clock control functions to fsl_dcu_drm_drv.c
> > - remove redundant enable the clock implicitly using regmap
> > - Add maintainer message
> >
> > Changed in V4:
> >
> > -This version doesn't have functionality changed  Just a minor
> adjustment.
> >
> > Changed in V3:
> >
> > - Test driver on Vybrid board and add compatible string
> > - Remove unused functions
> > - set default crtc for encoder
> > - replace legacy functions with atomic help functions
> > - Set the unique name of the DRM device
> > - Implement irq handle function for vblank interrupt
> >
> > Changed in v2:
> > - Add atomic support
> > - Modify bindings file
> > - Rename node for compatibility
> > - Move platform related code out for compatibility
> >
> >  .../devicetree/bindings/drm/fsl-dcu/fsl,dcu.txt|  50 +++
> >  MAINTAINERS|   8 +
> >  drivers/gpu/drm/Kconfig|   2 +
> >  drivers/gpu/drm/Makefile   |   1 +
> >  drivers/gpu/drm/fsl-dcu/Kconfig|  17 +
> >  drivers/gpu/drm/fsl-dcu/Makefile   |   7 +
> >  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_connector.c| 194 +++
> >  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_connector.h|  30 ++
> >  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c | 172 ++
> >  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.h |  22 ++
> >  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c  | 373
> > +
> >  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.h  | 223 
> >  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_fbdev.c|  26 ++
> >  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.c  |  42 +++
> >  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.h  |  17 +
> >  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c| 192 +++
> >  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.h|  23 ++
> >  17 files changed, 1399 insertions(+)
> >  create mode 100644 

[PATCH v5 1/3] drm/layerscape: Add Freescale DCU DRM driver

2015-05-13 Thread Wang J.W.
Hi David,

Can you help me review this patch? Thanks.

Jianwei

> -Original Message-
> From: Jianwei Wang [mailto:jianwei.wang at freescale.com]
> Sent: Friday, April 17, 2015 2:36 PM
> To: airlied at linux.ie; daniel.vetter at intel.com; stefan at agner.ch; Wood
> Scott-B07421; dri-devel at lists.freedesktop.org
> Cc: linux-kernel at vger.kernel.org; linux-arm-kernel at lists.infradead.org;
> Jin Zhengxiong-R64188; Wang Jianwei-B52261; Wang Huan-B18965; Xiubo Li;
> Wang Jianwei-B52261
> Subject: [PATCH v5 1/3] drm/layerscape: Add Freescale DCU DRM driver
> 
> From: Jianwei Wang 
> 
> This patch add support for Two Dimensional Animation and Compositing
> Engine (2D-ACE) on the Freescale SoCs.
> 
> 2D-ACE is a Freescale display controller. 2D-ACE describes the
> functionality of the module extremely well its name is a value that cannot
> be used as a token in programming languages.
> Instead the valid token "DCU" is used to tag the register names and
> function names.
> 
> The Display Controller Unit (DCU) module is a system master that fetches
> graphics stored in internal or external memory and displays them on a TFT
> LCD panel. A wide range of panel sizes is supported and the timing of the
> interface signals is highly configurable.
> Graphics are read directly from memory and then blended in real-time,
> which allows for dynamic content creation with minimal CPU intervention.
> 
> The features:
> (1) Full RGB888 output to TFT LCD panel.
> (2) For the current LCD panel, WQVGA "480x272" is supported.
> (3) Blending of each pixel using up to 4 source layers dependent on size
> of panel.
> (4) Each graphic layer can be placed with one pixel resolution in either
> axis.
> (5) Each graphic layer support RGB565 and RGB888 direct colors without
> alpha channel and BGRA BGRA ARGB1555 direct colors with an alpha
> channel and YUV422 format.
> (6) Each graphic layer support alpha blending with 8-bit resolution.
> 
> This is a simplified version, only one primary plane, one framebuffer
> created for fbdev, one crtc, one connector for TFT LCD panel, an encoder.
> 
> Signed-off-by: Alison Wang 
> Signed-off-by: Xiubo Li 
> Signed-off-by: Jianwei Wang 
> ---
> 
> Changed in V5
> 
> - Update commit message
> - Add layer registers initialization
> - Remove unused functions
> - Rename driver folder
> - Move pixel clock control functions to fsl_dcu_drm_drv.c
> - remove redundant enable the clock implicitly using regmap
> - Add maintainer message
> 
> Changed in V4:
> 
> -This version doesn't have functionality changed  Just a minor adjustment.
> 
> Changed in V3:
> 
> - Test driver on Vybrid board and add compatible string
> - Remove unused functions
> - set default crtc for encoder
> - replace legacy functions with atomic help functions
> - Set the unique name of the DRM device
> - Implement irq handle function for vblank interrupt
> 
> Changed in v2:
> - Add atomic support
> - Modify bindings file
> - Rename node for compatibility
> - Move platform related code out for compatibility
> 
>  .../devicetree/bindings/drm/fsl-dcu/fsl,dcu.txt|  50 +++
>  MAINTAINERS|   8 +
>  drivers/gpu/drm/Kconfig|   2 +
>  drivers/gpu/drm/Makefile   |   1 +
>  drivers/gpu/drm/fsl-dcu/Kconfig|  17 +
>  drivers/gpu/drm/fsl-dcu/Makefile   |   7 +
>  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_connector.c| 194 +++
>  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_connector.h|  30 ++
>  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c | 172 ++
>  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.h |  22 ++
>  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c  | 373
> +
>  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.h  | 223 
>  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_fbdev.c|  26 ++
>  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.c  |  42 +++
>  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.h  |  17 +
>  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c| 192 +++
>  drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.h|  23 ++
>  17 files changed, 1399 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/drm/fsl-
> dcu/fsl,dcu.txt
>  create mode 100644 drivers/gpu/drm/fsl-dcu/Kconfig  create mode 100644
> drivers/gpu/drm/fsl-dcu/Makefile  create mode 100644 drivers/gpu/drm/fsl-
> dcu/fsl_dcu_drm_connector.c
>  create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_connector.h
>  create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c
>  create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.h
>  create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c
>  create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.h
>  create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_fbdev.c
>  create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.c
>  create mode 100644 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_kms.h
>