devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 00/13] R-Car VSP improvements for v4.7 - Round 2
@ 2016-04-25 21:36 Laurent Pinchart
  2016-04-25 21:36 ` [PATCH v2 01/13] dt-bindings: Add Renesas R-Car FCP DT bindings Laurent Pinchart
  0 siblings, 1 reply; 8+ messages in thread
From: Laurent Pinchart @ 2016-04-25 21:36 UTC (permalink / raw)
  To: linux-media; +Cc: linux-renesas-soc, devicetree, dri-devel, Dave Airlie

Hello,

This patch series is the second version of the second (and most probably last)
round of vsp1 driver improvements for v4.7. In particular, it enables runtime
PM support (03/13 and 04/13), adds support for the FCP (01/13, 02/13 and
05/13), prepare for HGO (histogram) support (06/13 to 09/13) and update the
API towards the DRM driver (10/13 to 13/13).

The FCP is a companion module of video processing modules in the Renesas R-Car
Gen3 SoCs. It provides data compression and decompression, data caching, and
conversion of AXI transaction in order to reduce the memory bandwidth. The FCP
driver is not meant to be used standalone but provides an API to the video
processing modules to control the FCP.

The API towards the DRM driver is updated to store all configuration
parameters in a structure in order to improve readability and make future
updates easier. This series contain two R-Car DU DRM patches that update the
DU DRM driver to the new API. They would normally be merged through Dave
Airlie's tree, but due to dependencies on VSP1 patches queued up for v4.7 Dave
agreed to get them merged through the linux-media tree (hence his Acked-by for
the two patches). They should not conflict with any patch queued up for v4.7
through Dave's tree.

Note that patch 10/13 adds some macro magic to make the API transition easier.
Depending on your taste you will find the implementation beautiful or ugly,
but in any case patch 13/13 removes the macros and inline wrapper.

The code is based on top of the latest linux-media master branch. For
convenience I've pushed the patches to the following git tree branch.
patches on top of the latest Linux media master branch to

        git://linuxtv.org/pinchartl/media.git vsp1/next

Changes since v1:

- Fixed typos
- Made rcar_fcp_enable() return a status
- Dropped the unneeded dependency on PM for the VSP driver

Cc: devicetree@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
Cc: Dave Airlie <airlied@redhat.com>

Laurent Pinchart (13):
  dt-bindings: Add Renesas R-Car FCP DT bindings
  v4l: Add Renesas R-Car FCP driver
  v4l: vsp1: Implement runtime PM support
  v4l: vsp1: Don't handle clocks manually
  v4l: vsp1: Add FCP support
  v4l: vsp1: Add output node value to routing table
  v4l: vsp1: Replace container_of() with dedicated macro
  v4l: vsp1: Make vsp1_entity_get_pad_compose() more generic
  v4l: vsp1: Move frame sequence number from video node to pipeline
  v4l: vsp1: Group DRM RPF parameters in a structure
  drm: rcar-du: Add alpha support for VSP planes
  drm: rcar-du: Add Z-order support for VSP planes
  v4l: vsp1: Remove deprecated DRM API

 .../devicetree/bindings/media/renesas,fcp.txt      |  31 ++++
 .../devicetree/bindings/media/renesas,vsp1.txt     |   5 +
 MAINTAINERS                                        |  10 ++
 drivers/gpu/drm/rcar-du/rcar_du_vsp.c              |  45 ++---
 drivers/gpu/drm/rcar-du/rcar_du_vsp.h              |   2 +
 drivers/media/platform/Kconfig                     |  14 ++
 drivers/media/platform/Makefile                    |   1 +
 drivers/media/platform/rcar-fcp.c                  | 181 +++++++++++++++++++++
 drivers/media/platform/vsp1/vsp1.h                 |   6 +-
 drivers/media/platform/vsp1/vsp1_drm.c             |  68 ++++----
 drivers/media/platform/vsp1/vsp1_drv.c             | 120 +++++++-------
 drivers/media/platform/vsp1/vsp1_entity.c          |  86 +++++++---
 drivers/media/platform/vsp1/vsp1_entity.h          |  12 +-
 drivers/media/platform/vsp1/vsp1_pipe.c            |   4 +-
 drivers/media/platform/vsp1/vsp1_pipe.h            |   2 +
 drivers/media/platform/vsp1/vsp1_rpf.c             |   7 +-
 drivers/media/platform/vsp1/vsp1_video.c           |   4 +-
 drivers/media/platform/vsp1/vsp1_video.h           |   1 -
 include/media/rcar-fcp.h                           |  37 +++++
 include/media/vsp1.h                               |  29 ++--
 20 files changed, 494 insertions(+), 171 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/media/renesas,fcp.txt
 create mode 100644 drivers/media/platform/rcar-fcp.c
 create mode 100644 include/media/rcar-fcp.h

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH v2 01/13] dt-bindings: Add Renesas R-Car FCP DT bindings
  2016-04-25 21:36 [PATCH v2 00/13] R-Car VSP improvements for v4.7 - Round 2 Laurent Pinchart
@ 2016-04-25 21:36 ` Laurent Pinchart
  2016-04-28  2:54   ` Rob Herring
       [not found]   ` <1461620198-13428-2-git-send-email-laurent.pinchart+renesas-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org>
  0 siblings, 2 replies; 8+ messages in thread
