Re: [PATCH 15/15] v4l: vsp1: Rename BRU to BRx

2018-04-04 Thread Kieran Bingham
Hi Laurent,

And so - the final patch (of the series)

On 26/02/18 21:45, Laurent Pinchart wrote:
> Some VSP instances have two blending units named BRU (Blend/ROP Unit)
> and BRS (Blend/ROP Sub unit). The BRS is a smaller version of the BRU
> with only two inputs, but otherwise offers similar features and offers
> the same register interface. The BRU and BRS can be used exchangeably in> VSP 
> pipelines (provided no more than two inputs are needed).
> 
> Due to historical reasons, the VSP1 driver implements support for both
> the BRU and BRS through objects named vsp1_bru. The code uses the name
> BRU to refer to either the BRU or the BRS, except in a few places where
> noted explicitly. This creates confusion.
> 
> In an effort to avoid confusion, rename the vsp1_bru object and the
> corresponding API to vsp1_brx, and use BRx to refer to blend unit
> instances regardless of their type. The names BRU and BRS are retained
> where reference to a particular blend unit type is needed, as well as in
> hardware registers to stay close to the datasheet.
> 

I fully approve of this change, though I can see there will be some conflicts /
fixups needed when you rebase this - and depending upon when other series get 
in.

Thus - rather than do a full review, for now I'll just say:

Acked-by: Kieran Bingham 

> Signed-off-by: Laurent Pinchart 



