Re: [PATCH 14/14] drm/msm/dpu: remove cdm block support from resource manager

2018-08-31 Thread Sean Paul
On Tue, Aug 28, 2018 at 05:40:03PM -0700, Jeykumar Sankaran wrote:
> Support for CDM block is not present in DPU. Remove CDM
> handlers from resource manager.

I think there's some leftovers that can be cleaned up...

$ ack -i cdm
disp/dpu1/dpu_hw_mdss.h
103:DPU_HW_BLK_CDM,
192:enum dpu_cdm {
193:CDM_0 = 1,
194:CDM_1,
195:CDM_MAX
454:#define DPU_DBG_MASK_CDM  (1 << 1)

disp/dpu1/dpu_hw_catalog.h
533: * struct dpu_cdm_cfg - information of chroma down blocks
537: * @intf_connect   Bitmask of INTF IDs this CDM can connect to
539:struct dpu_cdm_cfg   {
737:u32 cdm_count;
738:struct dpu_cdm_cfg *cdm;
776:#define BLK_CDM(s) ((s)->cdm)

disp/dpu1/dpu_hw_catalog.c
324: * CDM sub blocks config
326:static struct dpu_cdm_cfg sdm845_cdm[] = {
328:.name = "cdm_0", .id = CDM_0,
461:.cdm_count = ARRAY_SIZE(sdm845_cdm),
462:.cdm = sdm845_cdm,



> 
> Signed-off-by: Jeykumar Sankaran 
> ---
>  drivers/gpu/drm/msm/Makefile |   1 -
>  drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.h  |   2 -
>  drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h |   5 -
>  drivers/gpu/drm/msm/disp/dpu1/dpu_hw_cdm.c   | 323 
> ---
>  drivers/gpu/drm/msm/disp/dpu1/dpu_hw_cdm.h   | 139 --
>  drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c   |  14 -
>  drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.h   |   4 -
>  drivers/gpu/drm/msm/disp/dpu1/dpu_hw_top.c   |  18 --
>  drivers/gpu/drm/msm/disp/dpu1/dpu_hw_top.h   |  17 --
>  drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c   |  68 +
>  drivers/gpu/drm/msm/disp/dpu1/dpu_trace.h|   4 -
>  11 files changed, 2 insertions(+), 593 deletions(-)
>  delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_cdm.c
>  delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_cdm.h
> 
> diff --git a/drivers/gpu/drm/msm/Makefile b/drivers/gpu/drm/msm/Makefile
> index 261fa79..19ab521 100644
> --- a/drivers/gpu/drm/msm/Makefile
> +++ b/drivers/gpu/drm/msm/Makefile
> @@ -58,7 +58,6 @@ msm-y := \
>   disp/dpu1/dpu_formats.o \
>   disp/dpu1/dpu_hw_blk.o \
>   disp/dpu1/dpu_hw_catalog.o \
> - disp/dpu1/dpu_hw_cdm.o \
>   disp/dpu1/dpu_hw_ctl.o \
>   disp/dpu1/dpu_hw_interrupts.o \
>   disp/dpu1/dpu_hw_intf.o \
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.h 
> b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.h
> index e453271..e844afa 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.h
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.h
> @@ -32,11 +32,9 @@
>  /**
>   * Encoder functions and data types
>   * @intfs:   Interfaces this encoder is using, INTF_MODE_NONE if unused
> - * @needs_cdm:   Encoder requests a CDM based on pixel format conversion 
> needs
>   */
>  struct dpu_encoder_hw_resources {
>   enum dpu_intf_mode intfs[INTF_MAX];
> - bool needs_cdm;
>  };
>  
>  /**
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h 
> b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h
> index b5fc65c..f796683 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h
> @@ -22,7 +22,6 @@
>  #include "dpu_hw_pingpong.h"
>  #include "dpu_hw_ctl.h"
>  #include "dpu_hw_top.h"
> -#include "dpu_hw_cdm.h"
>  #include "dpu_encoder.h"
>  #include "dpu_crtc.h"
>  
> @@ -205,8 +204,6 @@ struct dpu_encoder_irq {
>   * @parent_ops:  Callbacks exposed by the parent to the phys_enc
>   * @hw_mdptop:   Hardware interface to the top registers
>   * @hw_ctl:  Hardware interface to the ctl registers
> - * @hw_cdm:  Hardware interface to the cdm registers
> - * @cdm_cfg: Chroma-down hardware configuration
>   * @hw_pp:   Hardware interface to the ping pong registers
>   * @dpu_kms: Pointer to the dpu_kms top level
>   * @cached_mode: DRM mode cached at mode_set time, acted on in enable
> @@ -235,8 +232,6 @@ struct dpu_encoder_phys {
>   const struct dpu_encoder_virt_ops *parent_ops;
>   struct dpu_hw_mdp *hw_mdptop;
>   struct dpu_hw_ctl *hw_ctl;
> - struct dpu_hw_cdm *hw_cdm;
> - struct dpu_hw_cdm_cfg cdm_cfg;
>   struct dpu_hw_pingpong *hw_pp;
>   struct dpu_kms *dpu_kms;
>   struct drm_display_mode cached_mode;
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_cdm.c 
> b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_cdm.c
> deleted file mode 100644
> index 554874b..000
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_cdm.c
> +++ /dev/null
> @@ -1,323 +0,0 @@
> -/* Copyright (c) 2015-2018, The Linux Foundation. All rights reserved.
> - *
> - * This program is free software; you can redistribute it and/or modify
> - * it under the terms of the GNU General Public License version 2 and
> - * only version 2 as published by the Free Software Foundation.
> - *
> - * This program is distributed in the hope that it will be useful,
> - * but WITHOUT ANY WARRANTY; without even the implied warranty of
> - * ME

[PATCH 14/14] drm/msm/dpu: remove cdm block support from resource manager

2018-08-28 Thread Jeykumar Sankaran
Support for CDM block is not present in DPU. Remove CDM
handlers from resource manager.

Signed-off-by: Jeykumar Sankaran 
---
 drivers/gpu/drm/msm/Makefile |   1 -
 drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.h  |   2 -
 drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h |   5 -
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_cdm.c   | 323 ---
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_cdm.h   | 139 --
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c   |  14 -
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.h   |   4 -
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_top.c   |  18 --
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_top.h   |  17 --
 drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c   |  68 +
 drivers/gpu/drm/msm/disp/dpu1/dpu_trace.h|   4 -
 11 files changed, 2 insertions(+), 593 deletions(-)
 delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_cdm.c
 delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_cdm.h

diff --git a/drivers/gpu/drm/msm/Makefile b/drivers/gpu/drm/msm/Makefile
index 261fa79..19ab521 100644
--- a/drivers/gpu/drm/msm/Makefile
+++ b/drivers/gpu/drm/msm/Makefile
@@ -58,7 +58,6 @@ msm-y := \
disp/dpu1/dpu_formats.o \
disp/dpu1/dpu_hw_blk.o \
disp/dpu1/dpu_hw_catalog.o \
-   disp/dpu1/dpu_hw_cdm.o \
disp/dpu1/dpu_hw_ctl.o \
disp/dpu1/dpu_hw_interrupts.o \
disp/dpu1/dpu_hw_intf.o \
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.h 
b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.h
index e453271..e844afa 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.h
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.h
@@ -32,11 +32,9 @@
 /**
  * Encoder functions and data types
  * @intfs: Interfaces this encoder is using, INTF_MODE_NONE if unused
- * @needs_cdm: Encoder requests a CDM based on pixel format conversion needs
  */
 struct dpu_encoder_hw_resources {
enum dpu_intf_mode intfs[INTF_MAX];
-   bool needs_cdm;
 };
 
 /**
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h 
b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h
index b5fc65c..f796683 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h
@@ -22,7 +22,6 @@
 #include "dpu_hw_pingpong.h"
 #include "dpu_hw_ctl.h"
 #include "dpu_hw_top.h"
-#include "dpu_hw_cdm.h"
 #include "dpu_encoder.h"
 #include "dpu_crtc.h"
 
@@ -205,8 +204,6 @@ struct dpu_encoder_irq {
  * @parent_ops:Callbacks exposed by the parent to the phys_enc
  * @hw_mdptop: Hardware interface to the top registers
  * @hw_ctl:Hardware interface to the ctl registers
- * @hw_cdm:Hardware interface to the cdm registers
- * @cdm_cfg:   Chroma-down hardware configuration
  * @hw_pp: Hardware interface to the ping pong registers
  * @dpu_kms:   Pointer to the dpu_kms top level
  * @cached_mode:   DRM mode cached at mode_set time, acted on in enable
@@ -235,8 +232,6 @@ struct dpu_encoder_phys {
const struct dpu_encoder_virt_ops *parent_ops;
struct dpu_hw_mdp *hw_mdptop;
struct dpu_hw_ctl *hw_ctl;
-   struct dpu_hw_cdm *hw_cdm;
-   struct dpu_hw_cdm_cfg cdm_cfg;
struct dpu_hw_pingpong *hw_pp;
struct dpu_kms *dpu_kms;
struct drm_display_mode cached_mode;
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_cdm.c 
b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_cdm.c
deleted file mode 100644
index 554874b..000
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_cdm.c
+++ /dev/null
@@ -1,323 +0,0 @@
-/* Copyright (c) 2015-2018, The Linux Foundation. All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 and
- * only version 2 as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- */
-
-#include "dpu_hw_mdss.h"
-#include "dpu_hwio.h"
-#include "dpu_hw_catalog.h"
-#include "dpu_hw_cdm.h"
-#include "dpu_dbg.h"
-#include "dpu_kms.h"
-
-#define CDM_CSC_10_OPMODE  0x000
-#define CDM_CSC_10_BASE0x004
-
-#define CDM_CDWN2_OP_MODE  0x100
-#define CDM_CDWN2_CLAMP_OUT0x104
-#define CDM_CDWN2_PARAMS_3D_0  0x108
-#define CDM_CDWN2_PARAMS_3D_1  0x10C
-#define CDM_CDWN2_COEFF_COSITE_H_0 0x110
-#define CDM_CDWN2_COEFF_COSITE_H_1 0x114
-#define CDM_CDWN2_COEFF_COSITE_H_2 0x118
-#define CDM_CDWN2_COEFF_OFFSITE_H_00x11C
-#define CDM_CDWN2_COEFF_OFFSITE_H_10x120
-#define CDM_CDWN2_COEFF_OFFSITE_H_20x124
-#define CDM_CDWN2_COEFF_COSITE_V   0x128
-#define CDM_CDWN2_COEFF_OFFSITE_V  0x12C
-#d