From: Laurent Pinchart @ 2016-04-25 21:36 UTC (permalink / raw)
  To: linux-media; +Cc: linux-renesas-soc, devicetree

The FCP is a companion module of video processing modules in the Renesas
R-Car Gen3 SoCs. It provides data compression and decompression, data
caching, and conversion of AXI transactions in order to reduce the
memory bandwidth.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
 .../devicetree/bindings/media/renesas,fcp.txt      | 31 ++++++++++++++++++++++
 1 file changed, 31 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/media/renesas,fcp.txt

Cc: devicetree@vger.kernel.org

diff --git a/Documentation/devicetree/bindings/media/renesas,fcp.txt b/Documentation/devicetree/bindings/media/renesas,fcp.txt
new file mode 100644
index 000000000000..0c72ca24379f
--- /dev/null
+++ b/Documentation/devicetree/bindings/media/renesas,fcp.txt
@@ -0,0 +1,31 @@
+Renesas R-Car Frame Compression Processor (FCP)
+-----------------------------------------------
+
+The FCP is a companion module of video processing modules in the Renesas R-Car
+Gen3 SoCs. It provides data compression and decompression, data caching, and
+conversion of AXI transactions in order to reduce the memory bandwidth.
+
+There are three types of FCP whose configuration and behaviour highly depend
+on the module they are paired with.
+
+ - compatible: Must be one or more of the following
+
+   - "renesas,r8a7795-fcpv" for R8A7795 (R-Car H3) compatible 'FCP for VSP'
+   - "renesas,fcpv" for generic compatible 'FCP for VSP'
+
+   When compatible with the generic version, nodes must list the
+   SoC-specific version corresponding to the platform first, followed by the
+   family-specific and/or generic versions.
+
+ - reg: the register base and size for the device registers
+ - clocks: Reference to the functional clock
+
+
+Device node example
+-------------------
+
+	fcpvd1: fcp@fea2f000 {
+		compatible = "renesas,r8a7795-fcpv", "renesas,fcpv";
+		reg = <0 0xfea2f000 0 0x200>;
+		clocks = <&cpg CPG_MOD 602>;
+	};
-- 
2.7.3

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH v2 01/13] dt-bindings: Add Renesas R-Car FCP DT bindings
  2016-04-25 21:36 ` [PATCH v2 01/13] dt-bindings: Add Renesas R-Car FCP DT bindings Laurent Pinchart
@ 2016-04-28  2:54   ` Rob Herring
  2016-04-28  6:36     ` Laurent Pinchart
       [not found]   ` <1461620198-13428-2-git-send-email-laurent.pinchart+renesas-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org>
  1 sibling, 1 reply; 8+ messages in thread
