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

2015-05-07 Thread jianwei.w...@freescale.com
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 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
>  

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

2015-04-15 Thread jianwei.w...@freescale.com
Hi Stefan,

> -Original Message-
> From: Stefan Agner [mailto:stefan at agner.ch]
> Sent: Wednesday, April 08, 2015 3:57 PM
> To: Wang Jianwei-B52261
> Cc: Wood Scott-B07421; airlied at linux.ie; dri-devel at 
> lists.freedesktop.org;
> devicetree at vger.kernel.org; Xiubo Li; Wang Huan-B18965; linux-
> kernel at vger.kernel.org; Jin Zhengxiong-R64188; linux-arm-
> kernel at lists.infradead.org
> Subject: RE: [PATCH v3 1/4] drm/layerscape: Add Freescale DCU DRM driver
> 
> On 2015-04-08 09:17, Jianwei.Wang at freescale.com wrote:
> > Hi Stefan,
> >
> >> -Original Message-
> >> From: Stefan Agner [mailto:stefan at agner.ch]
> >> Sent: Tuesday, April 07, 2015 8:12 PM
> >> To: Wang Jianwei-B52261
> >> Cc: Wood Scott-B07421; airlied at linux.ie; dri-
> devel at lists.freedesktop.org;
> >> devicetree at vger.kernel.org; Xiubo Li; Wang Huan-B18965; linux-
> >> kernel at vger.kernel.org; Jin Zhengxiong-R64188; linux-arm-
> >> kernel at lists.infradead.org
> >> Subject: RE: [PATCH v3 1/4] drm/layerscape: Add Freescale DCU DRM
> driver
> >>
> >> Hi Jianwei,
> >>
> >> On 2015-04-07 08:44, Jianwei.Wang at freescale.com wrote:
> >> > Hi Stefan,
> >> >
> >> > Thank you for your review and testing on Vybrid F610 device. This
> driver
> >> > just implement the basic functions and it only support the exported
> >> > framebuffer access. Some DRM interfaces are not implemented now. So
> your
> >> > test result is normal. I will implement these interfaces with patches
> >> soon
> >> > afterwards. I don't plan to add new features for the initial version
> >> driver,
> >> > otherwise it will be a long term for this version.
> >> >
> >> > I tested on ls1021a using TFT panel, there are no flickers on the
> screen
> >> > when inserting a USB HID device. I will do more test if time permits.
> >> >
> >> > By the way, could please give me some guidance on how X-Server use
> DRM
> >> > Interface directly? Do you have some papers or webpage about this?
> >>
> >> I'm using the modesetting X.org driver. Lots of distributions ship that
> >> driver as a package (e.g. xserver-xorg-video-modesetting in Debian, or
> >> xf86-video-modesetting in OpenEmbedded). Since 1.17 this driver has
> even
> >> been included into the main source tree of Xorg X-Server
> >>
> (http://cgit.freedesktop.org/xorg/xserver/tree/hw/xfree86/drivers/modesett
> >> ing)
> >>
> >> This driver is using KMS/DRM interface and should work well for
> >> un-accelerated graphic devices. This is a a much nicer way to use X.org
> >> on top of a DRM driver, since it avoids going through the legacy fbdev
> >> interface. The man page shows how to use it:
> >> http://linux.die.net/man/4/modesetting
> >>
> >> So, when the driver is installed, it is just choosing that driver in
> >> xorg.conf:
> >>
> >> Section "Device"
> >> Identifier  "dcu"
> >> Driver  "modesetting"
> >> EndSection
> >>
> >
> > Thank you for your guidance.
> >
> >> Some more comments below...
> >>
> >> >
> >> > My reply below...
> >> >
> >> >>
> >> >> Hi Jianwei,
> >> >>
> >> >> The driver worked on a Vybrid VF610 device using the exported
> >> >> framebuffer. However, when using X-Server through the DRM interface
> >> >> directly (by using the modesetting driver) I get just a black screen
> so
> >> >> far, still investigating the reason. What user-space interfaces did
> you
> >> >> test?
> >> >>
> >> >> When using the FB device and insert a USB HID device, I get some
> >> >> flickers on the screen. I didn't had those on the dcufb driver, did
> you
> >> >> notice something like this too? Probably related to the resolution,
> I'm
> >> >> using VGA resolution.
> >> >>
> >> >> Some comments below.
> >> >>
> >> >>
> >> >> On 2015-03-26 06:37, 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.
> >> >>
> >> >> modetest 

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

2015-04-08 Thread jianwei.w...@freescale.com

Hi Stefan,