> ---
>  drivers/media/platform/vsp1/Makefile   |   2 +-
>  drivers/media/platform/vsp1/vsp1.h |   6 +-
>  .../media/platform/vsp1/{vsp1_bru.c => vsp1_brx.c} | 202 
> ++---
>  .../media/platform/vsp1/{vsp1_bru.h => vsp1_brx.h} |  18 +-
>  drivers/media/platform/vsp1/vsp1_drm.c | 172 +-
>  drivers/media/platform/vsp1/vsp1_drm.h |   6 +-
>  drivers/media/platform/vsp1/vsp1_drv.c |   6 +-
>  drivers/media/platform/vsp1/vsp1_pipe.c|  12 +-
>  drivers/media/platform/vsp1/vsp1_pipe.h|   4 +-
>  drivers/media/platform/vsp1/vsp1_rpf.c |  12 +-
>  drivers/media/platform/vsp1/vsp1_rwpf.h|   2 +-
>  drivers/media/platform/vsp1/vsp1_video.c   |  16 +-
>  drivers/media/platform/vsp1/vsp1_wpf.c |   8 +-
>  13 files changed, 233 insertions(+), 233 deletions(-)
>  rename drivers/media/platform/vsp1/{vsp1_bru.c => vsp1_brx.c} (63%)
>  rename drivers/media/platform/vsp1/{vsp1_bru.h => vsp1_brx.h} (66%)
> 
> diff --git a/drivers/media/platform/vsp1/Makefile 
> b/drivers/media/platform/vsp1/Makefile
> index f5cd6f0491cb..596775f932c0 100644
> --- a/drivers/media/platform/vsp1/Makefile
> +++ b/drivers/media/platform/vsp1/Makefile
> @@ -3,7 +3,7 @@ vsp1-y:= vsp1_drv.o 
> vsp1_entity.o vsp1_pipe.o
>  vsp1-y   += vsp1_dl.o vsp1_drm.o 
> vsp1_video.o
>  vsp1-y   += vsp1_rpf.o vsp1_rwpf.o 
> vsp1_wpf.o
>  vsp1-y   += vsp1_clu.o vsp1_hsit.o 
> vsp1_lut.o
> -vsp1-y   += vsp1_bru.o vsp1_sru.o 
> vsp1_uds.o
> +vsp1-y   += vsp1_brx.o vsp1_sru.o 
> vsp1_uds.o
>  vsp1-y   += vsp1_hgo.o vsp1_hgt.o 
> vsp1_histo.o
>  vsp1-y   += vsp1_lif.o
>  
> diff --git a/drivers/media/platform/vsp1/vsp1.h 
> b/drivers/media/platform/vsp1/vsp1.h
> index 78ef838416b3..894cc725c2d4 100644
> --- a/drivers/media/platform/vsp1/vsp1.h
> +++ b/drivers/media/platform/vsp1/vsp1.h
> @@ -30,7 +30,7 @@ struct rcar_fcp_device;
>  struct vsp1_drm;
>  struct vsp1_entity;
>  struct vsp1_platform_data;
> -struct vsp1_bru;
> +struct vsp1_brx;
>  struct vsp1_clu;
>  struct vsp1_hgo;
>  struct vsp1_hgt;
> @@ -78,8 +78,8 @@ struct vsp1_device {
>   struct rcar_fcp_device *fcp;
>   struct device *bus_master;
>  
> - struct vsp1_bru *brs;
> - struct vsp1_bru *bru;
> + struct vsp1_brx *brs;
> + struct vsp1_brx *bru;
>   struct vsp1_clu *clu;
>   struct vsp1_hgo *hgo;
>   struct vsp1_hgt *hgt;
> diff --git a/drivers/media/platform/vsp1/vsp1_bru.c 
> b/drivers/media/platform/vsp1/vsp1_brx.c
> similarity index 63%
> rename from drivers/media/platform/vsp1/vsp1_bru.c
> rename to drivers/media/platform/vsp1/vsp1_brx.c
> index e8fd2ae3b3eb..b4af1d546022 100644
> --- a/drivers/media/platform/vsp1/vsp1_bru.c
> +++ b/drivers/media/platform/vsp1/vsp1_brx.c
> @@ -1,5 +1,5 @@
>  /*
> - * vsp1_bru.c  --  R-Car VSP1 Blend ROP Unit
> + * vsp1_brx.c  --  R-Car VSP1 Blend ROP Unit (BRU and BRS)
>   *
>   * Copyright (C) 2013 Renesas Corporation
>   *
> @@ -17,45 +17,45 @@
>  #include 
>  
>  #include "vsp1.h"
> -#include "vsp1_bru.h"
> +#include "vsp1_brx.h"
>  #include "vsp1_dl.h"
>  #include "vsp1_pipe.h"
>  #include "vsp1_rwpf.h"
>  #include "vsp1_video.h"
>  
> -#define BRU_MIN_SIZE

[PATCH 15/15] v4l: vsp1: Rename BRU to BRx

2018-02-26 Thread Laurent Pinchart
Some VSP instances have two blending units named BRU (Blend/ROP Unit)
and BRS (Blend/ROP Sub unit). The BRS is a smaller version of the BRU
with only two inputs, but otherwise offers similar features and offers
the same register interface. The BRU and BRS can be used exchangeably in
VSP pipelines (provided no more than two inputs are needed).

Due to historical reasons, the VSP1 driver implements support for both
the BRU and BRS through objects named vsp1_bru. The code uses the name
BRU to refer to either the BRU or the BRS, except in a few places where
noted explicitly. This creates confusion.

In an effort to avoid confusion, rename the vsp1_bru object and the
corresponding API to vsp1_brx, and use BRx to refer to blend unit
instances regardless of their type. The names BRU and BRS are retained
where reference to a particular blend unit type is needed, as well as in
hardware registers to stay close to the datasheet.

Signed-off-by: Laurent Pinchart 
---
 drivers/media/platform/vsp1/Makefile   |   2 +-
 drivers/media/platform/vsp1/vsp1.h |   6 +-
 .../media/platform/vsp1/{vsp1_bru.c => vsp1_brx.c} | 202 ++---
 .../media/platform/vsp1/{vsp1_bru.h => vsp1_brx.h} |  18 +-
 drivers/media/platform/vsp1/vsp1_drm.c | 172 +-
 drivers/media/platform/vsp1/vsp1_drm.h |   6 +-
 drivers/media/platform/vsp1/vsp1_drv.c |   6 +-
 drivers/media/platform/vsp1/vsp1_pipe.c|  12 +-
 drivers/media/platform/vsp1/vsp1_pipe.h|   4 +-
 drivers/media/platform/vsp1/vsp1_rpf.c |  12 +-
 drivers/media/platform/vsp1/vsp1_rwpf.h|   2 +-
 drivers/media/platform/vsp1/vsp1_video.c   |  16 +-
 drivers/media/platform/vsp1/vsp1_wpf.c |   8 +-
 13 files changed, 233 insertions(+), 233 deletions(-)
 rename drivers/media/platform/vsp1/{vsp1_bru.c => vsp1_brx.c} (63%)
 rename drivers/media/platform/vsp1/{vsp1_bru.h => vsp1_brx.h} (66%)

diff --git a/drivers/media/platform/vsp1/Makefile 
b/drivers/media/platform/vsp1/Makefile
index f5cd6f0491cb..596775f932c0 100644
--- a/drivers/media/platform/vsp1/Makefile
+++ b/drivers/media/platform/vsp1/Makefile
@@ -3,7 +3,7 @@ vsp1-y  := vsp1_drv.o 
vsp1_entity.o vsp1_pipe.o
 vsp1-y += vsp1_dl.o vsp1_drm.o vsp1_video.o
 vsp1-y += vsp1_rpf.o vsp1_rwpf.o vsp1_wpf.o
 vsp1-y += vsp1_clu.o vsp1_hsit.o vsp1_lut.o
-vsp1-y += vsp1_bru.o vsp1_sru.o vsp1_uds.o
+vsp1-y += vsp1_brx.o vsp1_sru.o vsp1_uds.o
 vsp1-y += vsp1_hgo.o vsp1_hgt.o vsp1_histo.o
 vsp1-y += vsp1_lif.o
 
diff --git a/drivers/media/platform/vsp1/vsp1.h 
b/drivers/media/platform/vsp1/vsp1.h
index 78ef838416b3..894cc725c2d4 100644
--- a/drivers/media/platform/vsp1/vsp1.h
+++ b/drivers/media/platform/vsp1/vsp1.h
@@ -30,7 +30,7 @@ struct rcar_fcp_device;
 struct vsp1_drm;
 struct vsp1_entity;
 struct vsp1_platform_data;
-struct vsp1_bru;
+struct vsp1_brx;
 struct vsp1_clu;
 struct vsp1_hgo;
 struct vsp1_hgt;
@@ -78,8 +78,8 @@ struct vsp1_device {
struct rcar_fcp_device *fcp;
struct device *bus_master;
 
-   struct vsp1_bru *brs;
-   struct vsp1_bru *bru;
+   struct vsp1_brx *brs;
+   struct vsp1_brx *bru;
struct vsp1_clu *clu;
struct vsp1_hgo *hgo;
struct vsp1_hgt *hgt;
diff --git a/drivers/media/platform/vsp1/vsp1_bru.c 
b/drivers/media/platform/vsp1/vsp1_brx.c
similarity index 63%
rename from drivers/media/platform/vsp1/vsp1_bru.c
rename to drivers/media/platform/vsp1/vsp1_brx.c
index e8fd2ae3b3eb..b4af1d546022 100644
--- a/drivers/media/platform/vsp1/vsp1_bru.c
+++ b/drivers/media/platform/vsp1/vsp1_brx.c
@@ -1,5 +1,5 @@
 /*
- * vsp1_bru.c  --  R-Car VSP1 Blend ROP Unit
+ * vsp1_brx.c  --  R-Car VSP1 Blend ROP Unit (BRU and BRS)
  *
  * Copyright (C) 2013 Renesas Corporation
  *
@@ -17,45 +17,45 @@
 #include 
 
 #include "vsp1.h"
-#include "vsp1_bru.h"
+#include "vsp1_brx.h"
 #include "vsp1_dl.h"
 #include "vsp1_pipe.h"
 #include "vsp1_rwpf.h"
 #include "vsp1_video.h"
 
-#define BRU_MIN_SIZE   1U
-#define BRU_MAX_SIZE   8190U
+#define BRX_MIN_SIZE   1U
+#define BRX_MAX_SIZE   8190U
 
 /* 
-
  * Device Access
  */
 
-static inline void vsp1_bru_write(struct vsp1_bru *bru, struct vsp1_dl_list 
*dl,
+static inline void vsp1_brx_write(struct vsp1_brx *brx, struct vsp1_dl_list 
*dl,
  u32 reg, u32 data)
 {
-   vsp1_dl_list_write(dl, bru->base + reg, data);
+   vsp1_dl_list_write(dl, brx->base + reg, data);
 }
 
 /*