From: Rob Herring @ 2016-04-28  2:54 UTC (permalink / raw)
  To: Laurent Pinchart; +Cc: linux-media, linux-renesas-soc, devicetree

On Tue, Apr 26, 2016 at 12:36:26AM +0300, Laurent Pinchart wrote:
> The FCP is a companion module of video processing modules in the Renesas
> R-Car Gen3 SoCs. It provides data compression and decompression, data
> caching, and conversion of AXI transactions in order to reduce the
> memory bandwidth.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> ---
>  .../devicetree/bindings/media/renesas,fcp.txt      | 31 ++++++++++++++++++++++
>  1 file changed, 31 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/media/renesas,fcp.txt
> 
> Cc: devicetree@vger.kernel.org
> 
> diff --git a/Documentation/devicetree/bindings/media/renesas,fcp.txt b/Documentation/devicetree/bindings/media/renesas,fcp.txt
> new file mode 100644
> index 000000000000..0c72ca24379f
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/media/renesas,fcp.txt
> @@ -0,0 +1,31 @@
> +Renesas R-Car Frame Compression Processor (FCP)
> +-----------------------------------------------
> +
> +The FCP is a companion module of video processing modules in the Renesas R-Car
> +Gen3 SoCs. It provides data compression and decompression, data caching, and
> +conversion of AXI transactions in order to reduce the memory bandwidth.
> +
> +There are three types of FCP whose configuration and behaviour highly depend
> +on the module they are paired with.

3 types?, but I only see one compatible and no relationship with said 
module described.

Rob

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2 01/13] dt-bindings: Add Renesas R-Car FCP DT bindings
  2016-04-28  2:54   ` Rob Herring
@ 2016-04-28  6:36     ` Laurent Pinchart
  2016-04-28  8:00       ` Geert Uytterhoeven
  0 siblings, 1 reply; 8+ messages in thread
From: Laurent Pinchart @ 2016-04-28  6:36 UTC (permalink / raw)
  To: Rob Herring; +Cc: Laurent Pinchart, linux-media, linux-renesas-soc, devicetree

Hi Rob,

On Wednesday 27 Apr 2016 21:54:29 Rob Herring wrote:
> On Tue, Apr 26, 2016 at 12:36:26AM +0300, Laurent Pinchart wrote:
> > The FCP is a companion module of video processing modules in the Renesas
> > R-Car Gen3 SoCs. It provides data compression and decompression, data
> > caching, and conversion of AXI transactions in order to reduce the
> > memory bandwidth.
> > 
> > Signed-off-by: Laurent Pinchart
> > <laurent.pinchart+renesas@ideasonboard.com>
> > ---
> > 
> >  .../devicetree/bindings/media/renesas,fcp.txt      | 31
> >  ++++++++++++++++++++++ 1 file changed, 31 insertions(+)
> >  create mode 100644
> >  Documentation/devicetree/bindings/media/renesas,fcp.txt
> > 
> > Cc: devicetree@vger.kernel.org
> > 
> > diff --git a/Documentation/devicetree/bindings/media/renesas,fcp.txt
> > b/Documentation/devicetree/bindings/media/renesas,fcp.txt new file mode
> > 100644
> > index 000000000000..0c72ca24379f
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/media/renesas,fcp.txt
> > @@ -0,0 +1,31 @@
> > +Renesas R-Car Frame Compression Processor (FCP)
> > +-----------------------------------------------
> > +
> > +The FCP is a companion module of video processing modules in the Renesas
> > R-Car +Gen3 SoCs. It provides data compression and decompression, data
> > caching, and +conversion of AXI transactions in order to reduce the
> > memory bandwidth. +
> > +There are three types of FCP whose configuration and behaviour highly
> > depend +on the module they are paired with.
> 
> 3 types?, but I only see one compatible and no relationship with said
> module described.

The bindings currently support a single type, as that's all the driver 
currently supports and I'm not comfortable merging bindings without at least 
one test implementation. Should I clarify that with something as "These DT 
bindings currently support the "FCP for Video" type only" ?

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2 01/13] dt-bindings: Add Renesas R-Car FCP DT bindings
  2016-04-28  6:36     ` Laurent Pinchart