> -Original Message-
> From: Stefan Agner [mailto:stefan at agner.ch]
> Sent: Tuesday, April 07, 2015 8:12 PM
> To: Wang Jianwei-B52261
> Cc: Wood Scott-B07421; airlied at linux.ie; dri-devel at 
> lists.freedesktop.org;
> devicetree at vger.kernel.org; Xiubo Li; Wang Huan-B18965; linux-
> kernel at vger.kernel.org; Jin Zhengxiong-R64188; linux-arm-
> kernel at lists.infradead.org
> Subject: RE: [PATCH v3 1/4] drm/layerscape: Add Freescale DCU DRM driver
> 
> Hi Jianwei,
> 
> On 2015-04-07 08:44, Jianwei.Wang at freescale.com wrote:
> > Hi Stefan,
> >
> > Thank you for your review and testing on Vybrid F610 device. This driver
> > just implement the basic functions and it only support the exported
> > framebuffer access. Some DRM interfaces are not implemented now. So your
> > test result is normal. I will implement these interfaces with patches
> soon
> > afterwards. I don't plan to add new features for the initial version
> driver,
> > otherwise it will be a long term for this version.
> >
> > I tested on ls1021a using TFT panel, there are no flickers on the screen
> > when inserting a USB HID device. I will do more test if time permits.
> >
> > By the way, could please give me some guidance on how X-Server use DRM
> > Interface directly? Do you have some papers or webpage about this?
> 
> I'm using the modesetting X.org driver. Lots of distributions ship that
> driver as a package (e.g. xserver-xorg-video-modesetting in Debian, or
> xf86-video-modesetting in OpenEmbedded). Since 1.17 this driver has even
> been included into the main source tree of Xorg X-Server
> (http://cgit.freedesktop.org/xorg/xserver/tree/hw/xfree86/drivers/modesett
> ing)
> 
> This driver is using KMS/DRM interface and should work well for
> un-accelerated graphic devices. This is a a much nicer way to use X.org
> on top of a DRM driver, since it avoids going through the legacy fbdev
> interface. The man page shows how to use it:
> http://linux.die.net/man/4/modesetting
> 
> So, when the driver is installed, it is just choosing that driver in
> xorg.conf:
> 
> Section "Device"
> Identifier  "dcu"
> Driver  "modesetting"
> EndSection
> 

Thank you for your guidance.