@ 2016-04-28  8:00       ` Geert Uytterhoeven
  0 siblings, 0 replies; 8+ messages in thread
From: Geert Uytterhoeven @ 2016-04-28  8:00 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: Rob Herring, Laurent Pinchart, Linux Media Mailing List,
	linux-renesas-soc-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org

On Thu, Apr 28, 2016 at 8:36 AM, Laurent Pinchart
<laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org> wrote:
>> > diff --git a/Documentation/devicetree/bindings/media/renesas,fcp.txt
>> > b/Documentation/devicetree/bindings/media/renesas,fcp.txt new file mode
>> > 100644
>> > index 000000000000..0c72ca24379f
>> > --- /dev/null
>> > +++ b/Documentation/devicetree/bindings/media/renesas,fcp.txt
>> > @@ -0,0 +1,31 @@
>> > +Renesas R-Car Frame Compression Processor (FCP)
>> > +-----------------------------------------------
>> > +
>> > +The FCP is a companion module of video processing modules in the Renesas
>> > R-Car +Gen3 SoCs. It provides data compression and decompression, data
>> > caching, and +conversion of AXI transactions in order to reduce the
>> > memory bandwidth. +
>> > +There are three types of FCP whose configuration and behaviour highly
>> > depend +on the module they are paired with.
>>
>> 3 types?, but I only see one compatible and no relationship with said
>> module described.
>
> The bindings currently support a single type, as that's all the driver
> currently supports and I'm not comfortable merging bindings without at least
> one test implementation. Should I clarify that with something as "These DT
> bindings currently support the "FCP for Video" type only" ?

Yes please.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH v2.1] dt-bindings: Add Renesas R-Car FCP DT bindings
       [not found]   ` <1461620198-13428-2-git-send-email-laurent.pinchart+renesas-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org>
@ 2016-05-11 12:36     ` Laurent Pinchart
  2016-05-11 12:38       ` Geert Uytterhoeven
  2016-05-11 13:05       ` Rob Herring
  0 siblings, 2 replies; 8+ messages in thread
From: Laurent Pinchart @ 2016-05-11 12:36 UTC (permalink / raw)
  To: linux-media-u79uwXL29TY76Z2rM5mHXA
  Cc: linux-renesas-soc-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Rob Herring,
	Geert Uytterhoeven

The FCP is a companion module of video processing modules in the Renesas
R-Car Gen3 SoCs. It provides data compression and decompression, data
caching, and conversion of AXI transactions in order to reduce the
memory bandwidth.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org>
---
 .../devicetree/bindings/media/renesas,fcp.txt      | 32 ++++++++++++++++++++++
 1 file changed, 32 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/media/renesas,fcp.txt

diff --git a/Documentation/devicetree/bindings/media/renesas,fcp.txt b/Documentation/devicetree/bindings/media/renesas,fcp.txt
new file mode 100644
index 000000000000..6a12960609d8
--- /dev/null
+++ b/Documentation/devicetree/bindings/media/renesas,fcp.txt
@@ -0,0 +1,32 @@
+Renesas R-Car Frame Compression Processor (FCP)
+-----------------------------------------------
+
+The FCP is a companion module of video processing modules in the Renesas R-Car
+Gen3 SoCs. It provides data compression and decompression, data caching, and
+conversion of AXI transactions in order to reduce the memory bandwidth.
+
+There are three types of FCP: FCP for Codec (FCPC), FCP for VSP (FCPV) and FCP
+for FDP (FCPF). Their configuration and behaviour depend on the module they
+are paired with. These DT bindings currently support the FCPV only.
+
+ - compatible: Must be one or more of the following
+
+   - "renesas,r8a7795-fcpv" for R8A7795 (R-Car H3) compatible 'FCP for VSP'
+   - "renesas,fcpv" for generic compatible 'FCP for VSP'
+
+   When compatible with the generic version, nodes must list the
+   SoC-specific version corresponding to the platform first, followed by the
+   family-specific and/or generic versions.
+
+ - reg: the register base and size for the device registers
+ - clocks: Reference to the functional clock
+
+
+Device node example
+-------------------
+
+	fcpvd1: fcp@fea2f000 {
+		compatible = "renesas,r8a7795-fcpv", "renesas,fcpv";
+		reg = <0 0xfea2f000 0 0x200>;
+		clocks = <&cpg CPG_MOD 602>;
+	};
-- 
Regards,

Laurent Pinchart

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH v2.1] dt-bindings: Add Renesas R-Car FCP DT bindings
  2016-05-11 12:36     ` [PATCH v2.1] " Laurent Pinchart
@ 2016-05-11 12:38       ` Geert Uytterhoeven
  2016-05-11 13:05       ` Rob Herring
  1 sibling, 0 replies; 8+ messages in thread
From: Geert Uytterhoeven @ 2016-05-11 12:38 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: Linux Media Mailing List, linux-renesas-soc,
	devicetree@vger.kernel.org, Rob Herring

On Wed, May 11, 2016 at 2:36 PM, Laurent Pinchart
<laurent.pinchart+renesas@ideasonboard.com> wrote:
> The FCP is a companion module of video processing modules in the Renesas
> R-Car Gen3 SoCs. It provides data compression and decompression, data
> caching, and conversion of AXI transactions in order to reduce the
> memory bandwidth.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>

Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2.1] dt-bindings: Add Renesas R-Car FCP DT bindings
  2016-05-11 12:36     ` [PATCH v2.1] " Laurent Pinchart
  2016-05-11 12:38       ` Geert Uytterhoeven
@ 2016-05-11 13:05       ` Rob Herring
  1 sibling, 0 replies; 8+ messages in thread
From: Rob Herring @ 2016-05-11 13:05 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: linux-media, linux-renesas-soc, devicetree, Geert Uytterhoeven

On Wed, May 11, 2016 at 03:36:30PM +0300, Laurent Pinchart wrote:
> The FCP is a companion module of video processing modules in the Renesas
> R-Car Gen3 SoCs. It provides data compression and decompression, data
> caching, and conversion of AXI transactions in order to reduce the
> memory bandwidth.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> ---
>  .../devicetree/bindings/media/renesas,fcp.txt      | 32 ++++++++++++++++++++++
>  1 file changed, 32 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/media/renesas,fcp.txt

Acked-by: Rob Herring <robh@kernel.org>

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-05-11 13:05 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-25 21:36 [PATCH v2 00/13] R-Car VSP improvements for v4.7 - Round 2 Laurent Pinchart
2016-04-25 21:36 ` [PATCH v2 01/13] dt-bindings: Add Renesas R-Car FCP DT bindings Laurent Pinchart
2016-04-28  2:54   ` Rob Herring
2016-04-28  6:36     ` Laurent Pinchart
2016-04-28  8:00       ` Geert Uytterhoeven
     [not found]   ` <1461620198-13428-2-git-send-email-laurent.pinchart+renesas-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org>
2016-05-11 12:36     ` [PATCH v2.1] " Laurent Pinchart
2016-05-11 12:38       ` Geert Uytterhoeven
2016-05-11 13:05       ` Rob Herring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).