> Some more comments below...
> 
> >
> > My reply below...
> >
> >>
> >> Hi Jianwei,
> >>
> >> The driver worked on a Vybrid VF610 device using the exported
> >> framebuffer. However, when using X-Server through the DRM interface
> >> directly (by using the modesetting driver) I get just a black screen so
> >> far, still investigating the reason. What user-space interfaces did you
> >> test?
> >>
> >> When using the FB device and insert a USB HID device, I get some
> >> flickers on the screen. I didn't had those on the dcufb driver, did you
> >> notice something like this too? Probably related to the resolution, I'm
> >> using VGA resolution.
> >>
> >> Some comments below.
> >>
> >>
> >> On 2015-03-26 06:37, 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.
> >>
> >> modetest only shows one layer currently...
> >
> > Yes, only one plane and one framebuffer were created now, others
> > maybe create as user requirement or create all when initializing,
> > I'm not sure now. This describe the hardware feature
> >
> >>
> >> > (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 direct colors with an alpha channel.
> >>
> >> The array fsl_dcu_drm_plane_formats below shows more formats, does this
> >> commit log needs updating?
> >>
> >
> > I agree with your suggestion, I will update this commit log
> >
> >> > (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, 

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

2015-04-07 Thread jianwei.w...@freescale.com
Hi Stefan,

Thank you for your review and testing on Vybrid F610 device. This driver 
just implement the basic functions and it only support the exported 
framebuffer access. Some DRM interfaces are not implemented now. So your 
test result is normal. I will implement these interfaces with patches soon 
afterwards. I don't plan to add new features for the initial version driver,
otherwise it will be a long term for this version.

I tested on ls1021a using TFT panel, there are no flickers on the screen
when inserting a USB HID device. I will do more test if time permits.

By the way, could please give me some guidance on how X-Server use DRM 
Interface directly? Do you have some papers or webpage about this?

My reply below...

> 
> Hi Jianwei,
> 
> The driver worked on a Vybrid VF610 device using the exported
> framebuffer. However, when using X-Server through the DRM interface
> directly (by using the modesetting driver) I get just a black screen so
> far, still investigating the reason. What user-space interfaces did you
> test?
> 
> When using the FB device and insert a USB HID device, I get some
> flickers on the screen. I didn't had those on the dcufb driver, did you
> notice something like this too? Probably related to the resolution, I'm
> using VGA resolution.
> 
> Some comments below.
> 
> 
> On 2015-03-26 06:37, 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.
> 
> modetest only shows one layer currently...

Yes, only one plane and one framebuffer were created now, others
maybe create as user requirement or create all when initializing,
I'm not sure now. This describe the hardware feature

> 
> > (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 direct colors with an alpha channel.
> 
> The array fsl_dcu_drm_plane_formats below shows more formats, does this
> commit log needs updating?
> 

I agree with your suggestion, I will update this commit log

> > (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 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/fsl,dcu.txt|  50 
> >  drivers/gpu/drm/Kconfig|   2 +
> >  drivers/gpu/drm/Makefile   |   1 +
> >  drivers/gpu/drm/fsl/Kconfig|  17 ++
> >  drivers/gpu/drm/fsl/Makefile   |   8 +
> >  drivers/gpu/drm/fsl/fsl_dcu_drm_connector.c| 193 
> >  drivers/gpu/drm/fsl/fsl_dcu_drm_connector.h|  30 ++
> >  drivers/gpu/drm/fsl/fsl_dcu_drm_crtc.c | 165 ++
> >  drivers/gpu/drm/fsl/fsl_dcu_drm_crtc.h |  26 ++
> >  drivers/gpu/drm/fsl/fsl_dcu_drm_drv.c  | 331
> +
> >  drivers/gpu/drm/fsl/fsl_dcu_drm_drv.h  | 210 +
> >  drivers/gpu/drm/fsl/fsl_dcu_drm_fbdev.c|  26 ++
> >  drivers/gpu/drm/fsl/fsl_dcu_drm_kms.c  |  42 +++
> >  drivers/gpu/drm/fsl/fsl_dcu_drm_kms.h  |  17 ++
> >  drivers/gpu/drm/fsl/fsl_dcu_drm_plane.c| 192 
> >  drivers/gpu/drm/fsl/fsl_dcu_drm_plane.h|  23 ++

[PATCH 1/3] drm/layerscape: Add fsl dcu DRM driver

2015-03-26 Thread jianwei.w...@freescale.com
Hi Stefan,

I have tested recently, this driver also works on Vybrid twr board. I
send V3 patches just now, Please help test it on Vybrid board if necessary.

Regards,

Jianwei

> -Original Message-
> From: Stefan Agner [mailto:stefan at agner.ch]
> Sent: Wednesday, March 04, 2015 11:04 PM
> To: Wang Jianwei-B52261
> Cc: dri-devel at lists.freedesktop.org; jbarnes at virtuousgeek.org; Wood 
> Scott-
> B07421; Xiubo Li; Wang Huan-B18965; linux-kernel at vger.kernel.org; linux-
> arm-kernel at lists.infradead.org
> Subject: Re: [PATCH 1/3] drm/layerscape: Add fsl dcu DRM driver
> 
> On 2015-02-13 12:03, Jianwei Wang wrote:
> > This patch add support for Two Dimensional Animation and Compositing
> > Engine (2D-ACE) on the Freescale LS102x SoCs.
> >
> > 2D-ACE is a Freescale display controller. It supports at most four
> > plane and provide an hardware cursor.
> >
> > This is a simplified version, only a primary plane, a fb created for
> > fbdev, a crtc, a connector for TFT LCD panel, an encoder, and the
> > encoder is not in use. Now this drver support fbdev only.
> 
> Hi,
> 
> Do you know if that driver also works on Vybrid devices? Vybrid has also
> DCU4 module with 2D-ACE functionality, also the registers look pretty
> similar. I was thinking about creating a driver for Vybrid anyway...
> 
> Some remarks below...
> 
> 
> >
> > Signed-off-by: Alison Wang 
> > Signed-off-by: Xiubo Li 
> > Signed-off-by: Jianwei Wang 
> > ---
> >  .../devicetree/bindings/video/fsl,dcfb.txt |  50 +++
> >  drivers/gpu/drm/Kconfig|   2 +
> >  drivers/gpu/drm/Makefile   |   1 +
> >  drivers/gpu/drm/fsl/Kconfig|  17 +
> >  drivers/gpu/drm/fsl/Makefile   |   7 +
> >  drivers/gpu/drm/fsl/fsl_dcu_drm_crtc.c | 412
> +
> >  drivers/gpu/drm/fsl/fsl_dcu_drm_crtc.h |  40 ++
> >  drivers/gpu/drm/fsl/fsl_dcu_drm_drv.c  | 323
> 
> >  drivers/gpu/drm/fsl/fsl_dcu_drm_drv.h  | 167 +
> >  drivers/gpu/drm/fsl/fsl_dcu_drm_fbdev.c|  43 +++
> >  drivers/gpu/drm/fsl/fsl_dcu_drm_kms.c  |  45 +++
> >  drivers/gpu/drm/fsl/fsl_dcu_drm_kms.h  |  22 ++
> >  drivers/gpu/drm/fsl/fsl_dcu_drm_plane.c| 124 +++
> >  drivers/gpu/drm/fsl/fsl_dcu_drm_plane.h|  28 ++
> >  14 files changed, 1281 insertions(+)
> >  create mode 100644
> > Documentation/devicetree/bindings/video/fsl,dcfb.txt
> >  create mode 100644 drivers/gpu/drm/fsl/Kconfig  create mode 100644
> > drivers/gpu/drm/fsl/Makefile  create mode 100644
> > drivers/gpu/drm/fsl/fsl_dcu_drm_crtc.c
> >  create mode 100644 drivers/gpu/drm/fsl/fsl_dcu_drm_crtc.h
> >  create mode 100644 drivers/gpu/drm/fsl/fsl_dcu_drm_drv.c
> >  create mode 100644 drivers/gpu/drm/fsl/fsl_dcu_drm_drv.h
> >  create mode 100644 drivers/gpu/drm/fsl/fsl_dcu_drm_fbdev.c
> >  create mode 100644 drivers/gpu/drm/fsl/fsl_dcu_drm_kms.c
> >  create mode 100644 drivers/gpu/drm/fsl/fsl_dcu_drm_kms.h
> >  create mode 100644 drivers/gpu/drm/fsl/fsl_dcu_drm_plane.c
> >  create mode 100644 drivers/gpu/drm/fsl/fsl_dcu_drm_plane.h
> >
> > diff --git a/Documentation/devicetree/bindings/video/fsl,dcfb.txt
> > b/Documentation/devicetree/bindings/video/fsl,dcfb.txt
> > new file mode 100644
> > index 000..de7da97
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/video/fsl,dcfb.txt
> > @@ -0,0 +1,50 @@
> > +* Freescale Simple Display Controller FB Driver
> 
> "FB Driver" probably refers more to a fbdev driver in the Linux kernel
> sense, but since this is a DRM driver this is somewhat confusing. The
> binding should describe the hardware, in the Vybrid RM mentions the IP as
> "Display Control Unit (DCU4)", so maybe
> 
> Freescale Display Controller Unit (DCU4) module
> 
> Also, instead of using dcfb, I would use somewhat more hardware describing,
> e.g. dcu4?
> 
> > +
> > +Required properties:
> > +- compatible:  Should be one of "fsl,ls1021a-dcfb".
> 
> If the driver also works for Vybrid, be favorable to have a generic
> compatible string, e.g. fsl,dcu4?
> 
> > +- reg: Address and length of the register set for dcfb.
> > +- clocks:  From common clock binding: handle to dcfb clock.
> > +- clock-names: From common clock binding: Shall be "dcfb".
> > +- display: The phandle to display node.
> > +
> > +Optional properties:
> > +- scfg-controller: The phandle of scfg node.
> > +
> > +Required properties:
> > +- bits-per-pixel:  <16> for RGB565,
> > +   <24> for RGB888,
> > +   <32> for RGB.
> > +
> > +Required timing node for dispplay sub-node:
> > +- display-timings: Refer to binding doc display-timing.txt for
> details.
> > +
> > +Examples:
> > +dcfb: dcfb at 2ce {
> > +   compatible = "fsl,ls1021a-dcfb";
> > +   reg = <0x0 0x2ce 0x0 0x1>;
> > +   clocks = <_clk 0>;
> > +  

[PATCH 1/3] drm/layerscape: Add fsl dcu DRM driver

2015-03-19 Thread jianwei.w...@freescale.com
Hi Stefan,

Thank you for your comment. I'll correct this next time.


> -Original Message-
> From: Stefan Agner [mailto:stefan at agner.ch]
> Sent: Thursday, March 19, 2015 6:58 AM
> To: Wang Jianwei-B52261
> Cc: Wood Scott-B07421; airlied at linux.ie; jbarnes at virtuousgeek.org; dri-
> devel at lists.freedesktop.org; Xiubo Li; Wang Huan-B18965; linux-
> kernel at vger.kernel.org; Jin Zhengxiong-R64188; linux-arm-
> kernel at lists.infradead.org
> Subject: Re: [PATCH 1/3] drm/layerscape: Add fsl dcu DRM driver
> 
> Hi Jianwei,
> 
> Normally, for the second and higher iteration of a patchset, developers
> add the version to the subject (e.g. PATCH v2). You can use the --reroll-
> count option when creating the patches with git format-patch.
> 
> On 2015-03-13 10:44, Jianwei Wang wrote:
> > This patch add support for Two Dimensional Animation and Compositing
> > Engine (2D-ACE) on Freescale SoCs.
> >
> > 2D-ACE is a Freescale display controller. It provide an hardware
> > cursor.
> >
> > This is a simplified version, only a primary plane, a fb created for
> > fbdev, a crtc, a connector for TFT LCD panel, an encoder, and the
> > encoder is not in use.
> >
> > Signed-off-by: Alison Wang 
> > Signed-off-by: Xiubo Li 
> > Signed-off-by: Jianwei Wang 
> > ---
> >
> > Changed in v2:
> > - Add atomic support
> > - Modify bindings file
> > - Rename node for compatibility
> > - Move platform related code out for compatibility
> >
> > Added in v1:
> > - Add support for DCU display controller on the Freescale LS102x SoCs.
> > - Create a primary plane, a fb created for fbdev, a crtc, a connector
> > for TFT LCD panel, an encoder.
> >
> >  arch/arm/mach-imx/mach-ls1021a.c|  36 
> >  drivers/gpu/drm/Kconfig |   2 +
> >  drivers/gpu/drm/Makefile|   1 +
> >  drivers/gpu/drm/fsl/Kconfig |  17 ++
> >  drivers/gpu/drm/fsl/Makefile|   8 +
> >  drivers/gpu/drm/fsl/fsl_dcu_drm_connector.c | 203
> >   drivers/gpu/drm/fsl/fsl_dcu_drm_connector.h |  28
> +++
> >  drivers/gpu/drm/fsl/fsl_dcu_drm_crtc.c  | 164 
> >  drivers/gpu/drm/fsl/fsl_dcu_drm_crtc.h  |  26 +++
> >  drivers/gpu/drm/fsl/fsl_dcu_drm_drv.c   | 288
> 
> >  drivers/gpu/drm/fsl/fsl_dcu_drm_drv.h   | 168 
> >  drivers/gpu/drm/fsl/fsl_dcu_drm_fbdev.c |  26 +++
> >  drivers/gpu/drm/fsl/fsl_dcu_drm_kms.c   |  42 
> >  drivers/gpu/drm/fsl/fsl_dcu_drm_kms.h   |  17 ++
> >  drivers/gpu/drm/fsl/fsl_dcu_drm_plane.c | 187 ++
> >  drivers/gpu/drm/fsl/fsl_dcu_drm_plane.h |  23 +++
> >  include/linux/fsl/dcu.h |  22 +++
> >  17 files changed, 1258 insertions(+)
> >  create mode 100644 drivers/gpu/drm/fsl/Kconfig  create mode 100644
> > drivers/gpu/drm/fsl/Makefile  create mode 100644
> > drivers/gpu/drm/fsl/fsl_dcu_drm_connector.c
> >  create mode 100644 drivers/gpu/drm/fsl/fsl_dcu_drm_connector.h
> >  create mode 100644 drivers/gpu/drm/fsl/fsl_dcu_drm_crtc.c
> >  create mode 100644 drivers/gpu/drm/fsl/fsl_dcu_drm_crtc.h
> >  create mode 100644 drivers/gpu/drm/fsl/fsl_dcu_drm_drv.c
> >  create mode 100644 drivers/gpu/drm/fsl/fsl_dcu_drm_drv.h
> >  create mode 100644 drivers/gpu/drm/fsl/fsl_dcu_drm_fbdev.c
> >  create mode 100644 drivers/gpu/drm/fsl/fsl_dcu_drm_kms.c
> >  create mode 100644 drivers/gpu/drm/fsl/fsl_dcu_drm_kms.h
> >  create mode 100644 drivers/gpu/drm/fsl/fsl_dcu_drm_plane.c
> >  create mode 100644 drivers/gpu/drm/fsl/fsl_dcu_drm_plane.h
> >  create mode 100644 include/linux/fsl/dcu.h
> >
> > diff --git a/arch/arm/mach-imx/mach-ls1021a.c
> > b/arch/arm/mach-imx/mach-ls1021a.c
> > index b89c858..4fb346d 100644
> > --- a/arch/arm/mach-imx/mach-ls1021a.c
> > +++ b/arch/arm/mach-imx/mach-ls1021a.c
> > @@ -8,9 +8,44 @@
> >   */
> >
> >  #include 
> > +#include 
> > +#include 
> > +#include 
> > +#include 
> >
> >  #include "common.h"
> >
> > +void dcu_pixclk_disable(void)
> > +{
> > +   struct regmap *scfg_regmap;
> > +
> > +   scfg_regmap = syscon_regmap_lookup_by_compatible("fsl,ls1021a-scfg");
> > +   if (IS_ERR(scfg_regmap)) {
> > +   pr_err("No syscfg phandle specified\n");
> > +   return;
> > +   }
> > +
> > +   regmap_write(scfg_regmap, SCFG_PIXCLKCR, PXCK_DISABLE); }
> > +
> > +void dcu_pixclk_enable(void)
> > +{
> > +   struct regmap *scfg_regmap;
> > +
> > +   scfg_regmap = syscon_regmap_lookup_by_compatible("fsl,ls1021a-scfg");
> > +   if (IS_ERR(scfg_regmap)) {
> > +   pr_err("No syscfg phandle specified\n");
> > +   return;
> > +   }
> > +
> > +   regmap_write(scfg_regmap, SCFG_PIXCLKCR, PXCK_ENABLE); }
> > +
> > +static void __init ls1021a_init_machine(void) {
> > +   of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
> > +   dcu_pixclk_enable();
> > +}
> 
> This change should be in a separate patch. However, I'm not convinced that
> the current code is the 

[PATCH 1/3] drm/layerscape: Add fsl dcu DRM driver

2015-03-06 Thread jianwei.w...@freescale.com


> -Original Message-
> From: Stefan Agner [mailto:stefan at agner.ch]
> Sent: Wednesday, March 04, 2015 11:04 PM
> To: Wang Jianwei-B52261
> Cc: dri-devel at lists.freedesktop.org; jbarnes at virtuousgeek.org; Wood
> Scott-B07421; Xiubo Li; Wang Huan-B18965; linux-kernel at vger.kernel.org;
> linux-arm-kernel at lists.infradead.org
> Subject: Re: [PATCH 1/3] drm/layerscape: Add fsl dcu DRM driver
> 
> On 2015-02-13 12:03, Jianwei Wang wrote:
> > This patch add support for Two Dimensional Animation and Compositing
> > Engine (2D-ACE) on the Freescale LS102x SoCs.
> >
> > 2D-ACE is a Freescale display controller. It supports at most four
> > plane and provide an hardware cursor.
> >
> > This is a simplified version, only a primary plane, a fb created for
> > fbdev, a crtc, a connector for TFT LCD panel, an encoder, and the
> > encoder is not in use. Now this drver support fbdev only.
> 
> Hi,
> 
> Do you know if that driver also works on Vybrid devices? Vybrid has also
> DCU4 module with 2D-ACE functionality, also the registers look pretty
> similar. I was thinking about creating a driver for Vybrid anyway...
> 
> Some remarks below...
> 

Hi,

As you say the display IP module on ls1021a and Vybrid device are all 2D-ACE, 
so I think this driver also works on Vybrid devices. I'd like to do something
for the compatibility.

> "FB Driver" probably refers more to a fbdev driver in the Linux kernel
> sense, but since this is a DRM driver this is somewhat confusing. The
> binding should describe the hardware, in the Vybrid RM mentions the IP as
> "Display Control Unit (DCU4)", so maybe
> 
> Freescale Display Controller Unit (DCU4) module
> 
> Also, instead of using dcfb, I would use somewhat more hardware
> describing, e.g. dcu4?
> 
> > +
> > +Required properties:
> > +- compatible:  Should be one of "fsl,ls1021a-dcfb".
> 
> If the driver also works for Vybrid, be favorable to have a generic
> compatible string, e.g. fsl,dcu4?

Thank you for your comments, I'll modify it.

> > +   regmap_write(fsl_dev->scfg_regmap, 0x28, 0x8000);
> 
> What does this actually do? I don't think this exists in Vybrid, but I
> guess we could easily make the property optional which would then not
> call this function...
> 
> --
> Stefan

This is a platform related register. I would move it to platform related
file (arch/arm/mach-imx/mach-ls1021a.c).

Regards,
Jianwei

> 
> >
> > Signed-off-by: Alison Wang 
> > Signed-off-by: Xiubo Li 
> > Signed-off-by: Jianwei Wang 
> > ---
> >  .../devicetree/bindings/video/fsl,dcfb.txt |  50 +++
> >  drivers/gpu/drm/Kconfig|   2 +
> >  drivers/gpu/drm/Makefile   |   1 +
> >  drivers/gpu/drm/fsl/Kconfig|  17 +
> >  drivers/gpu/drm/fsl/Makefile   |   7 +
> >  drivers/gpu/drm/fsl/fsl_dcu_drm_crtc.c | 412
> +
> >  drivers/gpu/drm/fsl/fsl_dcu_drm_crtc.h |  40 ++
> >  drivers/gpu/drm/fsl/fsl_dcu_drm_drv.c  | 323
> 
> >  drivers/gpu/drm/fsl/fsl_dcu_drm_drv.h  | 167 +
> >  drivers/gpu/drm/fsl/fsl_dcu_drm_fbdev.c|  43 +++
> >  drivers/gpu/drm/fsl/fsl_dcu_drm_kms.c  |  45 +++
> >  drivers/gpu/drm/fsl/fsl_dcu_drm_kms.h  |  22 ++
> >  drivers/gpu/drm/fsl/fsl_dcu_drm_plane.c| 124 +++
> >  drivers/gpu/drm/fsl/fsl_dcu_drm_plane.h|  28 ++
> >  14 files changed, 1281 insertions(+)
> >  create mode 100644
> > Documentation/devicetree/bindings/video/fsl,dcfb.txt
> >  create mode 100644 drivers/gpu/drm/fsl/Kconfig  create mode 100644
> > drivers/gpu/drm/fsl/Makefile  create mode 100644
> > drivers/gpu/drm/fsl/fsl_dcu_drm_crtc.c
> >  create mode 100644 drivers/gpu/drm/fsl/fsl_dcu_drm_crtc.h
> >  create mode 100644 drivers/gpu/drm/fsl/fsl_dcu_drm_drv.c
> >  create mode 100644 drivers/gpu/drm/fsl/fsl_dcu_drm_drv.h
> >  create mode 100644 drivers/gpu/drm/fsl/fsl_dcu_drm_fbdev.c
> >  create mode 100644 drivers/gpu/drm/fsl/fsl_dcu_drm_kms.c
> >  create mode 100644 drivers/gpu/drm/fsl/fsl_dcu_drm_kms.h
> >  create mode 100644 drivers/gpu/drm/fsl/fsl_dcu_drm_plane.c
> >  create mode 100644 drivers/gpu/drm/fsl/fsl_dcu_drm_plane.h
> >
> > diff --git a/Documentation/devicetree/bindings/video/fsl,dcfb.txt
> > b/Documentation/devicetree/bindings/video/fsl,dcfb.txt
> > new file mode 100644
> > index 000..de7da97
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/video/fsl,dcfb.txt
> > @@ -0,0 +1,50 @@
> > +* Freescale Simple Display Controller FB Driver
> 
> "FB Driver" probably refers more to a fbdev driver in the Linux kernel
> sense, but since this is a DRM driver this is somewhat confusing. The
> binding should describe the hardware, in the Vybrid RM mentions the IP as
> "Display Control Unit (DCU4)", so maybe
> 
> Freescale Display Controller Unit (DCU4) module
> 
> Also, instead of using dcfb, I would use somewhat more hardware
> 

[PATCH 1/3] drm/layerscape: Add fsl dcu DRM driver

2015-03-04 Thread jianwei.w...@freescale.com
> -Original Message-
> From: Daniel Vetter [mailto:daniel.vetter at ffwll.ch] On Behalf Of Daniel
> Vetter
> Sent: Tuesday, March 03, 2015 6:54 PM
> To: Wang Jianwei-B52261
> Cc: Daniel Vetter; dri-devel at lists.freedesktop.org;
> jbarnes at virtuousgeek.org; Wood Scott-B07421; Xiubo Li; Wang Huan-B18965;
> linux-kernel at vger.kernel.org; linux-arm-kernel at lists.infradead.org
> Subject: Re: [PATCH 1/3] drm/layerscape: Add fsl dcu DRM driver
> 
> On Tue, Mar 03, 2015 at 10:06:57AM +, Jianwei.Wang at freescale.com
> wrote:
> > > -Original Message-
> > > From: Daniel Vetter [mailto:daniel.vetter at ffwll.ch] On Behalf Of
> Daniel
> > > Vetter
> > > Sent: Sunday, February 22, 2015 7:35 PM
> > > To: Wang Jianwei-B52261
> > > Cc: dri-devel at lists.freedesktop.org; jbarnes at virtuousgeek.org; Wood
> > > Scott-B07421; Xiubo Li; Wang Huan-B18965; linux-
> kernel at vger.kernel.org;
> > > linux-arm-kernel at lists.infradead.org
> > > Subject: Re: [PATCH 1/3] drm/layerscape: Add fsl dcu DRM driver
> > >
> > > On Fri, Feb 13, 2015 at 07:03:54PM +0800, Jianwei Wang wrote:
> > > > This patch add support for Two Dimensional Animation and
> Compositing
> > > > Engine (2D-ACE) on the Freescale LS102x SoCs.
> > > >
> > > > 2D-ACE is a Freescale display controller. It supports at most four
> > > > plane and provide an hardware cursor.
> > > >
> > > > This is a simplified version, only a primary plane, a fb created
> for
> > > > fbdev, a crtc, a connector for TFT LCD panel, an encoder, and the
> > > > encoder is not in use. Now this drver support fbdev only.
> > > >
> > > > Signed-off-by: Alison Wang 
> > > > Signed-off-by: Xiubo Li 
> > > > Signed-off-by: Jianwei Wang 
> > >
> > > Imo adding a new driver without primary plane support (use
> > > drm_crtc_init_with_planes) and without atomic support doesn't make
> sense
> > > any more.
> > >
> > > Also, what do you mean with "support fbdev only"?
> > > -Daniel
> > >
> >
> > Daniel,
> >
> > This driver has supported primary plane (use drm_crtc_init_with_planes)
> > Already.
> > If atomic support is a must? 2D-ACE is a simple display Controller and
> > this is a simplified version. If atomic support is not a must, I want
> to add
> > it with patches, is it ok?
> 
> atomic is the new way the drm display subsystem works, not supporting it
> in new drivers makes this transition even longer. Since I guess if you
> don't want to do the conversion now no one else will do it anytime later,
> and then we're stuck with this driver as-is. On top of that atomic should
> simplify testing for your driver a lot (since a few things are take care
> of for you in the generic atomic code).
> -Daniel
> 

Okey! I'll add atomic support in this driver.

Regards,
Wang Jianwei

> >
> > " Now this drver support fbdev only." if this sentence confuses you,
> > I'd like remove it. In fact I mean that this driver only create a
> framebuffer
> > dev (use drm_fbdev_cma_init).
> >
> > Thanks
> > Regards,
> > Wang Jianwei
> >
> > > > ---
> > > >  .../devicetree/bindings/video/fsl,dcfb.txt |  50 +++
> > > >  drivers/gpu/drm/Kconfig|   2 +
> > > >  drivers/gpu/drm/Makefile   |   1 +
> > > >  drivers/gpu/drm/fsl/Kconfig|  17 +
> > > >  drivers/gpu/drm/fsl/Makefile   |   7 +
> > > >  drivers/gpu/drm/fsl/fsl_dcu_drm_crtc.c | 412
> > > +
> > > >  drivers/gpu/drm/fsl/fsl_dcu_drm_crtc.h |  40 ++
> > > >  drivers/gpu/drm/fsl/fsl_dcu_drm_drv.c  | 323
> > > 
> > > >  drivers/gpu/drm/fsl/fsl_dcu_drm_drv.h  | 167 +
> > > >  drivers/gpu/drm/fsl/fsl_dcu_drm_fbdev.c|  43 +++
> > > >  drivers/gpu/drm/fsl/fsl_dcu_drm_kms.c  |  45 +++
> > > >  drivers/gpu/drm/fsl/fsl_dcu_drm_kms.h  |  22 ++
> > > >  drivers/gpu/drm/fsl/fsl_dcu_drm_plane.c| 124 +++
> > > >  drivers/gpu/drm/fsl/fsl_dcu_drm_plane.h|  28 ++
> > > >  14 files changed, 1281 insertions(+)
> > > >  create mode 100644
> > > > Documentation/devicetree/bindings/video/fsl,dcfb.txt
> > > >  create mode 100644 drivers/gpu/drm/fsl/Kconfig  create mode 100644
> > > > drivers/gpu/drm/fsl/Makefile  create mode 100644
> > > > drivers/gpu/drm/fsl/fsl_dcu_drm_crtc.c
> > > >  create mode 100644 drivers/gpu/drm/fsl/fsl_dcu_drm_crtc.h
> > > >  create mode 100644 drivers/gpu/drm/fsl/fsl_dcu_drm_drv.c
> > > >  create mode 100644 drivers/gpu/drm/fsl/fsl_dcu_drm_drv.h
> > > >  create mode 100644 drivers/gpu/drm/fsl/fsl_dcu_drm_fbdev.c
> > > >  create mode 100644 drivers/gpu/drm/fsl/fsl_dcu_drm_kms.c
> > > >  create mode 100644 drivers/gpu/drm/fsl/fsl_dcu_drm_kms.h
> > > >  create mode 100644 drivers/gpu/drm/fsl/fsl_dcu_drm_plane.c
> > > >  create mode 100644 drivers/gpu/drm/fsl/fsl_dcu_drm_plane.h
> > > >
> > > > diff --git a/Documentation/devicetree/bindings/video/fsl,dcfb.txt
> > > > 

[PATCH 1/3] drm/layerscape: Add fsl dcu DRM driver

2015-03-03 Thread jianwei.w...@freescale.com
> -Original Message-
> From: Daniel Vetter [mailto:daniel.vetter at ffwll.ch] On Behalf Of Daniel
> Vetter
> Sent: Sunday, February 22, 2015 7:35 PM
> To: Wang Jianwei-B52261
> Cc: dri-devel at lists.freedesktop.org; jbarnes at virtuousgeek.org; Wood
> Scott-B07421; Xiubo Li; Wang Huan-B18965; linux-kernel at vger.kernel.org;
> linux-arm-kernel at lists.infradead.org
> Subject: Re: [PATCH 1/3] drm/layerscape: Add fsl dcu DRM driver
> 
> On Fri, Feb 13, 2015 at 07:03:54PM +0800, Jianwei Wang wrote:
> > This patch add support for Two Dimensional Animation and Compositing
> > Engine (2D-ACE) on the Freescale LS102x SoCs.
> >
> > 2D-ACE is a Freescale display controller. It supports at most four
> > plane and provide an hardware cursor.
> >
> > This is a simplified version, only a primary plane, a fb created for
> > fbdev, a crtc, a connector for TFT LCD panel, an encoder, and the
> > encoder is not in use. Now this drver support fbdev only.
> >
> > Signed-off-by: Alison Wang 
> > Signed-off-by: Xiubo Li 
> > Signed-off-by: Jianwei Wang 
> 
> Imo adding a new driver without primary plane support (use
> drm_crtc_init_with_planes) and without atomic support doesn't make sense
> any more.
> 
> Also, what do you mean with "support fbdev only"?
> -Daniel
> 

Daniel,

This driver has supported primary plane (use drm_crtc_init_with_planes) 
Already. 
If atomic support is a must? 2D-ACE is a simple display Controller and
this is a simplified version. If atomic support is not a must, I want to add 
it with patches, is it ok?

" Now this drver support fbdev only." if this sentence confuses you,
I'd like remove it. In fact I mean that this driver only create a framebuffer
dev (use drm_fbdev_cma_init).

Thanks
Regards,
Wang Jianwei

> > ---
> >  .../devicetree/bindings/video/fsl,dcfb.txt |  50 +++
> >  drivers/gpu/drm/Kconfig|   2 +
> >  drivers/gpu/drm/Makefile   |   1 +
> >  drivers/gpu/drm/fsl/Kconfig|  17 +
> >  drivers/gpu/drm/fsl/Makefile   |   7 +
> >  drivers/gpu/drm/fsl/fsl_dcu_drm_crtc.c | 412
> +
> >  drivers/gpu/drm/fsl/fsl_dcu_drm_crtc.h |  40 ++
> >  drivers/gpu/drm/fsl/fsl_dcu_drm_drv.c  | 323
> 
> >  drivers/gpu/drm/fsl/fsl_dcu_drm_drv.h  | 167 +
> >  drivers/gpu/drm/fsl/fsl_dcu_drm_fbdev.c|  43 +++
> >  drivers/gpu/drm/fsl/fsl_dcu_drm_kms.c  |  45 +++
> >  drivers/gpu/drm/fsl/fsl_dcu_drm_kms.h  |  22 ++
> >  drivers/gpu/drm/fsl/fsl_dcu_drm_plane.c| 124 +++
> >  drivers/gpu/drm/fsl/fsl_dcu_drm_plane.h|  28 ++
> >  14 files changed, 1281 insertions(+)
> >  create mode 100644
> > Documentation/devicetree/bindings/video/fsl,dcfb.txt
> >  create mode 100644 drivers/gpu/drm/fsl/Kconfig  create mode 100644
> > drivers/gpu/drm/fsl/Makefile  create mode 100644
> > drivers/gpu/drm/fsl/fsl_dcu_drm_crtc.c
> >  create mode 100644 drivers/gpu/drm/fsl/fsl_dcu_drm_crtc.h
> >  create mode 100644 drivers/gpu/drm/fsl/fsl_dcu_drm_drv.c
> >  create mode 100644 drivers/gpu/drm/fsl/fsl_dcu_drm_drv.h
> >  create mode 100644 drivers/gpu/drm/fsl/fsl_dcu_drm_fbdev.c
> >  create mode 100644 drivers/gpu/drm/fsl/fsl_dcu_drm_kms.c
> >  create mode 100644 drivers/gpu/drm/fsl/fsl_dcu_drm_kms.h
> >  create mode 100644 drivers/gpu/drm/fsl/fsl_dcu_drm_plane.c
> >  create mode 100644 drivers/gpu/drm/fsl/fsl_dcu_drm_plane.h
> >
> > diff --git a/Documentation/devicetree/bindings/video/fsl,dcfb.txt
> > b/Documentation/devicetree/bindings/video/fsl,dcfb.txt
> > new file mode 100644
> > index 000..de7da97
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/video/fsl,dcfb.txt
> > @@ -0,0 +1,50 @@
> > +* Freescale Simple Display Controller FB Driver
> > +
> > +Required properties:
> > +- compatible:  Should be one of "fsl,ls1021a-dcfb".
> > +- reg: Address and length of the register set for dcfb.
> > +- clocks:  From common clock binding: handle to dcfb clock.
> > +- clock-names: From common clock binding: Shall be "dcfb".
> > +- display: The phandle to display node.
> > +
> > +Optional properties:
> > +- scfg-controller: The phandle of scfg node.
> > +
> > +Required properties:
> > +- bits-per-pixel:  <16> for RGB565,
> > +   <24> for RGB888,
> > +   <32> for RGB.
> > +
> > +Required timing node for dispplay sub-node:
> > +- display-timings: Refer to binding doc display-timing.txt for
> details.
> > +
> > +Examples:
> > +dcfb: dcfb at 2ce {
> > +   compatible = "fsl,ls1021a-dcfb";
> > +   reg = <0x0 0x2ce 0x0 0x1>;
> > +   clocks = <_clk 0>;
> > +   clock-names = "dcfb";
> > +   scfg-controller = <>;
> > +   display = <>;
> > +
> > +   display: display at 0 {
> > +   bits-per-pixel = <24>;
> > +
> > +   display-timings {
> > +   

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

2015-02-15 Thread jianwei.w...@freescale.com
My careless, I'll add "big―endia" to fsl,dcfb.txt next version.

发件人: Wood Scott-B07421
发送时间: 2015年2月14日 1:28:08
收件人: Wang Jianwei-B52261
抄送: dri-devel at lists.freedesktop.org; jbarnes at virtuousgeek.org; 
linux-kernel at vger.kernel.org; linux-arm-kernel at lists.infradead.org; Wang 
Huan-B18965; Xiubo Li
主题: Re: [PATCH 2/3] arm/dts/ls1021a: Add DCU dts node

On Fri, 2015-02-13 at 19:03 +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 
> ---
>  arch/arm/boot/dts/ls1021a.dtsi | 11 +++
>  1 file changed, 11 insertions(+)
>
> diff --git a/arch/arm/boot/dts/ls1021a.dtsi b/arch/arm/boot/dts/ls1021a.dtsi
> index c70bb27..28c37f1 100644
> --- a/arch/arm/boot/dts/ls1021a.dtsi
> +++ b/arch/arm/boot/dts/ls1021a.dtsi
> @@ -383,6 +383,17 @@
><_clk 1>;
>   };
>
> + dcfb: dcfb at 2ce {
> + compatible = "fsl,ls1021a-dcfb";
> + reg = <0x0 0x2ce 0x0 0x1>;
> + interrupts = ;
> + clocks = <_clk 0>;
> + clock-names = "dcfb";
> + scfg-controller = <>;
> + big-endian;
> + status = "disabled";
> + };

I don't see "big-endian" in the dcfb binding.

-Scott