All of lore.kernel.org
 help / color / mirror / Atom feed
* [DPU PATCH v2 0/7] clean up DPU custom properties
@ 2018-06-06  3:45 Jeykumar Sankaran
  2018-06-06  3:45 ` [DPU PATCH v2 1/7] drm/msm: remove connector " Jeykumar Sankaran
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Jeykumar Sankaran @ 2018-06-06  3:45 UTC (permalink / raw)
  To: dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	freedreno-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	linux-arm-msm-u79uwXL29TY76Z2rM5mHXA
  Cc: hoegsberg-hpIqsD4AKlfQT0dZR+AlfA, Jeykumar Sankaran,
	seanpaul-F7+t8E8rja9g9hUCZPvPmw,
	robdclark-Re5JQEeQqe8AvxtiuMwx3w

Submitting a series of patches to further clean up DPU driver by stripping
down a list of custom properties supporting proprietary features. It 
removes the property installers/handlers and cleans up relevant files of
of some of the advanced features. This series is based on the patch[1] 
available on the drm-next tip.

[1]https://patchwork.kernel.org/patch/10202847/

Thanks.

changes in v2:
	- remove stale code in blend config
	- move unrelated code while updating zpos property
	- Makefile changes

Jeykumar Sankaran (7):
  drm/msm: remove connector custom properties
  drm/msm/dpu: clean up dpu plane custom properties
  drm/msm: enable zpos normalization
  drm/msm/dpu: switch to drm zpos property
  drm/msm/dpu: clean up dpu crtc custom properties
  drm/msm: remove msm_prop files
  drm/msm: remove dpu specific uapi header

 drivers/gpu/drm/msm/Makefile                       |   10 -
 drivers/gpu/drm/msm/disp/dpu1/dpu_ad4.h            |   99 --
 .../gpu/drm/msm/disp/dpu1/dpu_color_processing.c   | 1521 --------------------
 .../gpu/drm/msm/disp/dpu1/dpu_color_processing.h   |  120 --
 drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c      |   30 -
 drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c           | 1328 +----------------
 drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h           |   45 +-
 drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c        |   14 -
 drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.h        |    2 -
 .../gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c    |    1 -
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ad4.c         | 1443 -------------------
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c     |   72 +-
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h     |   89 --
 .../msm/disp/dpu1/dpu_hw_color_proc_common_v4.h    |   69 -
 .../gpu/drm/msm/disp/dpu1/dpu_hw_color_proc_v4.c   |  242 ----
 .../gpu/drm/msm/disp/dpu1/dpu_hw_color_proc_v4.h   |   40 -
 .../drm/msm/disp/dpu1/dpu_hw_color_processing.h    |   20 -
 .../msm/disp/dpu1/dpu_hw_color_processing_v1_7.c   |  565 --------
 .../msm/disp/dpu1/dpu_hw_color_processing_v1_7.h   |   92 --
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c         |   44 -
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.h         |   15 -
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ds.c          |  149 --
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ds.h          |  111 --
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dspp.c        |  209 ---
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dspp.h        |  220 ---
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.c          |   67 -
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.h          |   14 -
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_mdss.h        |   58 +-
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.c    |   68 -
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.h    |    6 -
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_reg_dma_v1.c  |  757 ----------
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_reg_dma_v1.h  |   27 -
 .../msm/disp/dpu1/dpu_hw_reg_dma_v1_color_proc.c   |  943 ------------
 .../msm/disp/dpu1/dpu_hw_reg_dma_v1_color_proc.h   |   75 -
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c        |  219 ---
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.h        |   73 -
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_util.c        |    1 -
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_util.h        |  156 ++
 drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c            |    3 -
 drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c          | 1404 ++----------------
 drivers/gpu/drm/msm/disp/dpu1/dpu_plane.h          |   43 -
 drivers/gpu/drm/msm/disp/dpu1/dpu_reg_dma.c        |  139 --
 drivers/gpu/drm/msm/disp/dpu1/dpu_reg_dma.h        |  310 ----
 drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c             |  149 +-
 drivers/gpu/drm/msm/disp/dpu1/dpu_rm.h             |    2 -
 drivers/gpu/drm/msm/disp/dpu1/dpu_wb.c             |    2 -
 drivers/gpu/drm/msm/msm_drv.c                      |    3 +
 drivers/gpu/drm/msm/msm_drv.h                      |   86 +-
 drivers/gpu/drm/msm/msm_prop.c                     |  688 ---------
 drivers/gpu/drm/msm/msm_prop.h                     |  438 ------
 include/uapi/drm/dpu_drm.h                         |  407 ------
 include/uapi/drm/msm_drm.h                         |    1 -
 include/uapi/drm/msm_drm_pp.h                      |  345 -----
 53 files changed, 297 insertions(+), 12737 deletions(-)
 delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_ad4.h
 delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_color_processing.c
 delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_color_processing.h
 delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ad4.c
 delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_color_proc_common_v4.h
 delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_color_proc_v4.c
 delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_color_proc_v4.h
 delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_color_processing.h
 delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_color_processing_v1_7.c
 delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_color_processing_v1_7.h
 delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ds.c
 delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ds.h
 delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dspp.c
 delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dspp.h
 delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_reg_dma_v1.c
 delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_reg_dma_v1.h
 delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_reg_dma_v1_color_proc.c
 delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_reg_dma_v1_color_proc.h
 delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_reg_dma.c
 delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_reg_dma.h
 delete mode 100644 drivers/gpu/drm/msm/msm_prop.c
 delete mode 100644 drivers/gpu/drm/msm/msm_prop.h
 delete mode 100644 include/uapi/drm/dpu_drm.h
 delete mode 100644 include/uapi/drm/msm_drm_pp.h

-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

_______________________________________________
Freedreno mailing list
Freedreno@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/freedreno

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

* [DPU PATCH v2 1/7] drm/msm: remove connector custom properties
  2018-06-06  3:45 [DPU PATCH v2 0/7] clean up DPU custom properties Jeykumar Sankaran
@ 2018-06-06  3:45 ` Jeykumar Sankaran
       [not found] ` <1528256738-30652-1-git-send-email-jsanka-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 10+ messages in thread
From: Jeykumar Sankaran @ 2018-06-06  3:45 UTC (permalink / raw)
  To: dri-devel, freedreno, linux-arm-msm; +Cc: hoegsberg

Cleanup residual connector property enumerations.

changs in v2:
	- none

Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
---
 drivers/gpu/drm/msm/msm_drv.h | 27 ---------------------------
 1 file changed, 27 deletions(-)

diff --git a/drivers/gpu/drm/msm/msm_drv.h b/drivers/gpu/drm/msm/msm_drv.h
index 90a2521..954ac12 100644
--- a/drivers/gpu/drm/msm/msm_drv.h
+++ b/drivers/gpu/drm/msm/msm_drv.h
@@ -140,32 +140,6 @@ enum msm_mdp_crtc_property {
 	CRTC_PROP_COUNT
 };
 
-enum msm_mdp_conn_property {
-	/* blob properties, always put these first */
-	CONNECTOR_PROP_DPU_INFO,
-	CONNECTOR_PROP_HDR_INFO,
-	CONNECTOR_PROP_PP_DITHER,
-
-	/* # of blob properties */
-	CONNECTOR_PROP_BLOBCOUNT,
-
-	/* range properties */
-	CONNECTOR_PROP_OUT_FB = CONNECTOR_PROP_BLOBCOUNT,
-	CONNECTOR_PROP_DST_X,
-	CONNECTOR_PROP_DST_Y,
-	CONNECTOR_PROP_DST_W,
-	CONNECTOR_PROP_DST_H,
-	CONNECTOR_PROP_BL_SCALE,
-	CONNECTOR_PROP_AD_BL_SCALE,
-
-	/* enum/bitmask properties */
-	CONNECTOR_PROP_AUTOREFRESH,
-	CONNECTOR_PROP_LP,
-
-	/* total # of properties */
-	CONNECTOR_PROP_COUNT
-};
-
 struct msm_vblank_ctrl {
 	struct kthread_work work;
 	struct list_head event_list;
@@ -434,7 +408,6 @@ struct msm_drm_private {
 	/* Properties */
 	struct drm_property *plane_property[PLANE_PROP_COUNT];
 	struct drm_property *crtc_property[CRTC_PROP_COUNT];
-	struct drm_property *conn_property[CONNECTOR_PROP_COUNT];
 
 	/* Color processing properties for the crtc */
 	struct drm_property **cp_property;
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [DPU PATCH v2 2/7] drm/msm/dpu: clean up dpu plane custom properties
       [not found] ` <1528256738-30652-1-git-send-email-jsanka-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
@ 2018-06-06  3:45   ` Jeykumar Sankaran
       [not found]     ` <1528256738-30652-3-git-send-email-jsanka-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
  2018-06-06  3:45   ` [DPU PATCH v2 3/7] drm/msm: enable zpos normalization Jeykumar Sankaran
                     ` (3 subsequent siblings)
  4 siblings, 1 reply; 10+ messages in thread
From: Jeykumar Sankaran @ 2018-06-06  3:45 UTC (permalink / raw)
  To: dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	freedreno-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	linux-arm-msm-u79uwXL29TY76Z2rM5mHXA
  Cc: hoegsberg-hpIqsD4AKlfQT0dZR+AlfA, Jeykumar Sankaran,
	seanpaul-F7+t8E8rja9g9hUCZPvPmw,
	robdclark-Re5JQEeQqe8AvxtiuMwx3w

This change removes all the dpu plane custom properties
and its handlers.

changs in v2:
	- remove stale code in blend config(Sean Paul)
	- Makefile changes to remove warning flags(Sean Paul)

Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
---
 drivers/gpu/drm/msm/Makefile                       |    8 -
 drivers/gpu/drm/msm/disp/dpu1/dpu_ad4.h            |   99 --
 .../gpu/drm/msm/disp/dpu1/dpu_color_processing.c   | 1521 --------------------
 .../gpu/drm/msm/disp/dpu1/dpu_color_processing.h   |  120 --
 drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c           |  205 +--
 drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h           |    3 +-
 drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c        |    2 -
 .../gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c    |    1 -
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ad4.c         | 1443 -------------------
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c     |   72 +-
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h     |   89 --
 .../msm/disp/dpu1/dpu_hw_color_proc_common_v4.h    |   69 -
 .../gpu/drm/msm/disp/dpu1/dpu_hw_color_proc_v4.c   |  242 ----
 .../gpu/drm/msm/disp/dpu1/dpu_hw_color_proc_v4.h   |   40 -
 .../drm/msm/disp/dpu1/dpu_hw_color_processing.h    |   20 -
 .../msm/disp/dpu1/dpu_hw_color_processing_v1_7.c   |  565 --------
 .../msm/disp/dpu1/dpu_hw_color_processing_v1_7.h   |   92 --
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c         |   44 -
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.h         |   15 -
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dspp.c        |  209 ---
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dspp.h        |  220 ---
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.c          |    1 +
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_mdss.h        |   44 +-
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.c    |   68 -
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.h    |    6 -
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_reg_dma_v1.c  |  757 ----------
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_reg_dma_v1.h  |   27 -
 .../msm/disp/dpu1/dpu_hw_reg_dma_v1_color_proc.c   |  943 ------------
 .../msm/disp/dpu1/dpu_hw_reg_dma_v1_color_proc.h   |   75 -
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c        |  219 ---
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.h        |   73 -
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_util.c        |    1 -
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_util.h        |  156 ++
 drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c            |    3 -
 drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c          | 1269 +---------------
 drivers/gpu/drm/msm/disp/dpu1/dpu_plane.h          |   31 -
 drivers/gpu/drm/msm/disp/dpu1/dpu_reg_dma.c        |  139 --
 drivers/gpu/drm/msm/disp/dpu1/dpu_reg_dma.h        |  310 ----
 drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c             |  102 +-
 drivers/gpu/drm/msm/disp/dpu1/dpu_rm.h             |    2 -
 drivers/gpu/drm/msm/disp/dpu1/dpu_wb.c             |    2 -
 drivers/gpu/drm/msm/msm_drv.h                      |   28 -
 include/uapi/drm/dpu_drm.h                         |  187 ---
 include/uapi/drm/msm_drm.h                         |    1 -
 44 files changed, 282 insertions(+), 9241 deletions(-)
 delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_ad4.h
 delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_color_processing.c
 delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_color_processing.h
 delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ad4.c
 delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_color_proc_common_v4.h
 delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_color_proc_v4.c
 delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_color_proc_v4.h
 delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_color_processing.h
 delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_color_processing_v1_7.c
 delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_color_processing_v1_7.h
 delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dspp.c
 delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dspp.h
 delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_reg_dma_v1.c
 delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_reg_dma_v1.h
 delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_reg_dma_v1_color_proc.c
 delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_reg_dma_v1_color_proc.h
 delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_reg_dma.c
 delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_reg_dma.h

diff --git a/drivers/gpu/drm/msm/Makefile b/drivers/gpu/drm/msm/Makefile
index d7558ed..7bc3921 100644
--- a/drivers/gpu/drm/msm/Makefile
+++ b/drivers/gpu/drm/msm/Makefile
@@ -46,7 +46,6 @@ msm-y := \
 	disp/mdp5/mdp5_mixer.o \
 	disp/mdp5/mdp5_plane.o \
 	disp/mdp5/mdp5_smp.o \
-	disp/dpu1/dpu_color_processing.o \
 	disp/dpu1/dpu_core_irq.o \
 	disp/dpu1/dpu_core_perf.o \
 	disp/dpu1/dpu_crtc.o \
@@ -54,21 +53,15 @@ msm-y := \
 	disp/dpu1/dpu_encoder_phys_cmd.o \
 	disp/dpu1/dpu_encoder_phys_vid.o \
 	disp/dpu1/dpu_formats.o \
-	disp/dpu1/dpu_hw_ad4.o \
 	disp/dpu1/dpu_hw_blk.o \
 	disp/dpu1/dpu_hw_catalog.o \
 	disp/dpu1/dpu_hw_cdm.o \
-	disp/dpu1/dpu_hw_color_proc_v4.o \
-	disp/dpu1/dpu_hw_color_processing_v1_7.o \
 	disp/dpu1/dpu_hw_ctl.o \
 	disp/dpu1/dpu_hw_ds.o \
-	disp/dpu1/dpu_hw_dspp.o \
 	disp/dpu1/dpu_hw_interrupts.o \
 	disp/dpu1/dpu_hw_intf.o \
 	disp/dpu1/dpu_hw_lm.o \
 	disp/dpu1/dpu_hw_pingpong.o \
-	disp/dpu1/dpu_hw_reg_dma_v1.o \
-	disp/dpu1/dpu_hw_reg_dma_v1_color_proc.o \
 	disp/dpu1/dpu_hw_sspp.o \
 	disp/dpu1/dpu_hw_top.o \
 	disp/dpu1/dpu_hw_util.o \
@@ -78,7 +71,6 @@ msm-y := \
 	disp/dpu1/dpu_kms.o \
 	disp/dpu1/dpu_kms_utils.o \
 	disp/dpu1/dpu_plane.o \
-	disp/dpu1/dpu_reg_dma.o \
 	disp/dpu1/dpu_rm.o \
 	disp/dpu1/dpu_vbif.o \
 	dpu_dbg.o \
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_ad4.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_ad4.h
deleted file mode 100644
index 5b70c4a..0000000
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_ad4.h
+++ /dev/null
@@ -1,99 +0,0 @@
-/* Copyright (c) 2017-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.
- */
-#ifndef _DPU_AD4_H_
-#define _DPU_AD4_H_
-
-#include <drm/drm_mode.h>
-#include <drm/drm_property.h>
-#include "dpu_hw_dspp.h"
-
-/**
- * enum ad4_modes - ad4 modes supported by driver
- */
-enum ad4_modes {
-	AD4_OFF,
-	AD4_AUTO_STRENGTH,
-	AD4_CALIBRATION,
-	AD4_MANUAL,
-};
-
-/**
- * struct drm_prop_enum_list - drm structure for creating enum property and
- *                             enumerating values
- */
-static const struct drm_prop_enum_list ad4_modes[] = {
-	{AD4_OFF, "off"},
-	{AD4_AUTO_STRENGTH, "auto_strength_mode"},
-	{AD4_CALIBRATION, "calibration_mode"},
-	{AD4_MANUAL, "manual_mode"},
-};
-
-/**
- * enum ad_property - properties that can be set for ad
- */
-enum ad_property {
-	AD_MODE,
-	AD_INIT,
-	AD_CFG,
-	AD_INPUT,
-	AD_SUSPEND,
-	AD_ASSERTIVE,
-	AD_BACKLIGHT,
-	AD_IPC_SUSPEND,
-	AD_IPC_RESUME,
-	AD_IPC_RESET,
-	AD_PROPMAX,
-};
-
-/**
- * enum ad_intr_resp_property - ad4 interrupt response enum
- */
-enum ad_intr_resp_property {
-	AD4_BACKLIGHT,
-	AD4_RESPMAX,
-};
-
-/**
- * struct dpu_ad_hw_cfg - structure for setting the ad properties
- * @prop: enum of ad property
- * @hw_cfg: payload for the prop being set.
- */
-struct dpu_ad_hw_cfg {
-	enum ad_property prop;
-	struct dpu_hw_cp_cfg *hw_cfg;
-};
-
-/**
- * dpu_validate_dspp_ad4() - api to validate if ad property is allowed for
- *                           the display with allocated dspp/mixers.
- * @dspp: pointer to dspp info structure.
- * @prop: pointer to u32 pointing to ad property
- */
-int dpu_validate_dspp_ad4(struct dpu_hw_dspp *dspp, u32 *prop);
-
-/**
- * dpu_setup_dspp_ad4 - api to apply the ad property, dpu_validate_dspp_ad4
- *                      should be called before call this function
- * @dspp: pointer to dspp info structure.
- * @cfg: pointer to struct dpu_ad_hw_cfg
- */
-void dpu_setup_dspp_ad4(struct dpu_hw_dspp *dspp, void *cfg);
-
-/**
- * dpu_read_intr_resp_ad4 - api to get ad4 interrupt status for event
- * @dspp: pointer to dspp object
- * @event: event for which response is needed
- * @resp: value of event requested
- */
-void dpu_read_intr_resp_ad4(struct dpu_hw_dspp *dspp, u32 event, u32 *resp);
-
-#endif /* _DPU_AD4_H_ */
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_color_processing.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_color_processing.c
deleted file mode 100644
index f13d1cc..0000000
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_color_processing.c
+++ /dev/null
@@ -1,1521 +0,0 @@
-/* Copyright (c) 2016-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 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.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#define pr_fmt(fmt)	"%s: " fmt, __func__
-
-#include <drm/msm_drm_pp.h>
-#include "dpu_color_processing.h"
-#include "dpu_kms.h"
-#include "dpu_crtc.h"
-#include "dpu_hw_dspp.h"
-#include "dpu_hw_lm.h"
-#include "dpu_ad4.h"
-#include "dpu_hw_interrupts.h"
-#include "dpu_core_irq.h"
-
-struct dpu_cp_node {
-	u32 property_id;
-	u32 prop_flags;
-	u32 feature;
-	void *blob_ptr;
-	uint64_t prop_val;
-	const struct dpu_pp_blk *pp_blk;
-	struct list_head feature_list;
-	struct list_head active_list;
-	struct list_head dirty_list;
-	bool is_dspp_feature;
-	u32 prop_blob_sz;
-	struct dpu_irq_callback *irq;
-};
-
-struct dpu_cp_prop_attach {
-	struct drm_crtc *crtc;
-	struct drm_property *prop;
-	struct dpu_cp_node *prop_node;
-	u32 feature;
-	uint64_t val;
-};
-
-static void dspp_pcc_install_property(struct drm_crtc *crtc);
-
-static void dspp_hsic_install_property(struct drm_crtc *crtc);
-
-static void dspp_ad_install_property(struct drm_crtc *crtc);
-
-static void dspp_vlut_install_property(struct drm_crtc *crtc);
-
-static void dspp_gamut_install_property(struct drm_crtc *crtc);
-
-static void dspp_gc_install_property(struct drm_crtc *crtc);
-
-static void dspp_igc_install_property(struct drm_crtc *crtc);
-
-typedef void (*dspp_prop_install_func_t)(struct drm_crtc *crtc);
-
-static dspp_prop_install_func_t dspp_prop_install_func[DPU_DSPP_MAX];
-
-static void dpu_cp_update_list(struct dpu_cp_node *prop_node,
-		struct dpu_crtc *crtc, bool dirty_list);
-
-static int dpu_cp_ad_validate_prop(struct dpu_cp_node *prop_node,
-		struct dpu_crtc *crtc);
-
-static void dpu_cp_notify_ad_event(struct drm_crtc *crtc_drm, void *arg);
-
-static void dpu_cp_ad_set_prop(struct dpu_crtc *dpu_crtc,
-		enum ad_property ad_prop);
-
-#define setup_dspp_prop_install_funcs(func) \
-do { \
-	func[DPU_DSPP_PCC] = dspp_pcc_install_property; \
-	func[DPU_DSPP_HSIC] = dspp_hsic_install_property; \
-	func[DPU_DSPP_AD] = dspp_ad_install_property; \
-	func[DPU_DSPP_VLUT] = dspp_vlut_install_property; \
-	func[DPU_DSPP_GAMUT] = dspp_gamut_install_property; \
-	func[DPU_DSPP_GC] = dspp_gc_install_property; \
-	func[DPU_DSPP_IGC] = dspp_igc_install_property; \
-} while (0)
-
-typedef void (*lm_prop_install_func_t)(struct drm_crtc *crtc);
-
-static lm_prop_install_func_t lm_prop_install_func[DPU_MIXER_MAX];
-
-static void lm_gc_install_property(struct drm_crtc *crtc);
-
-#define setup_lm_prop_install_funcs(func) \
-	(func[DPU_MIXER_GC] = lm_gc_install_property)
-
-enum {
-	/* Append new DSPP features before DPU_CP_CRTC_DSPP_MAX */
-	/* DSPP Features start */
-	DPU_CP_CRTC_DSPP_IGC,
-	DPU_CP_CRTC_DSPP_PCC,
-	DPU_CP_CRTC_DSPP_GC,
-	DPU_CP_CRTC_DSPP_HUE,
-	DPU_CP_CRTC_DSPP_SAT,
-	DPU_CP_CRTC_DSPP_VAL,
-	DPU_CP_CRTC_DSPP_CONT,
-	DPU_CP_CRTC_DSPP_MEMCOLOR,
-	DPU_CP_CRTC_DSPP_SIXZONE,
-	DPU_CP_CRTC_DSPP_GAMUT,
-	DPU_CP_CRTC_DSPP_DITHER,
-	DPU_CP_CRTC_DSPP_HIST,
-	DPU_CP_CRTC_DSPP_AD,
-	DPU_CP_CRTC_DSPP_VLUT,
-	DPU_CP_CRTC_DSPP_AD_MODE,
-	DPU_CP_CRTC_DSPP_AD_INIT,
-	DPU_CP_CRTC_DSPP_AD_CFG,
-	DPU_CP_CRTC_DSPP_AD_INPUT,
-	DPU_CP_CRTC_DSPP_AD_ASSERTIVENESS,
-	DPU_CP_CRTC_DSPP_AD_BACKLIGHT,
-	DPU_CP_CRTC_DSPP_MAX,
-	/* DSPP features end */
-
-	/* Append new LM features before DPU_CP_CRTC_MAX_FEATURES */
-	/* LM feature start*/
-	DPU_CP_CRTC_LM_GC,
-	/* LM feature end*/
-
-	DPU_CP_CRTC_MAX_FEATURES,
-};
-
-#define INIT_PROP_ATTACH(p, crtc, prop, node, feature, val) \
-	do { \
-		(p)->crtc = crtc; \
-		(p)->prop = prop; \
-		(p)->prop_node = node; \
-		(p)->feature = feature; \
-		(p)->val = val; \
-	} while (0)
-
-static void dpu_cp_get_hw_payload(struct dpu_cp_node *prop_node,
-				  struct dpu_hw_cp_cfg *hw_cfg,
-				  bool *feature_enabled)
-{
-
-	struct drm_property_blob *blob = NULL;
-
-	memset(hw_cfg, 0, sizeof(*hw_cfg));
-	*feature_enabled = false;
-
-	blob = prop_node->blob_ptr;
-	if (prop_node->prop_flags & DRM_MODE_PROP_BLOB) {
-		if (blob) {
-			hw_cfg->len = blob->length;
-			hw_cfg->payload = blob->data;
-			*feature_enabled = true;
-		}
-	} else if (prop_node->prop_flags & DRM_MODE_PROP_RANGE) {
-		/* Check if local blob is Set */
-		if (!blob) {
-			if (prop_node->prop_val) {
-				hw_cfg->len = sizeof(prop_node->prop_val);
-				hw_cfg->payload = &prop_node->prop_val;
-			}
-		} else {
-			hw_cfg->len = (prop_node->prop_val) ? blob->length :
-					0;
-			hw_cfg->payload = (prop_node->prop_val) ? blob->data
-						: NULL;
-		}
-		if (prop_node->prop_val)
-			*feature_enabled = true;
-	} else if (prop_node->prop_flags & DRM_MODE_PROP_ENUM) {
-		*feature_enabled = (prop_node->prop_val != 0);
-		hw_cfg->len = sizeof(prop_node->prop_val);
-		hw_cfg->payload = &prop_node->prop_val;
-	} else {
-		DRM_ERROR("property type is not supported\n");
-	}
-}
-
-static int dpu_cp_disable_crtc_blob_property(struct dpu_cp_node *prop_node)
-{
-	struct drm_property_blob *blob = prop_node->blob_ptr;
-
-	if (!blob)
-		return 0;
-	drm_property_blob_put(blob);
-	prop_node->blob_ptr = NULL;
-	return 0;
-}
-
-static int dpu_cp_create_local_blob(struct drm_crtc *crtc, u32 feature, int len)
-{
-	int ret = -EINVAL;
-	bool found = false;
-	struct dpu_cp_node *prop_node = NULL;
-	struct drm_property_blob *blob_ptr;
-	struct dpu_crtc *dpu_crtc = to_dpu_crtc(crtc);
-
-	list_for_each_entry(prop_node, &dpu_crtc->feature_list, feature_list) {
-		if (prop_node->feature == feature) {
-			found = true;
-			break;
-		}
-	}
-
-	if (!found || !(prop_node->prop_flags & DRM_MODE_PROP_RANGE)) {
-		DRM_ERROR("local blob create failed prop found %d flags %d\n",
-		       found, prop_node->prop_flags);
-		return ret;
-	}
-
-	blob_ptr = drm_property_create_blob(crtc->dev, len, NULL);
-	ret = (IS_ERR_OR_NULL(blob_ptr)) ? PTR_ERR(blob_ptr) : 0;
-	if (!ret)
-		prop_node->blob_ptr = blob_ptr;
-
-	return ret;
-}
-
-static void dpu_cp_destroy_local_blob(struct dpu_cp_node *prop_node)
-{
-	if (!(prop_node->prop_flags & DRM_MODE_PROP_BLOB) &&
-		prop_node->blob_ptr)
-		drm_property_blob_put(prop_node->blob_ptr);
-}
-
-static int dpu_cp_handle_range_property(struct dpu_cp_node *prop_node,
-					uint64_t val)
-{
-	int ret = 0;
-	struct drm_property_blob *blob_ptr = prop_node->blob_ptr;
-
-	if (!blob_ptr) {
-		prop_node->prop_val = val;
-		return 0;
-	}
-
-	if (!val) {
-		prop_node->prop_val = 0;
-		return 0;
-	}
-
-	ret = copy_from_user(blob_ptr->data, u64_to_user_ptr(val),
-			     blob_ptr->length);
-	if (ret) {
-		DRM_ERROR("failed to get the property info ret %d", ret);
-		ret = -EFAULT;
-	} else {
-		prop_node->prop_val = val;
-	}
-
-	return ret;
-}
-
-static int dpu_cp_disable_crtc_property(struct drm_crtc *crtc,
-					 struct drm_property *property,
-					 struct dpu_cp_node *prop_node)
-{
-	int ret = -EINVAL;
-
-	if (property->flags & DRM_MODE_PROP_BLOB) {
-		ret = dpu_cp_disable_crtc_blob_property(prop_node);
-	} else if (property->flags & DRM_MODE_PROP_RANGE) {
-		ret = dpu_cp_handle_range_property(prop_node, 0);
-	} else if (property->flags & DRM_MODE_PROP_ENUM) {
-		ret = 0;
-		prop_node->prop_val = 0;
-	}
-	return ret;
-}
-
-static int dpu_cp_enable_crtc_blob_property(struct drm_crtc *crtc,
-					       struct dpu_cp_node *prop_node,
-					       uint64_t val)
-{
-	struct drm_property_blob *blob = NULL;
-
-	/**
-	 * For non-blob based properties add support to create a blob
-	 * using the val and store the blob_ptr in prop_node.
-	 */
-	blob = drm_property_lookup_blob(crtc->dev, val);
-	if (!blob) {
-		DRM_ERROR("invalid blob id %lld\n", val);
-		return -EINVAL;
-	}
-	if (blob->length != prop_node->prop_blob_sz) {
-		DRM_ERROR("invalid blob len %zd exp %d feature %d\n",
-		    blob->length, prop_node->prop_blob_sz, prop_node->feature);
-		drm_property_blob_put(blob);
-		return -EINVAL;
-	}
-	/* Release refernce to existing payload of the property */
-	if (prop_node->blob_ptr)
-		drm_property_blob_put(prop_node->blob_ptr);
-
-	prop_node->blob_ptr = blob;
-	return 0;
-}
-
-static int dpu_cp_enable_crtc_property(struct drm_crtc *crtc,
-				       struct drm_property *property,
-				       struct dpu_cp_node *prop_node,
-				       uint64_t val)
-{
-	int ret = -EINVAL;
-
-	if (property->flags & DRM_MODE_PROP_BLOB) {
-		ret = dpu_cp_enable_crtc_blob_property(crtc, prop_node, val);
-	} else if (property->flags & DRM_MODE_PROP_RANGE) {
-		ret = dpu_cp_handle_range_property(prop_node, val);
-	} else if (property->flags & DRM_MODE_PROP_ENUM) {
-		ret = 0;
-		prop_node->prop_val = val;
-	}
-	return ret;
-}
-
-static struct dpu_kms *get_kms(struct drm_crtc *crtc)
-{
-	struct msm_drm_private *priv = crtc->dev->dev_private;
-
-	return to_dpu_kms(priv->kms);
-}
-
-static void dpu_cp_crtc_prop_attach(struct dpu_cp_prop_attach *prop_attach)
-{
-
-	struct dpu_crtc *dpu_crtc = to_dpu_crtc(prop_attach->crtc);
-
-	drm_object_attach_property(&prop_attach->crtc->base,
-				   prop_attach->prop, prop_attach->val);
-
-	INIT_LIST_HEAD(&prop_attach->prop_node->active_list);
-	INIT_LIST_HEAD(&prop_attach->prop_node->dirty_list);
-
-	prop_attach->prop_node->property_id = prop_attach->prop->base.id;
-	prop_attach->prop_node->prop_flags = prop_attach->prop->flags;
-	prop_attach->prop_node->feature = prop_attach->feature;
-
-	if (prop_attach->feature < DPU_CP_CRTC_DSPP_MAX)
-		prop_attach->prop_node->is_dspp_feature = true;
-	else
-		prop_attach->prop_node->is_dspp_feature = false;
-
-	list_add(&prop_attach->prop_node->feature_list,
-		 &dpu_crtc->feature_list);
-}
-
-void dpu_cp_crtc_init(struct drm_crtc *crtc)
-{
-	struct dpu_crtc *dpu_crtc = NULL;
-
-	if (!crtc) {
-		DRM_ERROR("invalid crtc %pK\n", crtc);
-		return;
-	}
-
-	dpu_crtc = to_dpu_crtc(crtc);
-	if (!dpu_crtc) {
-		DRM_ERROR("invalid dpu_crtc %pK\n", dpu_crtc);
-		return;
-	}
-
-	INIT_LIST_HEAD(&dpu_crtc->active_list);
-	INIT_LIST_HEAD(&dpu_crtc->dirty_list);
-	INIT_LIST_HEAD(&dpu_crtc->feature_list);
-	INIT_LIST_HEAD(&dpu_crtc->ad_dirty);
-	INIT_LIST_HEAD(&dpu_crtc->ad_active);
-}
-
-static void dpu_cp_crtc_install_immutable_property(struct drm_crtc *crtc,
-						   char *name,
-						   u32 feature)
-{
-	struct drm_property *prop;
-	struct dpu_cp_node *prop_node = NULL;
-	struct msm_drm_private *priv;
-	struct dpu_cp_prop_attach prop_attach;
-	uint64_t val = 0;
-
-	if (feature >=  DPU_CP_CRTC_MAX_FEATURES) {
-		DRM_ERROR("invalid feature %d max %d\n", feature,
-		       DPU_CP_CRTC_MAX_FEATURES);
-		return;
-	}
-
-	prop_node = kzalloc(sizeof(*prop_node), GFP_KERNEL);
-	if (!prop_node)
-		return;
-
-	priv = crtc->dev->dev_private;
-	prop = priv->cp_property[feature];
-
-	if (!prop) {
-		prop = drm_property_create_range(crtc->dev,
-				DRM_MODE_PROP_IMMUTABLE, name, 0, 1);
-		if (!prop) {
-			DRM_ERROR("property create failed: %s\n", name);
-			kfree(prop_node);
-			return;
-		}
-		priv->cp_property[feature] = prop;
-	}
-
-	INIT_PROP_ATTACH(&prop_attach, crtc, prop, prop_node,
-				feature, val);
-	dpu_cp_crtc_prop_attach(&prop_attach);
-}
-
-static void dpu_cp_crtc_install_range_property(struct drm_crtc *crtc,
-					     char *name,
-					     u32 feature,
-					     uint64_t min, uint64_t max,
-					     uint64_t val)
-{
-	struct drm_property *prop;
-	struct dpu_cp_node *prop_node = NULL;
-	struct msm_drm_private *priv;
-	struct dpu_cp_prop_attach prop_attach;
-
-	if (feature >=  DPU_CP_CRTC_MAX_FEATURES) {
-		DRM_ERROR("invalid feature %d max %d\n", feature,
-			  DPU_CP_CRTC_MAX_FEATURES);
-		return;
-	}
-
-	prop_node = kzalloc(sizeof(*prop_node), GFP_KERNEL);
-	if (!prop_node)
-		return;
-
-	priv = crtc->dev->dev_private;
-	prop = priv->cp_property[feature];
-
-	if (!prop) {
-		prop = drm_property_create_range(crtc->dev, 0, name, min, max);
-		if (!prop) {
-			DRM_ERROR("property create failed: %s\n", name);
-			kfree(prop_node);
-			return;
-		}
-		priv->cp_property[feature] = prop;
-	}
-
-	INIT_PROP_ATTACH(&prop_attach, crtc, prop, prop_node,
-				feature, val);
-
-	dpu_cp_crtc_prop_attach(&prop_attach);
-}
-
-static void dpu_cp_crtc_install_blob_property(struct drm_crtc *crtc, char *name,
-			u32 feature, u32 blob_sz)
-{
-	struct drm_property *prop;
-	struct dpu_cp_node *prop_node = NULL;
-	struct msm_drm_private *priv;
-	uint64_t val = 0;
-	struct dpu_cp_prop_attach prop_attach;
-
-	if (feature >=  DPU_CP_CRTC_MAX_FEATURES) {
-		DRM_ERROR("invalid feature %d max %d\n", feature,
-		       DPU_CP_CRTC_MAX_FEATURES);
-		return;
-	}
-
-	prop_node = kzalloc(sizeof(*prop_node), GFP_KERNEL);
-	if (!prop_node)
-		return;
-
-	priv = crtc->dev->dev_private;
-	prop = priv->cp_property[feature];
-
-	if (!prop) {
-		prop = drm_property_create(crtc->dev,
-					   DRM_MODE_PROP_BLOB, name, 0);
-		if (!prop) {
-			DRM_ERROR("property create failed: %s\n", name);
-			kfree(prop_node);
-			return;
-		}
-		priv->cp_property[feature] = prop;
-	}
-
-	INIT_PROP_ATTACH(&prop_attach, crtc, prop, prop_node,
-				feature, val);
-	prop_node->prop_blob_sz = blob_sz;
-
-	dpu_cp_crtc_prop_attach(&prop_attach);
-}
-
-static void dpu_cp_crtc_install_enum_property(struct drm_crtc *crtc,
-	u32 feature, const struct drm_prop_enum_list *list, u32 enum_sz,
-	char *name)
-{
-	struct drm_property *prop;
-	struct dpu_cp_node *prop_node = NULL;
-	struct msm_drm_private *priv;
-	uint64_t val = 0;
-	struct dpu_cp_prop_attach prop_attach;
-
-	if (feature >=  DPU_CP_CRTC_MAX_FEATURES) {
-		DRM_ERROR("invalid feature %d max %d\n", feature,
-		       DPU_CP_CRTC_MAX_FEATURES);
-		return;
-	}
-
-	prop_node = kzalloc(sizeof(*prop_node), GFP_KERNEL);
-	if (!prop_node)
-		return;
-
-	priv = crtc->dev->dev_private;
-	prop = priv->cp_property[feature];
-
-	if (!prop) {
-		prop = drm_property_create_enum(crtc->dev, 0, name,
-			list, enum_sz);
-		if (!prop) {
-			DRM_ERROR("property create failed: %s\n", name);
-			kfree(prop_node);
-			return;
-		}
-		priv->cp_property[feature] = prop;
-	}
-
-	INIT_PROP_ATTACH(&prop_attach, crtc, prop, prop_node,
-				feature, val);
-
-	dpu_cp_crtc_prop_attach(&prop_attach);
-}
-
-static void dpu_cp_crtc_setfeature(struct dpu_cp_node *prop_node,
-				   struct dpu_crtc *dpu_crtc)
-{
-	struct dpu_hw_cp_cfg hw_cfg;
-	struct dpu_hw_mixer *hw_lm;
-	struct dpu_hw_dspp *hw_dspp;
-	u32 num_mixers = dpu_crtc->num_mixers;
-	int i = 0;
-	bool feature_enabled = false;
-	int ret = 0;
-	struct dpu_ad_hw_cfg ad_cfg;
-
-	dpu_cp_get_hw_payload(prop_node, &hw_cfg, &feature_enabled);
-	hw_cfg.num_of_mixers = dpu_crtc->num_mixers;
-	hw_cfg.displayh = dpu_crtc->base.mode.hdisplay;
-	hw_cfg.displayv = dpu_crtc->base.mode.vdisplay;
-	hw_cfg.last_feature = 0;
-
-	for (i = 0; i < num_mixers && !ret; i++) {
-		hw_lm = dpu_crtc->mixers[i].hw_lm;
-		hw_dspp = dpu_crtc->mixers[i].hw_dspp;
-		hw_cfg.ctl = dpu_crtc->mixers[i].hw_ctl;
-		hw_cfg.mixer_info = hw_lm;
-		switch (prop_node->feature) {
-		case DPU_CP_CRTC_DSPP_VLUT:
-			if (!hw_dspp || !hw_dspp->ops.setup_vlut) {
-				ret = -EINVAL;
-				continue;
-			}
-			hw_dspp->ops.setup_vlut(hw_dspp, &hw_cfg);
-			break;
-		case DPU_CP_CRTC_DSPP_PCC:
-			if (!hw_dspp || !hw_dspp->ops.setup_pcc) {
-				ret = -EINVAL;
-				continue;
-			}
-			hw_dspp->ops.setup_pcc(hw_dspp, &hw_cfg);
-			break;
-		case DPU_CP_CRTC_DSPP_IGC:
-			if (!hw_dspp || !hw_dspp->ops.setup_igc) {
-				ret = -EINVAL;
-				continue;
-			}
-			hw_dspp->ops.setup_igc(hw_dspp, &hw_cfg);
-			break;
-		case DPU_CP_CRTC_DSPP_GC:
-			if (!hw_dspp || !hw_dspp->ops.setup_gc) {
-				ret = -EINVAL;
-				continue;
-			}
-			hw_dspp->ops.setup_gc(hw_dspp, &hw_cfg);
-			break;
-		case DPU_CP_CRTC_DSPP_HUE:
-			if (!hw_dspp || !hw_dspp->ops.setup_hue) {
-				ret = -EINVAL;
-				continue;
-			}
-			hw_dspp->ops.setup_hue(hw_dspp, &hw_cfg);
-			break;
-		case DPU_CP_CRTC_DSPP_SAT:
-			if (!hw_dspp || !hw_dspp->ops.setup_sat) {
-				ret = -EINVAL;
-				continue;
-			}
-			hw_dspp->ops.setup_sat(hw_dspp, &hw_cfg);
-			break;
-		case DPU_CP_CRTC_DSPP_VAL:
-			if (!hw_dspp || !hw_dspp->ops.setup_val) {
-				ret = -EINVAL;
-				continue;
-			}
-			hw_dspp->ops.setup_val(hw_dspp, &hw_cfg);
-			break;
-		case DPU_CP_CRTC_DSPP_CONT:
-			if (!hw_dspp || !hw_dspp->ops.setup_cont) {
-				ret = -EINVAL;
-				continue;
-			}
-			hw_dspp->ops.setup_cont(hw_dspp, &hw_cfg);
-			break;
-		case DPU_CP_CRTC_DSPP_MEMCOLOR:
-			if (!hw_dspp || !hw_dspp->ops.setup_pa_memcolor) {
-				ret = -EINVAL;
-				continue;
-			}
-			hw_dspp->ops.setup_pa_memcolor(hw_dspp, &hw_cfg);
-			break;
-		case DPU_CP_CRTC_DSPP_SIXZONE:
-			if (!hw_dspp || !hw_dspp->ops.setup_sixzone) {
-				ret = -EINVAL;
-				continue;
-			}
-			hw_dspp->ops.setup_sixzone(hw_dspp, &hw_cfg);
-			break;
-		case DPU_CP_CRTC_DSPP_GAMUT:
-			if (!hw_dspp || !hw_dspp->ops.setup_gamut) {
-				ret = -EINVAL;
-				continue;
-			}
-			hw_dspp->ops.setup_gamut(hw_dspp, &hw_cfg);
-			break;
-		case DPU_CP_CRTC_LM_GC:
-			if (!hw_lm || !hw_lm->ops.setup_gc) {
-				ret = -EINVAL;
-				continue;
-			}
-			hw_lm->ops.setup_gc(hw_lm, &hw_cfg);
-			break;
-		case DPU_CP_CRTC_DSPP_AD_MODE:
-			if (!hw_dspp || !hw_dspp->ops.setup_ad) {
-				ret = -EINVAL;
-				continue;
-			}
-			ad_cfg.prop = AD_MODE;
-			ad_cfg.hw_cfg = &hw_cfg;
-			hw_dspp->ops.setup_ad(hw_dspp, &ad_cfg);
-			break;
-		case DPU_CP_CRTC_DSPP_AD_INIT:
-			if (!hw_dspp || !hw_dspp->ops.setup_ad) {
-				ret = -EINVAL;
-				continue;
-			}
-			ad_cfg.prop = AD_INIT;
-			ad_cfg.hw_cfg = &hw_cfg;
-			hw_dspp->ops.setup_ad(hw_dspp, &ad_cfg);
-			break;
-		case DPU_CP_CRTC_DSPP_AD_CFG:
-			if (!hw_dspp || !hw_dspp->ops.setup_ad) {
-				ret = -EINVAL;
-				continue;
-			}
-			ad_cfg.prop = AD_CFG;
-			ad_cfg.hw_cfg = &hw_cfg;
-			hw_dspp->ops.setup_ad(hw_dspp, &ad_cfg);
-			break;
-		case DPU_CP_CRTC_DSPP_AD_INPUT:
-			if (!hw_dspp || !hw_dspp->ops.setup_ad) {
-				ret = -EINVAL;
-				continue;
-			}
-			ad_cfg.prop = AD_INPUT;
-			ad_cfg.hw_cfg = &hw_cfg;
-			hw_dspp->ops.setup_ad(hw_dspp, &ad_cfg);
-			break;
-		case DPU_CP_CRTC_DSPP_AD_ASSERTIVENESS:
-			if (!hw_dspp || !hw_dspp->ops.setup_ad) {
-				ret = -EINVAL;
-				continue;
-			}
-			ad_cfg.prop = AD_ASSERTIVE;
-			ad_cfg.hw_cfg = &hw_cfg;
-			hw_dspp->ops.setup_ad(hw_dspp, &ad_cfg);
-			break;
-		case DPU_CP_CRTC_DSPP_AD_BACKLIGHT:
-			if (!hw_dspp || !hw_dspp->ops.setup_ad) {
-				ret = -EINVAL;
-				continue;
-			}
-			ad_cfg.prop = AD_BACKLIGHT;
-			ad_cfg.hw_cfg = &hw_cfg;
-			hw_dspp->ops.setup_ad(hw_dspp, &ad_cfg);
-			break;
-		default:
-			ret = -EINVAL;
-			break;
-		}
-	}
-
-	if (ret) {
-		DRM_ERROR("failed to %s feature %d\n",
-			((feature_enabled) ? "enable" : "disable"),
-			prop_node->feature);
-		return;
-	}
-
-	if (feature_enabled) {
-		DRM_DEBUG_DRIVER("Add feature to active list %d\n",
-				 prop_node->property_id);
-		dpu_cp_update_list(prop_node, dpu_crtc, false);
-	} else {
-		DRM_DEBUG_DRIVER("remove feature from active list %d\n",
-			 prop_node->property_id);
-		list_del_init(&prop_node->active_list);
-	}
-	/* Programming of feature done remove from dirty list */
-	list_del_init(&prop_node->dirty_list);
-}
-
-void dpu_cp_crtc_apply_properties(struct drm_crtc *crtc)
-{
-	struct dpu_crtc *dpu_crtc = NULL;
-	bool set_dspp_flush = false, set_lm_flush = false;
-	struct dpu_cp_node *prop_node = NULL, *n = NULL;
-	struct dpu_hw_ctl *ctl;
-	uint32_t flush_mask = 0;
-	u32 num_mixers = 0, i = 0;
-
-	if (!crtc || !crtc->dev) {
-		DRM_ERROR("invalid crtc %pK dev %pK\n", crtc,
-			  (crtc ? crtc->dev : NULL));
-		return;
-	}
-
-	dpu_crtc = to_dpu_crtc(crtc);
-	if (!dpu_crtc) {
-		DRM_ERROR("invalid dpu_crtc %pK\n", dpu_crtc);
-		return;
-	}
-
-	num_mixers = dpu_crtc->num_mixers;
-	if (!num_mixers) {
-		DRM_DEBUG_DRIVER("no mixers for this crtc\n");
-		return;
-	}
-
-	/* Check if dirty lists are empty and ad features are disabled for
-	 * early return. If ad properties are active then we need to issue
-	 * dspp flush.
-	 **/
-	if (list_empty(&dpu_crtc->dirty_list) &&
-		list_empty(&dpu_crtc->ad_dirty)) {
-		if (list_empty(&dpu_crtc->ad_active)) {
-			DRM_DEBUG_DRIVER("Dirty list is empty\n");
-			return;
-		}
-		dpu_cp_ad_set_prop(dpu_crtc, AD_IPC_RESET);
-		set_dspp_flush = true;
-	}
-
-	list_for_each_entry_safe(prop_node, n, &dpu_crtc->dirty_list,
-				dirty_list) {
-		dpu_cp_crtc_setfeature(prop_node, dpu_crtc);
-		/* Set the flush flag to true */
-		if (prop_node->is_dspp_feature)
-			set_dspp_flush = true;
-		else
-			set_lm_flush = true;
-	}
-
-	list_for_each_entry_safe(prop_node, n, &dpu_crtc->ad_dirty,
-				dirty_list) {
-		set_dspp_flush = true;
-		dpu_cp_crtc_setfeature(prop_node, dpu_crtc);
-	}
-
-	for (i = 0; i < num_mixers; i++) {
-		ctl = dpu_crtc->mixers[i].hw_ctl;
-		if (!ctl)
-			continue;
-		if (set_dspp_flush && ctl->ops.get_bitmask_dspp
-				&& dpu_crtc->mixers[i].hw_dspp) {
-			ctl->ops.get_bitmask_dspp(ctl,
-					&flush_mask,
-					dpu_crtc->mixers[i].hw_dspp->idx);
-			ctl->ops.update_pending_flush(ctl, flush_mask);
-		}
-		if (set_lm_flush && ctl->ops.get_bitmask_mixer
-				&& dpu_crtc->mixers[i].hw_lm) {
-			flush_mask = ctl->ops.get_bitmask_mixer(ctl,
-					dpu_crtc->mixers[i].hw_lm->idx);
-			ctl->ops.update_pending_flush(ctl, flush_mask);
-		}
-	}
-}
-
-void dpu_cp_crtc_install_properties(struct drm_crtc *crtc)
-{
-	struct dpu_kms *kms = NULL;
-	struct dpu_crtc *dpu_crtc = NULL;
-	struct dpu_mdss_cfg *catalog = NULL;
-	unsigned long features = 0;
-	int i = 0;
-	struct msm_drm_private *priv;
-
-	if (!crtc || !crtc->dev || !crtc->dev->dev_private) {
-		DRM_ERROR("invalid crtc %pK dev %pK\n",
-		       crtc, ((crtc) ? crtc->dev : NULL));
-		return;
-	}
-
-	dpu_crtc = to_dpu_crtc(crtc);
-	if (!dpu_crtc) {
-		DRM_ERROR("dpu_crtc %pK\n", dpu_crtc);
-		return;
-	}
-
-	kms = get_kms(crtc);
-	if (!kms || !kms->catalog) {
-		DRM_ERROR("invalid dpu kms %pK catalog %pK dpu_crtc %pK\n",
-		 kms, ((kms) ? kms->catalog : NULL), dpu_crtc);
-		return;
-	}
-
-	/**
-	 * Function can be called during the atomic_check with test_only flag
-	 * and actual commit. Allocate properties only if feature list is
-	 * empty during the atomic_check with test_only flag.
-	 */
-	if (!list_empty(&dpu_crtc->feature_list))
-		return;
-
-	catalog = kms->catalog;
-	priv = crtc->dev->dev_private;
-	/**
-	 * DSPP/LM properties are global to all the CRTCS.
-	 * Properties are created for first CRTC and re-used for later
-	 * crtcs.
-	 */
-	if (!priv->cp_property) {
-		priv->cp_property = kzalloc((sizeof(priv->cp_property) *
-				DPU_CP_CRTC_MAX_FEATURES), GFP_KERNEL);
-		setup_dspp_prop_install_funcs(dspp_prop_install_func);
-		setup_lm_prop_install_funcs(lm_prop_install_func);
-	}
-	if (!priv->cp_property)
-		return;
-
-	if (!catalog->dspp_count)
-		goto lm_property;
-
-	/* Check for all the DSPP properties and attach it to CRTC */
-	features = catalog->dspp[0].features;
-	for (i = 0; i < DPU_DSPP_MAX; i++) {
-		if (!test_bit(i, &features))
-			continue;
-		if (dspp_prop_install_func[i])
-			dspp_prop_install_func[i](crtc);
-	}
-
-lm_property:
-	if (!catalog->mixer_count)
-		return;
-
-	/* Check for all the LM properties and attach it to CRTC */
-	features = catalog->mixer[0].features;
-	for (i = 0; i < DPU_MIXER_MAX; i++) {
-		if (!test_bit(i, &features))
-			continue;
-		if (lm_prop_install_func[i])
-			lm_prop_install_func[i](crtc);
-	}
-}
-
-int dpu_cp_crtc_set_property(struct drm_crtc *crtc,
-				struct drm_property *property,
-				uint64_t val)
-{
-	struct dpu_cp_node *prop_node = NULL;
-	struct dpu_crtc *dpu_crtc = NULL;
-	int ret = 0, i = 0, dspp_cnt, lm_cnt;
-	u8 found = 0;
-
-	if (!crtc || !property) {
-		DRM_ERROR("invalid crtc %pK property %pK\n", crtc, property);
-		return -EINVAL;
-	}
-
-	dpu_crtc = to_dpu_crtc(crtc);
-	if (!dpu_crtc) {
-		DRM_ERROR("invalid dpu_crtc %pK\n", dpu_crtc);
-		return -EINVAL;
-	}
-
-	list_for_each_entry(prop_node, &dpu_crtc->feature_list, feature_list) {
-		if (property->base.id == prop_node->property_id) {
-			found = 1;
-			break;
-		}
-	}
-
-	if (!found)
-		return 0;
-	/**
-	 * dpu_crtc is virtual ensure that hardware has been attached to the
-	 * crtc. Check LM and dspp counts based on whether feature is a
-	 * dspp/lm feature.
-	 */
-	if (!dpu_crtc->num_mixers ||
-	    dpu_crtc->num_mixers > ARRAY_SIZE(dpu_crtc->mixers)) {
-		DRM_ERROR("Invalid mixer config act cnt %d max cnt %zd\n",
-			dpu_crtc->num_mixers, ARRAY_SIZE(dpu_crtc->mixers));
-		return -EINVAL;
-	}
-
-	dspp_cnt = 0;
-	lm_cnt = 0;
-	for (i = 0; i < dpu_crtc->num_mixers; i++) {
-		if (dpu_crtc->mixers[i].hw_dspp)
-			dspp_cnt++;
-		if (dpu_crtc->mixers[i].hw_lm)
-			lm_cnt++;
-	}
-
-	if (prop_node->is_dspp_feature && dspp_cnt < dpu_crtc->num_mixers) {
-		DRM_ERROR("invalid dspp cnt %d mixer cnt %d\n", dspp_cnt,
-			dpu_crtc->num_mixers);
-		return -EINVAL;
-	} else if (lm_cnt < dpu_crtc->num_mixers) {
-		DRM_ERROR("invalid lm cnt %d mixer cnt %d\n", lm_cnt,
-			dpu_crtc->num_mixers);
-		return -EINVAL;
-	}
-
-	ret = dpu_cp_ad_validate_prop(prop_node, dpu_crtc);
-	if (ret) {
-		DRM_ERROR("ad property validation failed ret %d\n", ret);
-		return ret;
-	}
-
-	/* remove the property from dirty list */
-	list_del_init(&prop_node->dirty_list);
-
-	if (!val)
-		ret = dpu_cp_disable_crtc_property(crtc, property, prop_node);
-	else
-		ret = dpu_cp_enable_crtc_property(crtc, property,
-						  prop_node, val);
-
-	if (!ret) {
-		/* remove the property from active list */
-		list_del_init(&prop_node->active_list);
-		/* Mark the feature as dirty */
-		dpu_cp_update_list(prop_node, dpu_crtc, true);
-	}
-	return ret;
-}
-
-int dpu_cp_crtc_get_property(struct drm_crtc *crtc,
-			     struct drm_property *property, uint64_t *val)
-{
-	struct dpu_cp_node *prop_node = NULL;
-	struct dpu_crtc *dpu_crtc = NULL;
-
-	if (!crtc || !property || !val) {
-		DRM_ERROR("invalid crtc %pK property %pK val %pK\n",
-			  crtc, property, val);
-		return -EINVAL;
-	}
-
-	dpu_crtc = to_dpu_crtc(crtc);
-	if (!dpu_crtc) {
-		DRM_ERROR("invalid dpu_crtc %pK\n", dpu_crtc);
-		return -EINVAL;
-	}
-	/* Return 0 if property is not supported */
-	*val = 0;
-	list_for_each_entry(prop_node, &dpu_crtc->feature_list, feature_list) {
-		if (property->base.id == prop_node->property_id) {
-			*val = prop_node->prop_val;
-			break;
-		}
-	}
-	return 0;
-}
-
-void dpu_cp_crtc_destroy_properties(struct drm_crtc *crtc)
-{
-	struct dpu_crtc *dpu_crtc = NULL;
-	struct dpu_cp_node *prop_node = NULL, *n = NULL;
-
-	if (!crtc) {
-		DRM_ERROR("invalid crtc %pK\n", crtc);
-		return;
-	}
-
-	dpu_crtc = to_dpu_crtc(crtc);
-	if (!dpu_crtc) {
-		DRM_ERROR("invalid dpu_crtc %pK\n", dpu_crtc);
-		return;
-	}
-
-	list_for_each_entry_safe(prop_node, n, &dpu_crtc->feature_list,
-				 feature_list) {
-		if (prop_node->prop_flags & DRM_MODE_PROP_BLOB
-		    && prop_node->blob_ptr)
-			drm_property_blob_put(prop_node->blob_ptr);
-
-		list_del_init(&prop_node->active_list);
-		list_del_init(&prop_node->dirty_list);
-		list_del_init(&prop_node->feature_list);
-		dpu_cp_destroy_local_blob(prop_node);
-		kfree(prop_node);
-	}
-
-	INIT_LIST_HEAD(&dpu_crtc->active_list);
-	INIT_LIST_HEAD(&dpu_crtc->dirty_list);
-	INIT_LIST_HEAD(&dpu_crtc->feature_list);
-}
-
-void dpu_cp_crtc_suspend(struct drm_crtc *crtc)
-{
-	struct dpu_crtc *dpu_crtc = NULL;
-	struct dpu_cp_node *prop_node = NULL, *n = NULL;
-
-	if (!crtc) {
-		DRM_ERROR("crtc %pK\n", crtc);
-		return;
-	}
-	dpu_crtc = to_dpu_crtc(crtc);
-	if (!dpu_crtc) {
-		DRM_ERROR("dpu_crtc %pK\n", dpu_crtc);
-		return;
-	}
-
-	list_for_each_entry_safe(prop_node, n, &dpu_crtc->active_list,
-				 active_list) {
-		dpu_cp_update_list(prop_node, dpu_crtc, true);
-		list_del_init(&prop_node->active_list);
-	}
-
-	list_for_each_entry_safe(prop_node, n, &dpu_crtc->ad_active,
-				 active_list) {
-		dpu_cp_update_list(prop_node, dpu_crtc, true);
-		list_del_init(&prop_node->active_list);
-	}
-}
-
-void dpu_cp_crtc_resume(struct drm_crtc *crtc)
-{
-	/* placeholder for operations needed during resume */
-}
-
-static void dspp_pcc_install_property(struct drm_crtc *crtc)
-{
-	char feature_name[256];
-	struct dpu_kms *kms = NULL;
-	struct dpu_mdss_cfg *catalog = NULL;
-	u32 version;
-
-	kms = get_kms(crtc);
-	catalog = kms->catalog;
-
-	version = catalog->dspp[0].sblk->pcc.version >> 16;
-	snprintf(feature_name, ARRAY_SIZE(feature_name), "%s%d",
-		"DPU_DSPP_PCC_V", version);
-	switch (version) {
-	case 1:
-	case 4:
-		dpu_cp_crtc_install_blob_property(crtc, feature_name,
-			DPU_CP_CRTC_DSPP_PCC, sizeof(struct drm_msm_pcc));
-		break;
-	default:
-		DRM_ERROR("version %d not supported\n", version);
-		break;
-	}
-}
-
-static void dspp_hsic_install_property(struct drm_crtc *crtc)
-{
-	char feature_name[256];
-	struct dpu_kms *kms = NULL;
-	struct dpu_mdss_cfg *catalog = NULL;
-	u32 version;
-
-	kms = get_kms(crtc);
-	catalog = kms->catalog;
-	version = catalog->dspp[0].sblk->hsic.version >> 16;
-	switch (version) {
-	case 1:
-		snprintf(feature_name, ARRAY_SIZE(feature_name), "%s%d",
-			"DPU_DSPP_HUE_V", version);
-		dpu_cp_crtc_install_range_property(crtc, feature_name,
-			DPU_CP_CRTC_DSPP_HUE, 0, U32_MAX, 0);
-		break;
-	default:
-		DRM_ERROR("version %d not supported\n", version);
-		break;
-	}
-}
-
-static void dspp_vlut_install_property(struct drm_crtc *crtc)
-{
-	char feature_name[256];
-	struct dpu_kms *kms = NULL;
-	struct dpu_mdss_cfg *catalog = NULL;
-	u32 version;
-
-	kms = get_kms(crtc);
-	catalog = kms->catalog;
-	version = catalog->dspp[0].sblk->vlut.version >> 16;
-	snprintf(feature_name, ARRAY_SIZE(feature_name), "%s%d",
-		"DPU_DSPP_VLUT_V", version);
-	switch (version) {
-	case 1:
-		dpu_cp_crtc_install_range_property(crtc, feature_name,
-			DPU_CP_CRTC_DSPP_VLUT, 0, U64_MAX, 0);
-		dpu_cp_create_local_blob(crtc,
-			DPU_CP_CRTC_DSPP_VLUT,
-			sizeof(struct drm_msm_pa_vlut));
-		break;
-	default:
-		DRM_ERROR("version %d not supported\n", version);
-		break;
-	}
-}
-
-static void dspp_ad_install_property(struct drm_crtc *crtc)
-{
-	char feature_name[256];
-	struct dpu_kms *kms = NULL;
-	struct dpu_mdss_cfg *catalog = NULL;
-	u32 version;
-
-	kms = get_kms(crtc);
-	catalog = kms->catalog;
-	version = catalog->dspp[0].sblk->ad.version >> 16;
-	snprintf(feature_name, ARRAY_SIZE(feature_name), "%s%d",
-		"DPU_DSPP_AD_V", version);
-	switch (version) {
-	case 3:
-		dpu_cp_crtc_install_immutable_property(crtc,
-			feature_name, DPU_CP_CRTC_DSPP_AD);
-		break;
-	case 4:
-		dpu_cp_crtc_install_immutable_property(crtc,
-			feature_name, DPU_CP_CRTC_DSPP_AD);
-
-		dpu_cp_crtc_install_enum_property(crtc,
-			DPU_CP_CRTC_DSPP_AD_MODE, ad4_modes,
-			ARRAY_SIZE(ad4_modes), "DPU_DSPP_AD_V4_MODE");
-
-		dpu_cp_crtc_install_range_property(crtc, "DPU_DSPP_AD_V4_INIT",
-			DPU_CP_CRTC_DSPP_AD_INIT, 0, U64_MAX, 0);
-		dpu_cp_create_local_blob(crtc, DPU_CP_CRTC_DSPP_AD_INIT,
-			sizeof(struct drm_msm_ad4_init));
-
-		dpu_cp_crtc_install_range_property(crtc, "DPU_DSPP_AD_V4_CFG",
-			DPU_CP_CRTC_DSPP_AD_CFG, 0, U64_MAX, 0);
-		dpu_cp_create_local_blob(crtc, DPU_CP_CRTC_DSPP_AD_CFG,
-			sizeof(struct drm_msm_ad4_cfg));
-		dpu_cp_crtc_install_range_property(crtc,
-			"DPU_DSPP_AD_V4_ASSERTIVENESS",
-			DPU_CP_CRTC_DSPP_AD_ASSERTIVENESS, 0, (BIT(8) - 1), 0);
-		dpu_cp_crtc_install_range_property(crtc, "DPU_DSPP_AD_V4_INPUT",
-			DPU_CP_CRTC_DSPP_AD_INPUT, 0, U16_MAX, 0);
-		dpu_cp_crtc_install_range_property(crtc,
-				"DPU_DSPP_AD_V4_BACKLIGHT",
-			DPU_CP_CRTC_DSPP_AD_BACKLIGHT, 0, (BIT(16) - 1),
-			0);
-		break;
-	default:
-		DRM_ERROR("version %d not supported\n", version);
-		break;
-	}
-}
-
-static void lm_gc_install_property(struct drm_crtc *crtc)
-{
-	char feature_name[256];
-	struct dpu_kms *kms = NULL;
-	struct dpu_mdss_cfg *catalog = NULL;
-	u32 version;
-
-	kms = get_kms(crtc);
-	catalog = kms->catalog;
-	version = catalog->mixer[0].sblk->gc.version >> 16;
-	snprintf(feature_name, ARRAY_SIZE(feature_name), "%s%d",
-		 "DPU_LM_GC_V", version);
-	switch (version) {
-	case 1:
-		dpu_cp_crtc_install_blob_property(crtc, feature_name,
-			DPU_CP_CRTC_LM_GC, sizeof(struct drm_msm_pgc_lut));
-		break;
-	default:
-		DRM_ERROR("version %d not supported\n", version);
-		break;
-	}
-}
-
-static void dspp_gamut_install_property(struct drm_crtc *crtc)
-{
-	char feature_name[256];
-	struct dpu_kms *kms = NULL;
-	struct dpu_mdss_cfg *catalog = NULL;
-	u32 version;
-
-	kms = get_kms(crtc);
-	catalog = kms->catalog;
-
-	version = catalog->dspp[0].sblk->gamut.version >> 16;
-	snprintf(feature_name, ARRAY_SIZE(feature_name), "%s%d",
-		"DPU_DSPP_GAMUT_V", version);
-	switch (version) {
-	case 4:
-		dpu_cp_crtc_install_blob_property(crtc, feature_name,
-			DPU_CP_CRTC_DSPP_GAMUT,
-			sizeof(struct drm_msm_3d_gamut));
-		break;
-	default:
-		DRM_ERROR("version %d not supported\n", version);
-		break;
-	}
-}
-
-static void dspp_gc_install_property(struct drm_crtc *crtc)
-{
-	char feature_name[256];
-	struct dpu_kms *kms = NULL;
-	struct dpu_mdss_cfg *catalog = NULL;
-	u32 version;
-
-	kms = get_kms(crtc);
-	catalog = kms->catalog;
-
-	version = catalog->dspp[0].sblk->gc.version >> 16;
-	snprintf(feature_name, ARRAY_SIZE(feature_name), "%s%d",
-		"DPU_DSPP_GC_V", version);
-	switch (version) {
-	case 1:
-		dpu_cp_crtc_install_blob_property(crtc, feature_name,
-			DPU_CP_CRTC_DSPP_GC, sizeof(struct drm_msm_pgc_lut));
-		break;
-	default:
-		DRM_ERROR("version %d not supported\n", version);
-		break;
-	}
-}
-
-static void dspp_igc_install_property(struct drm_crtc *crtc)
-{
-	char feature_name[256];
-	struct dpu_kms *kms = NULL;
-	struct dpu_mdss_cfg *catalog = NULL;
-	u32 version;
-
-	kms = get_kms(crtc);
-	catalog = kms->catalog;
-
-	version = catalog->dspp[0].sblk->igc.version >> 16;
-	snprintf(feature_name, ARRAY_SIZE(feature_name), "%s%d",
-		"DPU_DSPP_IGC_V", version);
-	switch (version) {
-	case 3:
-		dpu_cp_crtc_install_blob_property(crtc, feature_name,
-			DPU_CP_CRTC_DSPP_IGC, sizeof(struct drm_msm_igc_lut));
-		break;
-	default:
-		DRM_ERROR("version %d not supported\n", version);
-		break;
-	}
-}
-
-static void dpu_cp_update_list(struct dpu_cp_node *prop_node,
-		struct dpu_crtc *crtc, bool dirty_list)
-{
-	switch (prop_node->feature) {
-	case DPU_CP_CRTC_DSPP_AD_MODE:
-	case DPU_CP_CRTC_DSPP_AD_INIT:
-	case DPU_CP_CRTC_DSPP_AD_CFG:
-	case DPU_CP_CRTC_DSPP_AD_INPUT:
-	case DPU_CP_CRTC_DSPP_AD_ASSERTIVENESS:
-	case DPU_CP_CRTC_DSPP_AD_BACKLIGHT:
-		if (dirty_list)
-			list_add_tail(&prop_node->dirty_list, &crtc->ad_dirty);
-		else
-			list_add_tail(&prop_node->active_list,
-					&crtc->ad_active);
-		break;
-	default:
-		/* color processing properties handle here */
-		if (dirty_list)
-			list_add_tail(&prop_node->dirty_list,
-					&crtc->dirty_list);
-		else
-			list_add_tail(&prop_node->active_list,
-					&crtc->active_list);
-		break;
-	};
-}
-
-static int dpu_cp_ad_validate_prop(struct dpu_cp_node *prop_node,
-		struct dpu_crtc *crtc)
-{
-	int i = 0, ret = 0;
-	u32 ad_prop;
-
-	for (i = 0; i < crtc->num_mixers && !ret; i++) {
-		if (!crtc->mixers[i].hw_dspp) {
-			ret = -EINVAL;
-			continue;
-		}
-		switch (prop_node->feature) {
-		case DPU_CP_CRTC_DSPP_AD_MODE:
-			ad_prop = AD_MODE;
-			break;
-		case DPU_CP_CRTC_DSPP_AD_INIT:
-			ad_prop = AD_INIT;
-			break;
-		case DPU_CP_CRTC_DSPP_AD_CFG:
-			ad_prop = AD_CFG;
-			break;
-		case DPU_CP_CRTC_DSPP_AD_INPUT:
-			ad_prop = AD_INPUT;
-			break;
-		case DPU_CP_CRTC_DSPP_AD_ASSERTIVENESS:
-			ad_prop = AD_ASSERTIVE;
-			break;
-		case DPU_CP_CRTC_DSPP_AD_BACKLIGHT:
-			ad_prop = AD_BACKLIGHT;
-			break;
-		default:
-			/* Not an AD property */
-			return 0;
-		}
-		if (!crtc->mixers[i].hw_dspp->ops.validate_ad)
-			ret = -EINVAL;
-		else
-			ret = crtc->mixers[i].hw_dspp->ops.validate_ad(
-				crtc->mixers[i].hw_dspp, &ad_prop);
-	}
-	return ret;
-}
-
-static void dpu_cp_ad_interrupt_cb(void *arg, int irq_idx)
-{
-	struct dpu_crtc *crtc = arg;
-
-	dpu_crtc_event_queue(&crtc->base, dpu_cp_notify_ad_event, NULL);
-}
-
-static void dpu_cp_notify_ad_event(struct drm_crtc *crtc_drm, void *arg)
-{
-	uint32_t bl = 0;
-	struct dpu_hw_mixer *hw_lm = NULL;
-	struct dpu_hw_dspp *hw_dspp = NULL;
-	u32 num_mixers;
-	struct dpu_crtc *crtc;
-	struct drm_event event;
-	int i;
-
-	crtc = to_dpu_crtc(crtc_drm);
-	num_mixers = crtc->num_mixers;
-	if (!num_mixers)
-		return;
-
-	for (i = 0; i < num_mixers; i++) {
-		hw_lm = crtc->mixers[i].hw_lm;
-		hw_dspp = crtc->mixers[i].hw_dspp;
-		if (!hw_lm->cfg.right_mixer)
-			break;
-	}
-
-	if (!hw_dspp)
-		return;
-
-	hw_dspp->ops.ad_read_intr_resp(hw_dspp, AD4_BACKLIGHT, &bl);
-	event.length = sizeof(u32);
-	event.type = DRM_EVENT_AD_BACKLIGHT;
-	msm_mode_object_event_notify(&crtc_drm->base, crtc_drm->dev,
-			&event, (u8 *)&bl);
-}
-
-int dpu_cp_ad_interrupt(struct drm_crtc *crtc_drm, bool en,
-	struct dpu_irq_callback *ad_irq)
-{
-	struct dpu_kms *kms = NULL;
-	u32 num_mixers;
-	struct dpu_hw_mixer *hw_lm;
-	struct dpu_hw_dspp *hw_dspp = NULL;
-	struct dpu_crtc *crtc;
-	int i;
-	int irq_idx, ret;
-	struct dpu_cp_node prop_node;
-
-	if (!crtc_drm || !ad_irq) {
-		DRM_ERROR("invalid crtc %pK irq %pK\n", crtc_drm, ad_irq);
-		return -EINVAL;
-	}
-
-	crtc = to_dpu_crtc(crtc_drm);
-	if (!crtc) {
-		DRM_ERROR("invalid dpu_crtc %pK\n", crtc);
-		return -EINVAL;
-	}
-
-	kms = get_kms(crtc_drm);
-	num_mixers = crtc->num_mixers;
-
-	memset(&prop_node, 0, sizeof(prop_node));
-	prop_node.feature = DPU_CP_CRTC_DSPP_AD_BACKLIGHT;
-	ret = dpu_cp_ad_validate_prop(&prop_node, crtc);
-	if (ret) {
-		DRM_ERROR("Ad not supported ret %d\n", ret);
-		goto exit;
-	}
-
-	for (i = 0; i < num_mixers; i++) {
-		hw_lm = crtc->mixers[i].hw_lm;
-		hw_dspp = crtc->mixers[i].hw_dspp;
-		if (!hw_lm->cfg.right_mixer)
-			break;
-	}
-
-	if (!hw_dspp) {
-		DRM_ERROR("invalid dspp\n");
-		ret = -EINVAL;
-		goto exit;
-	}
-
-	irq_idx = dpu_core_irq_idx_lookup(kms, DPU_IRQ_TYPE_AD4_BL_DONE,
-			hw_dspp->idx);
-	if (irq_idx < 0) {
-		DRM_ERROR("failed to get the irq idx ret %d\n", irq_idx);
-		ret = irq_idx;
-		goto exit;
-	}
-
-	if (!en) {
-		dpu_core_irq_disable(kms, &irq_idx, 1);
-		dpu_core_irq_unregister_callback(kms, irq_idx, ad_irq);
-		ret = 0;
-		goto exit;
-	}
-
-	ad_irq->arg = crtc;
-	ad_irq->func = dpu_cp_ad_interrupt_cb;
-	ret = dpu_core_irq_register_callback(kms, irq_idx, ad_irq);
-	if (ret) {
-		DRM_ERROR("failed to register the callback ret %d\n", ret);
-		goto exit;
-	}
-	ret = dpu_core_irq_enable(kms, &irq_idx, 1);
-	if (ret) {
-		DRM_ERROR("failed to enable irq ret %d\n", ret);
-		dpu_core_irq_unregister_callback(kms, irq_idx, ad_irq);
-	}
-exit:
-	return ret;
-}
-
-static void dpu_cp_ad_set_prop(struct dpu_crtc *dpu_crtc,
-		enum ad_property ad_prop)
-{
-	struct dpu_ad_hw_cfg ad_cfg;
-	struct dpu_hw_cp_cfg hw_cfg;
-	struct dpu_hw_dspp *hw_dspp = NULL;
-	struct dpu_hw_mixer *hw_lm = NULL;
-	u32 num_mixers = dpu_crtc->num_mixers;
-	int i = 0, ret = 0;
-
-	hw_cfg.num_of_mixers = dpu_crtc->num_mixers;
-	hw_cfg.displayh = dpu_crtc->base.mode.hdisplay;
-	hw_cfg.displayv = dpu_crtc->base.mode.vdisplay;
-
-	for (i = 0; i < num_mixers && !ret; i++) {
-		hw_lm = dpu_crtc->mixers[i].hw_lm;
-		hw_dspp = dpu_crtc->mixers[i].hw_dspp;
-		if (!hw_lm || !hw_dspp || !hw_dspp->ops.validate_ad ||
-				!hw_dspp->ops.setup_ad) {
-			ret = -EINVAL;
-			continue;
-		}
-
-		hw_cfg.mixer_info = hw_lm;
-		ad_cfg.prop = ad_prop;
-		ad_cfg.hw_cfg = &hw_cfg;
-		ret = hw_dspp->ops.validate_ad(hw_dspp, (u32 *)&ad_prop);
-		if (!ret)
-			hw_dspp->ops.setup_ad(hw_dspp, &ad_cfg);
-	}
-}
-
-void dpu_cp_crtc_pre_ipc(struct drm_crtc *drm_crtc)
-{
-	struct dpu_crtc *dpu_crtc;
-
-	dpu_crtc = to_dpu_crtc(drm_crtc);
-	if (!dpu_crtc) {
-		DRM_ERROR("invalid dpu_crtc %pK\n", dpu_crtc);
-		return;
-	}
-
-	dpu_cp_ad_set_prop(dpu_crtc, AD_IPC_SUSPEND);
-}
-
-void dpu_cp_crtc_post_ipc(struct drm_crtc *drm_crtc)
-{
-	struct dpu_crtc *dpu_crtc;
-
-	dpu_crtc = to_dpu_crtc(drm_crtc);
-	if (!dpu_crtc) {
-		DRM_ERROR("invalid dpu_crtc %pK\n", dpu_crtc);
-		return;
-	}
-
-	dpu_cp_ad_set_prop(dpu_crtc, AD_IPC_RESUME);
-}
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_color_processing.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_color_processing.h
deleted file mode 100644
index 0fa546c..0000000
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_color_processing.h
+++ /dev/null
@@ -1,120 +0,0 @@
-/* Copyright (c) 2016-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.
- *
- */
-
-#ifndef _DPU_COLOR_PROCESSING_H
-#define _DPU_COLOR_PROCESSING_H
-#include <drm/drm_crtc.h>
-
-struct dpu_irq_callback;
-
-/*
- * PA MEMORY COLOR types
- * @MEMCOLOR_SKIN          Skin memory color type
- * @MEMCOLOR_SKY           Sky memory color type
- * @MEMCOLOR_FOLIAGE       Foliage memory color type
- */
-enum dpu_memcolor_type {
-	MEMCOLOR_SKIN = 0,
-	MEMCOLOR_SKY,
-	MEMCOLOR_FOLIAGE
-};
-
-/**
- * dpu_cp_crtc_init(): Initialize color processing lists for a crtc.
- *                     Should be called during crtc initialization.
- * @crtc:  Pointer to dpu_crtc.
- */
-void dpu_cp_crtc_init(struct drm_crtc *crtc);
-
-/**
- * dpu_cp_crtc_install_properties(): Installs the color processing
- *                                properties for a crtc.
- *                                Should be called during crtc initialization.
- * @crtc:  Pointer to crtc.
- */
-void dpu_cp_crtc_install_properties(struct drm_crtc *crtc);
-
-/**
- * dpu_cp_crtc_destroy_properties: Destroys color processing
- *                                            properties for a crtc.
- * should be called during crtc de-initialization.
- * @crtc:  Pointer to crtc.
- */
-void dpu_cp_crtc_destroy_properties(struct drm_crtc *crtc);
-
-/**
- * dpu_cp_crtc_set_property: Set a color processing property
- *                                      for a crtc.
- *                                      Should be during atomic set property.
- * @crtc: Pointer to crtc.
- * @property: Property that needs to enabled/disabled.
- * @val: Value of property.
- */
-int dpu_cp_crtc_set_property(struct drm_crtc *crtc,
-				struct drm_property *property, uint64_t val);
-
-/**
- * dpu_cp_crtc_apply_properties: Enable/disable properties
- *                               for a crtc.
- *                               Should be called during atomic commit call.
- * @crtc: Pointer to crtc.
- */
-void dpu_cp_crtc_apply_properties(struct drm_crtc *crtc);
-
-/**
- * dpu_cp_crtc_get_property: Get value of color processing property
- *                                      for a crtc.
- *                                      Should be during atomic get property.
- * @crtc: Pointer to crtc.
- * @property: Property that needs to enabled/disabled.
- * @val: Value of property.
- *
- */
-int dpu_cp_crtc_get_property(struct drm_crtc *crtc,
-				struct drm_property *property, uint64_t *val);
-
-/**
- * dpu_cp_crtc_suspend: Suspend the crtc features
- * @crtc: Pointer to crtc.
- */
-void dpu_cp_crtc_suspend(struct drm_crtc *crtc);
-
-/**
- * dpu_cp_crtc_resume: Resume the crtc features
- * @crtc: Pointer to crtc.
- */
-void dpu_cp_crtc_resume(struct drm_crtc *crtc);
-
-/**
- * dpu_cp_ad_interrupt: Api to enable/disable ad interrupt
- * @crtc: Pointer to crtc.
- * @en: Variable to enable/disable interrupt.
- * @irq: Pointer to irq callback
- */
-int dpu_cp_ad_interrupt(struct drm_crtc *crtc, bool en,
-		struct dpu_irq_callback *irq);
-
-/**
- * dpu_cp_crtc_pre_ipc: Handle color processing features
- *                      before entering IPC
- * @crtc: Pointer to crtc.
- */
-void dpu_cp_crtc_pre_ipc(struct drm_crtc *crtc);
-
-/**
- * dpu_cp_crtc_post_ipc: Handle color processing features
- *                       after exiting IPC
- * @crtc: Pointer to crtc.
- */
-void dpu_cp_crtc_post_ipc(struct drm_crtc *crtc);
-#endif /*_DPU_COLOR_PROCESSING_H */
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
index 48920b05..24bf9c4 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
@@ -20,7 +20,6 @@
 #include <linux/sort.h>
 #include <linux/debugfs.h>
 #include <linux/ktime.h>
-#include <uapi/drm/dpu_drm.h>
 #include <drm/drm_mode.h>
 #include <drm/drm_crtc.h>
 #include <drm/drm_crtc_helper.h>
@@ -31,13 +30,18 @@
 #include "dpu_hw_ctl.h"
 #include "dpu_crtc.h"
 #include "dpu_plane.h"
-#include "dpu_color_processing.h"
 #include "dpu_encoder.h"
 #include "dpu_vbif.h"
 #include "dpu_power_handle.h"
 #include "dpu_core_perf.h"
 #include "dpu_trace.h"
 
+#define DPU_DRM_BLEND_OP_NOT_DEFINED    0
+#define DPU_DRM_BLEND_OP_OPAQUE         1
+#define DPU_DRM_BLEND_OP_PREMULTIPLIED  2
+#define DPU_DRM_BLEND_OP_COVERAGE       3
+#define DPU_DRM_BLEND_OP_MAX            4
+
 /* layer mixer index on dpu_crtc */
 #define LEFT_MIXER 0
 #define RIGHT_MIXER 1
@@ -590,7 +594,6 @@ static void dpu_crtc_destroy(struct drm_crtc *crtc)
 	if (dpu_crtc->blob_info)
 		drm_property_blob_put(dpu_crtc->blob_info);
 	msm_property_destroy(&dpu_crtc->property_info);
-	dpu_cp_crtc_destroy_properties(crtc);
 	_dpu_crtc_destroy_dest_scaler(dpu_crtc);
 
 	_dpu_crtc_deinit_events(dpu_crtc);
@@ -617,67 +620,14 @@ static bool dpu_crtc_mode_fixup(struct drm_crtc *crtc,
 }
 
 static void _dpu_crtc_setup_blend_cfg(struct dpu_crtc_mixer *mixer,
-	struct dpu_plane_state *pstate, struct dpu_format *format)
+		struct dpu_plane_state *pstate)
 {
-	uint32_t blend_op, fg_alpha, bg_alpha;
-	uint32_t blend_type;
 	struct dpu_hw_mixer *lm = mixer->hw_lm;
 
 	/* default to opaque blending */
-	fg_alpha = dpu_plane_get_property(pstate, PLANE_PROP_ALPHA);
-	bg_alpha = 0xFF - fg_alpha;
-	blend_op = DPU_BLEND_FG_ALPHA_FG_CONST | DPU_BLEND_BG_ALPHA_BG_CONST;
-	blend_type = dpu_plane_get_property(pstate, PLANE_PROP_BLEND_OP);
-
-	DPU_DEBUG("blend type:0x%x blend alpha:0x%x\n", blend_type, fg_alpha);
-
-	switch (blend_type) {
-
-	case DPU_DRM_BLEND_OP_OPAQUE:
-		blend_op = DPU_BLEND_FG_ALPHA_FG_CONST |
-			DPU_BLEND_BG_ALPHA_BG_CONST;
-		break;
-
-	case DPU_DRM_BLEND_OP_PREMULTIPLIED:
-		if (format->alpha_enable) {
-			blend_op = DPU_BLEND_FG_ALPHA_FG_CONST |
-				DPU_BLEND_BG_ALPHA_FG_PIXEL;
-			if (fg_alpha != 0xff) {
-				bg_alpha = fg_alpha;
-				blend_op |= DPU_BLEND_BG_MOD_ALPHA |
-					DPU_BLEND_BG_INV_MOD_ALPHA;
-			} else {
-				blend_op |= DPU_BLEND_BG_INV_ALPHA;
-			}
-		}
-		break;
-
-	case DPU_DRM_BLEND_OP_COVERAGE:
-		if (format->alpha_enable) {
-			blend_op = DPU_BLEND_FG_ALPHA_FG_PIXEL |
-				DPU_BLEND_BG_ALPHA_FG_PIXEL;
-			if (fg_alpha != 0xff) {
-				bg_alpha = fg_alpha;
-				blend_op |= DPU_BLEND_FG_MOD_ALPHA |
-					DPU_BLEND_FG_INV_MOD_ALPHA |
-					DPU_BLEND_BG_MOD_ALPHA |
-					DPU_BLEND_BG_INV_MOD_ALPHA;
-			} else {
-				blend_op |= DPU_BLEND_BG_INV_ALPHA;
-			}
-		}
-		break;
-	default:
-		/* do nothing */
-		break;
-	}
-
-	lm->ops.setup_blend_config(lm, pstate->stage, fg_alpha,
-						bg_alpha, blend_op);
-	DPU_DEBUG(
-		"format: %4.4s, alpha_enable %u fg alpha:0x%x bg alpha:0x%x blend_op:0x%x\n",
-		(char *) &format->base.pixel_format,
-		format->alpha_enable, fg_alpha, bg_alpha, blend_op);
+	lm->ops.setup_blend_config(lm, pstate->stage, 0XFF, 0,
+				DPU_BLEND_FG_ALPHA_FG_CONST |
+				DPU_BLEND_BG_ALPHA_BG_CONST);
 }
 
 static void _dpu_crtc_setup_dim_layer_cfg(struct drm_crtc *crtc,
@@ -852,8 +802,8 @@ static void _dpu_crtc_blend_setup_mixer(struct drm_crtc *crtc,
 
 		/* blend config update */
 		for (lm_idx = 0; lm_idx < dpu_crtc->num_mixers; lm_idx++) {
-			_dpu_crtc_setup_blend_cfg(mixer + lm_idx, pstate,
-								format);
+			_dpu_crtc_setup_blend_cfg(mixer + lm_idx, pstate);
+
 			mixer[lm_idx].flush_mask |= flush_mask;
 
 			if (bg_alpha_enable && !format->alpha_enable)
@@ -1814,11 +1764,10 @@ static void _dpu_crtc_setup_mixer_for_encoder(
 	struct dpu_crtc_mixer *mixer;
 	struct dpu_hw_ctl *last_valid_ctl = NULL;
 	int i;
-	struct dpu_rm_hw_iter lm_iter, ctl_iter, dspp_iter, ds_iter;
+	struct dpu_rm_hw_iter lm_iter, ctl_iter, ds_iter;
 
 	dpu_rm_init_hw_iter(&lm_iter, enc->base.id, DPU_HW_BLK_LM);
 	dpu_rm_init_hw_iter(&ctl_iter, enc->base.id, DPU_HW_BLK_CTL);
-	dpu_rm_init_hw_iter(&dspp_iter, enc->base.id, DPU_HW_BLK_DSPP);
 	dpu_rm_init_hw_iter(&ds_iter, enc->base.id, DPU_HW_BLK_DS);
 
 	/* Set up all the mixers and ctls reserved by this encoder */
@@ -1846,10 +1795,6 @@ static void _dpu_crtc_setup_mixer_for_encoder(
 			return;
 		}
 
-		/* Dspp may be null */
-		(void) dpu_rm_get_hw(rm, &dspp_iter);
-		mixer->hw_dspp = (struct dpu_hw_dspp *)dspp_iter.hw;
-
 		/* DS may be null */
 		(void) dpu_rm_get_hw(rm, &ds_iter);
 		mixer->hw_ds = (struct dpu_hw_ds *)ds_iter.hw;
@@ -1982,17 +1927,6 @@ static void dpu_crtc_atomic_begin(struct drm_crtc *crtc,
 	_dpu_crtc_dest_scaler_setup(crtc);
 
 	/*
-	 * Since CP properties use AXI buffer to program the
-	 * HW, check if context bank is in attached
-	 * state,
-	 * apply color processing properties only if
-	 * smmu state is attached,
-	 */
-	if ((smmu_state->state != DETACHED) &&
-			(smmu_state->state != DETACH_ALL_REQ))
-		dpu_cp_crtc_apply_properties(crtc);
-
-	/*
 	 * PP_DONE irq is only used by command mode for now.
 	 * It is better to request pending before FLUSH and START trigger
 	 * to make sure no pp_done irq missed.
@@ -2425,7 +2359,6 @@ static void dpu_crtc_handle_power_event(u32 event_type, void *arg)
 {
 	struct drm_crtc *crtc = arg;
 	struct dpu_crtc *dpu_crtc;
-	struct drm_plane *plane;
 	struct drm_encoder *encoder;
 	struct dpu_crtc_mixer *m;
 	u32 i, misr_status;
@@ -2450,8 +2383,6 @@ static void dpu_crtc_handle_power_event(u32 event_type, void *arg)
 			dpu_encoder_virt_restore(encoder);
 		}
 
-		dpu_cp_crtc_post_ipc(crtc);
-
 		for (i = 0; i < dpu_crtc->num_mixers; ++i) {
 			m = &dpu_crtc->mixers[i];
 			if (!m->hw_lm || !m->hw_lm->ops.setup_misr ||
@@ -2473,18 +2404,12 @@ static void dpu_crtc_handle_power_event(u32 event_type, void *arg)
 			dpu_crtc->misr_data[i] = misr_status ? misr_status :
 							dpu_crtc->misr_data[i];
 		}
-
-		dpu_cp_crtc_pre_ipc(crtc);
 		break;
 	case DPU_POWER_EVENT_POST_DISABLE:
-		/*
-		 * set revalidate flag in planes, so it will be re-programmed
-		 * in the next frame update
+		/**
+		 * Nothing to do. All the planes on the CRTC will be
+		 * programmed for every frame
 		 */
-		drm_atomic_crtc_for_each_plane(plane, crtc)
-			dpu_plane_set_revalidate(plane, true);
-
-		dpu_cp_crtc_suspend(crtc);
 		break;
 	default:
 		DPU_DEBUG("event:%d not handled\n", event_type);
@@ -2531,7 +2456,6 @@ static void dpu_crtc_disable(struct drm_crtc *crtc)
 	/* update color processing on suspend */
 	event.type = DRM_EVENT_CRTC_POWER;
 	event.length = sizeof(u32);
-	dpu_cp_crtc_suspend(crtc);
 	power_on = 0;
 	msm_mode_object_event_notify(&crtc->base, crtc->dev, &event,
 			(u8 *)&power_on);
@@ -2635,7 +2559,6 @@ static void dpu_crtc_enable(struct drm_crtc *crtc,
 	/* update color processing on resume */
 	event.type = DRM_EVENT_CRTC_POWER;
 	event.length = sizeof(u32);
-	dpu_cp_crtc_resume(crtc);
 	power_on = 1;
 	msm_mode_object_event_notify(&crtc->base, crtc->dev, &event,
 			(u8 *)&power_on);
@@ -2677,82 +2600,6 @@ static int pstate_cmp(const void *a, const void *b)
 	return rc;
 }
 
-static int _dpu_crtc_excl_rect_overlap_check(struct plane_state pstates[],
-	int cnt, int curr_cnt, struct dpu_rect *excl_rect, int z_pos)
-{
-	struct dpu_rect dst_rect, intersect;
-	int i, rc = -EINVAL;
-	const struct drm_plane_state *pstate;
-
-	/* start checking from next plane */
-	for (i = curr_cnt; i < cnt; i++) {
-		pstate = pstates[i].drm_pstate;
-		POPULATE_RECT(&dst_rect, pstate->crtc_x, pstate->crtc_y,
-				pstate->crtc_w, pstate->crtc_h, false);
-		dpu_kms_rect_intersect(&dst_rect, excl_rect, &intersect);
-
-		if (intersect.w == excl_rect->w && intersect.h == excl_rect->h
-				/* next plane may be on same z-order */
-				&& z_pos != pstates[i].stage) {
-			rc = 0;
-			goto end;
-		}
-	}
-
-	DPU_ERROR("excl rect does not find top overlapping rect\n");
-end:
-	return rc;
-}
-
-/* no input validation - caller API has all the checks */
-static int _dpu_crtc_excl_dim_layer_check(struct drm_crtc_state *state,
-		struct plane_state pstates[], int cnt)
-{
-	struct dpu_crtc_state *cstate = to_dpu_crtc_state(state);
-	struct drm_display_mode *mode = &state->adjusted_mode;
-	const struct drm_plane_state *pstate;
-	struct dpu_plane_state *dpu_pstate;
-	int rc = 0, i;
-
-	/* Check dim layer rect bounds and stage */
-	for (i = 0; i < cstate->num_dim_layers; i++) {
-		if ((CHECK_LAYER_BOUNDS(cstate->dim_layer[i].rect.y,
-			cstate->dim_layer[i].rect.h, mode->vdisplay)) ||
-		    (CHECK_LAYER_BOUNDS(cstate->dim_layer[i].rect.x,
-			cstate->dim_layer[i].rect.w, mode->hdisplay)) ||
-		    (cstate->dim_layer[i].stage >= DPU_STAGE_MAX) ||
-		    (!cstate->dim_layer[i].rect.w) ||
-		    (!cstate->dim_layer[i].rect.h)) {
-			DPU_ERROR("invalid dim_layer:{%d,%d,%d,%d}, stage:%d\n",
-					cstate->dim_layer[i].rect.x,
-					cstate->dim_layer[i].rect.y,
-					cstate->dim_layer[i].rect.w,
-					cstate->dim_layer[i].rect.h,
-					cstate->dim_layer[i].stage);
-			DPU_ERROR("display: %dx%d\n", mode->hdisplay,
-					mode->vdisplay);
-			rc = -E2BIG;
-			goto end;
-		}
-	}
-
-	/* this is traversing on sorted z-order pstates */
-	for (i = 0; i < cnt; i++) {
-		pstate = pstates[i].drm_pstate;
-		dpu_pstate = to_dpu_plane_state(pstate);
-		if (dpu_pstate->excl_rect.w && dpu_pstate->excl_rect.h) {
-			/* check overlap on all top z-order */
-			rc = _dpu_crtc_excl_rect_overlap_check(pstates, cnt,
-			     i + 1, &dpu_pstate->excl_rect, pstates[i].stage);
-			if (rc)
-				goto end;
-		}
-	}
-
-end:
-	return rc;
-}
-
 static int dpu_crtc_atomic_check(struct drm_crtc *crtc,
 		struct drm_crtc_state *state)
 {
@@ -2878,10 +2725,6 @@ static int dpu_crtc_atomic_check(struct drm_crtc *crtc,
 	/* assign mixer stages based on sorted zpos property */
 	sort(pstates, cnt, sizeof(pstates[0]), pstate_cmp, NULL);
 
-	rc = _dpu_crtc_excl_dim_layer_check(state, pstates, cnt);
-	if (rc)
-		goto end;
-
 	if (!dpu_is_custom_client()) {
 		int stage_old = pstates[0].stage;
 
@@ -3301,11 +3144,8 @@ static int dpu_crtc_atomic_set_property(struct drm_crtc *crtc,
 				break;
 			}
 		} else {
-			ret = dpu_cp_crtc_set_property(crtc,
-					property, val);
-		}
-		if (ret)
 			DRM_ERROR("failed to set the property\n");
+		}
 
 		DPU_DEBUG("crtc%d %s[%d] <= 0x%llx ret=%d\n", crtc->base.id,
 				property->name, property->base.id, val, ret);
@@ -3370,9 +3210,6 @@ static int dpu_crtc_atomic_get_property(struct drm_crtc *crtc,
 				&cstate->property_state,
 				property, val);
 		if (ret)
-			ret = dpu_cp_crtc_get_property(crtc,
-				property, val);
-		if (ret)
 			DRM_ERROR("get property failed\n");
 	}
 	return ret;
@@ -3487,10 +3324,6 @@ static int _dpu_debugfs_status_show(struct seq_file *s, void *data)
 		seq_printf(s, "\tmultirect: mode: %d index: %d\n",
 			pstate->multirect_mode, pstate->multirect_index);
 
-		seq_printf(s, "\texcl_rect: x:%4d y:%4d w:%4d h:%4d\n",
-			pstate->excl_rect.x, pstate->excl_rect.y,
-			pstate->excl_rect.w, pstate->excl_rect.h);
-
 		seq_puts(s, "\n");
 	}
 	if (dpu_crtc->vblank_cb_count) {
@@ -3934,10 +3767,6 @@ struct drm_crtc *dpu_crtc_init(struct drm_device *dev, struct drm_plane *plane)
 	/* Init dest scaler */
 	_dpu_crtc_dest_scaler_init(dpu_crtc, kms->catalog);
 
-	/* Install color processing properties */
-	dpu_cp_crtc_init(crtc);
-	dpu_cp_crtc_install_properties(crtc);
-
 	DPU_DEBUG("%s: successfully initialized crtc\n", dpu_crtc->name);
 	return crtc;
 }
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h
index 9304058..5f380b8 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h
@@ -20,6 +20,7 @@
 #define _DPU_CRTC_H_
 
 #include <linux/kthread.h>
+#include <uapi/drm/dpu_drm.h>
 #include <drm/drm_crtc.h>
 #include "msm_prop.h"
 #include "dpu_kms.h"
@@ -86,7 +87,6 @@ struct dpu_crtc_smmu_state_data {
  * struct dpu_crtc_mixer: stores the map for each virtual pipeline in the CRTC
  * @hw_lm:	LM HW Driver context
  * @hw_ctl:	CTL Path HW driver context
- * @hw_dspp:	DSPP HW driver context
  * @hw_ds:	DS HW driver context
  * @encoder:	Encoder attached to this lm & ctl
  * @mixer_op_mode:	mixer blending operation mode
@@ -95,7 +95,6 @@ struct dpu_crtc_smmu_state_data {
 struct dpu_crtc_mixer {
 	struct dpu_hw_mixer *hw_lm;
 	struct dpu_hw_ctl *hw_ctl;
-	struct dpu_hw_dspp *hw_dspp;
 	struct dpu_hw_ds *hw_ds;
 	struct drm_encoder *encoder;
 	u32 mixer_op_mode;
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
index 4386360..77d3571 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
@@ -1748,8 +1748,6 @@ static void _dpu_encoder_kickoff_phys(struct dpu_encoder_virt *dpu_enc)
 
 		if (phys->split_role != ENC_ROLE_SLAVE)
 			set_bit(i, dpu_enc->frame_busy_mask);
-		if (phys->hw_ctl->ops.reg_dma_flush)
-			phys->hw_ctl->ops.reg_dma_flush(phys->hw_ctl);
 		if (!phys->ops.needs_single_flush ||
 				!phys->ops.needs_single_flush(phys))
 			_dpu_encoder_trigger_flush(&dpu_enc->base, phys, 0x0);
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c
index 3b1212b..d2e9cd9 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c
@@ -13,7 +13,6 @@
 
 #define pr_fmt(fmt)	"[drm:%s:%d] " fmt, __func__, __LINE__
 #include <linux/debugfs.h>
-#include <uapi/drm/dpu_drm.h>
 
 #include "dpu_encoder_phys.h"
 #include "dpu_formats.h"
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ad4.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ad4.c
deleted file mode 100644
index 7f81c9a..0000000
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ad4.c
+++ /dev/null
@@ -1,1443 +0,0 @@
-/* Copyright (c) 2017-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 <drm/msm_drm_pp.h>
-#include "dpu_hw_catalog.h"
-#include "dpu_hw_util.h"
-#include "dpu_hw_mdss.h"
-#include "dpu_hw_lm.h"
-#include "dpu_ad4.h"
-
-#define AD_STATE_READY(x) ((x) == (ad4_init | ad4_cfg | ad4_mode | ad4_input))
-#define MERGE_WIDTH_RIGHT 6
-#define MERGE_WIDTH_LEFT 5
-#define AD_IPC_FRAME_COUNT 2
-
-enum ad4_ops_bitmask {
-	ad4_init = BIT(AD_INIT),
-	ad4_cfg = BIT(AD_CFG),
-	ad4_mode = BIT(AD_MODE),
-	ad4_input = BIT(AD_INPUT),
-	ad4_ops_max = BIT(31),
-};
-
-enum ad4_state {
-	ad4_state_idle,
-	ad4_state_startup,
-	ad4_state_run,
-	/* idle power collapse suspend state */
-	ad4_state_ipcs,
-	/* idle power collapse resume state */
-	ad4_state_ipcr,
-	ad4_state_max,
-};
-
-typedef int (*ad4_prop_setup)(struct dpu_hw_dspp *dspp,
-		struct dpu_ad_hw_cfg *ad);
-
-static int ad4_params_check(struct dpu_hw_dspp *dspp,
-		struct dpu_ad_hw_cfg *cfg);
-
-static int ad4_no_op_setup(struct dpu_hw_dspp *dspp, struct dpu_ad_hw_cfg *cfg);
-static int ad4_setup_debug(struct dpu_hw_dspp *dspp, struct dpu_ad_hw_cfg *cfg);
-static int ad4_mode_setup(struct dpu_hw_dspp *dspp, enum ad4_modes mode);
-static int ad4_mode_setup_common(struct dpu_hw_dspp *dspp,
-		struct dpu_ad_hw_cfg *cfg);
-static int ad4_init_setup(struct dpu_hw_dspp *dspp, struct dpu_ad_hw_cfg *cfg);
-static int ad4_init_setup_idle(struct dpu_hw_dspp *dspp,
-		struct dpu_ad_hw_cfg *cfg);
-static int ad4_init_setup_run(struct dpu_hw_dspp *dspp,
-		struct dpu_ad_hw_cfg *cfg);
-static int ad4_init_setup_ipcr(struct dpu_hw_dspp *dspp,
-		struct dpu_ad_hw_cfg *cfg);
-static int ad4_cfg_setup(struct dpu_hw_dspp *dspp, struct dpu_ad_hw_cfg *cfg);
-static int ad4_cfg_setup_idle(struct dpu_hw_dspp *dspp,
-		struct dpu_ad_hw_cfg *cfg);
-static int ad4_cfg_setup_run(struct dpu_hw_dspp *dspp,
-		struct dpu_ad_hw_cfg *cfg);
-static int ad4_cfg_setup_ipcr(struct dpu_hw_dspp *dspp,
-		struct dpu_ad_hw_cfg *cfg);
-static int ad4_input_setup(struct dpu_hw_dspp *dspp,
-		struct dpu_ad_hw_cfg *cfg);
-static int ad4_input_setup_idle(struct dpu_hw_dspp *dspp,
-		struct dpu_ad_hw_cfg *cfg);
-static int ad4_input_setup_ipcr(struct dpu_hw_dspp *dspp,
-		struct dpu_ad_hw_cfg *cfg);
-static int ad4_suspend_setup(struct dpu_hw_dspp *dspp,
-		struct dpu_ad_hw_cfg *cfg);
-static int ad4_assertive_setup(struct dpu_hw_dspp *dspp,
-		struct dpu_ad_hw_cfg *cfg);
-static int ad4_assertive_setup_ipcr(struct dpu_hw_dspp *dspp,
-		struct dpu_ad_hw_cfg *cfg);
-static int ad4_backlight_setup(struct dpu_hw_dspp *dspp,
-		struct dpu_ad_hw_cfg *cfg);
-static int ad4_backlight_setup_ipcr(struct dpu_hw_dspp *dspp,
-		struct dpu_ad_hw_cfg *cfg);
-
-static int ad4_ipc_suspend_setup_run(struct dpu_hw_dspp *dspp,
-		struct dpu_ad_hw_cfg *cfg);
-static int ad4_ipc_suspend_setup_ipcr(struct dpu_hw_dspp *dspp,
-		struct dpu_ad_hw_cfg *cfg);
-static int ad4_ipc_resume_setup_ipcs(struct dpu_hw_dspp *dspp,
-		struct dpu_ad_hw_cfg *cfg);
-static int ad4_ipc_reset_setup_startup(struct dpu_hw_dspp *dspp,
-		struct dpu_ad_hw_cfg *cfg);
-static int ad4_ipc_reset_setup_ipcr(struct dpu_hw_dspp *dspp,
-		struct dpu_ad_hw_cfg *cfg);
-static int ad4_cfg_ipc_reset(struct dpu_hw_dspp *dspp,
-		struct dpu_ad_hw_cfg *cfg);
-
-static ad4_prop_setup prop_set_func[ad4_state_max][AD_PROPMAX] = {
-	[ad4_state_idle][AD_MODE] = ad4_mode_setup_common,
-	[ad4_state_idle][AD_INIT] = ad4_init_setup_idle,
-	[ad4_state_idle][AD_CFG] = ad4_cfg_setup_idle,
-	[ad4_state_idle][AD_INPUT] = ad4_input_setup_idle,
-	[ad4_state_idle][AD_SUSPEND] = ad4_suspend_setup,
-	[ad4_state_idle][AD_ASSERTIVE] = ad4_assertive_setup,
-	[ad4_state_idle][AD_BACKLIGHT] = ad4_backlight_setup,
-	[ad4_state_idle][AD_IPC_SUSPEND] = ad4_no_op_setup,
-	[ad4_state_idle][AD_IPC_RESUME] = ad4_no_op_setup,
-	[ad4_state_idle][AD_IPC_RESET] = ad4_no_op_setup,
-
-	[ad4_state_startup][AD_MODE] = ad4_mode_setup_common,
-	[ad4_state_startup][AD_INIT] = ad4_init_setup,
-	[ad4_state_startup][AD_CFG] = ad4_cfg_setup,
-	[ad4_state_startup][AD_INPUT] = ad4_input_setup,
-	[ad4_state_startup][AD_SUSPEND] = ad4_suspend_setup,
-	[ad4_state_startup][AD_ASSERTIVE] = ad4_assertive_setup,
-	[ad4_state_startup][AD_BACKLIGHT] = ad4_backlight_setup,
-	[ad4_state_startup][AD_IPC_SUSPEND] = ad4_no_op_setup,
-	[ad4_state_startup][AD_IPC_RESUME] = ad4_no_op_setup,
-	[ad4_state_startup][AD_IPC_RESET] = ad4_ipc_reset_setup_startup,
-
-	[ad4_state_run][AD_MODE] = ad4_mode_setup_common,
-	[ad4_state_run][AD_INIT] = ad4_init_setup_run,
-	[ad4_state_run][AD_CFG] = ad4_cfg_setup_run,
-	[ad4_state_run][AD_INPUT] = ad4_input_setup,
-	[ad4_state_run][AD_SUSPEND] = ad4_suspend_setup,
-	[ad4_state_run][AD_ASSERTIVE] = ad4_assertive_setup,
-	[ad4_state_run][AD_BACKLIGHT] = ad4_backlight_setup,
-	[ad4_state_run][AD_IPC_SUSPEND] = ad4_ipc_suspend_setup_run,
-	[ad4_state_run][AD_IPC_RESUME] = ad4_no_op_setup,
-	[ad4_state_run][AD_IPC_RESET] = ad4_setup_debug,
-
-	[ad4_state_ipcs][AD_MODE] = ad4_no_op_setup,
-	[ad4_state_ipcs][AD_INIT] = ad4_no_op_setup,
-	[ad4_state_ipcs][AD_CFG] = ad4_no_op_setup,
-	[ad4_state_ipcs][AD_INPUT] = ad4_no_op_setup,
-	[ad4_state_ipcs][AD_SUSPEND] = ad4_no_op_setup,
-	[ad4_state_ipcs][AD_ASSERTIVE] = ad4_no_op_setup,
-	[ad4_state_ipcs][AD_BACKLIGHT] = ad4_no_op_setup,
-	[ad4_state_ipcs][AD_IPC_SUSPEND] = ad4_no_op_setup,
-	[ad4_state_ipcs][AD_IPC_RESUME] = ad4_ipc_resume_setup_ipcs,
-	[ad4_state_ipcs][AD_IPC_RESET] = ad4_no_op_setup,
-
-	[ad4_state_ipcr][AD_MODE] = ad4_mode_setup_common,
-	[ad4_state_ipcr][AD_INIT] = ad4_init_setup_ipcr,
-	[ad4_state_ipcr][AD_CFG] = ad4_cfg_setup_ipcr,
-	[ad4_state_ipcr][AD_INPUT] = ad4_input_setup_ipcr,
-	[ad4_state_ipcr][AD_SUSPEND] = ad4_suspend_setup,
-	[ad4_state_ipcr][AD_ASSERTIVE] = ad4_assertive_setup_ipcr,
-	[ad4_state_ipcr][AD_BACKLIGHT] = ad4_backlight_setup_ipcr,
-	[ad4_state_ipcr][AD_IPC_SUSPEND] = ad4_ipc_suspend_setup_ipcr,
-	[ad4_state_ipcr][AD_IPC_RESUME] = ad4_no_op_setup,
-	[ad4_state_ipcr][AD_IPC_RESET] = ad4_ipc_reset_setup_ipcr,
-};
-
-struct ad4_info {
-	enum ad4_state state;
-	u32 completed_ops_mask;
-	bool ad4_support;
-	enum ad4_modes mode;
-	bool is_master;
-	u32 last_assertive;
-	u32 cached_assertive;
-	u64 last_als;
-	u64 cached_als;
-	u64 last_bl;
-	u64 cached_bl;
-	u32 last_str;
-	u32 frame_count;
-	u32 frmt_mode;
-	u32 irdx_control_0;
-	u32 tf_ctrl;
-	u32 vc_control_0;
-};
-
-static struct ad4_info info[DSPP_MAX] = {
-	[DSPP_0] = {ad4_state_idle, 0, true, AD4_OFF, false, 0x80, 0x80},
-	[DSPP_1] = {ad4_state_idle, 0, true, AD4_OFF, false, 0x80, 0x80},
-	[DSPP_2] = {ad4_state_max, 0, false, AD4_OFF, false, 0x80, 0x80},
-	[DSPP_3] = {ad4_state_max, 0, false, AD4_OFF, false, 0x80, 0x80},
-};
-
-void dpu_setup_dspp_ad4(struct dpu_hw_dspp *dspp, void *ad_cfg)
-{
-	int ret = 0;
-	struct dpu_ad_hw_cfg *cfg = ad_cfg;
-
-	ret = ad4_params_check(dspp, ad_cfg);
-	if (ret)
-		return;
-
-	ret = prop_set_func[info[dspp->idx].state][cfg->prop](dspp, ad_cfg);
-	if (ret)
-		DRM_ERROR("op failed %d ret %d\n", cfg->prop, ret);
-}
-
-int dpu_validate_dspp_ad4(struct dpu_hw_dspp *dspp, u32 *prop)
-{
-
-	if (!dspp || !prop) {
-		DRM_ERROR("invalid params dspp %pK prop %pK\n", dspp, prop);
-		return -EINVAL;
-	}
-
-	if (*prop >= AD_PROPMAX) {
-		DRM_ERROR("invalid prop set %d\n", *prop);
-		return -EINVAL;
-	}
-
-	if (dspp->idx >= DSPP_MAX || !info[dspp->idx].ad4_support) {
-		DRM_ERROR("ad4 not supported for dspp idx %d\n", dspp->idx);
-		return -EINVAL;
-	}
-
-	return 0;
-}
-
-static int ad4_params_check(struct dpu_hw_dspp *dspp,
-		struct dpu_ad_hw_cfg *cfg)
-{
-	struct dpu_hw_mixer *hw_lm;
-
-	if (!dspp || !cfg || !cfg->hw_cfg) {
-		DRM_ERROR("invalid dspp %pK cfg %pK hw_cfg %pK\n",
-			dspp, cfg, ((cfg) ? (cfg->hw_cfg) : NULL));
-		return -EINVAL;
-	}
-
-	if (!cfg->hw_cfg->mixer_info) {
-		DRM_ERROR("invalid mixed info\n");
-		return -EINVAL;
-	}
-
-	if (dspp->idx >= DSPP_MAX || !info[dspp->idx].ad4_support) {
-		DRM_ERROR("ad4 not supported for dspp idx %d\n", dspp->idx);
-		return -EINVAL;
-	}
-
-	if (cfg->prop >= AD_PROPMAX) {
-		DRM_ERROR("invalid prop set %d\n", cfg->prop);
-		return -EINVAL;
-	}
-
-	if (info[dspp->idx].state >= ad4_state_max) {
-		DRM_ERROR("in max state for dspp idx %d\n", dspp->idx);
-		return -EINVAL;
-	}
-
-	if (!prop_set_func[info[dspp->idx].state][cfg->prop]) {
-		DRM_ERROR("prop set not implemented for state %d prop %d\n",
-				info[dspp->idx].state, cfg->prop);
-		return -EINVAL;
-	}
-
-	if (!cfg->hw_cfg->num_of_mixers ||
-	    cfg->hw_cfg->num_of_mixers > CRTC_DUAL_MIXERS) {
-		DRM_ERROR("invalid mixer cnt %d\n",
-				cfg->hw_cfg->num_of_mixers);
-		return -EINVAL;
-	}
-	hw_lm = cfg->hw_cfg->mixer_info;
-	if (!hw_lm) {
-		DRM_ERROR("invalid mixer info\n");
-		return -EINVAL;
-	}
-
-	if (cfg->hw_cfg->num_of_mixers == 1 &&
-	    hw_lm->cfg.out_height != cfg->hw_cfg->displayv &&
-	    hw_lm->cfg.out_width != cfg->hw_cfg->displayh) {
-		DRM_ERROR("single_lm lmh %d lmw %d displayh %d displayw %d\n",
-			hw_lm->cfg.out_height, hw_lm->cfg.out_width,
-			cfg->hw_cfg->displayh, cfg->hw_cfg->displayv);
-		return -EINVAL;
-	} else if (hw_lm->cfg.out_height != cfg->hw_cfg->displayv &&
-		   hw_lm->cfg.out_width != (cfg->hw_cfg->displayh >> 1)) {
-		DRM_ERROR("dual_lm lmh %d lmw %d displayh %d displayw %d\n",
-			hw_lm->cfg.out_height, hw_lm->cfg.out_width,
-			cfg->hw_cfg->displayh, cfg->hw_cfg->displayv);
-		return -EINVAL;
-	}
-
-	return 0;
-}
-
-static int ad4_no_op_setup(struct dpu_hw_dspp *dspp, struct dpu_ad_hw_cfg *cfg)
-{
-	return 0;
-}
-
-static int ad4_setup_debug(struct dpu_hw_dspp *dspp, struct dpu_ad_hw_cfg *cfg)
-{
-	u32 strength = 0, i = 0;
-	struct dpu_hw_mixer *hw_lm;
-
-	hw_lm = cfg->hw_cfg->mixer_info;
-	if ((cfg->hw_cfg->num_of_mixers == 2) && hw_lm->cfg.right_mixer) {
-		/* this AD core is the salve core */
-		for (i = DSPP_0; i < DSPP_MAX; i++) {
-			if (info[i].is_master) {
-				strength = info[i].last_str;
-				break;
-			}
-		}
-	} else {
-		strength = DPU_REG_READ(&dspp->hw,
-				dspp->cap->sblk->ad.base + 0x4c);
-		pr_debug("%s(): AD strength = %d\n", __func__, strength);
-	}
-
-	return 0;
-}
-
-static int ad4_mode_setup(struct dpu_hw_dspp *dspp, enum ad4_modes mode)
-{
-	u32 blk_offset;
-
-	blk_offset = 0x04;
-	if (mode == AD4_OFF) {
-		DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset,
-				0x101);
-		info[dspp->idx].state = ad4_state_idle;
-		pr_debug("%s(): AD state move to idle\n", __func__);
-		info[dspp->idx].completed_ops_mask = 0;
-		/* reset last values to register default */
-		info[dspp->idx].last_assertive = 0x80;
-		info[dspp->idx].cached_assertive = U8_MAX;
-		info[dspp->idx].last_bl = 0xFFFF;
-		info[dspp->idx].cached_bl = U64_MAX;
-		info[dspp->idx].last_als = 0x0;
-		info[dspp->idx].cached_als = U64_MAX;
-	} else {
-		if (info[dspp->idx].state == ad4_state_idle) {
-			info[dspp->idx].frame_count = 0;
-			info[dspp->idx].state = ad4_state_startup;
-			pr_debug("%s(): AD state move to startup\n", __func__);
-		}
-		DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset,
-				0x100);
-	}
-
-	return 0;
-}
-
-static int ad4_init_setup(struct dpu_hw_dspp *dspp, struct dpu_ad_hw_cfg *cfg)
-{
-	u32 frame_start, frame_end, proc_start, proc_end;
-	struct dpu_hw_mixer *hw_lm;
-	u32 blk_offset, tile_ctl, val, i;
-	u32 off1, off2, off3, off4, off5, off6;
-	struct drm_msm_ad4_init *init;
-
-	if (!cfg->hw_cfg->payload) {
-		info[dspp->idx].completed_ops_mask &= ~ad4_init;
-		return 0;
-	}
-
-	if (cfg->hw_cfg->len != sizeof(struct drm_msm_ad4_init)) {
-		DRM_ERROR("invalid sz param exp %zd given %d cfg %pK\n",
-			sizeof(struct drm_msm_ad4_init), cfg->hw_cfg->len,
-			cfg->hw_cfg->payload);
-		return -EINVAL;
-	}
-
-	hw_lm = cfg->hw_cfg->mixer_info;
-	if (cfg->hw_cfg->num_of_mixers == 1) {
-		frame_start = 0;
-		frame_end = 0xffff;
-		proc_start = 0;
-		proc_end = 0xffff;
-		tile_ctl = 0;
-		info[dspp->idx].is_master = true;
-	} else {
-		tile_ctl = 0x5;
-		if (hw_lm->cfg.right_mixer) {
-			frame_start = (cfg->hw_cfg->displayh >> 1) -
-				MERGE_WIDTH_RIGHT;
-			frame_end = cfg->hw_cfg->displayh - 1;
-			proc_start = (cfg->hw_cfg->displayh >> 1);
-			proc_end = frame_end;
-			tile_ctl |= 0x10;
-			info[dspp->idx].is_master = false;
-		} else {
-			frame_start = 0;
-			frame_end = (cfg->hw_cfg->displayh >> 1) +
-				MERGE_WIDTH_LEFT;
-			proc_start = 0;
-			proc_end = (cfg->hw_cfg->displayh >> 1) - 1;
-			tile_ctl |= 0x10;
-			info[dspp->idx].is_master = true;
-		}
-	}
-
-	init = cfg->hw_cfg->payload;
-
-	info[dspp->idx].frmt_mode = (init->init_param_009 & (BIT(14) - 1));
-
-	blk_offset = 0xc;
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset,
-			init->init_param_010);
-
-	init->init_param_012 = cfg->hw_cfg->displayv & (BIT(17) - 1);
-	init->init_param_011 = cfg->hw_cfg->displayh & (BIT(17) - 1);
-	blk_offset = 0x10;
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset,
-			((init->init_param_011 << 16) | init->init_param_012));
-
-	blk_offset = 0x14;
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset,
-			tile_ctl);
-
-	blk_offset = 0x44;
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset,
-			((((init->init_param_013) & (BIT(17) - 1)) << 16) |
-			(init->init_param_014 & (BIT(17) - 1))));
-
-	blk_offset = 0x5c;
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset,
-			(init->init_param_015 & (BIT(16) - 1)));
-	blk_offset = 0x60;
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset,
-			(init->init_param_016 & (BIT(8) - 1)));
-	blk_offset = 0x64;
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset,
-			(init->init_param_017 & (BIT(12) - 1)));
-	blk_offset = 0x68;
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset,
-			(init->init_param_018 & (BIT(12) - 1)));
-	blk_offset = 0x6c;
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset,
-			(init->init_param_019 & (BIT(12) - 1)));
-	blk_offset = 0x70;
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset,
-			(init->init_param_020 & (BIT(16) - 1)));
-	blk_offset = 0x74;
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset,
-			(init->init_param_021 & (BIT(8) - 1)));
-	blk_offset = 0x78;
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset,
-			(init->init_param_022 & (BIT(8) - 1)));
-	blk_offset = 0x7c;
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset,
-			(init->init_param_023 & (BIT(16) - 1)));
-	blk_offset = 0x80;
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset,
-		(((init->init_param_024 & (BIT(16) - 1)) << 16) |
-		((init->init_param_025 & (BIT(16) - 1)))));
-	blk_offset = 0x84;
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset,
-		(((init->init_param_026 & (BIT(16) - 1)) << 16) |
-		((init->init_param_027 & (BIT(16) - 1)))));
-
-	blk_offset = 0x90;
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset,
-			(init->init_param_028 & (BIT(16) - 1)));
-	blk_offset = 0x94;
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset,
-			(init->init_param_029 & (BIT(16) - 1)));
-
-	blk_offset = 0x98;
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset,
-		(((init->init_param_035 & (BIT(16) - 1)) << 16) |
-		((init->init_param_030 & (BIT(16) - 1)))));
-
-	blk_offset = 0x9c;
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset,
-		(((init->init_param_032 & (BIT(16) - 1)) << 16) |
-		((init->init_param_031 & (BIT(16) - 1)))));
-	blk_offset = 0xa0;
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset,
-		(((init->init_param_034 & (BIT(16) - 1)) << 16) |
-		((init->init_param_033 & (BIT(16) - 1)))));
-
-	blk_offset = 0xb4;
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset,
-			(init->init_param_036 & (BIT(8) - 1)));
-	blk_offset = 0xcc;
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset,
-			(init->init_param_037 & (BIT(8) - 1)));
-	blk_offset = 0xc0;
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset,
-			(init->init_param_038 & (BIT(8) - 1)));
-	blk_offset = 0xd8;
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset,
-			(init->init_param_039 & (BIT(8) - 1)));
-
-	blk_offset = 0xe8;
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset,
-			(init->init_param_040 & (BIT(16) - 1)));
-
-	blk_offset = 0xf4;
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset,
-			(init->init_param_041 & (BIT(8) - 1)));
-
-	blk_offset = 0x100;
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset,
-			(init->init_param_042 & (BIT(16) - 1)));
-
-	blk_offset = 0x10c;
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset,
-			(init->init_param_043 & (BIT(8) - 1)));
-
-	blk_offset = 0x120;
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset,
-			(init->init_param_044 & (BIT(16) - 1)));
-	blk_offset = 0x124;
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset,
-			(init->init_param_045 & (BIT(16) - 1)));
-
-	blk_offset = 0x128;
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset,
-			(init->init_param_046 & (BIT(1) - 1)));
-	blk_offset = 0x12c;
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset,
-			(init->init_param_047 & (BIT(8) - 1)));
-
-	info[dspp->idx].irdx_control_0 = (init->init_param_048 & (BIT(5) - 1));
-
-	blk_offset = 0x140;
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset,
-			(init->init_param_049 & (BIT(8) - 1)));
-
-	blk_offset = 0x144;
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset,
-			(init->init_param_050 & (BIT(8) - 1)));
-	blk_offset = 0x148;
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset,
-		(((init->init_param_051 & (BIT(8) - 1)) << 8) |
-		((init->init_param_052 & (BIT(8) - 1)))));
-
-	blk_offset = 0x14c;
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset,
-			(init->init_param_053 & (BIT(10) - 1)));
-	blk_offset = 0x150;
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset,
-			(init->init_param_054 & (BIT(10) - 1)));
-	blk_offset = 0x154;
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset,
-			(init->init_param_055 & (BIT(8) - 1)));
-
-	blk_offset = 0x158;
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset,
-			(init->init_param_056 & (BIT(8) - 1)));
-	blk_offset = 0x164;
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset,
-			(init->init_param_057 & (BIT(8) - 1)));
-	blk_offset = 0x168;
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset,
-			(init->init_param_058 & (BIT(4) - 1)));
-
-	blk_offset = 0x17c;
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset,
-			(frame_start & (BIT(16) - 1)));
-	blk_offset = 0x180;
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset,
-			(frame_end & (BIT(16) - 1)));
-	blk_offset = 0x184;
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset,
-			(proc_start & (BIT(16) - 1)));
-	blk_offset = 0x188;
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset,
-			(proc_end & (BIT(16) - 1)));
-
-	blk_offset = 0x18c;
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset,
-			(init->init_param_059 & (BIT(4) - 1)));
-
-	blk_offset = 0x190;
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset,
-		(((init->init_param_061 & (BIT(8) - 1)) << 8) |
-		((init->init_param_060 & (BIT(8) - 1)))));
-
-	blk_offset = 0x194;
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset,
-			(init->init_param_062 & (BIT(10) - 1)));
-
-	blk_offset = 0x1a0;
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset,
-			(init->init_param_063 & (BIT(10) - 1)));
-	blk_offset = 0x1a4;
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset,
-			(init->init_param_064 & (BIT(10) - 1)));
-	blk_offset = 0x1a8;
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset,
-			(init->init_param_065 & (BIT(10) - 1)));
-	blk_offset = 0x1ac;
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset,
-			(init->init_param_066 & (BIT(8) - 1)));
-	blk_offset = 0x1b0;
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset,
-			(init->init_param_067 & (BIT(8) - 1)));
-	blk_offset = 0x1b4;
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset,
-			(init->init_param_068 & (BIT(6) - 1)));
-
-	blk_offset = 0x460;
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset,
-			(init->init_param_069 & (BIT(16) - 1)));
-	blk_offset = 0x464;
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset,
-			(init->init_param_070 & (BIT(10) - 1)));
-	blk_offset = 0x468;
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset,
-			(init->init_param_071 & (BIT(10) - 1)));
-	blk_offset = 0x46c;
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset,
-			(init->init_param_072 & (BIT(10) - 1)));
-	blk_offset = 0x470;
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset,
-			(init->init_param_073 & (BIT(8) - 1)));
-	blk_offset = 0x474;
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset,
-			(init->init_param_074 & (BIT(10) - 1)));
-	blk_offset = 0x478;
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset,
-			(init->init_param_075 & (BIT(10) - 1)));
-
-	off1 = 0x1c0;
-	off2 = 0x210;
-	off3 = 0x260;
-	off4 = 0x2b0;
-	off5 = 0x380;
-	off6 = 0x3d0;
-	for (i = 0; i < AD4_LUT_GRP0_SIZE - 1; i = i + 2) {
-		val = (init->init_param_001[i] & (BIT(16) - 1));
-		val |= ((init->init_param_001[i + 1] & (BIT(16) - 1))
-				<< 16);
-		DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + off1, val);
-		off1 += 4;
-
-		val = (init->init_param_002[i] & (BIT(16) - 1));
-		val |= ((init->init_param_002[i + 1] & (BIT(16) - 1))
-				<< 16);
-		DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + off2, val);
-		off2 += 4;
-
-		val = (init->init_param_003[i] & (BIT(16) - 1));
-		val |= ((init->init_param_003[i + 1] & (BIT(16) - 1))
-				<< 16);
-		DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + off3, val);
-		off3 += 4;
-
-		val = (init->init_param_004[i] & (BIT(16) - 1));
-		val |= ((init->init_param_004[i + 1] & (BIT(16) - 1))
-				<< 16);
-		DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + off4, val);
-		off4 += 4;
-
-		val = (init->init_param_007[i] & (BIT(16) - 1));
-		val |= ((init->init_param_007[i + 1] &
-				(BIT(16) - 1)) << 16);
-		DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + off5, val);
-		off5 += 4;
-
-		val = (init->init_param_008[i] & (BIT(12) - 1));
-		val |= ((init->init_param_008[i + 1] &
-				(BIT(12) - 1)) << 16);
-		DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + off6, val);
-		off6 += 4;
-	}
-	/* write last index data */
-	i = AD4_LUT_GRP0_SIZE - 1;
-	val = ((init->init_param_001[i] & (BIT(16) - 1)) << 16);
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + off1, val);
-	val = ((init->init_param_002[i] & (BIT(16) - 1)) << 16);
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + off2, val);
-	val = ((init->init_param_003[i] & (BIT(16) - 1)) << 16);
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + off3, val);
-	val = ((init->init_param_004[i] & (BIT(16) - 1)) << 16);
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + off4, val);
-	val = ((init->init_param_007[i] & (BIT(16) - 1)) << 16);
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + off5, val);
-	val = ((init->init_param_008[i] & (BIT(12) - 1)) << 16);
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + off6, val);
-
-	off1 = 0x300;
-	off2 = 0x340;
-	for (i = 0; i < AD4_LUT_GRP1_SIZE; i = i + 2) {
-		val = (init->init_param_005[i] & (BIT(16) - 1));
-		val |= ((init->init_param_005[i + 1] &
-				(BIT(16) - 1)) << 16);
-		DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + off1, val);
-		off1 += 4;
-
-		val = (init->init_param_006[i] & (BIT(16) - 1));
-		val |= ((init->init_param_006[i + 1] & (BIT(16) - 1))
-				<< 16);
-		DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + off2, val);
-		off2 += 4;
-	}
-
-	return 0;
-}
-
-static int ad4_cfg_setup(struct dpu_hw_dspp *dspp, struct dpu_ad_hw_cfg *cfg)
-{
-	u32 blk_offset, val;
-	struct drm_msm_ad4_cfg *ad_cfg;
-
-	if (!cfg->hw_cfg->payload) {
-		info[dspp->idx].completed_ops_mask &= ~ad4_cfg;
-		return 0;
-	}
-
-	if (cfg->hw_cfg->len != sizeof(struct drm_msm_ad4_cfg)) {
-		DRM_ERROR("invalid sz param exp %zd given %d cfg %pK\n",
-			sizeof(struct drm_msm_ad4_cfg), cfg->hw_cfg->len,
-			cfg->hw_cfg->payload);
-		return -EINVAL;
-	}
-	ad_cfg = cfg->hw_cfg->payload;
-
-	blk_offset = 0x18;
-	val = (ad_cfg->cfg_param_002 & (BIT(16) - 1));
-	val |= ((ad_cfg->cfg_param_001 & (BIT(16) - 1)) << 16);
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset, val);
-	blk_offset += 4;
-	val = (ad_cfg->cfg_param_004 & (BIT(16) - 1));
-	val |= ((ad_cfg->cfg_param_003 & (BIT(16) - 1)) << 16);
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset, val);
-
-	blk_offset = 0x20;
-	val = (ad_cfg->cfg_param_005 & (BIT(8) - 1));
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset, val);
-	blk_offset = 0x24;
-	val = (ad_cfg->cfg_param_006 & (BIT(7) - 1));
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset, val);
-
-	info[dspp->idx].tf_ctrl = (ad_cfg->cfg_param_008 & (BIT(8) - 1));
-
-	blk_offset = 0x38;
-	val = (ad_cfg->cfg_param_009 & (BIT(10) - 1));
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset, val);
-
-	blk_offset = 0x3c;
-	val = (ad_cfg->cfg_param_010 & (BIT(12) - 1));
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset, val);
-	blk_offset += 4;
-	val = ((ad_cfg->cfg_param_011 & (BIT(16) - 1)) << 16);
-	val |= (ad_cfg->cfg_param_012 & (BIT(16) - 1));
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset, val);
-
-	blk_offset = 0x88;
-	val = (ad_cfg->cfg_param_013 & (BIT(8) - 1));
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset, val);
-	blk_offset += 4;
-	val = (ad_cfg->cfg_param_014 & (BIT(16) - 1));
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset, val);
-
-	blk_offset = 0xa4;
-	val = (ad_cfg->cfg_param_015 & (BIT(16) - 1));
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset, val);
-	blk_offset += 4;
-	val = (ad_cfg->cfg_param_016 & (BIT(10) - 1));
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset, val);
-	blk_offset += 4;
-	val = (ad_cfg->cfg_param_017 & (BIT(16) - 1));
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset, val);
-	blk_offset += 4;
-	val = (ad_cfg->cfg_param_018 & (BIT(16) - 1));
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset, val);
-
-	blk_offset = 0xc4;
-	val = (ad_cfg->cfg_param_019 & (BIT(16) - 1));
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset, val);
-	blk_offset += 4;
-	val = (ad_cfg->cfg_param_020 & (BIT(16) - 1));
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset, val);
-
-	blk_offset = 0xb8;
-	val = (ad_cfg->cfg_param_021 & (BIT(16) - 1));
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset, val);
-	blk_offset += 4;
-	val = (ad_cfg->cfg_param_022 & (BIT(16) - 1));
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset, val);
-
-	blk_offset = 0xd0;
-	val = (ad_cfg->cfg_param_023 & (BIT(16) - 1));
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset, val);
-	blk_offset += 4;
-	val = (ad_cfg->cfg_param_024 & (BIT(16) - 1));
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset, val);
-
-	blk_offset = 0xdc;
-	val = (ad_cfg->cfg_param_025 & (BIT(16) - 1));
-	val |= ((ad_cfg->cfg_param_026 & (BIT(16) - 1)) << 16);
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset, val);
-	blk_offset += 4;
-	val = (ad_cfg->cfg_param_027 & (BIT(16) - 1));
-	val |= ((ad_cfg->cfg_param_028 & (BIT(16) - 1)) << 16);
-	blk_offset += 4;
-	val = (ad_cfg->cfg_param_029 & (BIT(16) - 1));
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset, val);
-
-	blk_offset = 0xec;
-	val = (ad_cfg->cfg_param_030 & (BIT(16) - 1));
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset, val);
-	blk_offset += 4;
-	val = (ad_cfg->cfg_param_031 & (BIT(12) - 1));
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset, val);
-
-	blk_offset = 0xf8;
-	val = (ad_cfg->cfg_param_032 & (BIT(10) - 1));
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset, val);
-	blk_offset += 4;
-	val = (ad_cfg->cfg_param_033 & (BIT(8) - 1));
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset, val);
-
-	blk_offset = 0x104;
-	val = (ad_cfg->cfg_param_034 & (BIT(16) - 1));
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset, val);
-	blk_offset += 4;
-	val = (ad_cfg->cfg_param_035 & (BIT(12) - 1));
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset, val);
-
-	blk_offset = 0x110;
-	val = (ad_cfg->cfg_param_036 & (BIT(12) - 1));
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset, val);
-	blk_offset += 4;
-	val = (ad_cfg->cfg_param_037 & (BIT(12) - 1));
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset, val);
-	blk_offset += 4;
-	val = (ad_cfg->cfg_param_038 & (BIT(8) - 1));
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset, val);
-	blk_offset += 4;
-	val = (ad_cfg->cfg_param_039 & (BIT(8) - 1));
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset, val);
-
-	blk_offset = 0x134;
-	val = (ad_cfg->cfg_param_040 & (BIT(12) - 1));
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset, val);
-
-	info[dspp->idx].vc_control_0 = (ad_cfg->cfg_param_041 & (BIT(7) - 1));
-
-	blk_offset += 160;
-	val = (ad_cfg->cfg_param_043 & (BIT(10) - 1));
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset, val);
-
-	blk_offset = 0x16c;
-	val = (ad_cfg->cfg_param_044 & (BIT(8) - 1));
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset, val);
-	blk_offset += 4;
-	val = (ad_cfg->cfg_param_045 & (BIT(8) - 1));
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset, val);
-	blk_offset += 4;
-	val = (ad_cfg->cfg_param_046 & (BIT(16) - 1));
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset, val);
-
-	return 0;
-}
-
-static int ad4_input_setup(struct dpu_hw_dspp *dspp,
-		struct dpu_ad_hw_cfg *cfg)
-{
-	u64 *val, als;
-	u32 blk_offset;
-
-	if (cfg->hw_cfg->len != sizeof(u64) && cfg->hw_cfg->payload) {
-		DRM_ERROR("invalid sz param exp %zd given %d cfg %pK\n",
-			sizeof(u64), cfg->hw_cfg->len, cfg->hw_cfg->payload);
-		return -EINVAL;
-	}
-
-	blk_offset = 0x28;
-	if (cfg->hw_cfg->payload) {
-		val = cfg->hw_cfg->payload;
-	} else {
-		als = 0;
-		val = &als;
-	}
-	info[dspp->idx].last_als = (*val & (BIT(16) - 1));
-	info[dspp->idx].completed_ops_mask |= ad4_input;
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset,
-			info[dspp->idx].last_als);
-	return 0;
-}
-
-static int ad4_suspend_setup(struct dpu_hw_dspp *dspp,
-		struct dpu_ad_hw_cfg *cfg)
-{
-	info[dspp->idx].state = ad4_state_idle;
-	pr_debug("%s(): AD state move to idle\n", __func__);
-	info[dspp->idx].completed_ops_mask = 0;
-	return 0;
-}
-
-static int ad4_mode_setup_common(struct dpu_hw_dspp *dspp,
-		struct dpu_ad_hw_cfg *cfg)
-{
-
-	if (cfg->hw_cfg->len != sizeof(u64) || !cfg->hw_cfg->payload) {
-		DRM_ERROR("invalid sz param exp %zd given %d cfg %pK\n",
-			sizeof(u64), cfg->hw_cfg->len, cfg->hw_cfg->payload);
-		return -EINVAL;
-	}
-
-	info[dspp->idx].mode = *((enum ad4_modes *)
-					(cfg->hw_cfg->payload));
-	info[dspp->idx].completed_ops_mask |= ad4_mode;
-
-	if (AD_STATE_READY(info[dspp->idx].completed_ops_mask) ||
-					info[dspp->idx].mode == AD4_OFF)
-		ad4_mode_setup(dspp, info[dspp->idx].mode);
-
-	return 0;
-}
-
-static int ad4_init_setup_idle(struct dpu_hw_dspp *dspp,
-		struct dpu_ad_hw_cfg *cfg)
-{
-	int ret;
-	u32 blk_offset;
-
-	if (!cfg->hw_cfg->payload) {
-		info[dspp->idx].completed_ops_mask &= ~ad4_init;
-		return 0;
-	}
-
-	ret = ad4_init_setup(dspp, cfg);
-	if (ret)
-		return ret;
-
-	/* enable memory initialization*/
-	/* frmt mode */
-	blk_offset = 0x8;
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset,
-			(info[dspp->idx].frmt_mode & 0x1fff));
-	/* memory init */
-	blk_offset = 0x450;
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset, 0x1);
-
-	/* enforce 0 initial strength when powering up AD config */
-	/* irdx_control_0 */
-	blk_offset = 0x13c;
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset, 0x6);
-
-	info[dspp->idx].completed_ops_mask |= ad4_init;
-
-	if (AD_STATE_READY(info[dspp->idx].completed_ops_mask))
-		ad4_mode_setup(dspp, info[dspp->idx].mode);
-
-	return 0;
-}
-
-static int ad4_init_setup_run(struct dpu_hw_dspp *dspp,
-		struct dpu_ad_hw_cfg *cfg)
-{
-	int ret;
-	u32 blk_offset;
-
-	if (!cfg->hw_cfg->payload) {
-		info[dspp->idx].completed_ops_mask &= ~ad4_init;
-		return 0;
-	}
-
-	ret = ad4_init_setup(dspp, cfg);
-	if (ret)
-		return ret;
-
-	/* disable memory initialization*/
-	/* frmt mode */
-	blk_offset = 0x8;
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset,
-			(info[dspp->idx].frmt_mode | 0x2000));
-	/* no need to explicitly set memory initialization sequence,
-	 * since AD hw were not powered off.
-	 */
-
-	/* irdx_control_0 */
-	blk_offset = 0x13c;
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset,
-			info[dspp->idx].irdx_control_0);
-
-	return 0;
-}
-
-static int ad4_init_setup_ipcr(struct dpu_hw_dspp *dspp,
-		struct dpu_ad_hw_cfg *cfg)
-{
-	int ret;
-	u32 blk_offset;
-
-	if (!cfg->hw_cfg->payload) {
-		info[dspp->idx].completed_ops_mask &= ~ad4_init;
-		return 0;
-	}
-
-	ret = ad4_init_setup(dspp, cfg);
-	if (ret)
-		return ret;
-	/* no need to explicitly set memory initialization sequence,
-	 * since register reset values are the correct configuration
-	 */
-	/* frmt mode */
-	blk_offset = 0x8;
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset,
-			(info[dspp->idx].frmt_mode | 0x2000));
-	/* irdx_control_0 */
-	blk_offset = 0x13c;
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset,
-			info[dspp->idx].irdx_control_0);
-
-	info[dspp->idx].completed_ops_mask |= ad4_init;
-	if (AD_STATE_READY(info[dspp->idx].completed_ops_mask))
-		ad4_mode_setup(dspp, info[dspp->idx].mode);
-
-	return 0;
-}
-
-static int ad4_cfg_setup_idle(struct dpu_hw_dspp *dspp,
-		struct dpu_ad_hw_cfg *cfg)
-{
-	int ret;
-	u32 blk_offset;
-
-	if (!cfg->hw_cfg->payload) {
-		info[dspp->idx].completed_ops_mask &= ~ad4_cfg;
-		return 0;
-	}
-
-	ret = ad4_cfg_setup(dspp, cfg);
-	if (ret)
-		return ret;
-
-	/* enforce 0 initial strength when powering up AD config */
-	/* assertiveness */
-	blk_offset = 0x30;
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset, 0x0);
-	/* tf control */
-	blk_offset = 0x34;
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset, 0x55);
-
-	/* vc_control_0 */
-	blk_offset = 0x138;
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset,
-		info[dspp->idx].vc_control_0);
-
-	info[dspp->idx].completed_ops_mask |= ad4_cfg;
-	if (AD_STATE_READY(info[dspp->idx].completed_ops_mask))
-		ad4_mode_setup(dspp, info[dspp->idx].mode);
-	return 0;
-}
-
-static int ad4_cfg_setup_run(struct dpu_hw_dspp *dspp,
-		struct dpu_ad_hw_cfg *cfg)
-{
-	int ret;
-	u32 blk_offset;
-
-	if (!cfg->hw_cfg->payload) {
-		info[dspp->idx].completed_ops_mask &= ~ad4_cfg;
-		return 0;
-	}
-
-	ret = ad4_cfg_setup(dspp, cfg);
-	if (ret)
-		return ret;
-
-	/* assertiveness */
-	blk_offset = 0x30;
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset,
-			info[dspp->idx].last_assertive);
-	/* tf control */
-	blk_offset = 0x34;
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset,
-		info[dspp->idx].tf_ctrl);
-	/* vc_control_0 */
-	blk_offset = 0x138;
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset,
-		info[dspp->idx].vc_control_0);
-
-	return 0;
-}
-
-static int ad4_cfg_setup_ipcr(struct dpu_hw_dspp *dspp,
-		struct dpu_ad_hw_cfg *cfg)
-{
-	int ret;
-	u32 blk_offset;
-
-	if (!cfg->hw_cfg->payload) {
-		info[dspp->idx].completed_ops_mask &= ~ad4_cfg;
-		return 0;
-	}
-
-	ret = ad4_cfg_setup(dspp, cfg);
-	if (ret)
-		return ret;
-
-	/* assertiveness */
-	blk_offset = 0x30;
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset,
-			info[dspp->idx].last_assertive);
-
-	info[dspp->idx].completed_ops_mask |= ad4_cfg;
-	if (AD_STATE_READY(info[dspp->idx].completed_ops_mask))
-		ad4_mode_setup(dspp, info[dspp->idx].mode);
-	return 0;
-}
-
-static int ad4_input_setup_idle(struct dpu_hw_dspp *dspp,
-		struct dpu_ad_hw_cfg *cfg)
-{
-	int ret;
-
-	ret = ad4_input_setup(dspp, cfg);
-	if (ret)
-		return ret;
-
-	info[dspp->idx].completed_ops_mask |= ad4_input;
-	if (AD_STATE_READY(info[dspp->idx].completed_ops_mask))
-		ad4_mode_setup(dspp, info[dspp->idx].mode);
-
-	return 0;
-}
-
-static int ad4_input_setup_ipcr(struct dpu_hw_dspp *dspp,
-		struct dpu_ad_hw_cfg *cfg)
-{
-	u64 *val, als;
-	u32 blk_offset;
-
-	if (cfg->hw_cfg->len != sizeof(u64) && cfg->hw_cfg->payload) {
-		DRM_ERROR("invalid sz param exp %zd given %d cfg %pK\n",
-			sizeof(u64), cfg->hw_cfg->len, cfg->hw_cfg->payload);
-		return -EINVAL;
-	}
-
-	blk_offset = 0x28;
-	if (cfg->hw_cfg->payload) {
-		val = cfg->hw_cfg->payload;
-	} else {
-		als = 0;
-		val = &als;
-	}
-	info[dspp->idx].cached_als = *val & (BIT(16) - 1);
-	info[dspp->idx].completed_ops_mask |= ad4_input;
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset,
-			info[dspp->idx].last_als);
-
-	if (AD_STATE_READY(info[dspp->idx].completed_ops_mask))
-		ad4_mode_setup(dspp, info[dspp->idx].mode);
-
-	return 0;
-}
-
-static int ad4_assertive_setup(struct dpu_hw_dspp *dspp,
-		struct dpu_ad_hw_cfg *cfg)
-{
-	u64 *val, assertive;
-	u32 blk_offset;
-
-	if (cfg->hw_cfg->len != sizeof(u64) && cfg->hw_cfg->payload) {
-		DRM_ERROR("invalid sz param exp %zd given %d cfg %pK\n",
-			sizeof(u64), cfg->hw_cfg->len, cfg->hw_cfg->payload);
-		return -EINVAL;
-	}
-
-	blk_offset = 0x30;
-	if (cfg->hw_cfg->payload) {
-		val = cfg->hw_cfg->payload;
-	} else {
-		assertive = 0;
-		val = &assertive;
-	}
-
-	info[dspp->idx].last_assertive = *val & (BIT(8) - 1);
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset,
-			(info[dspp->idx].last_assertive));
-	return 0;
-}
-
-static int ad4_assertive_setup_ipcr(struct dpu_hw_dspp *dspp,
-		struct dpu_ad_hw_cfg *cfg)
-{
-	u64 *val, assertive;
-	u32 blk_offset;
-
-	if (cfg->hw_cfg->len != sizeof(u64) && cfg->hw_cfg->payload) {
-		DRM_ERROR("invalid sz param exp %zd given %d cfg %pK\n",
-			sizeof(u64), cfg->hw_cfg->len, cfg->hw_cfg->payload);
-		return -EINVAL;
-	}
-
-	blk_offset = 0x30;
-	if (cfg->hw_cfg->payload) {
-		val = cfg->hw_cfg->payload;
-	} else {
-		assertive = 0;
-		val = &assertive;
-	}
-
-	info[dspp->idx].cached_assertive = *val & (BIT(8) - 1);
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset,
-			info[dspp->idx].last_assertive);
-
-	return 0;
-}
-
-static int ad4_backlight_setup(struct dpu_hw_dspp *dspp,
-		struct dpu_ad_hw_cfg *cfg)
-{
-	u64 *val, bl;
-	u32 blk_offset;
-
-	if (cfg->hw_cfg->len != sizeof(u64) && cfg->hw_cfg->payload) {
-		DRM_ERROR("invalid sz param exp %zd given %d cfg %pK\n",
-			sizeof(u64), cfg->hw_cfg->len, cfg->hw_cfg->payload);
-		return -EINVAL;
-	}
-
-	blk_offset = 0x2c;
-	if (cfg->hw_cfg->payload) {
-		val = cfg->hw_cfg->payload;
-	} else {
-		bl = 0;
-		val = &bl;
-	}
-
-	info[dspp->idx].last_bl = *val & (BIT(16) - 1);
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset,
-			info[dspp->idx].last_bl);
-	return 0;
-}
-
-static int ad4_backlight_setup_ipcr(struct dpu_hw_dspp *dspp,
-		struct dpu_ad_hw_cfg *cfg)
-{
-	u64 *val, bl;
-	u32 blk_offset;
-
-	if (cfg->hw_cfg->len != sizeof(u64) && cfg->hw_cfg->payload) {
-		DRM_ERROR("invalid sz param exp %zd given %d cfg %pK\n",
-			sizeof(u64), cfg->hw_cfg->len, cfg->hw_cfg->payload);
-		return -EINVAL;
-	}
-
-	blk_offset = 0x2c;
-	if (cfg->hw_cfg->payload) {
-		val = cfg->hw_cfg->payload;
-	} else {
-		bl = 0;
-		val = &bl;
-	}
-
-	info[dspp->idx].cached_bl = *val & (BIT(16) - 1);
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset,
-			info[dspp->idx].last_bl);
-
-	return 0;
-}
-
-void dpu_read_intr_resp_ad4(struct dpu_hw_dspp *dspp, u32 event, u32 *resp)
-{
-	if (!dspp || !resp) {
-		DRM_ERROR("invalid params dspp %pK resp %pK\n", dspp, resp);
-		return;
-	}
-
-	switch (event) {
-	case AD4_BACKLIGHT:
-		*resp = DPU_REG_READ(&dspp->hw,
-				dspp->cap->sblk->ad.base + 0x48);
-		break;
-	default:
-		break;
-	}
-}
-
-static int ad4_ipc_suspend_setup_run(struct dpu_hw_dspp *dspp,
-		struct dpu_ad_hw_cfg *cfg)
-{
-	u32 strength = 0, i = 0;
-	struct dpu_hw_mixer *hw_lm;
-
-	hw_lm = cfg->hw_cfg->mixer_info;
-	if ((cfg->hw_cfg->num_of_mixers == 2) && hw_lm->cfg.right_mixer) {
-		/* this AD core is the salve core */
-		for (i = DSPP_0; i < DSPP_MAX; i++) {
-			if (info[i].is_master) {
-				strength = info[i].last_str;
-				break;
-			}
-		}
-	} else {
-		strength = DPU_REG_READ(&dspp->hw,
-				dspp->cap->sblk->ad.base + 0x4c);
-		pr_debug("%s(): AD strength = %d\n", __func__, strength);
-	}
-	info[dspp->idx].last_str = strength;
-	info[dspp->idx].state = ad4_state_ipcs;
-	pr_debug("%s(): AD state move to ipcs\n", __func__);
-
-	return 0;
-}
-
-static int ad4_ipc_resume_setup_ipcs(struct dpu_hw_dspp *dspp,
-		struct dpu_ad_hw_cfg *cfg)
-{
-	u32 blk_offset, val;
-
-	info[dspp->idx].frame_count = 0;
-	info[dspp->idx].state = ad4_state_ipcr;
-	pr_debug("%s(): AD state move to ipcr\n", __func__);
-
-	/* no need to rewrite frmt_mode bit 13 and mem_init,
-	 * since the default register values are exactly what
-	 * we wanted.
-	 */
-
-	/* ipc resume with manual strength */
-	/* tf control */
-	blk_offset = 0x34;
-	val = (0x55 & (BIT(8) - 1));
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset, val);
-	/* set manual strength */
-	blk_offset = 0x15c;
-	val = (info[dspp->idx].last_str & (BIT(10) - 1));
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset, val);
-	/* enable manual mode */
-	blk_offset = 0x138;
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset, 0);
-
-	return 0;
-}
-
-static int ad4_ipc_suspend_setup_ipcr(struct dpu_hw_dspp *dspp,
-		struct dpu_ad_hw_cfg *cfg)
-{
-	info[dspp->idx].state = ad4_state_ipcs;
-	pr_debug("%s(): AD state move to ipcs\n", __func__);
-	return 0;
-}
-
-static int ad4_ipc_reset_setup_ipcr(struct dpu_hw_dspp *dspp,
-		struct dpu_ad_hw_cfg *cfg)
-{
-	int ret;
-	u32 strength = 0, i = 0;
-	struct dpu_hw_mixer *hw_lm;
-
-	/* Read AD calculator strength output during the 2 frames of manual
-	 * strength mode, and assign the strength output to last_str
-	 * when frame count reaches AD_IPC_FRAME_COUNT to avoid flickers
-	 * caused by strength was not converged before entering IPC mode
-	 */
-	hw_lm = cfg->hw_cfg->mixer_info;
-	if ((cfg->hw_cfg->num_of_mixers == 2) && hw_lm->cfg.right_mixer) {
-		/* this AD core is the salve core */
-		for (i = DSPP_0; i < DSPP_MAX; i++) {
-			if (info[i].is_master) {
-				strength = info[i].last_str;
-				break;
-			}
-		}
-	} else {
-		strength = DPU_REG_READ(&dspp->hw,
-				dspp->cap->sblk->ad.base + 0x4c);
-		pr_debug("%s(): AD strength = %d\n", __func__, strength);
-	}
-
-	if (info[dspp->idx].frame_count == AD_IPC_FRAME_COUNT) {
-		info[dspp->idx].state = ad4_state_run;
-		pr_debug("%s(): AD state move to run\n", __func__);
-		info[dspp->idx].last_str = strength;
-		ret = ad4_cfg_ipc_reset(dspp, cfg);
-		if (ret)
-			return ret;
-	} else {
-		info[dspp->idx].frame_count++;
-	}
-
-	return 0;
-}
-
-static int ad4_cfg_ipc_reset(struct dpu_hw_dspp *dspp,
-		struct dpu_ad_hw_cfg *cfg)
-{
-	u32 blk_offset;
-
-	/* revert manual strength */
-	/* tf control */
-	blk_offset = 0x34;
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset,
-		info[dspp->idx].tf_ctrl);
-	/* vc_control_0 */
-	blk_offset = 0x138;
-	DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset,
-		info[dspp->idx].vc_control_0);
-
-	/* reset cached ALS, backlight and assertiveness */
-	if (info[dspp->idx].cached_als != U64_MAX) {
-		DPU_REG_WRITE(&dspp->hw,
-				dspp->cap->sblk->ad.base + 0x28,
-				info[dspp->idx].cached_als);
-		info[dspp->idx].last_als = info[dspp->idx].cached_als;
-		info[dspp->idx].cached_als = U64_MAX;
-	}
-	if (info[dspp->idx].cached_bl != U64_MAX) {
-		DPU_REG_WRITE(&dspp->hw,
-				dspp->cap->sblk->ad.base + 0x2c,
-				info[dspp->idx].cached_bl);
-		info[dspp->idx].last_bl = info[dspp->idx].cached_bl;
-		info[dspp->idx].cached_bl = U64_MAX;
-	}
-	if (info[dspp->idx].cached_assertive != U8_MAX) {
-		DPU_REG_WRITE(&dspp->hw,
-				dspp->cap->sblk->ad.base + 0x30,
-				info[dspp->idx].cached_assertive);
-		info[dspp->idx].last_assertive =
-				info[dspp->idx].cached_assertive;
-		info[dspp->idx].cached_assertive = U8_MAX;
-	}
-
-	return 0;
-}
-
-static int ad4_ipc_reset_setup_startup(struct dpu_hw_dspp *dspp,
-		struct dpu_ad_hw_cfg *cfg)
-{
-	u32 blk_offset;
-
-	if (info[dspp->idx].frame_count == AD_IPC_FRAME_COUNT) {
-		info[dspp->idx].state = ad4_state_run;
-		pr_debug("%s(): AD state move to run\n", __func__);
-
-		/* revert enforce 0 initial strength */
-		/* irdx_control_0 */
-		blk_offset = 0x13c;
-		DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset,
-				info[dspp->idx].irdx_control_0);
-		/* assertiveness */
-		blk_offset = 0x30;
-		DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset,
-				info[dspp->idx].last_assertive);
-		/* tf control */
-		blk_offset = 0x34;
-		DPU_REG_WRITE(&dspp->hw, dspp->cap->sblk->ad.base + blk_offset,
-				info[dspp->idx].tf_ctrl);
-	} else {
-		info[dspp->idx].frame_count++;
-	}
-
-	return 0;
-}
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c
index 8e779c0..7a7c02a 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c
@@ -32,14 +32,6 @@
 #define MIXER_SDM845_MASK \
 	(BIT(DPU_MIXER_SOURCESPLIT) | BIT(DPU_DIM_LAYER))
 
-#define DSPP_SDM845_MASK \
-	(BIT(DPU_DSPP_IGC) | BIT(DPU_DSPP_PCC) | BIT(DPU_DSPP_GC) |\
-	BIT(DPU_DSPP_HSIC) | BIT(DPU_DSPP_GAMUT) | BIT(DPU_DSPP_HIST) |\
-	BIT(DPU_DSPP_MEMCOLOR) | BIT(DPU_DSPP_SIXZONE) | BIT(DPU_DSPP_VLUT))
-
-#define DSPP_AD_SDM845_MASK \
-	(DSPP_SDM845_MASK | BIT(DPU_DSPP_AD))
-
 #define PINGPONG_SDM845_MASK BIT(DPU_PINGPONG_DITHER)
 
 #define PINGPONG_SDM845_SPLIT_MASK \
@@ -248,76 +240,33 @@
 	},
 };
 
-#define LM_BLK(_name, _id, _base, _dspp, _ds, _pp, _lmpair) \
+#define LM_BLK(_name, _id, _base, _ds, _pp, _lmpair) \
 	{ \
 	.name = _name, .id = _id, \
 	.base = _base, .len = 0x320, \
 	.features = MIXER_SDM845_MASK, \
 	.sblk = &sdm845_lm_sblk, \
-	.dspp = _dspp, .ds = _ds, \
+	.ds = _ds, \
 	.pingpong = _pp, \
 	.lm_pair_mask = (1 << _lmpair) \
 	}
+
 static struct dpu_lm_cfg sdm845_lm[] = {
-	LM_BLK("lm_0", LM_0, 0x45000, DSPP_0,
+	LM_BLK("lm_0", LM_0, 0x45000,
 		DS_0, PINGPONG_0, LM_1),
-	LM_BLK("lm_1", LM_1, 0x46000, DSPP_1,
+	LM_BLK("lm_1", LM_1, 0x46000,
 		DS_1, PINGPONG_1, LM_0),
-	LM_BLK("lm_2", LM_2, 0x47000, DSPP_2,
+	LM_BLK("lm_2", LM_2, 0x47000,
 		DS_MAX, PINGPONG_2, LM_5),
-	LM_BLK("lm_3", LM_3, 0x0, DSPP_MAX,
+	LM_BLK("lm_3", LM_3, 0x0,
 		DS_MAX, PINGPONG_MAX, 0),
-	LM_BLK("lm_4", LM_4, 0x0, DSPP_MAX,
+	LM_BLK("lm_4", LM_4, 0x0,
 		DS_MAX, PINGPONG_MAX, 0),
-	LM_BLK("lm_5", LM_5, 0x4a000, DSPP_3,
+	LM_BLK("lm_5", LM_5, 0x4a000,
 		DS_MAX, PINGPONG_3, LM_2),
 };
 
 /*************************************************************
- * DSPP sub blocks config
- *************************************************************/
-static struct dpu_dspp_top_cfg sdm845_dspp_top = {
-	.name = "dspp_top", .base = 0x1300, .len = 0xc
-};
-
-static const struct dpu_dspp_sub_blks sdm845_dspp_sblk = {
-	.igc = {.id = DPU_DSPP_IGC, .base = 0x0,
-		.len = 0x0, .version = 0x30001},
-	.pcc = {.id = DPU_DSPP_PCC, .base = 0x1700,
-		.len = 0x0, .version = 0x40000},
-	.gc = {.id = DPU_DSPP_GC, .base = 0x17c0,
-		.len = 0x0, .version = 0x10008},
-	.hsic = {.id = DPU_DSPP_HSIC, .base = 0x800,
-		.len = 0x0, .version = 0x10007},
-	.memcolor = {.id = DPU_DSPP_MEMCOLOR, .base = 0x880,
-		.len = 0x0, .version = 0x10007},
-	.sixzone = {.id = DPU_DSPP_SIXZONE, .base = 0x900,
-		.len = 0x0, .version = 0x10007},
-	.gamut = {.id = DPU_DSPP_GAMUT, .base = 0x1000,
-		.len = 0x0, .version = 0x40000},
-	.hist = {.id = DPU_DSPP_HIST, .base = 0x800,
-		.len = 0x0, .version = 0x10007},
-	/* TODO : Move AD out of DSPP config */
-	.vlut = {.id = DPU_DSPP_VLUT, .base = 0xa00,
-		.len = 0x0, .version = 0x10008},
-};
-
-#define DSPP_BLK(_name, _id, _base) \
-	{\
-	.name = _name, .id = _id, \
-	.base = _base, .len = 0x17e0, \
-	.features = DSPP_SDM845_MASK, \
-	.sblk = &sdm845_dspp_sblk, \
-	}
-
-static struct dpu_dspp_cfg sdm845_dspp[] = {
-	DSPP_BLK("dspp_0", DSPP_0, 0x55000),
-	DSPP_BLK("dspp_1", DSPP_1, 0x57000),
-	DSPP_BLK("dspp_2", DSPP_2, 0x59000),
-	DSPP_BLK("dspp_3", DSPP_3, 0x5b000),
-};
-
-/*************************************************************
  * DS sub blocks config
  *************************************************************/
 static const struct dpu_ds_top_cfg sdm845_ds_top = {
@@ -560,9 +509,6 @@ void sdm845_cfg_init(struct dpu_mdss_cfg *dpu_cfg)
 		.sspp = sdm845_sspp,
 		.mixer_count = ARRAY_SIZE(sdm845_lm),
 		.mixer = sdm845_lm,
-		.dspp_top = sdm845_dspp_top,
-		.dspp_count = ARRAY_SIZE(sdm845_dspp),
-		.dspp = sdm845_dspp,
 		.ds_count = ARRAY_SIZE(sdm845_ds),
 		.ds = sdm845_ds,
 		.pingpong_count = ARRAY_SIZE(sdm845_pp),
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h
index 39bec0a..cd4ed8b 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h
@@ -63,11 +63,6 @@
 
 #define CRTC_DUAL_MIXERS	2
 
-#define DPU_COLOR_PROCESS_VER(MAJOR, MINOR) \
-		((((MAJOR) & 0xFFFF) << 16) | (((MINOR) & 0xFFFF)))
-#define DPU_COLOR_PROCESS_MAJOR(version) (((version) & 0xFFFF0000) >> 16)
-#define DPU_COLOR_PROCESS_MINOR(version) ((version) & 0xFFFF)
-
 #define MAX_XIN_COUNT 16
 
 /**
@@ -109,10 +104,6 @@ enum {
  * @DPU_SSPP_SCALER_RGB,     RGB Scaler, supported by RGB pipes
  * @DPU_SSPP_CSC,            Support of Color space converion
  * @DPU_SSPP_CSC_10BIT,      Support of 10-bit Color space conversion
- * @DPU_SSPP_HSIC,           Global HSIC control
- * @DPU_SSPP_MEMCOLOR        Memory Color Support
- * @DPU_SSPP_IGC,            Inverse gamma correction
- * @DPU_SSPP_PCC,            Color correction support
  * @DPU_SSPP_CURSOR,         SSPP can be used as a cursor layer
  * @DPU_SSPP_QOS,            SSPP support QoS control, danger/safe/creq
  * @DPU_SSPP_QOS_8LVL,       SSPP support 8-level QoS control
@@ -131,10 +122,6 @@ enum {
 	DPU_SSPP_SCALER_RGB,
 	DPU_SSPP_CSC,
 	DPU_SSPP_CSC_10BIT,
-	DPU_SSPP_HSIC,
-	DPU_SSPP_MEMCOLOR,
-	DPU_SSPP_IGC,
-	DPU_SSPP_PCC,
 	DPU_SSPP_CURSOR,
 	DPU_SSPP_QOS,
 	DPU_SSPP_QOS_8LVL,
@@ -164,36 +151,6 @@ enum {
 };
 
 /**
- * DSPP sub-blocks
- * @DPU_DSPP_IGC             DSPP Inverse gamma correction block
- * @DPU_DSPP_PCC             Panel color correction block
- * @DPU_DSPP_GC              Gamma correction block
- * @DPU_DSPP_HSIC            Global HSIC block
- * @DPU_DSPP_MEMCOLOR        Memory Color block
- * @DPU_DSPP_SIXZONE         Six zone block
- * @DPU_DSPP_GAMUT           Gamut bloc
- * @DPU_DSPP_DITHER          Dither block
- * @DPU_DSPP_HIST            Histogram block
- * @DPU_DSPP_VLUT            PA VLUT block
- * @DPU_DSPP_AD              AD block
- * @DPU_DSPP_MAX             maximum value
- */
-enum {
-	DPU_DSPP_IGC = 0x1,
-	DPU_DSPP_PCC,
-	DPU_DSPP_GC,
-	DPU_DSPP_HSIC,
-	DPU_DSPP_MEMCOLOR,
-	DPU_DSPP_SIXZONE,
-	DPU_DSPP_GAMUT,
-	DPU_DSPP_DITHER,
-	DPU_DSPP_HIST,
-	DPU_DSPP_VLUT,
-	DPU_DSPP_AD,
-	DPU_DSPP_MAX
-};
-
-/**
  * PINGPONG sub-blocks
  * @DPU_PINGPONG_TE         Tear check block
  * @DPU_PINGPONG_TE2        Additional tear check block for split pipes
@@ -468,20 +425,6 @@ struct dpu_lm_sub_blks {
 	struct dpu_pp_blk gc;
 };
 
-struct dpu_dspp_sub_blks {
-	struct dpu_pp_blk igc;
-	struct dpu_pp_blk pcc;
-	struct dpu_pp_blk gc;
-	struct dpu_pp_blk hsic;
-	struct dpu_pp_blk memcolor;
-	struct dpu_pp_blk sixzone;
-	struct dpu_pp_blk gamut;
-	struct dpu_pp_blk dither;
-	struct dpu_pp_blk hist;
-	struct dpu_pp_blk ad;
-	struct dpu_pp_blk vlut;
-};
-
 struct dpu_pingpong_sub_blks {
 	struct dpu_pp_blk te;
 	struct dpu_pp_blk te2;
@@ -583,7 +526,6 @@ struct dpu_sspp_cfg {
  * @base               register offset of this block
  * @features           bit mask identifying sub-blocks/features
  * @sblk:              LM Sub-blocks information
- * @dspp:              ID of connected DSPP, DSPP_MAX if unsupported
  * @pingpong:          ID of connected PingPong, PINGPONG_MAX if unsupported
  * @ds:                ID of connected DS, DS_MAX if unsupported
  * @lm_pair_mask:      Bitmask of LMs that can be controlled by same CTL
@@ -591,37 +533,12 @@ struct dpu_sspp_cfg {
 struct dpu_lm_cfg {
 	DPU_HW_BLK_INFO;
 	const struct dpu_lm_sub_blks *sblk;
-	u32 dspp;
 	u32 pingpong;
 	u32 ds;
 	unsigned long lm_pair_mask;
 };
 
 /**
- * struct dpu_dspp_cfg - information of DSPP top block
- * @id                 enum identifying this block
- * @base               register offset of this block
- * @features           bit mask identifying sub-blocks/features
- *                     supported by this block
- */
-struct dpu_dspp_top_cfg  {
-	DPU_HW_BLK_INFO;
-};
-
-/**
- * struct dpu_dspp_cfg - information of DSPP blocks
- * @id                 enum identifying this block
- * @base               register offset of this block
- * @features           bit mask identifying sub-blocks/features
- *                     supported by this block
- * @sblk               sub-blocks information
- */
-struct dpu_dspp_cfg  {
-	DPU_HW_BLK_INFO;
-	const struct dpu_dspp_sub_blks *sblk;
-};
-
-/**
  * struct dpu_ds_top_cfg - information of dest scaler top
  * @id               enum identifying this block
  * @base             register offset of this block
@@ -890,11 +807,6 @@ struct dpu_mdss_cfg {
 	u32 mixer_count;
 	struct dpu_lm_cfg *mixer;
 
-	struct dpu_dspp_top_cfg dspp_top;
-
-	u32 dspp_count;
-	struct dpu_dspp_cfg *dspp;
-
 	u32 ds_count;
 	struct dpu_ds_cfg *ds;
 
@@ -942,7 +854,6 @@ struct dpu_mdss_hw_cfg_handler {
 #define BLK_DMA(s) ((s)->dma)
 #define BLK_CURSOR(s) ((s)->cursor)
 #define BLK_MIXER(s) ((s)->mixer)
-#define BLK_DSPP(s) ((s)->dspp)
 #define BLK_DS(s) ((s)->ds)
 #define BLK_PINGPONG(s) ((s)->pingpong)
 #define BLK_CDM(s) ((s)->cdm)
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_color_proc_common_v4.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_color_proc_common_v4.h
deleted file mode 100644
index 495e675..0000000
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_color_proc_common_v4.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/* Copyright (c) 2017-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.
- */
-#ifndef _DPU_HW_COLOR_PROC_COMMON_V4_H_
-#define _DPU_HW_COLOR_PROC_COMMON_V4_H_
-
-#define GAMUT_TABLE_SEL_OFF 0x4
-#define GAMUT_UPPER_COLOR_OFF 0x8
-#define GAMUT_LOWER_COLOR_OFF 0xc
-#define GAMUT_SCALEA_OFFSET_OFF 0x10
-#define GAMUT_SCALEB_OFFSET_OFF 0xe0
-#define GAMUT_TABLE0_SEL BIT(12)
-#define GAMUT_MAP_EN BIT(1)
-#define GAMUT_EN BIT(0)
-#define GAMUT_MODE_13B_OFF 640
-#define GAMUT_MODE_5_OFF 1248
-
-enum {
-	gamut_mode_17 = 0,
-	gamut_mode_5,
-	gamut_mode_13a,
-	gamut_mode_13b,
-};
-
-#define GC_C0_OFF 0x4
-#define GC_C0_INDEX_OFF 0x8
-#define GC_8B_ROUND_EN BIT(1)
-#define GC_EN BIT(0)
-#define GC_TBL_NUM 3
-#define GC_LUT_SWAP_OFF 0x1c
-
-#define IGC_TBL_NUM 3
-#define IGC_DITHER_OFF 0x7e0
-#define IGC_OPMODE_OFF 0x0
-#define IGC_C0_OFF 0x0
-#define IGC_DATA_MASK (BIT(12) - 1)
-#define IGC_DSPP_SEL_MASK_MAX (BIT(4) - 1)
-#define IGC_DSPP_SEL_MASK(n) \
-	((IGC_DSPP_SEL_MASK_MAX & ~(1 << (n))) << 28)
-#define IGC_INDEX_UPDATE BIT(25)
-#define IGC_EN BIT(0)
-#define IGC_DIS 0
-#define IGC_DITHER_DATA_MASK (BIT(4) - 1)
-
-#define PCC_NUM_PLANES 3
-#define PCC_NUM_COEFF 11
-#define PCC_EN BIT(0)
-#define PCC_DIS 0
-#define PCC_C_OFF 0x4
-#define PCC_R_OFF 0x10
-#define PCC_G_OFF 0x1c
-#define PCC_B_OFF 0x28
-#define PCC_RG_OFF 0x34
-#define PCC_RB_OFF 0x40
-#define PCC_GB_OFF 0x4c
-#define PCC_RGB_OFF 0x58
-#define PCC_RR_OFF 0x64
-#define PCC_GG_OFF 0x70
-#define PCC_BB_OFF 0x7c
-
-#endif /* _DPU_HW_COLOR_PROC_COMMON_V4_H_ */
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_color_proc_v4.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_color_proc_v4.c
deleted file mode 100644
index 1c693a8..0000000
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_color_proc_v4.c
+++ /dev/null
@@ -1,242 +0,0 @@
-/* Copyright (c) 2017-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 <drm/msm_drm_pp.h>
-#include "dpu_hw_color_proc_common_v4.h"
-#include "dpu_hw_color_proc_v4.h"
-
-static int dpu_write_3d_gamut(struct dpu_hw_blk_reg_map *hw,
-		struct drm_msm_3d_gamut *payload, u32 base,
-		u32 *opcode)
-{
-	u32 reg, tbl_len, tbl_off, scale_off, i, j;
-	u32 scale_tbl_len, scale_tbl_off;
-	u32 *scale_data;
-
-	if (!payload || !opcode || !hw) {
-		DRM_ERROR("invalid payload %pK opcode %pK hw %pK\n",
-			payload, opcode, hw);
-		return -EINVAL;
-	}
-
-	switch (payload->mode) {
-	case GAMUT_3D_MODE_17:
-		tbl_len = GAMUT_3D_MODE17_TBL_SZ;
-		tbl_off = 0;
-		scale_off = GAMUT_SCALEA_OFFSET_OFF;
-		*opcode = gamut_mode_17 << 2;
-		break;
-	case GAMUT_3D_MODE_13:
-		*opcode = (*opcode & (BIT(4) - 1)) >> 2;
-		if (*opcode == gamut_mode_13a)
-			*opcode = gamut_mode_13b;
-		else
-			*opcode = gamut_mode_13a;
-		tbl_len = GAMUT_3D_MODE13_TBL_SZ;
-		tbl_off = (*opcode == gamut_mode_13a) ? 0 :
-			GAMUT_MODE_13B_OFF;
-		scale_off = (*opcode == gamut_mode_13a) ?
-			GAMUT_SCALEA_OFFSET_OFF : GAMUT_SCALEB_OFFSET_OFF;
-		*opcode <<= 2;
-		break;
-	case GAMUT_3D_MODE_5:
-		*opcode = gamut_mode_5 << 2;
-		tbl_len = GAMUT_3D_MODE5_TBL_SZ;
-		tbl_off = GAMUT_MODE_5_OFF;
-		scale_off = GAMUT_SCALEB_OFFSET_OFF;
-		break;
-	default:
-		DRM_ERROR("invalid mode %d\n", payload->mode);
-		return -EINVAL;
-	}
-
-	if (payload->flags & GAMUT_3D_MAP_EN)
-		*opcode |= GAMUT_MAP_EN;
-	*opcode |= GAMUT_EN;
-
-	for (i = 0; i < GAMUT_3D_TBL_NUM; i++) {
-		reg = GAMUT_TABLE0_SEL << i;
-		reg |= ((tbl_off) & (BIT(11) - 1));
-		DPU_REG_WRITE(hw, base + GAMUT_TABLE_SEL_OFF, reg);
-		for (j = 0; j < tbl_len; j++) {
-			DPU_REG_WRITE(hw, base + GAMUT_LOWER_COLOR_OFF,
-					payload->col[i][j].c2_c1);
-			DPU_REG_WRITE(hw, base + GAMUT_UPPER_COLOR_OFF,
-					payload->col[i][j].c0);
-		}
-	}
-
-	if ((*opcode & GAMUT_MAP_EN)) {
-		if (scale_off == GAMUT_SCALEA_OFFSET_OFF)
-			scale_tbl_len = GAMUT_3D_SCALE_OFF_SZ;
-		else
-			scale_tbl_len = GAMUT_3D_SCALEB_OFF_SZ;
-		for (i = 0; i < GAMUT_3D_SCALE_OFF_TBL_NUM; i++) {
-			scale_tbl_off = base + scale_off +
-					i * scale_tbl_len * sizeof(u32);
-			scale_data = &payload->scale_off[i][0];
-			for (j = 0; j < scale_tbl_len; j++)
-				DPU_REG_WRITE(hw,
-					scale_tbl_off + (j * sizeof(u32)),
-					scale_data[j]);
-		}
-	}
-	DPU_REG_WRITE(hw, base, *opcode);
-	return 0;
-}
-
-void dpu_setup_dspp_3d_gamutv4(struct dpu_hw_dspp *ctx, void *cfg)
-{
-	struct drm_msm_3d_gamut *payload;
-	struct dpu_hw_cp_cfg *hw_cfg = cfg;
-	u32 op_mode;
-
-	if (!ctx || !cfg) {
-		DRM_ERROR("invalid param ctx %pK cfg %pK\n", ctx, cfg);
-		return;
-	}
-
-	op_mode = DPU_REG_READ(&ctx->hw, ctx->cap->sblk->gamut.base);
-	if (!hw_cfg->payload) {
-		DRM_DEBUG_DRIVER("disable gamut feature\n");
-		DPU_REG_WRITE(&ctx->hw, ctx->cap->sblk->gamut.base, 0);
-		return;
-	}
-
-	payload = hw_cfg->payload;
-	dpu_write_3d_gamut(&ctx->hw, payload, ctx->cap->sblk->gamut.base,
-		&op_mode);
-
-}
-
-void dpu_setup_dspp_igcv3(struct dpu_hw_dspp *ctx, void *cfg)
-{
-	struct drm_msm_igc_lut *lut_cfg;
-	struct dpu_hw_cp_cfg *hw_cfg = cfg;
-	int i = 0, j = 0;
-	u32 *addr = NULL;
-	u32 offset = 0;
-
-	if (!ctx || !cfg) {
-		DRM_ERROR("invalid param ctx %pK cfg %pK\n", ctx, cfg);
-		return;
-	}
-
-	if (!hw_cfg->payload) {
-		DRM_DEBUG_DRIVER("disable igc feature\n");
-		DPU_REG_WRITE(&ctx->hw, IGC_OPMODE_OFF, 0);
-		return;
-	}
-
-	if (hw_cfg->len != sizeof(struct drm_msm_igc_lut)) {
-		DRM_ERROR("invalid size of payload len %d exp %zd\n",
-				hw_cfg->len, sizeof(struct drm_msm_igc_lut));
-		return;
-	}
-
-	lut_cfg = hw_cfg->payload;
-
-	for (i = 0; i < IGC_TBL_NUM; i++) {
-		addr = lut_cfg->c0 + (i * ARRAY_SIZE(lut_cfg->c0));
-		offset = IGC_C0_OFF + (i * sizeof(u32));
-
-		for (j = 0; j < IGC_TBL_LEN; j++) {
-			addr[j] &= IGC_DATA_MASK;
-			addr[j] |= IGC_DSPP_SEL_MASK(ctx->idx - 1);
-			if (j == 0)
-				addr[j] |= IGC_INDEX_UPDATE;
-			/* IGC lut registers are part of DSPP Top HW block */
-			DPU_REG_WRITE(&ctx->hw_top, offset, addr[j]);
-		}
-	}
-
-	if (lut_cfg->flags & IGC_DITHER_ENABLE) {
-		DPU_REG_WRITE(&ctx->hw, IGC_DITHER_OFF,
-			lut_cfg->strength & IGC_DITHER_DATA_MASK);
-	}
-
-	DPU_REG_WRITE(&ctx->hw, IGC_OPMODE_OFF, IGC_EN);
-}
-
-void dpu_setup_dspp_pccv4(struct dpu_hw_dspp *ctx, void *cfg)
-{
-	struct dpu_hw_cp_cfg *hw_cfg = cfg;
-	struct drm_msm_pcc *pcc_cfg;
-	struct drm_msm_pcc_coeff *coeffs = NULL;
-	int i = 0;
-	u32 base = 0;
-
-	if (!ctx || !cfg) {
-		DRM_ERROR("invalid param ctx %pK cfg %pK\n", ctx, cfg);
-		return;
-	}
-
-	if (!hw_cfg->payload) {
-		DRM_DEBUG_DRIVER("disable pcc feature\n");
-		DPU_REG_WRITE(&ctx->hw, ctx->cap->sblk->pcc.base, 0);
-		return;
-	}
-
-	if (hw_cfg->len != sizeof(struct drm_msm_pcc)) {
-		DRM_ERROR("invalid size of payload len %d exp %zd\n",
-				hw_cfg->len, sizeof(struct drm_msm_pcc));
-		return;
-	}
-
-	pcc_cfg = hw_cfg->payload;
-
-	for (i = 0; i < PCC_NUM_PLANES; i++) {
-		base = ctx->cap->sblk->pcc.base + (i * sizeof(u32));
-		switch (i) {
-		case 0:
-			coeffs = &pcc_cfg->r;
-			DPU_REG_WRITE(&ctx->hw,
-				base + PCC_RR_OFF, pcc_cfg->r_rr);
-			DPU_REG_WRITE(&ctx->hw,
-				base + PCC_GG_OFF, pcc_cfg->r_gg);
-			DPU_REG_WRITE(&ctx->hw,
-				base + PCC_BB_OFF, pcc_cfg->r_bb);
-			break;
-		case 1:
-			coeffs = &pcc_cfg->g;
-			DPU_REG_WRITE(&ctx->hw,
-				base + PCC_RR_OFF, pcc_cfg->g_rr);
-			DPU_REG_WRITE(&ctx->hw,
-				base + PCC_GG_OFF, pcc_cfg->g_gg);
-			DPU_REG_WRITE(&ctx->hw,
-				base + PCC_BB_OFF, pcc_cfg->g_bb);
-			break;
-		case 2:
-			coeffs = &pcc_cfg->b;
-			DPU_REG_WRITE(&ctx->hw,
-				base + PCC_RR_OFF, pcc_cfg->b_rr);
-			DPU_REG_WRITE(&ctx->hw,
-				base + PCC_GG_OFF, pcc_cfg->b_gg);
-			DPU_REG_WRITE(&ctx->hw,
-				base + PCC_BB_OFF, pcc_cfg->b_bb);
-			break;
-		default:
-			DRM_ERROR("invalid pcc plane: %d\n", i);
-			return;
-		}
-
-		DPU_REG_WRITE(&ctx->hw, base + PCC_C_OFF, coeffs->c);
-		DPU_REG_WRITE(&ctx->hw, base + PCC_R_OFF, coeffs->r);
-		DPU_REG_WRITE(&ctx->hw, base + PCC_G_OFF, coeffs->g);
-		DPU_REG_WRITE(&ctx->hw, base + PCC_B_OFF, coeffs->b);
-		DPU_REG_WRITE(&ctx->hw, base + PCC_RG_OFF, coeffs->rg);
-		DPU_REG_WRITE(&ctx->hw, base + PCC_RB_OFF, coeffs->rb);
-		DPU_REG_WRITE(&ctx->hw, base + PCC_GB_OFF, coeffs->gb);
-		DPU_REG_WRITE(&ctx->hw, base + PCC_RGB_OFF, coeffs->rgb);
-	}
-
-	DPU_REG_WRITE(&ctx->hw, ctx->cap->sblk->pcc.base, PCC_EN);
-}
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_color_proc_v4.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_color_proc_v4.h
deleted file mode 100644
index c2f447fb..0000000
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_color_proc_v4.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/* Copyright (c) 2017-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.
- */
-#ifndef _DPU_HW_COLOR_PROC_V4_H_
-#define _DPU_HW_COLOR_PROC_V4_H_
-
-#include "dpu_hw_util.h"
-#include "dpu_hw_catalog.h"
-#include "dpu_hw_dspp.h"
-/**
- * dpu_setup_dspp_3d_gamutv4 - Function for 3d gamut v4 version feature
- *                             programming.
- * @ctx: dspp ctx pointer
- * @cfg: pointer to dpu_hw_cp_cfg
- */
-void dpu_setup_dspp_3d_gamutv4(struct dpu_hw_dspp *ctx, void *cfg);
-/**
- * dpu_setup_dspp_igcv3 - Function for igc v3 version feature
- *                             programming.
- * @ctx: dspp ctx pointer
- * @cfg: pointer to dpu_hw_cp_cfg
- */
-void dpu_setup_dspp_igcv3(struct dpu_hw_dspp *ctx, void *cfg);
-/**
- * dpu_setup_dspp_pccv4 - Function for pcc v4 version feature
- *                             programming.
- * @ctx: dspp ctx pointer
- * @cfg: pointer to dpu_hw_cp_cfg
- */
-void dpu_setup_dspp_pccv4(struct dpu_hw_dspp *ctx, void *cfg);
-
-#endif /* _DPU_HW_COLOR_PROC_V4_H_ */
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_color_processing.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_color_processing.h
deleted file mode 100644
index e1bdffd..0000000
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_color_processing.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/* Copyright (c) 2016-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.
- */
-
-#ifndef _DPU_HW_COLOR_PROCESSING_H
-#define _DPU_HW_COLOR_PROCESSING_H
-
-#include "dpu_hw_color_processing_v1_7.h"
-#include "dpu_hw_reg_dma_v1_color_proc.h"
-#include "dpu_hw_color_proc_v4.h"
-
-#endif
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_color_processing_v1_7.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_color_processing_v1_7.c
deleted file mode 100644
index 6c67602..0000000
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_color_processing_v1_7.c
+++ /dev/null
@@ -1,565 +0,0 @@
-/* Copyright (c) 2016-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 <drm/msm_drm_pp.h>
-#include "dpu_hw_color_processing_v1_7.h"
-#include "dpu_hw_ctl.h"
-
-#define PA_HUE_VIG_OFF		0x110
-#define PA_SAT_VIG_OFF		0x114
-#define PA_VAL_VIG_OFF		0x118
-#define PA_CONT_VIG_OFF		0x11C
-
-#define PA_HUE_DSPP_OFF		0x238
-#define PA_SAT_DSPP_OFF		0x23C
-#define PA_VAL_DSPP_OFF		0x240
-#define PA_CONT_DSPP_OFF	0x244
-
-#define PA_LUTV_DSPP_OFF	0x1400
-#define PA_LUT_SWAP_OFF		0x234
-
-#define PA_LUTV_DSPP_CTRL_OFF	0x4c
-#define PA_LUTV_DSPP_SWAP_OFF	0x18
-
-#define PA_HUE_MASK		0xFFF
-#define PA_SAT_MASK		0xFFFF
-#define PA_VAL_MASK		0xFF
-#define PA_CONT_MASK		0xFF
-
-#define MEMCOL_PWL0_OFF		0x88
-#define MEMCOL_PWL0_MASK	0xFFFF07FF
-#define MEMCOL_PWL1_OFF		0x8C
-#define MEMCOL_PWL1_MASK	0xFFFFFFFF
-#define MEMCOL_HUE_REGION_OFF	0x90
-#define MEMCOL_HUE_REGION_MASK	0x7FF07FF
-#define MEMCOL_SAT_REGION_OFF	0x94
-#define MEMCOL_SAT_REGION_MASK	0xFFFFFF
-#define MEMCOL_VAL_REGION_OFF	0x98
-#define MEMCOL_VAL_REGION_MASK	0xFFFFFF
-#define MEMCOL_P0_LEN		0x14
-#define MEMCOL_P1_LEN		0x8
-#define MEMCOL_PWL2_OFF		0x218
-#define MEMCOL_PWL2_MASK	0xFFFFFFFF
-#define MEMCOL_BLEND_GAIN_OFF	0x21C
-#define MEMCOL_PWL_HOLD_OFF	0x214
-
-#define VIG_OP_PA_EN		BIT(4)
-#define VIG_OP_PA_SKIN_EN	BIT(5)
-#define VIG_OP_PA_FOL_EN	BIT(6)
-#define VIG_OP_PA_SKY_EN	BIT(7)
-#define VIG_OP_PA_HUE_EN	BIT(25)
-#define VIG_OP_PA_SAT_EN	BIT(26)
-#define VIG_OP_PA_VAL_EN	BIT(27)
-#define VIG_OP_PA_CONT_EN	BIT(28)
-
-#define DSPP_OP_SZ_VAL_EN	BIT(31)
-#define DSPP_OP_SZ_SAT_EN	BIT(30)
-#define DSPP_OP_SZ_HUE_EN	BIT(29)
-#define DSPP_OP_PA_HUE_EN	BIT(25)
-#define DSPP_OP_PA_SAT_EN	BIT(26)
-#define DSPP_OP_PA_VAL_EN	BIT(27)
-#define DSPP_OP_PA_CONT_EN	BIT(28)
-#define DSPP_OP_PA_EN		BIT(20)
-#define DSPP_OP_PA_LUTV_EN	BIT(19)
-#define DSPP_OP_PA_SKIN_EN	BIT(5)
-#define DSPP_OP_PA_FOL_EN	BIT(6)
-#define DSPP_OP_PA_SKY_EN	BIT(7)
-
-#define PA_VIG_DISABLE_REQUIRED(x) \
-			!((x) & (VIG_OP_PA_SKIN_EN | VIG_OP_PA_SKY_EN | \
-			VIG_OP_PA_FOL_EN | VIG_OP_PA_HUE_EN | \
-			VIG_OP_PA_SAT_EN | VIG_OP_PA_VAL_EN | \
-			VIG_OP_PA_CONT_EN))
-
-
-#define PA_DSPP_DISABLE_REQUIRED(x) \
-			!((x) & (DSPP_OP_PA_SKIN_EN | DSPP_OP_PA_SKY_EN | \
-			DSPP_OP_PA_FOL_EN | DSPP_OP_PA_HUE_EN | \
-			DSPP_OP_PA_SAT_EN | DSPP_OP_PA_VAL_EN | \
-			DSPP_OP_PA_CONT_EN | DSPP_OP_PA_LUTV_EN))
-
-#define DSPP_OP_PCC_ENABLE	BIT(0)
-#define PCC_OP_MODE_OFF		0
-#define PCC_CONST_COEFF_OFF	4
-#define PCC_R_COEFF_OFF		0x10
-#define PCC_G_COEFF_OFF		0x1C
-#define PCC_B_COEFF_OFF		0x28
-#define PCC_RG_COEFF_OFF	0x34
-#define PCC_RB_COEFF_OFF	0x40
-#define PCC_GB_COEFF_OFF	0x4C
-#define PCC_RGB_COEFF_OFF	0x58
-#define PCC_CONST_COEFF_MASK	0xFFFF
-#define PCC_COEFF_MASK		0x3FFFF
-
-#define SSPP	0
-#define DSPP	1
-
-#define PGC_C0_OFF 0x4
-#define PGC_C0_INDEX_OFF 0x8
-#define PGC_8B_ROUND_EN BIT(1)
-#define PGC_EN BIT(0)
-#define PGC_TBL_NUM 3
-#define PGC_LUT_SWAP_OFF 0x1c
-
-
-static void __setup_pa_hue(struct dpu_hw_blk_reg_map *hw,
-			const struct dpu_pp_blk *blk, uint32_t hue,
-			int location)
-{
-	u32 base = blk->base;
-	u32 offset = (location == DSPP) ? PA_HUE_DSPP_OFF : PA_HUE_VIG_OFF;
-	u32 op_hue_en = (location == DSPP) ? DSPP_OP_PA_HUE_EN :
-					VIG_OP_PA_HUE_EN;
-	u32 op_pa_en = (location == DSPP) ? DSPP_OP_PA_EN : VIG_OP_PA_EN;
-	u32 disable_req;
-	u32 opmode;
-
-	DPU_REG_WRITE(hw, base + offset, hue & PA_HUE_MASK);
-
-	opmode = DPU_REG_READ(hw, base);
-
-	if (!hue) {
-		opmode &= ~op_hue_en;
-		disable_req = (location == DSPP) ?
-			PA_DSPP_DISABLE_REQUIRED(opmode) :
-			PA_VIG_DISABLE_REQUIRED(opmode);
-		if (disable_req)
-			opmode &= ~op_pa_en;
-	} else {
-		opmode |= op_hue_en | op_pa_en;
-	}
-
-	DPU_REG_WRITE(hw, base, opmode);
-}
-
-void dpu_setup_pipe_pa_hue_v1_7(struct dpu_hw_pipe *ctx, void *cfg)
-{
-	uint32_t hue = *((uint32_t *)cfg);
-
-	__setup_pa_hue(&ctx->hw, &ctx->cap->sblk->hsic_blk, hue, SSPP);
-}
-
-void dpu_setup_dspp_pa_hue_v1_7(struct dpu_hw_dspp *ctx, void *cfg)
-{
-	uint32_t hue = *((uint32_t *)cfg);
-
-	__setup_pa_hue(&ctx->hw, &ctx->cap->sblk->hsic, hue, DSPP);
-}
-
-static void __setup_pa_sat(struct dpu_hw_blk_reg_map *hw,
-			const struct dpu_pp_blk *blk, uint32_t sat,
-			int location)
-{
-	u32 base = blk->base;
-	u32 offset = (location == DSPP) ? PA_SAT_DSPP_OFF : PA_SAT_VIG_OFF;
-	u32 op_sat_en = (location == DSPP) ?
-			DSPP_OP_PA_SAT_EN : VIG_OP_PA_SAT_EN;
-	u32 op_pa_en = (location == DSPP) ? DSPP_OP_PA_EN : VIG_OP_PA_EN;
-	u32 disable_req;
-	u32 opmode;
-
-	DPU_REG_WRITE(hw, base + offset, sat & PA_SAT_MASK);
-
-	opmode = DPU_REG_READ(hw, base);
-
-	if (!sat) {
-		opmode &= ~op_sat_en;
-		disable_req = (location == DSPP) ?
-			PA_DSPP_DISABLE_REQUIRED(opmode) :
-			PA_VIG_DISABLE_REQUIRED(opmode);
-		if (disable_req)
-			opmode &= ~op_pa_en;
-	} else {
-		opmode |= op_sat_en | op_pa_en;
-	}
-
-	DPU_REG_WRITE(hw, base, opmode);
-}
-
-void dpu_setup_pipe_pa_sat_v1_7(struct dpu_hw_pipe *ctx, void *cfg)
-{
-	uint32_t sat = *((uint32_t *)cfg);
-
-	__setup_pa_sat(&ctx->hw, &ctx->cap->sblk->hsic_blk, sat, SSPP);
-}
-
-static void __setup_pa_val(struct dpu_hw_blk_reg_map *hw,
-			const struct dpu_pp_blk *blk, uint32_t value,
-			int location)
-{
-	u32 base = blk->base;
-	u32 offset = (location == DSPP) ? PA_VAL_DSPP_OFF : PA_VAL_VIG_OFF;
-	u32 op_val_en = (location == DSPP) ?
-			DSPP_OP_PA_VAL_EN : VIG_OP_PA_VAL_EN;
-	u32 op_pa_en = (location == DSPP) ? DSPP_OP_PA_EN : VIG_OP_PA_EN;
-	u32 disable_req;
-	u32 opmode;
-
-	DPU_REG_WRITE(hw, base + offset, value & PA_VAL_MASK);
-
-	opmode = DPU_REG_READ(hw, base);
-
-	if (!value) {
-		opmode &= ~op_val_en;
-		disable_req = (location == DSPP) ?
-			PA_DSPP_DISABLE_REQUIRED(opmode) :
-			PA_VIG_DISABLE_REQUIRED(opmode);
-		if (disable_req)
-			opmode &= ~op_pa_en;
-	} else {
-		opmode |= op_val_en | op_pa_en;
-	}
-
-	DPU_REG_WRITE(hw, base, opmode);
-}
-
-void dpu_setup_pipe_pa_val_v1_7(struct dpu_hw_pipe *ctx, void *cfg)
-{
-	uint32_t value = *((uint32_t *)cfg);
-
-	__setup_pa_val(&ctx->hw, &ctx->cap->sblk->hsic_blk, value, SSPP);
-}
-
-static void __setup_pa_cont(struct dpu_hw_blk_reg_map *hw,
-			const struct dpu_pp_blk *blk, uint32_t contrast,
-			int location)
-{
-	u32 base = blk->base;
-	u32 offset = (location == DSPP) ? PA_CONT_DSPP_OFF : PA_CONT_VIG_OFF;
-	u32 op_cont_en = (location == DSPP) ? DSPP_OP_PA_CONT_EN :
-					VIG_OP_PA_CONT_EN;
-	u32 op_pa_en = (location == DSPP) ? DSPP_OP_PA_EN : VIG_OP_PA_EN;
-	u32 disable_req;
-	u32 opmode;
-
-	DPU_REG_WRITE(hw, base + offset, contrast & PA_CONT_MASK);
-
-	opmode = DPU_REG_READ(hw, base);
-
-	if (!contrast) {
-		opmode &= ~op_cont_en;
-		disable_req = (location == DSPP) ?
-			PA_DSPP_DISABLE_REQUIRED(opmode) :
-			PA_VIG_DISABLE_REQUIRED(opmode);
-		if (disable_req)
-			opmode &= ~op_pa_en;
-	} else {
-		opmode |= op_cont_en | op_pa_en;
-	}
-
-	DPU_REG_WRITE(hw, base, opmode);
-}
-
-void dpu_setup_pipe_pa_cont_v1_7(struct dpu_hw_pipe *ctx, void *cfg)
-{
-	uint32_t contrast = *((uint32_t *)cfg);
-
-	__setup_pa_cont(&ctx->hw, &ctx->cap->sblk->hsic_blk, contrast, SSPP);
-}
-
-void dpu_setup_pipe_pa_memcol_v1_7(struct dpu_hw_pipe *ctx,
-				   enum dpu_memcolor_type type,
-				   void *cfg)
-{
-	struct drm_msm_memcol *mc = cfg;
-	u32 base = ctx->cap->sblk->memcolor_blk.base;
-	u32 off, op, mc_en, hold = 0;
-	u32 mc_i = 0;
-
-	switch (type) {
-	case MEMCOLOR_SKIN:
-		mc_en = VIG_OP_PA_SKIN_EN;
-		mc_i = 0;
-		break;
-	case MEMCOLOR_SKY:
-		mc_en = VIG_OP_PA_SKY_EN;
-		mc_i = 1;
-		break;
-	case MEMCOLOR_FOLIAGE:
-		mc_en = VIG_OP_PA_FOL_EN;
-		mc_i = 2;
-		break;
-	default:
-		DRM_ERROR("Invalid memory color type %d\n", type);
-		return;
-	}
-
-	op = DPU_REG_READ(&ctx->hw, base);
-	if (!mc) {
-		op &= ~mc_en;
-		if (PA_VIG_DISABLE_REQUIRED(op))
-			op &= ~VIG_OP_PA_EN;
-		DPU_REG_WRITE(&ctx->hw, base, op);
-		return;
-	}
-
-	off = base + (mc_i * MEMCOL_P0_LEN);
-	DPU_REG_WRITE(&ctx->hw, (off + MEMCOL_PWL0_OFF),
-		      mc->color_adjust_p0 & MEMCOL_PWL0_MASK);
-	DPU_REG_WRITE(&ctx->hw, (off + MEMCOL_PWL1_OFF),
-		      mc->color_adjust_p1 & MEMCOL_PWL1_MASK);
-	DPU_REG_WRITE(&ctx->hw, (off + MEMCOL_HUE_REGION_OFF),
-		      mc->hue_region & MEMCOL_HUE_REGION_MASK);
-	DPU_REG_WRITE(&ctx->hw, (off + MEMCOL_SAT_REGION_OFF),
-		      mc->sat_region & MEMCOL_SAT_REGION_MASK);
-	DPU_REG_WRITE(&ctx->hw, (off + MEMCOL_VAL_REGION_OFF),
-		      mc->val_region & MEMCOL_VAL_REGION_MASK);
-
-	off = base + (mc_i * MEMCOL_P1_LEN);
-	DPU_REG_WRITE(&ctx->hw, (off + MEMCOL_PWL2_OFF),
-		      mc->color_adjust_p2 & MEMCOL_PWL2_MASK);
-	DPU_REG_WRITE(&ctx->hw, (off + MEMCOL_BLEND_GAIN_OFF), mc->blend_gain);
-
-	hold = DPU_REG_READ(&ctx->hw, off + MEMCOL_PWL_HOLD_OFF);
-	hold &= ~(0xF << (mc_i * 4));
-	hold |= ((mc->sat_hold & 0x3) << (mc_i * 4));
-	hold |= ((mc->val_hold & 0x3) << ((mc_i * 4) + 2));
-	DPU_REG_WRITE(&ctx->hw, (off + MEMCOL_PWL_HOLD_OFF), hold);
-
-	op |= VIG_OP_PA_EN | mc_en;
-	DPU_REG_WRITE(&ctx->hw, base, op);
-}
-
-void dpu_setup_dspp_pcc_v1_7(struct dpu_hw_dspp *ctx, void *cfg)
-{
-	struct dpu_hw_cp_cfg *hw_cfg = cfg;
-	struct drm_msm_pcc *pcc;
-	void  __iomem *base;
-
-	if (!hw_cfg  || (hw_cfg->len != sizeof(*pcc)  && hw_cfg->payload)) {
-		DRM_ERROR("invalid params hw %p payload %p payloadsize %d \"\
-			  exp size %zd\n",
-			   hw_cfg, ((hw_cfg) ? hw_cfg->payload : NULL),
-			   ((hw_cfg) ? hw_cfg->len : 0), sizeof(*pcc));
-		return;
-	}
-	base = ctx->hw.base_off + ctx->cap->base;
-
-	/* Turn off feature */
-	if (!hw_cfg->payload) {
-		DPU_REG_WRITE(&ctx->hw, ctx->cap->sblk->pcc.base,
-			      PCC_OP_MODE_OFF);
-		return;
-	}
-	DRM_DEBUG_DRIVER("Enable PCC feature\n");
-	pcc = hw_cfg->payload;
-
-	DPU_REG_WRITE(&ctx->hw, ctx->cap->sblk->pcc.base + PCC_CONST_COEFF_OFF,
-				  pcc->r.c & PCC_CONST_COEFF_MASK);
-	DPU_REG_WRITE(&ctx->hw,
-		      ctx->cap->sblk->pcc.base + PCC_CONST_COEFF_OFF + 4,
-		      pcc->g.c & PCC_CONST_COEFF_MASK);
-	DPU_REG_WRITE(&ctx->hw,
-		      ctx->cap->sblk->pcc.base + PCC_CONST_COEFF_OFF + 8,
-		      pcc->b.c & PCC_CONST_COEFF_MASK);
-
-	DPU_REG_WRITE(&ctx->hw, ctx->cap->sblk->pcc.base + PCC_R_COEFF_OFF,
-				  pcc->r.r & PCC_COEFF_MASK);
-	DPU_REG_WRITE(&ctx->hw, ctx->cap->sblk->pcc.base + PCC_R_COEFF_OFF + 4,
-				  pcc->g.r & PCC_COEFF_MASK);
-	DPU_REG_WRITE(&ctx->hw, ctx->cap->sblk->pcc.base + PCC_R_COEFF_OFF + 8,
-				  pcc->b.r & PCC_COEFF_MASK);
-
-	DPU_REG_WRITE(&ctx->hw, ctx->cap->sblk->pcc.base + PCC_G_COEFF_OFF,
-				  pcc->r.g & PCC_COEFF_MASK);
-	DPU_REG_WRITE(&ctx->hw, ctx->cap->sblk->pcc.base + PCC_G_COEFF_OFF + 4,
-				  pcc->g.g & PCC_COEFF_MASK);
-	DPU_REG_WRITE(&ctx->hw, ctx->cap->sblk->pcc.base + PCC_G_COEFF_OFF + 8,
-				  pcc->b.g & PCC_COEFF_MASK);
-
-	DPU_REG_WRITE(&ctx->hw, ctx->cap->sblk->pcc.base + PCC_B_COEFF_OFF,
-				  pcc->r.b & PCC_COEFF_MASK);
-	DPU_REG_WRITE(&ctx->hw, ctx->cap->sblk->pcc.base + PCC_B_COEFF_OFF + 4,
-				  pcc->g.b & PCC_COEFF_MASK);
-	DPU_REG_WRITE(&ctx->hw, ctx->cap->sblk->pcc.base + PCC_B_COEFF_OFF + 8,
-				  pcc->b.b & PCC_COEFF_MASK);
-
-
-	DPU_REG_WRITE(&ctx->hw, ctx->cap->sblk->pcc.base + PCC_RG_COEFF_OFF,
-				  pcc->r.rg & PCC_COEFF_MASK);
-	DPU_REG_WRITE(&ctx->hw, ctx->cap->sblk->pcc.base + PCC_RG_COEFF_OFF + 4,
-				  pcc->g.rg & PCC_COEFF_MASK);
-	DPU_REG_WRITE(&ctx->hw, ctx->cap->sblk->pcc.base + PCC_RG_COEFF_OFF + 8,
-				  pcc->b.rg & PCC_COEFF_MASK);
-
-	DPU_REG_WRITE(&ctx->hw, ctx->cap->sblk->pcc.base + PCC_RB_COEFF_OFF,
-				  pcc->r.rb & PCC_COEFF_MASK);
-	DPU_REG_WRITE(&ctx->hw, ctx->cap->sblk->pcc.base + PCC_RB_COEFF_OFF + 4,
-				  pcc->g.rb & PCC_COEFF_MASK);
-	DPU_REG_WRITE(&ctx->hw, ctx->cap->sblk->pcc.base + PCC_RB_COEFF_OFF + 8,
-				  pcc->b.rb & PCC_COEFF_MASK);
-
-
-	DPU_REG_WRITE(&ctx->hw, ctx->cap->sblk->pcc.base + PCC_GB_COEFF_OFF,
-				  pcc->r.gb & PCC_COEFF_MASK);
-	DPU_REG_WRITE(&ctx->hw, ctx->cap->sblk->pcc.base + PCC_GB_COEFF_OFF + 4,
-				  pcc->g.gb & PCC_COEFF_MASK);
-	DPU_REG_WRITE(&ctx->hw, ctx->cap->sblk->pcc.base + PCC_GB_COEFF_OFF + 8,
-				  pcc->b.gb & PCC_COEFF_MASK);
-
-	DPU_REG_WRITE(&ctx->hw, ctx->cap->sblk->pcc.base + PCC_RGB_COEFF_OFF,
-				  pcc->r.rgb & PCC_COEFF_MASK);
-	DPU_REG_WRITE(&ctx->hw,
-		      ctx->cap->sblk->pcc.base + PCC_RGB_COEFF_OFF + 4,
-		      pcc->g.rgb & PCC_COEFF_MASK);
-	DPU_REG_WRITE(&ctx->hw,
-		      ctx->cap->sblk->pcc.base + PCC_RGB_COEFF_OFF + 8,
-		      pcc->b.rgb & PCC_COEFF_MASK);
-	DPU_REG_WRITE(&ctx->hw, ctx->cap->sblk->pcc.base, DSPP_OP_PCC_ENABLE);
-}
-
-void dpu_setup_dspp_pa_vlut_v1_7(struct dpu_hw_dspp *ctx, void *cfg)
-{
-	struct drm_msm_pa_vlut *payload = NULL;
-	struct dpu_hw_cp_cfg *hw_cfg = cfg;
-	u32 base = ctx->cap->sblk->vlut.base;
-	u32 offset = base + PA_LUTV_DSPP_OFF;
-	u32 op_mode, tmp;
-	int i = 0, j = 0;
-
-	if (!hw_cfg || (hw_cfg->payload && hw_cfg->len !=
-			sizeof(struct drm_msm_pa_vlut))) {
-		DRM_ERROR("hw %pK payload %pK payloadsize %d exp size %zd\n",
-			  hw_cfg, ((hw_cfg) ? hw_cfg->payload : NULL),
-			  ((hw_cfg) ? hw_cfg->len : 0),
-			  sizeof(struct drm_msm_pa_vlut));
-		return;
-	}
-	op_mode = DPU_REG_READ(&ctx->hw, base);
-	if (!hw_cfg->payload) {
-		DRM_DEBUG_DRIVER("Disable vlut feature\n");
-		/**
-		 * In the PA_VLUT disable case, remove PA_VLUT enable bit(19)
-		 * first, then check whether any other PA sub-features are
-		 * enabled or not. If none of the sub-features are enabled,
-		 * remove the PA global enable bit(20).
-		 */
-		op_mode &= ~((u32)DSPP_OP_PA_LUTV_EN);
-		if (PA_DSPP_DISABLE_REQUIRED(op_mode))
-			op_mode &= ~((u32)DSPP_OP_PA_EN);
-		DPU_REG_WRITE(&ctx->hw, base, op_mode);
-		return;
-	}
-	payload = hw_cfg->payload;
-	DRM_DEBUG_DRIVER("Enable vlut feature flags %llx\n", payload->flags);
-	for (i = 0, j = 0; i < ARRAY_SIZE(payload->val); i += 2, j += 4) {
-		tmp = (payload->val[i] & REG_MASK(10)) |
-			((payload->val[i + 1] & REG_MASK(10)) << 16);
-		DPU_REG_WRITE(&ctx->hw, (offset + j),
-			     tmp);
-	}
-	DPU_REG_WRITE(&ctx->hw, (base + PA_LUT_SWAP_OFF), 1);
-	op_mode |= DSPP_OP_PA_EN | DSPP_OP_PA_LUTV_EN;
-	DPU_REG_WRITE(&ctx->hw, base, op_mode);
-}
-
-void dpu_setup_dspp_pa_vlut_v1_8(struct dpu_hw_dspp *ctx, void *cfg)
-{
-	struct drm_msm_pa_vlut *payload = NULL;
-	struct dpu_hw_cp_cfg *hw_cfg = cfg;
-	struct dpu_hw_ctl *ctl = NULL;
-	u32 vlut_base, pa_hist_base;
-	u32 ctrl_off, swap_off;
-	u32 tmp = 0;
-	int i = 0, j = 0;
-	u32 flush_mask = 0;
-
-	if (!ctx) {
-		DRM_ERROR("invalid input parameter NULL ctx\n");
-		return;
-	}
-
-	if (!hw_cfg || (hw_cfg->payload && hw_cfg->len !=
-			sizeof(struct drm_msm_pa_vlut))) {
-		DRM_ERROR("hw %pK payload %pK payloadsize %d exp size %zd\n",
-			  hw_cfg, ((hw_cfg) ? hw_cfg->payload : NULL),
-			  ((hw_cfg) ? hw_cfg->len : 0),
-			  sizeof(struct drm_msm_pa_vlut));
-		return;
-	}
-
-	ctl = hw_cfg->ctl;
-	vlut_base = ctx->cap->sblk->vlut.base;
-	pa_hist_base = ctx->cap->sblk->hist.base;
-	ctrl_off = pa_hist_base + PA_LUTV_DSPP_CTRL_OFF;
-	swap_off = pa_hist_base + PA_LUTV_DSPP_SWAP_OFF;
-
-	if (!hw_cfg->payload) {
-		DRM_DEBUG_DRIVER("Disable vlut feature\n");
-		DPU_REG_WRITE(&ctx->hw, ctrl_off, 0);
-		goto exit;
-	}
-
-	payload = hw_cfg->payload;
-	DRM_DEBUG_DRIVER("Enable vlut feature flags %llx\n", payload->flags);
-	for (i = 0, j = 0; i < ARRAY_SIZE(payload->val); i += 2, j += 4) {
-		tmp = (payload->val[i] & REG_MASK(10)) |
-			((payload->val[i + 1] & REG_MASK(10)) << 16);
-		DPU_REG_WRITE(&ctx->hw, (vlut_base + j), tmp);
-	}
-	DPU_REG_WRITE(&ctx->hw, ctrl_off, 1);
-	DPU_REG_WRITE(&ctx->hw, swap_off, 1);
-
-exit:
-	/* update flush bit */
-	if (ctl && ctl->ops.get_bitmask_dspp_pavlut) {
-		ctl->ops.get_bitmask_dspp_pavlut(ctl, &flush_mask, ctx->idx);
-		if (ctl->ops.update_pending_flush)
-			ctl->ops.update_pending_flush(ctl, flush_mask);
-	}
-}
-
-void dpu_setup_dspp_gc_v1_7(struct dpu_hw_dspp *ctx, void *cfg)
-{
-	struct drm_msm_pgc_lut *payload = NULL;
-	struct dpu_hw_cp_cfg *hw_cfg = cfg;
-	u32 c0_off, c1_off, c2_off, i;
-
-	if (!hw_cfg || (hw_cfg->payload && hw_cfg->len !=
-			sizeof(struct drm_msm_pgc_lut))) {
-		DRM_ERROR("hw %pK payload %pK payloadsize %d exp size %zd\n",
-			  hw_cfg, ((hw_cfg) ? hw_cfg->payload : NULL),
-			  ((hw_cfg) ? hw_cfg->len : 0),
-			  sizeof(struct drm_msm_pgc_lut));
-		return;
-	}
-
-	if (!hw_cfg->payload) {
-		DRM_DEBUG_DRIVER("Disable pgc feature\n");
-		DPU_REG_WRITE(&ctx->hw, ctx->cap->sblk->gc.base, 0);
-		return;
-	}
-	payload = hw_cfg->payload;
-
-	/* Initialize index offsets */
-	c0_off = ctx->cap->sblk->gc.base + PGC_C0_INDEX_OFF;
-	c1_off = c0_off + (sizeof(u32) * 2);
-	c2_off = c1_off + (sizeof(u32) * 2);
-	DPU_REG_WRITE(&ctx->hw, c0_off, 0);
-	DPU_REG_WRITE(&ctx->hw, c1_off, 0);
-	DPU_REG_WRITE(&ctx->hw, c2_off, 0);
-
-	/* Initialize table offsets */
-	c0_off = ctx->cap->sblk->gc.base + PGC_C0_OFF;
-	c1_off = c0_off + (sizeof(u32) * 2);
-	c2_off = c1_off + (sizeof(u32) * 2);
-
-	for (i = 0; i < PGC_TBL_LEN; i++) {
-		DPU_REG_WRITE(&ctx->hw, c0_off, payload->c0[i]);
-		DPU_REG_WRITE(&ctx->hw, c1_off, payload->c1[i]);
-		DPU_REG_WRITE(&ctx->hw, c2_off, payload->c2[i]);
-	}
-	DPU_REG_WRITE(&ctx->hw, ctx->cap->sblk->gc.base + PGC_LUT_SWAP_OFF,
-			BIT(0));
-	i = BIT(0) | ((payload->flags & PGC_8B_ROUND) ? BIT(1) : 0);
-	DPU_REG_WRITE(&ctx->hw, ctx->cap->sblk->gc.base, i);
-}
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_color_processing_v1_7.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_color_processing_v1_7.h
deleted file mode 100644
index 76807ae..0000000
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_color_processing_v1_7.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/* Copyright (c) 2016-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.
- */
-
-#ifndef _DPU_HW_COLOR_PROCESSING_V1_7_H
-#define _DPU_HW_COLOR_PROCESSING_V1_7_H
-
-#include "dpu_hw_sspp.h"
-#include "dpu_hw_dspp.h"
-
-/**
- * dpu_setup_pipe_pa_hue_v1_7 - setup SSPP hue feature in v1.7 hardware
- * @ctx: Pointer to pipe context
- * @cfg: Pointer to hue data
- */
-void dpu_setup_pipe_pa_hue_v1_7(struct dpu_hw_pipe *ctx, void *cfg);
-
-/**
- * dpu_setup_pipe_pa_sat_v1_7 - setup SSPP saturation feature in v1.7 hardware
- * @ctx: Pointer to pipe context
- * @cfg: Pointer to saturation data
- */
-void dpu_setup_pipe_pa_sat_v1_7(struct dpu_hw_pipe *ctx, void *cfg);
-
-/**
- * dpu_setup_pipe_pa_val_v1_7 - setup SSPP value feature in v1.7 hardware
- * @ctx: Pointer to pipe context
- * @cfg: Pointer to value data
- */
-void dpu_setup_pipe_pa_val_v1_7(struct dpu_hw_pipe *ctx, void *cfg);
-
-/**
- * dpu_setup_pipe_pa_cont_v1_7 - setup SSPP contrast feature in v1.7 hardware
- * @ctx: Pointer to pipe context
- * @cfg: Pointer to contrast data
- */
-void dpu_setup_pipe_pa_cont_v1_7(struct dpu_hw_pipe *ctx, void *cfg);
-
-/**
- * dpu_setup_pipe_pa_memcol_v1_7 - setup SSPP memory color in v1.7 hardware
- * @ctx: Pointer to pipe context
- * @type: Memory color type (Skin, sky, or foliage)
- * @cfg: Pointer to memory color config data
- */
-void dpu_setup_pipe_pa_memcol_v1_7(struct dpu_hw_pipe *ctx,
-				   enum dpu_memcolor_type type,
-				   void *cfg);
-
-/**
- * dpu_setup_dspp_pcc_v1_7 - setup DSPP PCC veature in v1.7 hardware
- * @ctx: Pointer to dspp context
- * @cfg: Pointer to PCC data
- */
-void dpu_setup_dspp_pcc_v1_7(struct dpu_hw_dspp *ctx, void *cfg);
-
-/**
- * dpu_setup_dspp_pa_hue_v1_7 - setup DSPP hue feature in v1.7 hardware
- * @ctx: Pointer to DSPP context
- * @cfg: Pointer to hue data
- */
-void dpu_setup_dspp_pa_hue_v1_7(struct dpu_hw_dspp *ctx, void *cfg);
-
-/**
- * dpu_setup_dspp_pa_vlut_v1_7 - setup DSPP PA vLUT feature in v1.7 hardware
- * @ctx: Pointer to DSPP context
- * @cfg: Pointer to vLUT data
- */
-void dpu_setup_dspp_pa_vlut_v1_7(struct dpu_hw_dspp *ctx, void *cfg);
-
-/**
- * dpu_setup_dspp_pa_vlut_v1_8 - setup DSPP PA vLUT feature in v1.8 hardware
- * @ctx: Pointer to DSPP context
- * @cfg: Pointer to vLUT data
- */
-void dpu_setup_dspp_pa_vlut_v1_8(struct dpu_hw_dspp *ctx, void *cfg);
-
-/**
- * dpu_setup_dspp_gc_v1_7 - setup DSPP gc feature in v1.7 hardware
- * @ctx: Pointer to DSPP context
- * @cfg: Pointer to gc data
- */
-void dpu_setup_dspp_gc_v1_7(struct dpu_hw_dspp *ctx, void *cfg);
-
-#endif
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c
index 6922d8a..4865427 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c
@@ -15,7 +15,6 @@
 #include "dpu_hw_ctl.h"
 #include "dpu_dbg.h"
 #include "dpu_kms.h"
-#include "dpu_reg_dma.h"
 
 #define   CTL_LAYER(lm)                 \
 	(((lm) == LM_5) ? (0x024) : (((lm) - LM_0) * 0x004))
@@ -203,38 +202,6 @@ static inline uint32_t dpu_hw_ctl_get_bitmask_mixer(struct dpu_hw_ctl *ctx,
 	return flushbits;
 }
 
-static inline int dpu_hw_ctl_get_bitmask_dspp(struct dpu_hw_ctl *ctx,
-		u32 *flushbits, enum dpu_dspp dspp)
-{
-	switch (dspp) {
-	case DSPP_0:
-		*flushbits |= BIT(13);
-		break;
-	case DSPP_1:
-		*flushbits |= BIT(14);
-		break;
-	default:
-		return -EINVAL;
-	}
-	return 0;
-}
-
-static inline int dpu_hw_ctl_get_bitmask_dspp_pavlut(struct dpu_hw_ctl *ctx,
-		u32 *flushbits, enum dpu_dspp dspp)
-{
-	switch (dspp) {
-	case DSPP_0:
-		*flushbits |= BIT(3);
-		break;
-	case DSPP_1:
-		*flushbits |= BIT(4);
-		break;
-	default:
-		return -EINVAL;
-	}
-	return 0;
-}
-
 static inline int dpu_hw_ctl_get_bitmask_intf(struct dpu_hw_ctl *ctx,
 		u32 *flushbits, enum dpu_intf intf)
 {
@@ -518,14 +485,6 @@ static void dpu_hw_ctl_intf_cfg(struct dpu_hw_ctl *ctx,
 	DPU_REG_WRITE(c, CTL_TOP, intf_cfg);
 }
 
-static void dpu_hw_reg_dma_flush(struct dpu_hw_ctl *ctx)
-{
-	struct dpu_hw_reg_dma_ops *ops = dpu_reg_dma_get_ops();
-
-	if (ops && ops->last_command)
-		ops->last_command(ctx, DMA_CTL_QUEUE0);
-}
-
 static void _setup_ctl_ops(struct dpu_hw_ctl_ops *ops,
 		unsigned long cap)
 {
@@ -543,12 +502,9 @@ static void _setup_ctl_ops(struct dpu_hw_ctl_ops *ops,
 	ops->setup_blendstage = dpu_hw_ctl_setup_blendstage;
 	ops->get_bitmask_sspp = dpu_hw_ctl_get_bitmask_sspp;
 	ops->get_bitmask_mixer = dpu_hw_ctl_get_bitmask_mixer;
-	ops->get_bitmask_dspp = dpu_hw_ctl_get_bitmask_dspp;
-	ops->get_bitmask_dspp_pavlut = dpu_hw_ctl_get_bitmask_dspp_pavlut;
 	ops->get_bitmask_intf = dpu_hw_ctl_get_bitmask_intf;
 	ops->get_bitmask_cdm = dpu_hw_ctl_get_bitmask_cdm;
 	ops->get_bitmask_wb = dpu_hw_ctl_get_bitmask_wb;
-	ops->reg_dma_flush = dpu_hw_reg_dma_flush;
 };
 
 static struct dpu_hw_blk_ops dpu_hw_ops = {
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.h
index d3435be..b773a5a 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.h
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.h
@@ -140,14 +140,6 @@ struct dpu_hw_ctl_ops {
 	uint32_t (*get_bitmask_mixer)(struct dpu_hw_ctl *ctx,
 		enum dpu_lm blk);
 
-	int (*get_bitmask_dspp)(struct dpu_hw_ctl *ctx,
-		u32 *flushbits,
-		enum dpu_dspp blk);
-
-	int (*get_bitmask_dspp_pavlut)(struct dpu_hw_ctl *ctx,
-		u32 *flushbits,
-		enum dpu_dspp blk);
-
 	int (*get_bitmask_intf)(struct dpu_hw_ctl *ctx,
 		u32 *flushbits,
 		enum dpu_intf blk);
@@ -174,13 +166,6 @@ struct dpu_hw_ctl_ops {
 	 */
 	void (*setup_blendstage)(struct dpu_hw_ctl *ctx,
 		enum dpu_lm lm, struct dpu_hw_stage_cfg *cfg);
-
-	/**
-	 * Flush the reg dma by sending last command.
-	 * @ctx       : ctl path ctx pointer
-	 */
-	void (*reg_dma_flush)(struct dpu_hw_ctl *ctx);
-
 };
 
 /**
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dspp.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dspp.c
deleted file mode 100644
index a042cab..0000000
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dspp.c
+++ /dev/null
@@ -1,209 +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 <drm/msm_drm_pp.h>
-#include "dpu_hw_mdss.h"
-#include "dpu_hwio.h"
-#include "dpu_hw_catalog.h"
-#include "dpu_hw_dspp.h"
-#include "dpu_hw_color_processing.h"
-#include "dpu_dbg.h"
-#include "dpu_ad4.h"
-#include "dpu_kms.h"
-
-static struct dpu_dspp_cfg *_dspp_offset(enum dpu_dspp dspp,
-		struct dpu_mdss_cfg *m,
-		void __iomem *addr,
-		struct dpu_hw_blk_reg_map *b)
-{
-	int i;
-
-	if (!m || !addr || !b)
-		return ERR_PTR(-EINVAL);
-
-	for (i = 0; i < m->dspp_count; i++) {
-		if (dspp == m->dspp[i].id) {
-			b->base_off = addr;
-			b->blk_off = m->dspp[i].base;
-			b->length = m->dspp[i].len;
-			b->hwversion = m->hwversion;
-			b->log_mask = DPU_DBG_MASK_DSPP;
-			return &m->dspp[i];
-		}
-	}
-
-	return ERR_PTR(-EINVAL);
-}
-
-static void _setup_dspp_ops(struct dpu_hw_dspp *c, unsigned long features)
-{
-	int i = 0, ret;
-
-	if (!c || !c->cap || !c->cap->sblk)
-		return;
-
-	for (i = 0; i < DPU_DSPP_MAX; i++) {
-		if (!test_bit(i, &features))
-			continue;
-		switch (i) {
-		case DPU_DSPP_PCC:
-			if (c->cap->sblk->pcc.version ==
-				(DPU_COLOR_PROCESS_VER(0x1, 0x7)))
-				c->ops.setup_pcc = dpu_setup_dspp_pcc_v1_7;
-			else if (c->cap->sblk->pcc.version ==
-					(DPU_COLOR_PROCESS_VER(0x4, 0x0))) {
-				ret = reg_dmav1_init_dspp_op_v4(i, c->idx);
-				if (!ret)
-					c->ops.setup_pcc =
-						reg_dmav1_setup_dspp_pccv4;
-				else
-					c->ops.setup_pcc =
-						dpu_setup_dspp_pccv4;
-			}
-			break;
-		case DPU_DSPP_HSIC:
-			if (c->cap->sblk->hsic.version ==
-				(DPU_COLOR_PROCESS_VER(0x1, 0x7)))
-				c->ops.setup_hue = dpu_setup_dspp_pa_hue_v1_7;
-			break;
-		case DPU_DSPP_VLUT:
-			if (c->cap->sblk->vlut.version ==
-				(DPU_COLOR_PROCESS_VER(0x1, 0x7))) {
-				c->ops.setup_vlut =
-				    dpu_setup_dspp_pa_vlut_v1_7;
-			} else if (c->cap->sblk->vlut.version ==
-					(DPU_COLOR_PROCESS_VER(0x1, 0x8))) {
-				ret = reg_dmav1_init_dspp_op_v4(i, c->idx);
-				if (!ret)
-					c->ops.setup_vlut =
-					reg_dmav1_setup_dspp_vlutv18;
-				else
-					c->ops.setup_vlut =
-					dpu_setup_dspp_pa_vlut_v1_8;
-			}
-			break;
-		case DPU_DSPP_GAMUT:
-			if (c->cap->sblk->gamut.version ==
-					DPU_COLOR_PROCESS_VER(0x4, 0)) {
-				ret = reg_dmav1_init_dspp_op_v4(i, c->idx);
-				if (!ret)
-					c->ops.setup_gamut =
-						reg_dmav1_setup_dspp_3d_gamutv4;
-				else
-					c->ops.setup_gamut =
-						dpu_setup_dspp_3d_gamutv4;
-			}
-			break;
-		case DPU_DSPP_GC:
-			if (c->cap->sblk->gc.version ==
-					DPU_COLOR_PROCESS_VER(0x1, 8)) {
-				ret = reg_dmav1_init_dspp_op_v4(i, c->idx);
-				if (!ret)
-					c->ops.setup_gc =
-						reg_dmav1_setup_dspp_gcv18;
-				/** programming for v18 through ahb is same
-				 * as v17 hence assign v17 function
-				 */
-				else
-					c->ops.setup_gc =
-						dpu_setup_dspp_gc_v1_7;
-			}
-			break;
-		case DPU_DSPP_IGC:
-			if (c->cap->sblk->igc.version ==
-					DPU_COLOR_PROCESS_VER(0x3, 0x1)) {
-				ret = reg_dmav1_init_dspp_op_v4(i, c->idx);
-				if (!ret)
-					c->ops.setup_igc =
-						reg_dmav1_setup_dspp_igcv31;
-				else
-					c->ops.setup_igc =
-						dpu_setup_dspp_igcv3;
-			}
-			break;
-		case DPU_DSPP_AD:
-			if (c->cap->sblk->ad.version ==
-			    DPU_COLOR_PROCESS_VER(4, 0)) {
-				c->ops.setup_ad = dpu_setup_dspp_ad4;
-				c->ops.ad_read_intr_resp =
-					dpu_read_intr_resp_ad4;
-				c->ops.validate_ad = dpu_validate_dspp_ad4;
-			}
-			break;
-		default:
-			break;
-		}
-	}
-}
-
-static struct dpu_hw_blk_ops dpu_hw_ops = {
-	.start = NULL,
-	.stop = NULL,
-};
-
-struct dpu_hw_dspp *dpu_hw_dspp_init(enum dpu_dspp idx,
-			void __iomem *addr,
-			struct dpu_mdss_cfg *m)
-{
-	struct dpu_hw_dspp *c;
-	struct dpu_dspp_cfg *cfg;
-	int rc;
-
-	if (!addr || !m)
-		return ERR_PTR(-EINVAL);
-
-	c = kzalloc(sizeof(*c), GFP_KERNEL);
-	if (!c)
-		return ERR_PTR(-ENOMEM);
-
-	cfg = _dspp_offset(idx, m, addr, &c->hw);
-	if (IS_ERR_OR_NULL(cfg)) {
-		kfree(c);
-		return ERR_PTR(-EINVAL);
-	}
-
-	/* Populate DSPP Top HW block */
-	c->hw_top.base_off = addr;
-	c->hw_top.blk_off = m->dspp_top.base;
-	c->hw_top.length = m->dspp_top.len;
-	c->hw_top.hwversion = m->hwversion;
-	c->hw_top.log_mask = DPU_DBG_MASK_DSPP;
-
-	/* Assign ops */
-	c->idx = idx;
-	c->cap = cfg;
-	_setup_dspp_ops(c, c->cap->features);
-
-	rc = dpu_hw_blk_init(&c->base, DPU_HW_BLK_DSPP, idx, &dpu_hw_ops);
-	if (rc) {
-		DPU_ERROR("failed to init hw blk %d\n", rc);
-		goto blk_init_error;
-	}
-
-	dpu_dbg_reg_register_dump_range(DPU_DBG_NAME, cfg->name, c->hw.blk_off,
-			c->hw.blk_off + c->hw.length, c->hw.xin_id);
-
-	return c;
-
-blk_init_error:
-	kzfree(c);
-
-	return ERR_PTR(rc);
-}
-
-void dpu_hw_dspp_destroy(struct dpu_hw_dspp *dspp)
-{
-	if (dspp) {
-		reg_dmav1_deinit_dspp_ops(dspp->idx);
-		dpu_hw_blk_destroy(&dspp->base);
-	}
-	kfree(dspp);
-}
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dspp.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dspp.h
deleted file mode 100644
index cc72490..0000000
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dspp.h
+++ /dev/null
@@ -1,220 +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.
- */
-
-#ifndef _DPU_HW_DSPP_H
-#define _DPU_HW_DSPP_H
-
-#include "dpu_hw_blk.h"
-
-struct dpu_hw_dspp;
-
-/**
- * struct dpu_hw_dspp_ops - interface to the dspp hardware driver functions
- * Caller must call the init function to get the dspp context for each dspp
- * Assumption is these functions will be called after clocks are enabled
- */
-struct dpu_hw_dspp_ops {
-	/**
-	 * setup_histogram - setup dspp histogram
-	 * @ctx: Pointer to dspp context
-	 * @cfg: Pointer to configuration
-	 */
-	void (*setup_histogram)(struct dpu_hw_dspp *ctx, void *cfg);
-
-	/**
-	 * read_histogram - read dspp histogram
-	 * @ctx: Pointer to dspp context
-	 * @cfg: Pointer to configuration
-	 */
-	void (*read_histogram)(struct dpu_hw_dspp *ctx, void *cfg);
-
-	/**
-	 * setup_igc - update dspp igc
-	 * @ctx: Pointer to dspp context
-	 * @cfg: Pointer to configuration
-	 */
-	void (*setup_igc)(struct dpu_hw_dspp *ctx, void *cfg);
-
-	/**
-	 * setup_pa - setup dspp pa
-	 * @ctx: Pointer to dspp context
-	 * @cfg: Pointer to configuration
-	 */
-	void (*setup_pa)(struct dpu_hw_dspp *dspp, void *cfg);
-
-	/**
-	 * setup_pcc - setup dspp pcc
-	 * @ctx: Pointer to dspp context
-	 * @cfg: Pointer to configuration
-	 */
-	void (*setup_pcc)(struct dpu_hw_dspp *ctx, void *cfg);
-
-	/**
-	 * setup_sharpening - setup dspp sharpening
-	 * @ctx: Pointer to dspp context
-	 * @cfg: Pointer to configuration
-	 */
-	void (*setup_sharpening)(struct dpu_hw_dspp *ctx, void *cfg);
-
-	/**
-	 * setup_pa_memcolor - setup dspp memcolor
-	 * @ctx: Pointer to dspp context
-	 * @cfg: Pointer to configuration
-	 */
-	void (*setup_pa_memcolor)(struct dpu_hw_dspp *ctx, void *cfg);
-
-	/**
-	 * setup_sixzone - setup dspp six zone
-	 * @ctx: Pointer to dspp context
-	 * @cfg: Pointer to configuration
-	 */
-	void (*setup_sixzone)(struct dpu_hw_dspp *dspp, void *cfg);
-
-	/**
-	 * setup_danger_safe - setup danger safe LUTS
-	 * @ctx: Pointer to dspp context
-	 * @cfg: Pointer to configuration
-	 */
-	void (*setup_danger_safe)(struct dpu_hw_dspp *ctx, void *cfg);
-
-	/**
-	 * setup_dither - setup dspp dither
-	 * @ctx: Pointer to dspp context
-	 * @cfg: Pointer to configuration
-	 */
-	void (*setup_dither)(struct dpu_hw_dspp *ctx, void *cfg);
-
-	/**
-	 * setup_hue - setup dspp PA hue
-	 * @ctx: Pointer to dspp context
-	 * @cfg: Pointer to configuration
-	 */
-	void (*setup_hue)(struct dpu_hw_dspp *ctx, void *cfg);
-
-	/**
-	 * setup_sat - setup dspp PA saturation
-	 * @ctx: Pointer to dspp context
-	 * @cfg: Pointer to configuration
-	 */
-	void (*setup_sat)(struct dpu_hw_dspp *ctx, void *cfg);
-
-	/**
-	 * setup_val - setup dspp PA value
-	 * @ctx: Pointer to dspp context
-	 * @cfg: Pointer to configuration
-	 */
-	void (*setup_val)(struct dpu_hw_dspp *ctx, void *cfg);
-
-	/**
-	 * setup_cont - setup dspp PA contrast
-	 * @ctx: Pointer to dspp context
-	 * @cfg: Pointer to configuration
-	 */
-	void (*setup_cont)(struct dpu_hw_dspp *ctx, void *cfg);
-
-	/**
-	 * setup_vlut - setup dspp PA VLUT
-	 * @ctx: Pointer to dspp context
-	 * @cfg: Pointer to configuration
-	 */
-	void (*setup_vlut)(struct dpu_hw_dspp *ctx, void *cfg);
-
-	/**
-	 * setup_gc - update dspp gc
-	 * @ctx: Pointer to dspp context
-	 * @cfg: Pointer to configuration
-	 */
-	void (*setup_gc)(struct dpu_hw_dspp *ctx, void *cfg);
-
-	/**
-	 * setup_gamut - update dspp gamut
-	 * @ctx: Pointer to dspp context
-	 * @cfg: Pointer to configuration
-	 */
-	void (*setup_gamut)(struct dpu_hw_dspp *ctx, void *cfg);
-
-	/**
-	 * validate_ad - check if ad property can be set
-	 * @ctx: Pointer to dspp context
-	 * @prop: Pointer to ad property being validated
-	 */
-	int (*validate_ad)(struct dpu_hw_dspp *ctx, u32 *prop);
-
-	/**
-	 * setup_ad - update the ad property
-	 * @ctx: Pointer to dspp context
-	 * @cfg: Pointer to ad configuration
-	 */
-	void (*setup_ad)(struct dpu_hw_dspp *ctx, void *cfg);
-
-	/**
-	 * ad_read_intr_resp - function to get interrupt response for ad
-	 * @event: Event for which response needs to be read
-	 * @resp: Pointer to u32 where response value is dumped.
-	 */
-	void (*ad_read_intr_resp)(struct dpu_hw_dspp *ctx, u32 event,
-			u32 *resp);
-
-};
-
-/**
- * struct dpu_hw_dspp - dspp description
- * @base: Hardware block base structure
- * @hw: Block hardware details
- * @hw_top: Block hardware top details
- * @idx: DSPP index
- * @cap: Pointer to layer_cfg
- * @ops: Pointer to operations possible for this DSPP
- */
-struct dpu_hw_dspp {
-	struct dpu_hw_blk base;
-	struct dpu_hw_blk_reg_map hw;
-
-	/* dspp top */
-	struct dpu_hw_blk_reg_map hw_top;
-
-	/* dspp */
-	enum dpu_dspp idx;
-	const struct dpu_dspp_cfg *cap;
-
-	/* Ops */
-	struct dpu_hw_dspp_ops ops;
-};
-
-/**
- * dpu_hw_dspp - convert base object dpu_hw_base to container
- * @hw: Pointer to base hardware block
- * return: Pointer to hardware block container
- */
-static inline struct dpu_hw_dspp *to_dpu_hw_dspp(struct dpu_hw_blk *hw)
-{
-	return container_of(hw, struct dpu_hw_dspp, base);
-}
-
-/**
- * dpu_hw_dspp_init - initializes the dspp hw driver object.
- * should be called once before accessing every dspp.
- * @idx:  DSPP index for which driver object is required
- * @addr: Mapped register io address of MDP
- * @Return: pointer to structure or ERR_PTR
- */
-struct dpu_hw_dspp *dpu_hw_dspp_init(enum dpu_dspp idx,
-			void __iomem *addr,
-			struct dpu_mdss_cfg *m);
-
-/**
- * dpu_hw_dspp_destroy(): Destroys DSPP driver context
- * @dspp:   Pointer to DSPP driver context
- */
-void dpu_hw_dspp_destroy(struct dpu_hw_dspp *dspp);
-
-#endif /*_DPU_HW_DSPP_H */
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.c
index ad21867..75a30db 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.c
@@ -10,6 +10,7 @@
  * GNU General Public License for more details.
  */
 
+#include <uapi/drm/dpu_drm.h>
 #include "dpu_kms.h"
 #include "dpu_hw_catalog.h"
 #include "dpu_hwio.h"
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_mdss.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_mdss.h
index 70d57c9..fcd164f 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_mdss.h
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_mdss.h
@@ -99,7 +99,6 @@ enum dpu_hw_blk_type {
 	DPU_HW_BLK_TOP = 0,
 	DPU_HW_BLK_SSPP,
 	DPU_HW_BLK_LM,
-	DPU_HW_BLK_DSPP,
 	DPU_HW_BLK_DS,
 	DPU_HW_BLK_CTL,
 	DPU_HW_BLK_CDM,
@@ -461,39 +460,16 @@ struct dpu_mdss_color {
  */
 #define DPU_DBG_MASK_NONE     (1 << 0)
 #define DPU_DBG_MASK_CDM      (1 << 1)
-#define DPU_DBG_MASK_DSPP     (1 << 2)
-#define DPU_DBG_MASK_INTF     (1 << 3)
-#define DPU_DBG_MASK_LM       (1 << 4)
-#define DPU_DBG_MASK_CTL      (1 << 5)
-#define DPU_DBG_MASK_PINGPONG (1 << 6)
-#define DPU_DBG_MASK_SSPP     (1 << 7)
-#define DPU_DBG_MASK_WB       (1 << 8)
-#define DPU_DBG_MASK_TOP      (1 << 9)
-#define DPU_DBG_MASK_VBIF     (1 << 10)
-#define DPU_DBG_MASK_ROT      (1 << 11)
-#define DPU_DBG_MASK_DS       (1 << 12)
-
-/**
- * struct dpu_hw_cp_cfg: hardware dspp/lm feature payload.
- * @payload: Feature specific payload.
- * @len: Length of the payload.
- * @ctl: control pointer associated with dspp/lm.
- * @last_feature: last feature that will be set.
- * @num_of_mixers: number of layer mixers for the display.
- * @mixer_info: mixer info pointer associated with lm.
- * @displayv: height of the display.
- * @displayh: width of the display.
- */
-struct dpu_hw_cp_cfg {
-	void *payload;
-	u32 len;
-	void *ctl;
-	u32 last_feature;
-	u32 num_of_mixers;
-	void *mixer_info;
-	u32 displayv;
-	u32 displayh;
-};
+#define DPU_DBG_MASK_INTF     (1 << 2)
+#define DPU_DBG_MASK_LM       (1 << 3)
+#define DPU_DBG_MASK_CTL      (1 << 4)
+#define DPU_DBG_MASK_PINGPONG (1 << 5)
+#define DPU_DBG_MASK_SSPP     (1 << 6)
+#define DPU_DBG_MASK_WB       (1 << 7)
+#define DPU_DBG_MASK_TOP      (1 << 8)
+#define DPU_DBG_MASK_VBIF     (1 << 9)
+#define DPU_DBG_MASK_ROT      (1 << 10)
+#define DPU_DBG_MASK_DS       (1 << 11)
 
 /**
  * struct dpu_hw_dim_layer: dim layer configs
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.c
index 0bfb511..84d2176 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.c
@@ -36,11 +36,6 @@
 #define PP_FBC_BUDGET_CTL               0x038
 #define PP_FBC_LOSSY_MODE               0x03C
 
-#define DITHER_DEPTH_MAP_INDEX 9
-static u32 dither_depth_map[DITHER_DEPTH_MAP_INDEX] = {
-	0, 0, 0, 0, 0, 1, 2, 3, 3
-};
-
 static struct dpu_pingpong_cfg *_pingpong_offset(enum dpu_pingpong pp,
 		struct dpu_mdss_cfg *m,
 		void __iomem *addr,
@@ -109,57 +104,6 @@ static int dpu_hw_pp_poll_timeout_wr_ptr(struct dpu_hw_pingpong *pp,
 	return rc;
 }
 
-static int dpu_hw_pp_setup_dither_v1(struct dpu_hw_pingpong *pp,
-					void *cfg, size_t len)
-{
-	struct dpu_hw_blk_reg_map *c;
-	struct drm_msm_dither *dither = (struct drm_msm_dither *)cfg;
-	u32 base = 0, offset = 0, data = 0, i = 0;
-
-	if (!pp)
-		return -EINVAL;
-
-	c = &pp->hw;
-	base = pp->caps->sblk->dither.base;
-	if (!dither) {
-		/* dither property disable case */
-		DPU_REG_WRITE(c, base, 0);
-		return 0;
-	}
-
-	if (len != sizeof(struct drm_msm_dither)) {
-		DRM_ERROR("input len %zu, expected len %zu\n", len,
-			sizeof(struct drm_msm_dither));
-		return -EINVAL;
-	}
-
-	if (dither->c0_bitdepth >= DITHER_DEPTH_MAP_INDEX ||
-		dither->c1_bitdepth >= DITHER_DEPTH_MAP_INDEX ||
-		dither->c2_bitdepth >= DITHER_DEPTH_MAP_INDEX ||
-		dither->c3_bitdepth >= DITHER_DEPTH_MAP_INDEX)
-		return -EINVAL;
-
-	offset += 4;
-	data = dither_depth_map[dither->c0_bitdepth] & REG_MASK(2);
-	data |= (dither_depth_map[dither->c1_bitdepth] & REG_MASK(2)) << 2;
-	data |= (dither_depth_map[dither->c2_bitdepth] & REG_MASK(2)) << 4;
-	data |= (dither_depth_map[dither->c3_bitdepth] & REG_MASK(2)) << 6;
-	data |= (dither->temporal_en) ? (1 << 8) : 0;
-	DPU_REG_WRITE(c, base + offset, data);
-
-	for (i = 0; i < DITHER_MATRIX_SZ - 3; i += 4) {
-		offset += 4;
-		data = (dither->matrix[i] & REG_MASK(4)) |
-			((dither->matrix[i + 1] & REG_MASK(4)) << 4) |
-			((dither->matrix[i + 2] & REG_MASK(4)) << 8) |
-			((dither->matrix[i + 3] & REG_MASK(4)) << 12);
-		DPU_REG_WRITE(c, base + offset, data);
-	}
-	DPU_REG_WRITE(c, base, 1);
-
-	return 0;
-}
-
 static int dpu_hw_pp_enable_te(struct dpu_hw_pingpong *pp, bool enable)
 {
 	struct dpu_hw_blk_reg_map *c;
@@ -248,24 +192,12 @@ static u32 dpu_hw_pp_get_line_count(struct dpu_hw_pingpong *pp)
 static void _setup_pingpong_ops(struct dpu_hw_pingpong_ops *ops,
 	const struct dpu_pingpong_cfg *hw_cap)
 {
-	u32 version = 0;
-
 	ops->setup_tearcheck = dpu_hw_pp_setup_te_config;
 	ops->enable_tearcheck = dpu_hw_pp_enable_te;
 	ops->connect_external_te = dpu_hw_pp_connect_external_te;
 	ops->get_vsync_info = dpu_hw_pp_get_vsync_info;
 	ops->poll_timeout_wr_ptr = dpu_hw_pp_poll_timeout_wr_ptr;
 	ops->get_line_count = dpu_hw_pp_get_line_count;
-
-	version = DPU_COLOR_PROCESS_MAJOR(hw_cap->sblk->dither.version);
-	switch (version) {
-	case 1:
-		ops->setup_dither = dpu_hw_pp_setup_dither_v1;
-		break;
-	default:
-		ops->setup_dither = NULL;
-		break;
-	}
 };
 
 static struct dpu_hw_blk_ops dpu_hw_ops = {
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.h
index 7dbfcae..3caccd7 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.h
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.h
@@ -17,7 +17,6 @@
 #include "dpu_hw_mdss.h"
 #include "dpu_hw_util.h"
 #include "dpu_hw_blk.h"
-#include <uapi/drm/msm_drm_pp.h>
 
 struct dpu_hw_pingpong;
 
@@ -88,11 +87,6 @@ struct dpu_hw_pingpong_ops {
 	int (*poll_timeout_wr_ptr)(struct dpu_hw_pingpong *pp, u32 timeout_us);
 
 	/**
-	 * Program the dither hw block
-	 */
-	int (*setup_dither)(struct dpu_hw_pingpong *pp, void *cfg, size_t len);
-
-	/**
 	 * Obtain current vertical line counter
 	 */
 	u32 (*get_line_count)(struct dpu_hw_pingpong *pp);
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_reg_dma_v1.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_reg_dma_v1.c
deleted file mode 100644
index 7c2772f..0000000
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_reg_dma_v1.c
+++ /dev/null
@@ -1,757 +0,0 @@
-/* Copyright (c) 2017-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_hw_ctl.h"
-#include "dpu_hw_reg_dma_v1.h"
-#include "msm_drv.h"
-#include "msm_kms.h"
-#include "msm_mmu.h"
-
-#define GUARD_BYTES (BIT(8) - 1)
-#define ALIGNED_OFFSET (U32_MAX & ~(GUARD_BYTES))
-#define ADDR_ALIGN BIT(8)
-#define MAX_RELATIVE_OFF (BIT(20) - 1)
-
-#define DECODE_SEL_OP (BIT(HW_BLK_SELECT))
-#define REG_WRITE_OP ((BIT(REG_SINGLE_WRITE)) | (BIT(REG_BLK_WRITE_SINGLE)) | \
-	(BIT(REG_BLK_WRITE_INC)) | (BIT(REG_BLK_WRITE_MULTIPLE)))
-
-#define REG_DMA_OPS (DECODE_SEL_OP | REG_WRITE_OP)
-#define IS_OP_ALLOWED(op, buf_op) (BIT(op) & buf_op)
-
-#define REG_DMA_OP_MODE_OFF 0x4
-
-#define REG_DMA_CTL0_QUEUE_0_CMD0_OFF 0x14
-#define REG_DMA_CTL0_RESET_OFF 0xE4
-#define REG_DMA_CTL_TRIGGER_OFF 0xD4
-
-#define SET_UP_REG_DMA_REG(hw, reg_dma) \
-	do { \
-		(hw).base_off = (reg_dma)->addr; \
-		(hw).blk_off = (reg_dma)->caps->base; \
-		(hw).hwversion = (reg_dma)->caps->version; \
-} while (0)
-
-#define SIZE_DWORD(x) ((x) / (sizeof(u32)))
-#define NOT_WORD_ALIGNED(x) ((x) & 0x3)
-
-
-#define GRP_VIG_HW_BLK_SELECT (VIG0 | VIG1 | VIG2 | VIG3)
-#define GRP_DSPP_HW_BLK_SELECT (DSPP0 | DSPP1 | DSPP2 | DSPP3)
-#define BUFFER_SPACE_LEFT(cfg) ((cfg)->dma_buf->buffer_size - \
-			(cfg)->dma_buf->index)
-
-#define REG_DMA_DECODE_SEL 0x180AC060
-#define SINGLE_REG_WRITE_OPCODE (BIT(28))
-#define REL_ADDR_OPCODE (BIT(27))
-#define HW_INDEX_REG_WRITE_OPCODE (BIT(28) | BIT(29))
-#define AUTO_INC_REG_WRITE_OPCODE (BIT(30))
-#define BLK_REG_WRITE_OPCODE (BIT(30) | BIT(28))
-
-#define WRAP_MIN_SIZE 2
-#define WRAP_MAX_SIZE (BIT(4) - 1)
-#define MAX_DWORDS_SZ (BIT(14) - 1)
-#define REG_DMA_HEADERS_BUFFER_SZ (sizeof(u32) * 128)
-
-typedef int (*reg_dma_internal_ops) (struct dpu_reg_dma_setup_ops_cfg *cfg);
-
-static struct dpu_hw_reg_dma *reg_dma;
-static u32 ops_mem_size[REG_DMA_SETUP_OPS_MAX] = {
-	[REG_BLK_WRITE_SINGLE] = sizeof(u32) * 2,
-	[REG_BLK_WRITE_INC] = sizeof(u32) * 2,
-	[REG_BLK_WRITE_MULTIPLE] = sizeof(u32) * 2,
-	[HW_BLK_SELECT] = sizeof(u32) * 2,
-	[REG_SINGLE_WRITE] = sizeof(u32) * 2
-};
-
-static u32 queue_sel[DMA_CTL_QUEUE_MAX] = {
-	[DMA_CTL_QUEUE0] = BIT(0),
-	[DMA_CTL_QUEUE1] = BIT(4),
-};
-
-static u32 reg_dma_ctl_queue_off[CTL_MAX];
-static u32 dspp_read_sel[DSPP_HIST_MAX] = {
-	[DSPP0_HIST] = 0,
-	[DSPP1_HIST] = 1,
-	[DSPP2_HIST] = 2,
-	[DSPP3_HIST] = 3,
-};
-
-static u32 v1_supported[REG_DMA_FEATURES_MAX]  = {
-	[GAMUT] = GRP_VIG_HW_BLK_SELECT | GRP_DSPP_HW_BLK_SELECT,
-	[VLUT] = GRP_DSPP_HW_BLK_SELECT,
-	[GC] = GRP_DSPP_HW_BLK_SELECT,
-	[IGC] = DSPP_IGC | GRP_DSPP_HW_BLK_SELECT,
-	[PCC] = GRP_DSPP_HW_BLK_SELECT,
-};
-
-static int validate_dma_cfg(struct dpu_reg_dma_setup_ops_cfg *cfg);
-static int validate_write_decode_sel(struct dpu_reg_dma_setup_ops_cfg *cfg);
-static int validate_write_reg(struct dpu_reg_dma_setup_ops_cfg *cfg);
-static int validate_write_multi_lut_reg(struct dpu_reg_dma_setup_ops_cfg *cfg);
-static int validate_last_cmd(struct dpu_reg_dma_setup_ops_cfg *cfg);
-static int write_decode_sel(struct dpu_reg_dma_setup_ops_cfg *cfg);
-static int write_single_reg(struct dpu_reg_dma_setup_ops_cfg *cfg);
-static int write_multi_reg_index(struct dpu_reg_dma_setup_ops_cfg *cfg);
-static int write_multi_reg_inc(struct dpu_reg_dma_setup_ops_cfg *cfg);
-static int write_multi_lut_reg(struct dpu_reg_dma_setup_ops_cfg *cfg);
-static int write_last_cmd(struct dpu_reg_dma_setup_ops_cfg *cfg);
-static int reset_reg_dma_buffer_v1(struct dpu_reg_dma_buffer *lut_buf);
-static int check_support_v1(enum dpu_reg_dma_features feature,
-		enum dpu_reg_dma_blk blk, bool *is_supported);
-static int setup_payload_v1(struct dpu_reg_dma_setup_ops_cfg *cfg);
-static int kick_off_v1(struct dpu_reg_dma_kickoff_cfg *cfg);
-static int reset_v1(struct dpu_hw_ctl *ctl);
-static int last_cmd_v1(struct dpu_hw_ctl *ctl, enum dpu_reg_dma_queue q);
-static struct dpu_reg_dma_buffer *alloc_reg_dma_buf_v1(u32 size);
-static int dealloc_reg_dma_v1(struct dpu_reg_dma_buffer *lut_buf);
-
-static reg_dma_internal_ops write_dma_op_params[REG_DMA_SETUP_OPS_MAX] = {
-	[HW_BLK_SELECT] = write_decode_sel,
-	[REG_SINGLE_WRITE] = write_single_reg,
-	[REG_BLK_WRITE_SINGLE] = write_multi_reg_inc,
-	[REG_BLK_WRITE_INC] = write_multi_reg_index,
-	[REG_BLK_WRITE_MULTIPLE] = write_multi_lut_reg,
-};
-
-static reg_dma_internal_ops validate_dma_op_params[REG_DMA_SETUP_OPS_MAX] = {
-	[HW_BLK_SELECT] = validate_write_decode_sel,
-	[REG_SINGLE_WRITE] = validate_write_reg,
-	[REG_BLK_WRITE_SINGLE] = validate_write_reg,
-	[REG_BLK_WRITE_INC] = validate_write_reg,
-	[REG_BLK_WRITE_MULTIPLE] = validate_write_multi_lut_reg,
-};
-
-static struct dpu_reg_dma_buffer *last_cmd_buf;
-
-static void get_decode_sel(unsigned long blk, u32 *decode_sel)
-{
-	int i = 0;
-
-	*decode_sel = 0;
-	for_each_set_bit(i, &blk, 31) {
-		switch (BIT(i)) {
-		case VIG0:
-			*decode_sel |= BIT(0);
-			break;
-		case VIG1:
-			*decode_sel |= BIT(1);
-			break;
-		case VIG2:
-			*decode_sel |= BIT(2);
-			break;
-		case VIG3:
-			*decode_sel |= BIT(3);
-			break;
-		case DSPP0:
-			*decode_sel |= BIT(17);
-			break;
-		case DSPP1:
-			*decode_sel |= BIT(18);
-			break;
-		case DSPP2:
-			*decode_sel |= BIT(19);
-			break;
-		case DSPP3:
-			*decode_sel |= BIT(20);
-			break;
-		case SSPP_IGC:
-			*decode_sel |= BIT(4);
-			break;
-		case DSPP_IGC:
-			*decode_sel |= BIT(21);
-			break;
-		default:
-			DRM_ERROR("block not supported %lx\n", BIT(i));
-			break;
-		}
-	}
-}
-
-static int write_multi_reg(struct dpu_reg_dma_setup_ops_cfg *cfg)
-{
-	u8 *loc = NULL;
-
-	loc =  (u8 *)cfg->dma_buf->vaddr + cfg->dma_buf->index;
-	memcpy(loc, cfg->data, cfg->data_size);
-	cfg->dma_buf->index += cfg->data_size;
-	cfg->dma_buf->next_op_allowed = REG_WRITE_OP | DECODE_SEL_OP;
-	cfg->dma_buf->ops_completed |= REG_WRITE_OP;
-
-	return 0;
-}
-
-int write_multi_reg_index(struct dpu_reg_dma_setup_ops_cfg *cfg)
-{
-	u32 *loc = NULL;
-
-	loc =  (u32 *)((u8 *)cfg->dma_buf->vaddr +
-			cfg->dma_buf->index);
-	loc[0] = HW_INDEX_REG_WRITE_OPCODE;
-	loc[0] |= (cfg->blk_offset & MAX_RELATIVE_OFF);
-	loc[1] = SIZE_DWORD(cfg->data_size);
-	cfg->dma_buf->index += ops_mem_size[cfg->ops];
-
-	return write_multi_reg(cfg);
-}
-
-int write_multi_reg_inc(struct dpu_reg_dma_setup_ops_cfg *cfg)
-{
-	u32 *loc = NULL;
-
-	loc =  (u32 *)((u8 *)cfg->dma_buf->vaddr +
-			cfg->dma_buf->index);
-	loc[0] = AUTO_INC_REG_WRITE_OPCODE;
-	loc[0] |= (cfg->blk_offset & MAX_RELATIVE_OFF);
-	loc[1] = SIZE_DWORD(cfg->data_size);
-	cfg->dma_buf->index += ops_mem_size[cfg->ops];
-
-	return write_multi_reg(cfg);
-}
-
-static int write_multi_lut_reg(struct dpu_reg_dma_setup_ops_cfg *cfg)
-{
-	u32 *loc = NULL;
-
-	loc =  (u32 *)((u8 *)cfg->dma_buf->vaddr +
-			cfg->dma_buf->index);
-	loc[0] = BLK_REG_WRITE_OPCODE;
-	loc[0] |= (cfg->blk_offset & MAX_RELATIVE_OFF);
-	loc[1] = (cfg->inc) ? 0 : BIT(31);
-	loc[1] |= (cfg->wrap_size & WRAP_MAX_SIZE) << 16;
-	loc[1] |= ((SIZE_DWORD(cfg->data_size)) & MAX_DWORDS_SZ);
-	cfg->dma_buf->next_op_allowed = REG_WRITE_OP;
-	cfg->dma_buf->index += ops_mem_size[cfg->ops];
-
-	return write_multi_reg(cfg);
-}
-
-static int write_single_reg(struct dpu_reg_dma_setup_ops_cfg *cfg)
-{
-	u32 *loc = NULL;
-
-	loc =  (u32 *)((u8 *)cfg->dma_buf->vaddr +
-			cfg->dma_buf->index);
-	loc[0] = SINGLE_REG_WRITE_OPCODE;
-	loc[0] |= (cfg->blk_offset & MAX_RELATIVE_OFF);
-	loc[1] = *cfg->data;
-	cfg->dma_buf->index += ops_mem_size[cfg->ops];
-	cfg->dma_buf->ops_completed |= REG_WRITE_OP;
-	cfg->dma_buf->next_op_allowed = REG_WRITE_OP | DECODE_SEL_OP;
-
-	return 0;
-}
-
-static int write_decode_sel(struct dpu_reg_dma_setup_ops_cfg *cfg)
-{
-	u32 *loc = NULL;
-
-	loc =  (u32 *)((u8 *)cfg->dma_buf->vaddr +
-			cfg->dma_buf->index);
-	loc[0] = REG_DMA_DECODE_SEL;
-	get_decode_sel(cfg->blk, &loc[1]);
-	cfg->dma_buf->index += sizeof(u32) * 2;
-	cfg->dma_buf->ops_completed |= DECODE_SEL_OP;
-	cfg->dma_buf->next_op_allowed = REG_WRITE_OP;
-
-	return 0;
-}
-
-static int validate_write_multi_lut_reg(struct dpu_reg_dma_setup_ops_cfg *cfg)
-{
-	int rc;
-
-	rc = validate_write_reg(cfg);
-	if (rc)
-		return rc;
-
-	if (cfg->wrap_size < WRAP_MIN_SIZE || cfg->wrap_size > WRAP_MAX_SIZE) {
-		DRM_ERROR("invalid wrap sz %d min %d max %ld\n",
-			cfg->wrap_size, WRAP_MIN_SIZE, WRAP_MAX_SIZE);
-		rc = -EINVAL;
-	}
-
-	return rc;
-}
-
-static int validate_write_reg(struct dpu_reg_dma_setup_ops_cfg *cfg)
-{
-	u32 remain_len, write_len;
-
-	remain_len = BUFFER_SPACE_LEFT(cfg);
-	write_len = ops_mem_size[cfg->ops] + cfg->data_size;
-	if (remain_len < write_len) {
-		DRM_ERROR("buffer is full sz %d needs %d bytes\n",
-				remain_len, write_len);
-		return -EINVAL;
-	}
-
-	if (!cfg->data) {
-		DRM_ERROR("invalid data %pK size %d exp sz %d\n", cfg->data,
-			cfg->data_size, write_len);
-		return -EINVAL;
-	}
-	if ((SIZE_DWORD(cfg->data_size)) > MAX_DWORDS_SZ ||
-	    NOT_WORD_ALIGNED(cfg->data_size)) {
-		DRM_ERROR("Invalid data size %d max %ld align %x\n",
-			cfg->data_size, MAX_DWORDS_SZ,
-			NOT_WORD_ALIGNED(cfg->data_size));
-		return -EINVAL;
-	}
-
-	if (cfg->blk_offset > MAX_RELATIVE_OFF ||
-			NOT_WORD_ALIGNED(cfg->blk_offset)) {
-		DRM_ERROR("invalid offset %d max %ld align %x\n",
-				cfg->blk_offset, MAX_RELATIVE_OFF,
-				NOT_WORD_ALIGNED(cfg->blk_offset));
-		return -EINVAL;
-	}
-
-	return 0;
-}
-
-static int validate_write_decode_sel(struct dpu_reg_dma_setup_ops_cfg *cfg)
-{
-	u32 remain_len;
-
-	remain_len = BUFFER_SPACE_LEFT(cfg);
-	if (remain_len < ops_mem_size[HW_BLK_SELECT]) {
-		DRM_ERROR("buffer is full needs %d bytes\n",
-				ops_mem_size[HW_BLK_SELECT]);
-		return -EINVAL;
-	}
-
-	if (!cfg->blk) {
-		DRM_ERROR("blk set as 0\n");
-		return -EINVAL;
-	}
-	/* DSPP and VIG can't be combined */
-	if ((cfg->blk & GRP_VIG_HW_BLK_SELECT) &&
-		(cfg->blk & GRP_DSPP_HW_BLK_SELECT)) {
-		DRM_ERROR("invalid blk combination %x\n",
-			    cfg->blk);
-		return -EINVAL;
-	}
-
-	return 0;
-}
-
-static int validate_dma_cfg(struct dpu_reg_dma_setup_ops_cfg *cfg)
-{
-	int rc = 0;
-	bool supported;
-
-	if (!cfg || cfg->ops >= REG_DMA_SETUP_OPS_MAX || !cfg->dma_buf) {
-		DRM_ERROR("invalid param cfg %pK ops %d dma_buf %pK\n",
-			cfg, ((cfg) ? cfg->ops : REG_DMA_SETUP_OPS_MAX),
-			((cfg) ? cfg->dma_buf : NULL));
-		return -EINVAL;
-	}
-
-	rc = check_support_v1(cfg->feature, cfg->blk, &supported);
-	if (rc || !supported) {
-		DRM_ERROR("check support failed rc %d supported %d\n",
-				rc, supported);
-		rc = -EINVAL;
-		return rc;
-	}
-
-	if (cfg->dma_buf->index >= cfg->dma_buf->buffer_size ||
-	    NOT_WORD_ALIGNED(cfg->dma_buf->index)) {
-		DRM_ERROR("Buf Overflow index %d max size %d align %x\n",
-			cfg->dma_buf->index, cfg->dma_buf->buffer_size,
-			NOT_WORD_ALIGNED(cfg->dma_buf->index));
-		return -EINVAL;
-	}
-
-	if (cfg->dma_buf->iova & GUARD_BYTES || !cfg->dma_buf->vaddr) {
-		DRM_ERROR("iova not aligned to %lx iova %llx kva %pK",
-				ADDR_ALIGN, cfg->dma_buf->iova,
-				cfg->dma_buf->vaddr);
-		return -EINVAL;
-	}
-	if (!IS_OP_ALLOWED(cfg->ops, cfg->dma_buf->next_op_allowed)) {
-		DRM_ERROR("invalid op %x allowed %x\n", cfg->ops,
-				cfg->dma_buf->next_op_allowed);
-		return -EINVAL;
-	}
-
-	if (!validate_dma_op_params[cfg->ops] ||
-	    !write_dma_op_params[cfg->ops]) {
-		DRM_ERROR("invalid op %d validate %pK write %pK\n", cfg->ops,
-			validate_dma_op_params[cfg->ops],
-			write_dma_op_params[cfg->ops]);
-		return -EINVAL;
-	}
-	return rc;
-}
-
-static int validate_kick_off_v1(struct dpu_reg_dma_kickoff_cfg *cfg)
-{
-
-	if (!cfg || !cfg->ctl || !cfg->dma_buf) {
-		DRM_ERROR("invalid cfg %pK ctl %pK dma_buf %pK\n",
-			cfg, ((!cfg) ? NULL : cfg->ctl),
-			((!cfg) ? NULL : cfg->dma_buf));
-		return -EINVAL;
-	}
-
-	if (cfg->ctl->idx < CTL_0 && cfg->ctl->idx >= CTL_MAX) {
-		DRM_ERROR("invalid ctl idx %d\n", cfg->ctl->idx);
-		return -EINVAL;
-	}
-
-	if (cfg->op >= REG_DMA_OP_MAX) {
-		DRM_ERROR("invalid op %d\n", cfg->op);
-		return -EINVAL;
-	}
-
-	if ((cfg->op == REG_DMA_WRITE) &&
-	     (!(cfg->dma_buf->ops_completed & DECODE_SEL_OP) ||
-	     !(cfg->dma_buf->ops_completed & REG_WRITE_OP))) {
-		DRM_ERROR("incomplete write ops %x\n",
-				cfg->dma_buf->ops_completed);
-		return -EINVAL;
-	}
-
-	if (cfg->op == REG_DMA_READ && cfg->block_select >= DSPP_HIST_MAX) {
-		DRM_ERROR("invalid block for read %d\n", cfg->block_select);
-		return -EINVAL;
-	}
-
-	/* Only immediate triggers are supported now hence hardcode */
-	cfg->trigger_mode = (cfg->op == REG_DMA_READ) ? (READ_TRIGGER) :
-				(WRITE_TRIGGER);
-
-	if (cfg->dma_buf->iova & GUARD_BYTES) {
-		DRM_ERROR("Address is not aligned to %lx iova %llx", ADDR_ALIGN,
-				cfg->dma_buf->iova);
-		return -EINVAL;
-	}
-
-	if (cfg->queue_select >= DMA_CTL_QUEUE_MAX) {
-		DRM_ERROR("invalid queue selected %d\n", cfg->queue_select);
-		return -EINVAL;
-	}
-
-	if (SIZE_DWORD(cfg->dma_buf->index) > MAX_DWORDS_SZ ||
-			!cfg->dma_buf->index) {
-		DRM_ERROR("invalid dword size %zd max %ld\n",
-			SIZE_DWORD(cfg->dma_buf->index), MAX_DWORDS_SZ);
-		return -EINVAL;
-	}
-	return 0;
-}
-
-static int write_kick_off_v1(struct dpu_reg_dma_kickoff_cfg *cfg)
-{
-	u32 cmd1;
-	struct dpu_hw_blk_reg_map hw;
-
-	memset(&hw, 0, sizeof(hw));
-	cmd1 = (cfg->op == REG_DMA_READ) ?
-		(dspp_read_sel[cfg->block_select] << 30) : 0;
-	cmd1 |= (cfg->last_command) ? BIT(24) : 0;
-	cmd1 |= (cfg->op == REG_DMA_READ) ? (2 << 22) : 0;
-	cmd1 |= (cfg->op == REG_DMA_WRITE) ? (BIT(22)) : 0;
-	cmd1 |= (SIZE_DWORD(cfg->dma_buf->index) & MAX_DWORDS_SZ);
-
-	SET_UP_REG_DMA_REG(hw, reg_dma);
-	DPU_REG_WRITE(&hw, REG_DMA_OP_MODE_OFF, BIT(0));
-	DPU_REG_WRITE(&hw, reg_dma_ctl_queue_off[cfg->ctl->idx],
-			cfg->dma_buf->iova);
-	DPU_REG_WRITE(&hw, reg_dma_ctl_queue_off[cfg->ctl->idx] + 0x4,
-			cmd1);
-	if (cfg->last_command)
-		DPU_REG_WRITE(&cfg->ctl->hw, REG_DMA_CTL_TRIGGER_OFF,
-			queue_sel[cfg->queue_select]);
-
-	return 0;
-}
-
-int init_v1(struct dpu_hw_reg_dma *cfg)
-{
-	int i = 0;
-
-	if (!cfg)
-		return -EINVAL;
-
-	reg_dma = cfg;
-	if (!last_cmd_buf) {
-		last_cmd_buf = alloc_reg_dma_buf_v1(REG_DMA_HEADERS_BUFFER_SZ);
-		if (IS_ERR_OR_NULL(last_cmd_buf))
-			return -EINVAL;
-	}
-	reg_dma->ops.check_support = check_support_v1;
-	reg_dma->ops.setup_payload = setup_payload_v1;
-	reg_dma->ops.kick_off = kick_off_v1;
-	reg_dma->ops.reset = reset_v1;
-	reg_dma->ops.alloc_reg_dma_buf = alloc_reg_dma_buf_v1;
-	reg_dma->ops.dealloc_reg_dma = dealloc_reg_dma_v1;
-	reg_dma->ops.reset_reg_dma_buf = reset_reg_dma_buffer_v1;
-	reg_dma->ops.last_command = last_cmd_v1;
-
-	reg_dma_ctl_queue_off[CTL_0] = REG_DMA_CTL0_QUEUE_0_CMD0_OFF;
-	for (i = CTL_1; i < ARRAY_SIZE(reg_dma_ctl_queue_off); i++)
-		reg_dma_ctl_queue_off[i] = reg_dma_ctl_queue_off[i - 1] +
-			(sizeof(u32) * 4);
-
-	return 0;
-}
-
-static int check_support_v1(enum dpu_reg_dma_features feature,
-		     enum dpu_reg_dma_blk blk,
-		     bool *is_supported)
-{
-	int ret = 0;
-
-	if (!is_supported)
-		return -EINVAL;
-
-	if (feature >= REG_DMA_FEATURES_MAX || blk >= MDSS) {
-		*is_supported = false;
-		return ret;
-	}
-
-	*is_supported = (blk & v1_supported[feature]) ? true : false;
-	return ret;
-}
-
-static int setup_payload_v1(struct dpu_reg_dma_setup_ops_cfg *cfg)
-{
-	int rc = 0;
-
-	rc = validate_dma_cfg(cfg);
-
-	if (!rc)
-		rc = validate_dma_op_params[cfg->ops](cfg);
-
-	if (!rc)
-		rc = write_dma_op_params[cfg->ops](cfg);
-
-	return rc;
-}
-
-
-static int kick_off_v1(struct dpu_reg_dma_kickoff_cfg *cfg)
-{
-	int rc = 0;
-
-	rc = validate_kick_off_v1(cfg);
-	if (rc)
-		return rc;
-
-	rc = write_kick_off_v1(cfg);
-	return rc;
-}
-
-int reset_v1(struct dpu_hw_ctl *ctl)
-{
-	struct dpu_hw_blk_reg_map hw;
-	u32 index, val;
-
-	if (!ctl || ctl->idx > CTL_MAX) {
-		DRM_ERROR("invalid ctl %pK ctl idx %d\n",
-			ctl, ((ctl) ? ctl->idx : 0));
-		return -EINVAL;
-	}
-
-	memset(&hw, 0, sizeof(hw));
-	index = ctl->idx - CTL_0;
-	SET_UP_REG_DMA_REG(hw, reg_dma);
-	DPU_REG_WRITE(&hw, REG_DMA_OP_MODE_OFF, BIT(0));
-	DPU_REG_WRITE(&hw, (REG_DMA_CTL0_RESET_OFF + index * sizeof(u32)),
-			BIT(0));
-
-	index = 0;
-	do {
-		udelay(1000);
-		index++;
-		val = DPU_REG_READ(&hw,
-			(REG_DMA_CTL0_RESET_OFF + index * sizeof(u32)));
-	} while (index < 2 && val);
-
-	return 0;
-}
-
-static struct dpu_reg_dma_buffer *alloc_reg_dma_buf_v1(u32 size)
-{
-	struct dpu_reg_dma_buffer *dma_buf = NULL;
-	u32 iova_aligned, offset;
-	u32 rsize = size + GUARD_BYTES;
-	struct msm_drm_private *priv = reg_dma->drm_dev->dev_private;
-	struct msm_gem_address_space *aspace = NULL;
-	int rc = 0;
-
-	if (!size || SIZE_DWORD(size) > MAX_DWORDS_SZ) {
-		DRM_ERROR("invalid buffer size %d\n", size);
-		return ERR_PTR(-EINVAL);
-	}
-
-	dma_buf = kzalloc(sizeof(*dma_buf), GFP_KERNEL);
-	if (!dma_buf)
-		return ERR_PTR(-ENOMEM);
-
-	dma_buf->buf = msm_gem_new(reg_dma->drm_dev,
-				    rsize, MSM_BO_UNCACHED);
-	if (IS_ERR_OR_NULL(dma_buf->buf)) {
-		rc = -EINVAL;
-		goto fail;
-	}
-
-	aspace = priv->kms->aspace;
-	if (!aspace) {
-		DRM_ERROR("failed to get aspace\n");
-		rc = -EINVAL;
-		goto free_gem;
-	}
-
-	dma_buf->aspace = aspace;
-	rc = msm_gem_get_iova(dma_buf->buf, aspace, &dma_buf->iova);
-	if (rc) {
-		DRM_ERROR("failed to get the iova rc %d\n", rc);
-		goto free_gem;
-	}
-
-	dma_buf->vaddr = msm_gem_get_vaddr(dma_buf->buf);
-	if (IS_ERR_OR_NULL(dma_buf->vaddr)) {
-		DRM_ERROR("failed to get va rc %d\n", rc);
-		rc = -EINVAL;
-		goto put_iova;
-	}
-
-	dma_buf->buffer_size = size;
-	iova_aligned = (dma_buf->iova + GUARD_BYTES) & ALIGNED_OFFSET;
-	offset = iova_aligned - dma_buf->iova;
-	dma_buf->iova = dma_buf->iova + offset;
-	dma_buf->vaddr = (void *)(((u8 *)dma_buf->vaddr) + offset);
-	dma_buf->next_op_allowed = DECODE_SEL_OP;
-
-	return dma_buf;
-
-put_iova:
-	msm_gem_put_iova(dma_buf->buf, aspace);
-free_gem:
-	mutex_lock(&reg_dma->drm_dev->struct_mutex);
-	msm_gem_free_object(dma_buf->buf);
-	mutex_unlock(&reg_dma->drm_dev->struct_mutex);
-fail:
-	kfree(dma_buf);
-	return ERR_PTR(rc);
-}
-
-static int dealloc_reg_dma_v1(struct dpu_reg_dma_buffer *dma_buf)
-{
-	if (!dma_buf) {
-		DRM_ERROR("invalid param reg_buf %pK\n", dma_buf);
-		return -EINVAL;
-	}
-
-	if (dma_buf->buf) {
-		msm_gem_put_iova(dma_buf->buf, 0);
-		mutex_lock(&reg_dma->drm_dev->struct_mutex);
-		msm_gem_free_object(dma_buf->buf);
-		mutex_unlock(&reg_dma->drm_dev->struct_mutex);
-	}
-
-	kfree(dma_buf);
-	return 0;
-}
-
-static int reset_reg_dma_buffer_v1(struct dpu_reg_dma_buffer *lut_buf)
-{
-	if (!lut_buf)
-		return -EINVAL;
-
-	lut_buf->index = 0;
-	lut_buf->ops_completed = 0;
-	lut_buf->next_op_allowed = DECODE_SEL_OP;
-	return 0;
-}
-
-static int validate_last_cmd(struct dpu_reg_dma_setup_ops_cfg *cfg)
-{
-	u32 remain_len, write_len;
-
-	remain_len = BUFFER_SPACE_LEFT(cfg);
-	write_len = sizeof(u32);
-	if (remain_len < write_len) {
-		DRM_ERROR("buffer is full sz %d needs %d bytes\n",
-				remain_len, write_len);
-		return -EINVAL;
-	}
-	return 0;
-}
-
-static int write_last_cmd(struct dpu_reg_dma_setup_ops_cfg *cfg)
-{
-	u32 *loc = NULL;
-
-	loc =  (u32 *)((u8 *)cfg->dma_buf->vaddr +
-			cfg->dma_buf->index);
-	loc[0] = REG_DMA_DECODE_SEL;
-	loc[1] = 0;
-	cfg->dma_buf->index = sizeof(u32) * 2;
-	cfg->dma_buf->ops_completed = REG_WRITE_OP | DECODE_SEL_OP;
-	cfg->dma_buf->next_op_allowed = REG_WRITE_OP;
-
-	return 0;
-}
-
-static int last_cmd_v1(struct dpu_hw_ctl *ctl, enum dpu_reg_dma_queue q)
-{
-	struct dpu_reg_dma_setup_ops_cfg cfg;
-	struct dpu_reg_dma_kickoff_cfg kick_off;
-
-	if (!last_cmd_buf || !ctl || q >= DMA_CTL_QUEUE_MAX) {
-		DRM_ERROR("invalid param buf %pK ctl %pK q %d\n", last_cmd_buf,
-				ctl, q);
-		return -EINVAL;
-	}
-
-	if (!last_cmd_buf->iova) {
-		DRM_DEBUG("iova not set, possible secure session\n");
-		return 0;
-	}
-
-	cfg.dma_buf = last_cmd_buf;
-	reset_reg_dma_buffer_v1(last_cmd_buf);
-	if (validate_last_cmd(&cfg)) {
-		DRM_ERROR("validate buf failed\n");
-		return -EINVAL;
-	}
-
-	if (write_last_cmd(&cfg)) {
-		DRM_ERROR("write buf failed\n");
-		return -EINVAL;
-	}
-
-	kick_off.ctl = ctl;
-	kick_off.queue_select = q;
-	kick_off.trigger_mode = WRITE_IMMEDIATE;
-	kick_off.last_command = 1;
-	kick_off.op = REG_DMA_WRITE;
-	kick_off.dma_buf = last_cmd_buf;
-	if (kick_off_v1(&kick_off)) {
-		DRM_ERROR("kick off last cmd failed\n");
-		return -EINVAL;
-	}
-
-	return 0;
-}
-
-void deinit_v1(void)
-{
-	if (last_cmd_buf)
-		dealloc_reg_dma_v1(last_cmd_buf);
-	last_cmd_buf = NULL;
-}
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_reg_dma_v1.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_reg_dma_v1.h
deleted file mode 100644
index 4d784eb..0000000
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_reg_dma_v1.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/* Copyright (c) 2017-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.
- */
-#ifndef _DPU_HW_REG_DMA_V1_H
-#define _DPU_HW_REG_DMA_V1_H
-
-#include "dpu_reg_dma.h"
-
-/**
- * init_v1() - initialize the reg dma v1 driver by installing v1 ops
- * @reg_dma - reg_dma hw info structure exposing capabilities.
- */
-int init_v1(struct dpu_hw_reg_dma *reg_dma);
-
-/**
- * deinit_v1() - free up any resources allocated during the v1 reg dma init
- */
-void deinit_v1(void);
-#endif /* _DPU_HW_REG_DMA_V1_H */
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_reg_dma_v1_color_proc.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_reg_dma_v1_color_proc.c
deleted file mode 100644
index d21aa6f..0000000
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_reg_dma_v1_color_proc.c
+++ /dev/null
@@ -1,943 +0,0 @@
-/* Copyright (c) 2017-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 <drm/msm_drm_pp.h>
-#include "dpu_reg_dma.h"
-#include "dpu_hw_reg_dma_v1_color_proc.h"
-#include "dpu_hw_color_proc_common_v4.h"
-
-/* Reserve space of 128 words for LUT dma payload set-up */
-#define REG_DMA_HEADERS_BUFFER_SZ (sizeof(u32) * 128)
-
-#define VLUT_MEM_SIZE ((128 * sizeof(u32)) + REG_DMA_HEADERS_BUFFER_SZ)
-#define VLUT_LEN (128 * sizeof(u32))
-#define PA_OP_MODE_OFF 0x800
-#define PA_LUTV_OPMODE_OFF 0x84c
-
-#define GAMUT_LUT_MEM_SIZE ((sizeof(struct drm_msm_3d_gamut)) + \
-		REG_DMA_HEADERS_BUFFER_SZ)
-#define GAMUT_SCALE_OFF_LEN (GAMUT_3D_SCALE_OFF_SZ * \
-		GAMUT_3D_SCALE_OFF_TBL_NUM * sizeof(u32))
-#define GAMUT_SCALE_OFF_LEN_12 (GAMUT_3D_SCALEB_OFF_SZ * sizeof(u32))
-
-#define GC_LUT_MEM_SIZE ((sizeof(struct drm_msm_pgc_lut)) + \
-		REG_DMA_HEADERS_BUFFER_SZ)
-
-#define IGC_LUT_MEM_SIZE ((sizeof(struct drm_msm_igc_lut)) + \
-		REG_DMA_HEADERS_BUFFER_SZ)
-
-#define PCC_LUT_ENTRIES (PCC_NUM_PLANES * PCC_NUM_COEFF)
-#define PCC_LEN (PCC_LUT_ENTRIES * sizeof(u32))
-#define PCC_MEM_SIZE (PCC_LEN + \
-		REG_DMA_HEADERS_BUFFER_SZ)
-
-#define REG_MASK(n) ((BIT(n)) - 1)
-
-static struct dpu_reg_dma_buffer *dspp_buf[REG_DMA_FEATURES_MAX][DSPP_MAX];
-
-static u32 feature_map[DPU_DSPP_MAX] = {
-	[DPU_DSPP_VLUT] = REG_DMA_FEATURES_MAX,
-	[DPU_DSPP_GAMUT] = GAMUT,
-	[DPU_DSPP_IGC] = IGC,
-	[DPU_DSPP_PCC] = PCC,
-	[DPU_DSPP_GC] = GC,
-	[DPU_DSPP_HSIC] = REG_DMA_FEATURES_MAX,
-	[DPU_DSPP_MEMCOLOR] = REG_DMA_FEATURES_MAX,
-	[DPU_DSPP_SIXZONE] = REG_DMA_FEATURES_MAX,
-	[DPU_DSPP_DITHER] = REG_DMA_FEATURES_MAX,
-	[DPU_DSPP_HIST] = REG_DMA_FEATURES_MAX,
-	[DPU_DSPP_AD] = REG_DMA_FEATURES_MAX,
-};
-
-static u32 feature_reg_dma_sz[DPU_DSPP_MAX] = {
-	[DPU_DSPP_VLUT] = VLUT_MEM_SIZE,
-	[DPU_DSPP_GAMUT] = GAMUT_LUT_MEM_SIZE,
-	[DPU_DSPP_GC] = GC_LUT_MEM_SIZE,
-	[DPU_DSPP_IGC] = IGC_LUT_MEM_SIZE,
-	[DPU_DSPP_PCC] = PCC_MEM_SIZE,
-};
-
-static u32 dspp_mapping[DSPP_MAX] = {
-	[DSPP_0] = DSPP0,
-	[DSPP_1] = DSPP1,
-	[DSPP_2] = DSPP2,
-	[DSPP_3] = DSPP3,
-};
-
-#define REG_DMA_INIT_OPS(cfg, block, reg_dma_feature, feature_dma_buf) \
-	do { \
-		memset(&cfg, 0, sizeof(cfg)); \
-		(cfg).blk = block; \
-		(cfg).feature = reg_dma_feature; \
-		(cfg).dma_buf = feature_dma_buf; \
-	} while (0)
-
-#define REG_DMA_SETUP_OPS(cfg, block_off, data_ptr, data_len, op, \
-		wrap_sz, wrap_inc) \
-	do { \
-		(cfg).ops = op; \
-		(cfg).blk_offset = block_off; \
-		(cfg).data_size = data_len; \
-		(cfg).data = data_ptr; \
-		(cfg).inc = wrap_inc; \
-		(cfg).wrap_size = wrap_sz; \
-	} while (0)
-
-#define REG_DMA_SETUP_KICKOFF(cfg, hw_ctl, feature_dma_buf, ops, ctl_q, \
-		mode) \
-	do { \
-		memset(&cfg, 0, sizeof(cfg)); \
-		(cfg).ctl = hw_ctl; \
-		(cfg).dma_buf = feature_dma_buf; \
-		(cfg).op = ops; \
-		(cfg).queue_select = ctl_q; \
-		(cfg).trigger_mode = mode; \
-	} while (0)
-
-static int reg_dma_buf_init(struct dpu_reg_dma_buffer **buf, u32 sz);
-static int reg_dma_dspp_check(struct dpu_hw_dspp *ctx, void *cfg,
-		enum dpu_reg_dma_features feature);
-static int reg_dma_blk_select(enum dpu_reg_dma_features feature,
-		enum dpu_reg_dma_blk blk, struct dpu_reg_dma_buffer *dma_buf);
-static int reg_dma_write(enum dpu_reg_dma_setup_ops ops, u32 off, u32 data_sz,
-			u32 *data, struct dpu_reg_dma_buffer *dma_buf,
-			enum dpu_reg_dma_features feature,
-			enum dpu_reg_dma_blk blk);
-static int reg_dma_kick_off(enum dpu_reg_dma_op op, enum dpu_reg_dma_queue q,
-		enum dpu_reg_dma_trigger_mode mode,
-		struct dpu_reg_dma_buffer *dma_buf, struct dpu_hw_ctl *ctl);
-
-static int reg_dma_buf_init(struct dpu_reg_dma_buffer **buf, u32 size)
-{
-	struct dpu_hw_reg_dma_ops *dma_ops;
-
-	dma_ops = dpu_reg_dma_get_ops();
-	if (IS_ERR_OR_NULL(dma_ops))
-		return -ENOTSUPP;
-
-	if (!buf) {
-		DRM_ERROR("invalid buf\n");
-		return -EINVAL;
-	}
-
-	/* buffer already initialized */
-	if (*buf)
-		return 0;
-
-	*buf = dma_ops->alloc_reg_dma_buf(size);
-	if (IS_ERR_OR_NULL(*buf))
-		return -EINVAL;
-
-	return 0;
-}
-
-static int reg_dma_dspp_check(struct dpu_hw_dspp *ctx, void *cfg,
-		enum dpu_reg_dma_features feature)
-{
-	struct dpu_hw_reg_dma_ops *dma_ops;
-	struct dpu_hw_cp_cfg *hw_cfg = cfg;
-
-	if (!cfg || !ctx) {
-		DRM_ERROR("invalid cfg %pK ctx %pK\n", cfg, ctx);
-		return -EINVAL;
-	}
-
-	dma_ops = dpu_reg_dma_get_ops();
-	if (IS_ERR_OR_NULL(dma_ops))
-		return -EINVAL;
-
-	if (!hw_cfg->ctl || ctx->idx >= DSPP_MAX ||
-		feature >= REG_DMA_FEATURES_MAX) {
-		DRM_ERROR("invalid ctl %pK dspp idx %d feature %d\n",
-			hw_cfg->ctl, ctx->idx, feature);
-		return -EINVAL;
-	}
-
-	if (!dspp_buf[feature][ctx->idx]) {
-		DRM_ERROR("invalid dma_buf\n");
-		return -EINVAL;
-	}
-
-	return 0;
-}
-
-static int reg_dma_blk_select(enum dpu_reg_dma_features feature,
-		enum dpu_reg_dma_blk blk, struct dpu_reg_dma_buffer *dma_buf)
-{
-	struct dpu_hw_reg_dma_ops *dma_ops;
-	struct dpu_reg_dma_setup_ops_cfg dma_write_cfg;
-	int rc = 0;
-
-	dma_ops = dpu_reg_dma_get_ops();
-	dma_ops->reset_reg_dma_buf(dma_buf);
-	memset(&dma_write_cfg, 0, sizeof(dma_write_cfg));
-	dma_write_cfg.blk = blk;
-	dma_write_cfg.feature = feature;
-	dma_write_cfg.ops = HW_BLK_SELECT;
-	dma_write_cfg.dma_buf = dma_buf;
-
-	rc = dma_ops->setup_payload(&dma_write_cfg);
-	if (rc)
-		DRM_ERROR("write decode select failed ret %d\n", rc);
-
-	return rc;
-}
-
-static int reg_dma_write(enum dpu_reg_dma_setup_ops ops, u32 off, u32 data_sz,
-			u32 *data, struct dpu_reg_dma_buffer *dma_buf,
-			enum dpu_reg_dma_features feature,
-			enum dpu_reg_dma_blk blk)
-{
-	struct dpu_hw_reg_dma_ops *dma_ops;
-	struct dpu_reg_dma_setup_ops_cfg dma_write_cfg;
-	int rc;
-
-	dma_ops = dpu_reg_dma_get_ops();
-	memset(&dma_write_cfg, 0, sizeof(dma_write_cfg));
-
-	dma_write_cfg.ops = ops;
-	dma_write_cfg.blk_offset = off;
-	dma_write_cfg.data_size = data_sz;
-	dma_write_cfg.data = data;
-	dma_write_cfg.dma_buf = dma_buf;
-	dma_write_cfg.feature = feature;
-	dma_write_cfg.blk = blk;
-	rc = dma_ops->setup_payload(&dma_write_cfg);
-	if (rc)
-		DRM_ERROR("write single reg failed ret %d\n", rc);
-
-	return rc;
-}
-
-static int reg_dma_kick_off(enum dpu_reg_dma_op op, enum dpu_reg_dma_queue q,
-		enum dpu_reg_dma_trigger_mode mode,
-		struct dpu_reg_dma_buffer *dma_buf, struct dpu_hw_ctl *ctl)
-{
-	struct dpu_reg_dma_kickoff_cfg kick_off;
-	struct dpu_hw_reg_dma_ops *dma_ops;
-	int rc;
-
-	dma_ops = dpu_reg_dma_get_ops();
-	memset(&kick_off, 0, sizeof(kick_off));
-	kick_off.ctl = ctl;
-	kick_off.dma_buf = dma_buf;
-	kick_off.op = op;
-	kick_off.queue_select = q;
-	kick_off.trigger_mode = mode;
-	rc = dma_ops->kick_off(&kick_off);
-	if (rc)
-		DRM_ERROR("failed to kick off ret %d\n", rc);
-
-	return rc;
-}
-
-int reg_dmav1_init_dspp_op_v4(int feature, enum dpu_dspp idx)
-{
-	int rc = -ENOTSUPP;
-	struct dpu_hw_reg_dma_ops *dma_ops;
-	bool is_supported = false;
-	u32 blk;
-
-	if (feature >= DPU_DSPP_MAX || idx >= DSPP_MAX) {
-		DRM_ERROR("invalid feature %x max %x dspp idx %x max %xd\n",
-			feature, DPU_DSPP_MAX, idx, DSPP_MAX);
-		return rc;
-	}
-
-	if (feature_map[feature] >= REG_DMA_FEATURES_MAX) {
-		DRM_ERROR("invalid feature map %d for feature %d\n",
-			feature_map[feature], feature);
-		return -ENOTSUPP;
-	}
-
-	dma_ops = dpu_reg_dma_get_ops();
-	if (IS_ERR_OR_NULL(dma_ops))
-		return -ENOTSUPP;
-
-	blk = (feature_map[feature] == IGC) ? DSPP_IGC : dspp_mapping[idx];
-	rc = dma_ops->check_support(feature_map[feature], blk, &is_supported);
-	if (!rc)
-		rc = (is_supported) ? 0 : -ENOTSUPP;
-
-	if (!rc)
-		rc = reg_dma_buf_init(&dspp_buf[feature_map[feature]][idx],
-				feature_reg_dma_sz[feature]);
-
-	return rc;
-}
-
-int reg_dmav1_init_sspp_op_v4(int feature, enum dpu_sspp idx)
-{
-	return -ENOTSUPP;
-}
-
-void reg_dmav1_setup_dspp_vlutv18(struct dpu_hw_dspp *ctx, void *cfg)
-{
-	struct drm_msm_pa_vlut *payload = NULL;
-	struct dpu_hw_cp_cfg *hw_cfg = cfg;
-	u32 op_mode;
-	u32 *data = NULL;
-	int i, j, rc = 0;
-
-	rc = reg_dma_dspp_check(ctx, cfg, VLUT);
-	if (rc)
-		return;
-
-	op_mode = DPU_REG_READ(&ctx->hw, PA_OP_MODE_OFF);
-	if (!hw_cfg->payload) {
-		DRM_DEBUG_DRIVER("Disable vlut feature\n");
-		DPU_REG_WRITE(&ctx->hw, PA_LUTV_OPMODE_OFF, 0);
-		if (op_mode & (~(BIT(20))))
-			op_mode = 0;
-		DPU_REG_WRITE(&ctx->hw, PA_OP_MODE_OFF, op_mode);
-		return;
-	}
-
-	rc = reg_dma_blk_select(VLUT, dspp_mapping[ctx->idx],
-			dspp_buf[VLUT][ctx->idx]);
-	if (rc) {
-		DRM_ERROR("write decode select failed ret %d\n", rc);
-		return;
-	}
-
-	data = kzalloc(VLUT_LEN, GFP_KERNEL);
-	if (!data)
-		return;
-
-	payload = hw_cfg->payload;
-	DRM_DEBUG_DRIVER("Enable vlut feature flags %llx\n", payload->flags);
-	for (i = 0, j = 0; i < ARRAY_SIZE(payload->val); i += 2, j++)
-		data[j] = (payload->val[i] & REG_MASK(10)) |
-			((payload->val[i + 1] & REG_MASK(10)) << 16);
-
-	rc = reg_dma_write(REG_BLK_WRITE_SINGLE, ctx->cap->sblk->vlut.base,
-			VLUT_LEN, data,
-			dspp_buf[VLUT][ctx->idx], VLUT,
-			dspp_mapping[ctx->idx]);
-	if (rc) {
-		DRM_ERROR("write single reg failed ret %d\n", rc);
-		goto exit;
-	}
-
-	rc = reg_dma_kick_off(REG_DMA_WRITE, DMA_CTL_QUEUE0, WRITE_IMMEDIATE,
-			dspp_buf[VLUT][ctx->idx], hw_cfg->ctl);
-	if (rc) {
-		DRM_ERROR("failed to kick off ret %d\n", rc);
-		goto exit;
-	}
-	DPU_REG_WRITE(&ctx->hw, PA_LUTV_OPMODE_OFF, BIT(0));
-	DPU_REG_WRITE(&ctx->hw, PA_OP_MODE_OFF, op_mode | BIT(20));
-
-exit:
-	kfree(data);
-}
-
-static int dpu_gamut_get_mode_info(struct drm_msm_3d_gamut *payload,
-		u32 *tbl_len, u32 *tbl_off, u32 *opcode, u32 *scale_off)
-{
-	int rc = 0;
-
-	if (payload->mode > GAMUT_3D_MODE_13) {
-		DRM_ERROR("invalid mode %d", payload->mode);
-		return -EINVAL;
-	}
-
-	switch (payload->mode) {
-	case GAMUT_3D_MODE_17:
-		*tbl_len = GAMUT_3D_MODE17_TBL_SZ * sizeof(u32) * 2;
-		*tbl_off = 0;
-		*scale_off = GAMUT_SCALEA_OFFSET_OFF;
-		*opcode = gamut_mode_17 << 2;
-		break;
-	case GAMUT_3D_MODE_5:
-		*tbl_len = GAMUT_3D_MODE5_TBL_SZ * sizeof(u32) * 2;
-		*tbl_off = GAMUT_MODE_5_OFF;
-		*scale_off = GAMUT_SCALEB_OFFSET_OFF;
-		*opcode = gamut_mode_5 << 2;
-		break;
-	case GAMUT_3D_MODE_13:
-		*tbl_len = GAMUT_3D_MODE13_TBL_SZ * sizeof(u32) * 2;
-		*opcode = (*opcode & (BIT(4) - 1)) >> 2;
-		if (*opcode == gamut_mode_13a)
-			*opcode = gamut_mode_13b;
-		else
-			*opcode = gamut_mode_13a;
-		*tbl_off = (*opcode == gamut_mode_13a) ? 0 :
-			GAMUT_MODE_13B_OFF;
-		*scale_off = (*opcode == gamut_mode_13a) ?
-			GAMUT_SCALEA_OFFSET_OFF : GAMUT_SCALEB_OFFSET_OFF;
-		*opcode <<= 2;
-		break;
-	default:
-		rc = -EINVAL;
-		break;
-	}
-	if (payload->flags & GAMUT_3D_MAP_EN)
-		*opcode |= GAMUT_MAP_EN;
-	*opcode |= GAMUT_EN;
-
-	return rc;
-}
-
-static void dspp_3d_gamutv4_off(struct dpu_hw_dspp *ctx, void *cfg)
-{
-	struct dpu_reg_dma_kickoff_cfg kick_off;
-	struct dpu_hw_cp_cfg *hw_cfg = cfg;
-	u32 op_mode = 0;
-	struct dpu_hw_reg_dma_ops *dma_ops;
-	struct dpu_reg_dma_setup_ops_cfg dma_write_cfg;
-	int rc;
-
-	dma_ops = dpu_reg_dma_get_ops();
-	dma_ops->reset_reg_dma_buf(dspp_buf[GAMUT][ctx->idx]);
-
-	REG_DMA_INIT_OPS(dma_write_cfg, dspp_mapping[ctx->idx], GAMUT,
-			dspp_buf[GAMUT][ctx->idx]);
-
-	REG_DMA_SETUP_OPS(dma_write_cfg, 0, NULL, 0, HW_BLK_SELECT, 0, 0);
-	rc = dma_ops->setup_payload(&dma_write_cfg);
-	if (rc) {
-		DRM_ERROR("write decode select failed ret %d\n", rc);
-		return;
-	}
-
-	REG_DMA_SETUP_OPS(dma_write_cfg,
-		ctx->cap->sblk->gamut.base,
-		&op_mode, sizeof(op_mode), REG_SINGLE_WRITE, 0, 0);
-	rc = dma_ops->setup_payload(&dma_write_cfg);
-	if (rc) {
-		DRM_ERROR("opmode write single reg failed ret %d\n", rc);
-		return;
-	}
-
-	REG_DMA_SETUP_KICKOFF(kick_off, hw_cfg->ctl, dspp_buf[GAMUT][ctx->idx],
-			REG_DMA_WRITE, DMA_CTL_QUEUE0, WRITE_IMMEDIATE);
-	rc = dma_ops->kick_off(&kick_off);
-	if (rc)
-		DRM_ERROR("failed to kick off ret %d\n", rc);
-}
-
-void reg_dmav1_setup_dspp_3d_gamutv4(struct dpu_hw_dspp *ctx, void *cfg)
-{
-	struct drm_msm_3d_gamut *payload;
-	struct dpu_reg_dma_kickoff_cfg kick_off;
-	struct dpu_hw_cp_cfg *hw_cfg = cfg;
-	u32 op_mode, reg, tbl_len, tbl_off, scale_off, i;
-	u32 scale_tbl_len, scale_tbl_off;
-	u32 *scale_data;
-	struct dpu_reg_dma_setup_ops_cfg dma_write_cfg;
-	struct dpu_hw_reg_dma_ops *dma_ops;
-	int rc;
-
-	rc = reg_dma_dspp_check(ctx, cfg, GAMUT);
-	if (rc)
-		return;
-
-	op_mode = DPU_REG_READ(&ctx->hw, ctx->cap->sblk->gamut.base);
-	if (!hw_cfg->payload) {
-		DRM_DEBUG_DRIVER("disable gamut feature\n");
-		dspp_3d_gamutv4_off(ctx, cfg);
-		return;
-	}
-
-	if (hw_cfg->len != sizeof(struct drm_msm_3d_gamut)) {
-		DRM_ERROR("invalid size of payload len %d exp %zd\n",
-				hw_cfg->len, sizeof(struct drm_msm_3d_gamut));
-		return;
-	}
-	payload = hw_cfg->payload;
-	rc = dpu_gamut_get_mode_info(payload, &tbl_len, &tbl_off, &op_mode,
-			&scale_off);
-	if (rc) {
-		DRM_ERROR("invalid mode info rc %d\n", rc);
-		return;
-	}
-
-	dma_ops = dpu_reg_dma_get_ops();
-	dma_ops->reset_reg_dma_buf(dspp_buf[GAMUT][ctx->idx]);
-
-	REG_DMA_INIT_OPS(dma_write_cfg, dspp_mapping[ctx->idx], GAMUT,
-			dspp_buf[GAMUT][ctx->idx]);
-
-	REG_DMA_SETUP_OPS(dma_write_cfg, 0, NULL, 0, HW_BLK_SELECT, 0, 0);
-	rc = dma_ops->setup_payload(&dma_write_cfg);
-	if (rc) {
-		DRM_ERROR("write decode select failed ret %d\n", rc);
-		return;
-	}
-	for (i = 0; i < GAMUT_3D_TBL_NUM; i++) {
-		reg = GAMUT_TABLE0_SEL << i;
-		reg |= ((tbl_off) & (BIT(11) - 1));
-		REG_DMA_SETUP_OPS(dma_write_cfg,
-			ctx->cap->sblk->gamut.base + GAMUT_TABLE_SEL_OFF,
-			&reg, sizeof(reg), REG_SINGLE_WRITE, 0, 0);
-		rc = dma_ops->setup_payload(&dma_write_cfg);
-		if (rc) {
-			DRM_ERROR("write tbl sel reg failed ret %d\n", rc);
-			return;
-		}
-		REG_DMA_SETUP_OPS(dma_write_cfg,
-		    ctx->cap->sblk->gamut.base + GAMUT_LOWER_COLOR_OFF,
-		    &payload->col[i][0].c2_c1, tbl_len,
-		    REG_BLK_WRITE_MULTIPLE, 2, 0);
-		rc = dma_ops->setup_payload(&dma_write_cfg);
-		if (rc) {
-			DRM_ERROR("write color reg failed ret %d\n", rc);
-			return;
-		}
-	}
-
-	if (op_mode & GAMUT_MAP_EN) {
-		if (scale_off == GAMUT_SCALEA_OFFSET_OFF)
-			scale_tbl_len = GAMUT_SCALE_OFF_LEN;
-		else
-			scale_tbl_len = GAMUT_SCALE_OFF_LEN_12;
-
-		for (i = 0; i < GAMUT_3D_SCALE_OFF_TBL_NUM; i++) {
-			scale_tbl_off = ctx->cap->sblk->gamut.base + scale_off +
-					(i * scale_tbl_len);
-			scale_data = &payload->scale_off[i][0];
-			REG_DMA_SETUP_OPS(dma_write_cfg, scale_tbl_off,
-					scale_data, scale_tbl_len,
-					REG_BLK_WRITE_SINGLE, 0, 0);
-			rc = dma_ops->setup_payload(&dma_write_cfg);
-			if (rc) {
-				DRM_ERROR("write scale/off reg failed ret %d\n",
-						rc);
-				return;
-			}
-		}
-	}
-
-	REG_DMA_SETUP_OPS(dma_write_cfg,
-		ctx->cap->sblk->gamut.base,
-		&op_mode, sizeof(op_mode), REG_SINGLE_WRITE, 0, 0);
-	rc = dma_ops->setup_payload(&dma_write_cfg);
-	if (rc) {
-		DRM_ERROR("opmode write single reg failed ret %d\n", rc);
-		return;
-	}
-
-	REG_DMA_SETUP_KICKOFF(kick_off, hw_cfg->ctl, dspp_buf[GAMUT][ctx->idx],
-			REG_DMA_WRITE, DMA_CTL_QUEUE0, WRITE_IMMEDIATE);
-	rc = dma_ops->kick_off(&kick_off);
-	if (rc)
-		DRM_ERROR("failed to kick off ret %d\n", rc);
-}
-
-void reg_dmav1_setup_dspp_gcv18(struct dpu_hw_dspp *ctx, void *cfg)
-{
-	struct drm_msm_pgc_lut *lut_cfg;
-	struct dpu_hw_reg_dma_ops *dma_ops;
-	struct dpu_reg_dma_kickoff_cfg kick_off;
-	struct dpu_hw_cp_cfg *hw_cfg = cfg;
-	struct dpu_reg_dma_setup_ops_cfg dma_write_cfg;
-	int rc, i = 0;
-	u32 reg;
-
-	rc = reg_dma_dspp_check(ctx, cfg, GC);
-	if (rc)
-		return;
-
-	if (!hw_cfg->payload) {
-		DRM_DEBUG_DRIVER("disable pgc feature\n");
-		DPU_REG_WRITE(&ctx->hw, ctx->cap->sblk->gc.base, 0);
-		return;
-	}
-
-	if (hw_cfg->len != sizeof(struct drm_msm_pgc_lut)) {
-		DRM_ERROR("invalid size of payload len %d exp %zd\n",
-				hw_cfg->len, sizeof(struct drm_msm_pgc_lut));
-		return;
-	}
-	lut_cfg = hw_cfg->payload;
-
-	dma_ops = dpu_reg_dma_get_ops();
-	dma_ops->reset_reg_dma_buf(dspp_buf[GC][ctx->idx]);
-
-	REG_DMA_INIT_OPS(dma_write_cfg, dspp_mapping[ctx->idx], GC,
-			dspp_buf[GC][ctx->idx]);
-
-	REG_DMA_SETUP_OPS(dma_write_cfg, 0, NULL, 0, HW_BLK_SELECT, 0, 0);
-	rc = dma_ops->setup_payload(&dma_write_cfg);
-	if (rc) {
-		DRM_ERROR("write decode select failed ret %d\n", rc);
-		return;
-	}
-
-	for (i = 0; i < GC_TBL_NUM; i++) {
-		reg = 0;
-		REG_DMA_SETUP_OPS(dma_write_cfg,
-			ctx->cap->sblk->gc.base + GC_C0_INDEX_OFF +
-			(i * sizeof(u32) * 2),
-			&reg, sizeof(reg), REG_SINGLE_WRITE, 0, 0);
-		rc = dma_ops->setup_payload(&dma_write_cfg);
-		if (rc) {
-			DRM_ERROR("index init failed ret %d\n", rc);
-			return;
-		}
-
-		REG_DMA_SETUP_OPS(dma_write_cfg,
-			ctx->cap->sblk->gc.base + GC_C0_OFF +
-			(i * sizeof(u32) * 2),
-			lut_cfg->c0 + (ARRAY_SIZE(lut_cfg->c0) * i),
-			PGC_TBL_LEN * sizeof(u32),
-			REG_BLK_WRITE_INC, 0, 0);
-		rc = dma_ops->setup_payload(&dma_write_cfg);
-		if (rc) {
-			DRM_ERROR("lut write failed ret %d\n", rc);
-			return;
-		}
-	}
-
-	reg = BIT(0);
-	REG_DMA_SETUP_OPS(dma_write_cfg,
-		ctx->cap->sblk->gc.base + GC_LUT_SWAP_OFF,
-		&reg, sizeof(reg), REG_SINGLE_WRITE, 0, 0);
-	rc = dma_ops->setup_payload(&dma_write_cfg);
-	if (rc) {
-		DRM_ERROR("setting swap offset failed ret %d\n", rc);
-		return;
-	}
-
-	reg = GC_EN | ((lut_cfg->flags & PGC_8B_ROUND) ? GC_8B_ROUND_EN : 0);
-	REG_DMA_SETUP_OPS(dma_write_cfg,
-		ctx->cap->sblk->gc.base,
-		&reg, sizeof(reg), REG_SINGLE_WRITE, 0, 0);
-	rc = dma_ops->setup_payload(&dma_write_cfg);
-	if (rc) {
-		DRM_ERROR("enabling gamma correction failed ret %d\n", rc);
-		return;
-	}
-
-	REG_DMA_SETUP_KICKOFF(kick_off, hw_cfg->ctl, dspp_buf[GC][ctx->idx],
-			REG_DMA_WRITE, DMA_CTL_QUEUE0, WRITE_IMMEDIATE);
-	rc = dma_ops->kick_off(&kick_off);
-	if (rc) {
-		DRM_ERROR("failed to kick off ret %d\n", rc);
-		return;
-	}
-}
-
-static void _dspp_igcv31_off(struct dpu_hw_dspp *ctx, void *cfg)
-{
-	struct dpu_reg_dma_kickoff_cfg kick_off;
-	struct dpu_hw_cp_cfg *hw_cfg = cfg;
-	struct dpu_hw_reg_dma_ops *dma_ops;
-	struct dpu_reg_dma_setup_ops_cfg dma_write_cfg;
-	int rc;
-	u32 reg;
-
-	dma_ops = dpu_reg_dma_get_ops();
-	dma_ops->reset_reg_dma_buf(dspp_buf[IGC][ctx->idx]);
-
-	REG_DMA_INIT_OPS(dma_write_cfg, dspp_mapping[ctx->idx], IGC,
-		dspp_buf[IGC][ctx->idx]);
-
-	REG_DMA_SETUP_OPS(dma_write_cfg, 0, NULL, 0, HW_BLK_SELECT, 0, 0);
-	rc = dma_ops->setup_payload(&dma_write_cfg);
-	if (rc) {
-		DRM_ERROR("write decode select failed ret %d\n", rc);
-		return;
-	}
-
-	reg = IGC_DIS;
-	REG_DMA_SETUP_OPS(dma_write_cfg,
-		ctx->cap->sblk->igc.base + IGC_OPMODE_OFF,
-		&reg, sizeof(reg), REG_SINGLE_WRITE, 0, 0);
-	rc = dma_ops->setup_payload(&dma_write_cfg);
-	if (rc) {
-		DRM_ERROR("setting opcode failed ret %d\n", rc);
-		return;
-	}
-
-	REG_DMA_SETUP_KICKOFF(kick_off, hw_cfg->ctl, dspp_buf[IGC][ctx->idx],
-			REG_DMA_WRITE, DMA_CTL_QUEUE0, WRITE_IMMEDIATE);
-	rc = dma_ops->kick_off(&kick_off);
-	if (rc)
-		DRM_ERROR("failed to kick off ret %d\n", rc);
-}
-
-void reg_dmav1_setup_dspp_igcv31(struct dpu_hw_dspp *ctx, void *cfg)
-{
-	struct drm_msm_igc_lut *lut_cfg;
-	struct dpu_hw_reg_dma_ops *dma_ops;
-	struct dpu_reg_dma_kickoff_cfg kick_off;
-	struct dpu_hw_cp_cfg *hw_cfg = cfg;
-	struct dpu_reg_dma_setup_ops_cfg dma_write_cfg;
-	int rc, i = 0, j = 0;
-	u32 *addr = NULL;
-	u32 offset = 0;
-	u32 reg;
-
-	rc = reg_dma_dspp_check(ctx, cfg, IGC);
-	if (rc)
-		return;
-
-	if (!hw_cfg->payload) {
-		DRM_DEBUG_DRIVER("disable igc feature\n");
-		_dspp_igcv31_off(ctx, cfg);
-		return;
-	}
-
-	if (hw_cfg->len != sizeof(struct drm_msm_igc_lut)) {
-		DRM_ERROR("invalid size of payload len %d exp %zd\n",
-				hw_cfg->len, sizeof(struct drm_msm_igc_lut));
-		return;
-	}
-
-	lut_cfg = hw_cfg->payload;
-
-	dma_ops = dpu_reg_dma_get_ops();
-	dma_ops->reset_reg_dma_buf(dspp_buf[IGC][ctx->idx]);
-
-	REG_DMA_INIT_OPS(dma_write_cfg, DSPP_IGC, IGC, dspp_buf[IGC][ctx->idx]);
-
-	REG_DMA_SETUP_OPS(dma_write_cfg, 0, NULL, 0, HW_BLK_SELECT, 0, 0);
-	rc = dma_ops->setup_payload(&dma_write_cfg);
-	if (rc) {
-		DRM_ERROR("write decode select failed ret %d\n", rc);
-		return;
-	}
-
-	for (i = 0; i < IGC_TBL_NUM; i++) {
-		addr = lut_cfg->c0 + (i * ARRAY_SIZE(lut_cfg->c0));
-		offset = IGC_C0_OFF + (i * sizeof(u32));
-
-		for (j = 0; j < IGC_TBL_LEN; j++) {
-			addr[j] &= IGC_DATA_MASK;
-			addr[j] |= IGC_DSPP_SEL_MASK(ctx->idx - 1);
-			if (j == 0)
-				addr[j] |= IGC_INDEX_UPDATE;
-		}
-
-		REG_DMA_SETUP_OPS(dma_write_cfg, offset, addr,
-			IGC_TBL_LEN * sizeof(u32),
-			REG_BLK_WRITE_INC, 0, 0);
-		rc = dma_ops->setup_payload(&dma_write_cfg);
-		if (rc) {
-			DRM_ERROR("lut write failed ret %d\n", rc);
-			return;
-		}
-	}
-
-	REG_DMA_INIT_OPS(dma_write_cfg, dspp_mapping[ctx->idx], IGC,
-		dspp_buf[IGC][ctx->idx]);
-
-	REG_DMA_SETUP_OPS(dma_write_cfg, 0, NULL, 0, HW_BLK_SELECT, 0, 0);
-	rc = dma_ops->setup_payload(&dma_write_cfg);
-	if (rc) {
-		DRM_ERROR("write decode select failed ret %d\n", rc);
-		return;
-	}
-
-	if (lut_cfg->flags & IGC_DITHER_ENABLE) {
-		reg = lut_cfg->strength & IGC_DITHER_DATA_MASK;
-		REG_DMA_SETUP_OPS(dma_write_cfg,
-			ctx->cap->sblk->igc.base + IGC_DITHER_OFF,
-			&reg, sizeof(reg), REG_SINGLE_WRITE, 0, 0);
-		rc = dma_ops->setup_payload(&dma_write_cfg);
-		if (rc) {
-			DRM_ERROR("dither strength failed ret %d\n", rc);
-			return;
-		}
-	}
-
-	reg = IGC_EN;
-	REG_DMA_SETUP_OPS(dma_write_cfg,
-		ctx->cap->sblk->igc.base + IGC_OPMODE_OFF,
-		&reg, sizeof(reg), REG_SINGLE_WRITE, 0, 0);
-	rc = dma_ops->setup_payload(&dma_write_cfg);
-	if (rc) {
-		DRM_ERROR("setting opcode failed ret %d\n", rc);
-		return;
-	}
-
-	REG_DMA_SETUP_KICKOFF(kick_off, hw_cfg->ctl, dspp_buf[IGC][ctx->idx],
-			REG_DMA_WRITE, DMA_CTL_QUEUE0, WRITE_IMMEDIATE);
-	rc = dma_ops->kick_off(&kick_off);
-	if (rc)
-		DRM_ERROR("failed to kick off ret %d\n", rc);
-}
-
-static void _dspp_pccv4_off(struct dpu_hw_dspp *ctx, void *cfg)
-{
-	struct dpu_reg_dma_kickoff_cfg kick_off;
-	struct dpu_hw_cp_cfg *hw_cfg = cfg;
-	struct dpu_hw_reg_dma_ops *dma_ops;
-	struct dpu_reg_dma_setup_ops_cfg dma_write_cfg;
-	int rc;
-	u32 reg;
-
-	dma_ops = dpu_reg_dma_get_ops();
-	dma_ops->reset_reg_dma_buf(dspp_buf[PCC][ctx->idx]);
-
-	REG_DMA_INIT_OPS(dma_write_cfg, dspp_mapping[ctx->idx], PCC,
-		dspp_buf[PCC][ctx->idx]);
-
-	REG_DMA_SETUP_OPS(dma_write_cfg, 0, NULL, 0, HW_BLK_SELECT, 0, 0);
-	rc = dma_ops->setup_payload(&dma_write_cfg);
-	if (rc) {
-		DRM_ERROR("write decode select failed ret %d\n", rc);
-		return;
-	}
-
-	reg = PCC_DIS;
-	REG_DMA_SETUP_OPS(dma_write_cfg,
-		ctx->cap->sblk->pcc.base,
-		&reg, sizeof(reg), REG_SINGLE_WRITE, 0, 0);
-	rc = dma_ops->setup_payload(&dma_write_cfg);
-	if (rc) {
-		DRM_ERROR("setting opcode failed ret %d\n", rc);
-		return;
-	}
-
-	REG_DMA_SETUP_KICKOFF(kick_off, hw_cfg->ctl, dspp_buf[PCC][ctx->idx],
-			REG_DMA_WRITE, DMA_CTL_QUEUE0, WRITE_IMMEDIATE);
-	rc = dma_ops->kick_off(&kick_off);
-	if (rc)
-		DRM_ERROR("failed to kick off ret %d\n", rc);
-}
-
-void reg_dmav1_setup_dspp_pccv4(struct dpu_hw_dspp *ctx, void *cfg)
-{
-	struct dpu_hw_reg_dma_ops *dma_ops;
-	struct dpu_reg_dma_kickoff_cfg kick_off;
-	struct dpu_hw_cp_cfg *hw_cfg = cfg;
-	struct dpu_reg_dma_setup_ops_cfg dma_write_cfg;
-	struct drm_msm_pcc *pcc_cfg;
-	struct drm_msm_pcc_coeff *coeffs = NULL;
-	u32 *data = NULL;
-	int rc, i = 0;
-	u32 reg = 0;
-
-	rc = reg_dma_dspp_check(ctx, cfg, PCC);
-	if (rc)
-		return;
-
-	if (!hw_cfg->payload) {
-		DRM_DEBUG_DRIVER("disable pcc feature\n");
-		_dspp_pccv4_off(ctx, cfg);
-		return;
-	}
-
-	if (hw_cfg->len != sizeof(struct drm_msm_pcc)) {
-		DRM_ERROR("invalid size of payload len %d exp %zd\n",
-				hw_cfg->len, sizeof(struct drm_msm_pcc));
-		return;
-	}
-
-	pcc_cfg = hw_cfg->payload;
-
-	dma_ops = dpu_reg_dma_get_ops();
-	dma_ops->reset_reg_dma_buf(dspp_buf[PCC][ctx->idx]);
-
-	REG_DMA_INIT_OPS(dma_write_cfg, dspp_mapping[ctx->idx],
-		PCC, dspp_buf[PCC][ctx->idx]);
-
-	REG_DMA_SETUP_OPS(dma_write_cfg, 0, NULL, 0, HW_BLK_SELECT, 0, 0);
-	rc = dma_ops->setup_payload(&dma_write_cfg);
-	if (rc) {
-		DRM_ERROR("write decode select failed ret %d\n", rc);
-		return;
-	}
-
-	data = kzalloc(PCC_LEN, GFP_KERNEL);
-	if (!data)
-		return;
-
-	for (i = 0; i < PCC_NUM_PLANES; i++) {
-		switch (i) {
-		case 0:
-			coeffs = &pcc_cfg->r;
-			data[i + 24] = pcc_cfg->r_rr;
-			data[i + 27] = pcc_cfg->r_gg;
-			data[i + 30] = pcc_cfg->r_bb;
-			break;
-		case 1:
-			coeffs = &pcc_cfg->g;
-			data[i + 24] = pcc_cfg->g_rr;
-			data[i + 27] = pcc_cfg->g_gg;
-			data[i + 30] = pcc_cfg->g_bb;
-			break;
-		case 2:
-			coeffs = &pcc_cfg->b;
-			data[i + 24] = pcc_cfg->b_rr;
-			data[i + 27] = pcc_cfg->b_gg;
-			data[i + 30] = pcc_cfg->b_bb;
-			break;
-		default:
-			DRM_ERROR("invalid pcc plane: %d\n", i);
-			goto exit;
-		}
-
-		data[i] = coeffs->c;
-		data[i + 3] = coeffs->r;
-		data[i + 6] = coeffs->g;
-		data[i + 9] = coeffs->b;
-		data[i + 12] = coeffs->rg;
-		data[i + 15] = coeffs->rb;
-		data[i + 18] = coeffs->gb;
-		data[i + 21] = coeffs->rgb;
-	}
-
-	REG_DMA_SETUP_OPS(dma_write_cfg,
-		ctx->cap->sblk->pcc.base + PCC_C_OFF,
-		data, PCC_LEN,
-		REG_BLK_WRITE_SINGLE, 0, 0);
-	rc = dma_ops->setup_payload(&dma_write_cfg);
-	if (rc) {
-		DRM_ERROR("write pcc lut failed ret %d\n", rc);
-		goto exit;
-	}
-
-	reg = PCC_EN;
-	REG_DMA_SETUP_OPS(dma_write_cfg,
-		ctx->cap->sblk->pcc.base,
-		&reg, sizeof(reg), REG_SINGLE_WRITE, 0, 0);
-	rc = dma_ops->setup_payload(&dma_write_cfg);
-	if (rc) {
-		DRM_ERROR("setting opcode failed ret %d\n", rc);
-		goto exit;
-	}
-
-	REG_DMA_SETUP_KICKOFF(kick_off, hw_cfg->ctl, dspp_buf[PCC][ctx->idx],
-			REG_DMA_WRITE, DMA_CTL_QUEUE0, WRITE_IMMEDIATE);
-	rc = dma_ops->kick_off(&kick_off);
-	if (rc)
-		DRM_ERROR("failed to kick off ret %d\n", rc);
-
-exit:
-	kfree(data);
-}
-
-int reg_dmav1_deinit_dspp_ops(enum dpu_dspp idx)
-{
-	int i;
-	struct dpu_hw_reg_dma_ops *dma_ops;
-
-	dma_ops = dpu_reg_dma_get_ops();
-	if (IS_ERR_OR_NULL(dma_ops))
-		return -ENOTSUPP;
-
-	if (idx >= DSPP_MAX) {
-		DRM_ERROR("invalid dspp idx %x max %xd\n", idx, DSPP_MAX);
-		return -EINVAL;
-	}
-
-	for (i = 0; i < REG_DMA_FEATURES_MAX; i++) {
-		if (!dspp_buf[i][idx])
-			continue;
-		dma_ops->dealloc_reg_dma(dspp_buf[i][idx]);
-		dspp_buf[i][idx] = NULL;
-	}
-	return 0;
-}
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_reg_dma_v1_color_proc.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_reg_dma_v1_color_proc.h
deleted file mode 100644
index 5c33399..0000000
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_reg_dma_v1_color_proc.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/* Copyright (c) 2017-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.
- */
-#ifndef _DPU_HW_REG_DMA_V1_COLOR_PROC_H
-#define _DPU_HW_REG_DMA_V1_COLOR_PROC_H
-
-#include "dpu_hw_util.h"
-#include "dpu_hw_catalog.h"
-#include "dpu_hw_dspp.h"
-
-/**
- * reg_dmav1_init_dspp_op_v4() - initialize the dspp feature op for dpu v4
- *                               using reg dma v1.
- * @feature: dspp feature
- * idx: dspp idx
- */
-int reg_dmav1_init_dspp_op_v4(int feature, enum dpu_dspp idx);
-
-/**
- * reg_dma_init_sspp_op_v4() - initialize the sspp feature op for dpu v4
- * @feature: sspp feature
- * @idx: sspp idx
- */
-int reg_dmav1_init_sspp_op_v4(int feature, enum dpu_sspp idx);
-
-/**
- * reg_dmav1_setup_dspp_vlutv18() - vlut v18 implementation using reg dma v1.
- * @ctx: dspp ctx info
- * @cfg: pointer to struct dpu_hw_cp_cfg
- */
-void reg_dmav1_setup_dspp_vlutv18(struct dpu_hw_dspp *ctx, void *cfg);
-
-/**
- * reg_dmav1_setup_3d_gamutv4() - gamut v4 implementation using reg dma v1.
- * @ctx: dspp ctx info
- * @cfg: pointer to struct dpu_hw_cp_cfg
- */
-void reg_dmav1_setup_dspp_3d_gamutv4(struct dpu_hw_dspp *ctx, void *cfg);
-
-/**
- * reg_dmav1_setup_dspp_gcv18() - gc v18 implementation using reg dma v1.
- * @ctx: dspp ctx info
- * @cfg: pointer to struct dpu_hw_cp_cfg
- */
-void reg_dmav1_setup_dspp_gcv18(struct dpu_hw_dspp *ctx, void *cfg);
-
-/**
- * reg_dmav1_setup_dspp_igcv31() - igc v31 implementation using reg dma v1.
- * @ctx: dspp ctx info
- * @cfg: pointer to struct dpu_hw_cp_cfg
- */
-void reg_dmav1_setup_dspp_igcv31(struct dpu_hw_dspp *ctx, void *cfg);
-
-/**
- * reg_dmav1_setup_dspp_pccv4() - pcc v4 implementation using reg dma v1.
- * @ctx: dspp ctx info
- * @cfg: pointer to struct dpu_hw_cp_cfg
- */
-void reg_dmav1_setup_dspp_pccv4(struct dpu_hw_dspp *ctx, void *cfg);
-
-/**
- * reg_dmav1_deinit_dspp_ops() - deinitialize the dspp feature op for dpu v4
- *                               which were initialized.
- * @idx: dspp idx
- */
-int reg_dmav1_deinit_dspp_ops(enum dpu_dspp idx);
-#endif /* _DPU_HW_REG_DMA_V1_COLOR_PROC_H */
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c
index 10bdce3..6640906 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c
@@ -14,7 +14,6 @@
 #include "dpu_hw_catalog.h"
 #include "dpu_hw_lm.h"
 #include "dpu_hw_sspp.h"
-#include "dpu_hw_color_processing.h"
 #include "dpu_dbg.h"
 #include "dpu_kms.h"
 
@@ -165,15 +164,6 @@ static inline int _sspp_subblk_offset(struct dpu_hw_pipe *ctx,
 	case DPU_SSPP_CSC_10BIT:
 		*idx = sblk->csc_blk.base;
 		break;
-	case DPU_SSPP_HSIC:
-		*idx = sblk->hsic_blk.base;
-		break;
-	case DPU_SSPP_PCC:
-		*idx = sblk->pcc_blk.base;
-		break;
-	case DPU_SSPP_MEMCOLOR:
-		*idx = sblk->memcolor_blk.base;
-		break;
 	default:
 		rc = -EINVAL;
 	}
@@ -413,64 +403,6 @@ static void dpu_hw_sspp_setup_pe_config(struct dpu_hw_pipe *ctx,
 			tot_req_pixels[3]);
 }
 
-static void _dpu_hw_sspp_setup_scaler(struct dpu_hw_pipe *ctx,
-		struct dpu_hw_pipe_cfg *sspp,
-		struct dpu_hw_pixel_ext *pe,
-		void *scaler_cfg)
-{
-	struct dpu_hw_blk_reg_map *c;
-	int config_h = 0x0;
-	int config_v = 0x0;
-	u32 idx;
-
-	(void)sspp;
-	(void)scaler_cfg;
-	if (_sspp_subblk_offset(ctx, DPU_SSPP_SCALER_QSEED2, &idx) || !pe)
-		return;
-
-	c = &ctx->hw;
-
-	/* enable scaler(s) if valid filter set */
-	if (pe->horz_filter[DPU_SSPP_COMP_0] < DPU_SCALE_FILTER_MAX)
-		config_h |= pe->horz_filter[DPU_SSPP_COMP_0] << 8;
-	if (pe->horz_filter[DPU_SSPP_COMP_1_2] < DPU_SCALE_FILTER_MAX)
-		config_h |= pe->horz_filter[DPU_SSPP_COMP_1_2] << 12;
-	if (pe->horz_filter[DPU_SSPP_COMP_3] < DPU_SCALE_FILTER_MAX)
-		config_h |= pe->horz_filter[DPU_SSPP_COMP_3] << 16;
-
-	if (config_h)
-		config_h |= BIT(0);
-
-	if (pe->vert_filter[DPU_SSPP_COMP_0] < DPU_SCALE_FILTER_MAX)
-		config_v |= pe->vert_filter[DPU_SSPP_COMP_0] << 10;
-	if (pe->vert_filter[DPU_SSPP_COMP_1_2] < DPU_SCALE_FILTER_MAX)
-		config_v |= pe->vert_filter[DPU_SSPP_COMP_1_2] << 14;
-	if (pe->vert_filter[DPU_SSPP_COMP_3] < DPU_SCALE_FILTER_MAX)
-		config_v |= pe->vert_filter[DPU_SSPP_COMP_3] << 18;
-
-	if (config_v)
-		config_v |= BIT(1);
-
-	DPU_REG_WRITE(c, SCALE_CONFIG + idx,  config_h | config_v);
-	DPU_REG_WRITE(c, COMP0_3_INIT_PHASE_X + idx,
-		pe->init_phase_x[DPU_SSPP_COMP_0]);
-	DPU_REG_WRITE(c, COMP0_3_INIT_PHASE_Y + idx,
-		pe->init_phase_y[DPU_SSPP_COMP_0]);
-	DPU_REG_WRITE(c, COMP0_3_PHASE_STEP_X + idx,
-		pe->phase_step_x[DPU_SSPP_COMP_0]);
-	DPU_REG_WRITE(c, COMP0_3_PHASE_STEP_Y + idx,
-		pe->phase_step_y[DPU_SSPP_COMP_0]);
-
-	DPU_REG_WRITE(c, COMP1_2_INIT_PHASE_X + idx,
-		pe->init_phase_x[DPU_SSPP_COMP_1_2]);
-	DPU_REG_WRITE(c, COMP1_2_INIT_PHASE_Y + idx,
-		pe->init_phase_y[DPU_SSPP_COMP_1_2]);
-	DPU_REG_WRITE(c, COMP1_2_PHASE_STEP_X + idx,
-		pe->phase_step_x[DPU_SSPP_COMP_1_2]);
-	DPU_REG_WRITE(c, COMP1_2_PHASE_STEP_Y + idx,
-		pe->phase_step_y[DPU_SSPP_COMP_1_2]);
-}
-
 static void _dpu_hw_sspp_setup_scaler3(struct dpu_hw_pipe *ctx,
 		struct dpu_hw_pipe_cfg *sspp,
 		struct dpu_hw_pixel_ext *pe,
@@ -509,7 +441,6 @@ static void dpu_hw_sspp_setup_rects(struct dpu_hw_pipe *ctx,
 	struct dpu_hw_blk_reg_map *c;
 	u32 src_size, src_xy, dst_size, dst_xy, ystride0, ystride1;
 	u32 src_size_off, src_xy_off, out_size_off, out_xy_off;
-	u32 decimation = 0;
 	u32 idx;
 
 	if (_sspp_subblk_offset(ctx, DPU_SSPP_SRC, &idx) || !cfg)
@@ -560,13 +491,6 @@ static void dpu_hw_sspp_setup_rects(struct dpu_hw_pipe *ctx,
 		}
 	}
 
-	/* program scaler, phase registers, if pipes supporting scaling */
-	if (ctx->cap->features & DPU_SSPP_SCALER) {
-		/* program decimation */
-		decimation = ((1 << cfg->horz_decimation) - 1) << 8;
-		decimation |= ((1 << cfg->vert_decimation) - 1);
-	}
-
 	/* rectangle register programming */
 	DPU_REG_WRITE(c, src_size_off + idx, src_size);
 	DPU_REG_WRITE(c, src_xy_off + idx, src_xy);
@@ -575,52 +499,6 @@ static void dpu_hw_sspp_setup_rects(struct dpu_hw_pipe *ctx,
 
 	DPU_REG_WRITE(c, SSPP_SRC_YSTRIDE0 + idx, ystride0);
 	DPU_REG_WRITE(c, SSPP_SRC_YSTRIDE1 + idx, ystride1);
-	DPU_REG_WRITE(c, SSPP_DECIMATION_CONFIG + idx, decimation);
-}
-
-/**
- * _dpu_hw_sspp_setup_excl_rect() - set exclusion rect configs
- * @ctx: Pointer to pipe context
- * @excl_rect: Exclusion rect configs
- */
-static void _dpu_hw_sspp_setup_excl_rect(struct dpu_hw_pipe *ctx,
-		struct dpu_rect *excl_rect,
-		enum dpu_sspp_multirect_index rect_index)
-{
-	struct dpu_hw_blk_reg_map *c;
-	u32 size, xy;
-	u32 idx;
-	u32 reg_xy, reg_size;
-	u32 excl_ctrl, enable_bit;
-
-	if (_sspp_subblk_offset(ctx, DPU_SSPP_SRC, &idx) || !excl_rect)
-		return;
-
-	if (rect_index == DPU_SSPP_RECT_0 || rect_index == DPU_SSPP_RECT_SOLO) {
-		reg_xy = SSPP_EXCL_REC_XY;
-		reg_size = SSPP_EXCL_REC_SIZE;
-		enable_bit = BIT(0);
-	} else {
-		reg_xy = SSPP_EXCL_REC_XY_REC1;
-		reg_size = SSPP_EXCL_REC_SIZE_REC1;
-		enable_bit = BIT(1);
-	}
-
-	c = &ctx->hw;
-
-	xy = (excl_rect->y << 16) | (excl_rect->x);
-	size = (excl_rect->h << 16) | (excl_rect->w);
-
-	excl_ctrl = DPU_REG_READ(c, SSPP_EXCL_REC_CTL + idx);
-	if (!size) {
-		DPU_REG_WRITE(c, SSPP_EXCL_REC_CTL + idx,
-				excl_ctrl & ~enable_bit);
-	} else {
-		DPU_REG_WRITE(c, SSPP_EXCL_REC_CTL + idx,
-				excl_ctrl | enable_bit);
-		DPU_REG_WRITE(c, reg_size + idx, size);
-		DPU_REG_WRITE(c, reg_xy + idx, xy);
-	}
 }
 
 static void dpu_hw_sspp_setup_sourceaddress(struct dpu_hw_pipe *ctx,
@@ -667,24 +545,6 @@ static void dpu_hw_sspp_setup_csc(struct dpu_hw_pipe *ctx,
 	dpu_hw_csc_setup(&ctx->hw, idx, data, csc10);
 }
 
-static void dpu_hw_sspp_setup_sharpening(struct dpu_hw_pipe *ctx,
-		struct dpu_hw_sharp_cfg *cfg)
-{
-	struct dpu_hw_blk_reg_map *c;
-	u32 idx;
-
-	if (_sspp_subblk_offset(ctx, DPU_SSPP_SCALER_QSEED2, &idx) || !cfg ||
-			!test_bit(DPU_SSPP_SCALER_QSEED2, &ctx->cap->features))
-		return;
-
-	c = &ctx->hw;
-
-	DPU_REG_WRITE(c, VIG_0_QSEED2_SHARP + idx, cfg->strength);
-	DPU_REG_WRITE(c, VIG_0_QSEED2_SHARP + idx + 0x4, cfg->edge_thr);
-	DPU_REG_WRITE(c, VIG_0_QSEED2_SHARP + idx + 0x8, cfg->smooth_thr);
-	DPU_REG_WRITE(c, VIG_0_QSEED2_SHARP + idx + 0xC, cfg->noise_thr);
-}
-
 static void dpu_hw_sspp_setup_solidfill(struct dpu_hw_pipe *ctx, u32 color, enum
 		dpu_sspp_multirect_index rect_index)
 {
@@ -754,56 +614,6 @@ static void dpu_hw_sspp_setup_qos_ctrl(struct dpu_hw_pipe *ctx,
 	DPU_REG_WRITE(&ctx->hw, SSPP_QOS_CTRL + idx, qos_ctrl);
 }
 
-static void dpu_hw_sspp_setup_ts_prefill(struct dpu_hw_pipe *ctx,
-		struct dpu_hw_pipe_ts_cfg *cfg,
-		enum dpu_sspp_multirect_index index)
-{
-	u32 idx;
-	u32 ts_offset, ts_prefill_offset;
-	u32 ts_count = 0, ts_bytes = 0;
-	const struct dpu_sspp_cfg *cap;
-
-	if (!ctx || !cfg || !ctx->cap)
-		return;
-
-	if (_sspp_subblk_offset(ctx, DPU_SSPP_SRC, &idx))
-		return;
-
-	cap = ctx->cap;
-
-	if (index == DPU_SSPP_RECT_0 &&
-			test_bit(DPU_SSPP_TS_PREFILL, &cap->features)) {
-		ts_offset = SSPP_TRAFFIC_SHAPER;
-		ts_prefill_offset = SSPP_TRAFFIC_SHAPER_PREFILL;
-	} else if (index == DPU_SSPP_RECT_1 &&
-			test_bit(DPU_SSPP_TS_PREFILL_REC1, &cap->features)) {
-		ts_offset = SSPP_TRAFFIC_SHAPER_REC1;
-		ts_prefill_offset = SSPP_TRAFFIC_SHAPER_REC1_PREFILL;
-	} else {
-		return;
-	}
-
-	if (cfg->time) {
-		/* this does mult_frac in a 64-bit safe manner */
-		u64 rate = TS_CLK * 1000000ULL;
-		u32 rem;
-		u64 quot = div_u64_rem(rate, cfg->time, &rem);
-		ts_bytes = (quot * cfg->size) +
-			   div_u64(rem * cfg->size, cfg->time);
-
-		if (ts_bytes > SSPP_TRAFFIC_SHAPER_BPC_MAX)
-			ts_bytes = SSPP_TRAFFIC_SHAPER_BPC_MAX;
-	}
-
-	if (ts_bytes) {
-		ts_count = DIV_ROUND_UP_ULL(cfg->size, ts_bytes);
-		ts_bytes |= BIT(31) | BIT(27);
-	}
-
-	DPU_REG_WRITE(&ctx->hw, ts_offset, ts_bytes);
-	DPU_REG_WRITE(&ctx->hw, ts_prefill_offset, ts_count);
-}
-
 static void dpu_hw_sspp_setup_cdp(struct dpu_hw_pipe *ctx,
 		struct dpu_hw_pipe_cdp_cfg *cfg)
 {
@@ -839,9 +649,6 @@ static void _setup_layer_ops(struct dpu_hw_pipe *c,
 		c->ops.setup_pe = dpu_hw_sspp_setup_pe_config;
 	}
 
-	if (test_bit(DPU_SSPP_EXCL_RECT, &features))
-		c->ops.setup_excl_rect = _dpu_hw_sspp_setup_excl_rect;
-
 	if (test_bit(DPU_SSPP_QOS, &features)) {
 		c->ops.setup_danger_safe_lut =
 			dpu_hw_sspp_setup_danger_safe_lut;
@@ -849,18 +656,10 @@ static void _setup_layer_ops(struct dpu_hw_pipe *c,
 		c->ops.setup_qos_ctrl = dpu_hw_sspp_setup_qos_ctrl;
 	}
 
-	if (test_bit(DPU_SSPP_TS_PREFILL, &features))
-		c->ops.setup_ts_prefill = dpu_hw_sspp_setup_ts_prefill;
-
 	if (test_bit(DPU_SSPP_CSC, &features) ||
 		test_bit(DPU_SSPP_CSC_10BIT, &features))
 		c->ops.setup_csc = dpu_hw_sspp_setup_csc;
 
-	if (test_bit(DPU_SSPP_SCALER_QSEED2, &features)) {
-		c->ops.setup_sharpening = dpu_hw_sspp_setup_sharpening;
-		c->ops.setup_scaler = _dpu_hw_sspp_setup_scaler;
-	}
-
 	if (dpu_hw_sspp_multirect_enabled(c->cap))
 		c->ops.setup_multirect = dpu_hw_sspp_setup_multirect;
 
@@ -869,24 +668,6 @@ static void _setup_layer_ops(struct dpu_hw_pipe *c,
 		c->ops.get_scaler_ver = _dpu_hw_sspp_get_scaler3_ver;
 	}
 
-	if (test_bit(DPU_SSPP_HSIC, &features)) {
-		/* TODO: add version based assignment here as inline or macro */
-		if (c->cap->sblk->hsic_blk.version ==
-			(DPU_COLOR_PROCESS_VER(0x1, 0x7))) {
-			c->ops.setup_pa_hue = dpu_setup_pipe_pa_hue_v1_7;
-			c->ops.setup_pa_sat = dpu_setup_pipe_pa_sat_v1_7;
-			c->ops.setup_pa_val = dpu_setup_pipe_pa_val_v1_7;
-			c->ops.setup_pa_cont = dpu_setup_pipe_pa_cont_v1_7;
-		}
-	}
-
-	if (test_bit(DPU_SSPP_MEMCOLOR, &features)) {
-		if (c->cap->sblk->memcolor_blk.version ==
-			(DPU_COLOR_PROCESS_VER(0x1, 0x7)))
-			c->ops.setup_pa_memcolor =
-				dpu_setup_pipe_pa_memcol_v1_7;
-	}
-
 	if (test_bit(DPU_SSPP_CDP, &features))
 		c->ops.setup_cdp = dpu_hw_sspp_setup_cdp;
 }
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.h
index a32ecc6..0bb5ecb 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.h
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.h
@@ -18,7 +18,6 @@
 #include "dpu_hw_util.h"
 #include "dpu_hw_blk.h"
 #include "dpu_formats.h"
-#include "dpu_color_processing.h"
 
 struct dpu_hw_pipe;
 
@@ -160,12 +159,6 @@ struct dpu_hw_pixel_ext {
  * @src_rect:  src ROI, caller takes into account the different operations
  *             such as decimation, flip etc to program this field
  * @dest_rect: destination ROI.
- * @ horz_decimation : horizontal decimation factor( 0, 2, 4, 8, 16)
- * @ vert_decimation : vertical decimation factor( 0, 2, 4, 8, 16)
- *              2: Read 1 line/pixel drop 1 line/pixel
- *              4: Read 1 line/pixel drop 3  lines/pixels
- *              8: Read 1 line/pixel drop 7 lines/pixels
- *              16: Read 1 line/pixel drop 15 line/pixels
  * @index:     index of the rectangle of SSPP
  * @mode:      parallel or time multiplex multirect mode
  */
@@ -173,8 +166,6 @@ struct dpu_hw_pipe_cfg {
 	struct dpu_hw_fmt_layout layout;
 	struct dpu_rect src_rect;
 	struct dpu_rect dst_rect;
-	u8 horz_decimation;
-	u8 vert_decimation;
 	enum dpu_sspp_multirect_index index;
 	enum dpu_sspp_multirect_mode mode;
 };
@@ -269,16 +260,6 @@ struct dpu_hw_sspp_ops {
 			struct dpu_hw_pixel_ext *pe_ext);
 
 	/**
-	 * setup_excl_rect - setup pipe exclusion rectangle
-	 * @ctx: Pointer to pipe context
-	 * @excl_rect: Pointer to exclclusion rect structure
-	 * @index: rectangle index in multirect
-	 */
-	void (*setup_excl_rect)(struct dpu_hw_pipe *ctx,
-			struct dpu_rect *excl_rect,
-			enum dpu_sspp_multirect_index index);
-
-	/**
 	 * setup_sourceaddress - setup pipe source addresses
 	 * @ctx: Pointer to pipe context
 	 * @cfg: Pointer to pipe config structure
@@ -324,50 +305,6 @@ struct dpu_hw_sspp_ops {
 	void (*setup_sharpening)(struct dpu_hw_pipe *ctx,
 			struct dpu_hw_sharp_cfg *cfg);
 
-
-	/**
-	 * setup_pa_hue(): Setup source hue adjustment
-	 * @ctx: Pointer to pipe context
-	 * @cfg: Pointer to hue data
-	 */
-	void (*setup_pa_hue)(struct dpu_hw_pipe *ctx, void *cfg);
-
-	/**
-	 * setup_pa_sat(): Setup source saturation adjustment
-	 * @ctx: Pointer to pipe context
-	 * @cfg: Pointer to saturation data
-	 */
-	void (*setup_pa_sat)(struct dpu_hw_pipe *ctx, void *cfg);
-
-	/**
-	 * setup_pa_val(): Setup source value adjustment
-	 * @ctx: Pointer to pipe context
-	 * @cfg: Pointer to value data
-	 */
-	void (*setup_pa_val)(struct dpu_hw_pipe *ctx, void *cfg);
-
-	/**
-	 * setup_pa_cont(): Setup source contrast adjustment
-	 * @ctx: Pointer to pipe context
-	 * @cfg: Pointer contrast data
-	 */
-	void (*setup_pa_cont)(struct dpu_hw_pipe *ctx, void *cfg);
-
-	/**
-	 * setup_pa_memcolor - setup source color processing
-	 * @ctx: Pointer to pipe context
-	 * @type: Memcolor type (Skin, sky or foliage)
-	 * @cfg: Pointer to memory color config data
-	 */
-	void (*setup_pa_memcolor)(struct dpu_hw_pipe *ctx,
-			enum dpu_memcolor_type type, void *cfg);
-
-	/**
-	 * setup_igc - setup inverse gamma correction
-	 * @ctx: Pointer to pipe context
-	 */
-	void (*setup_igc)(struct dpu_hw_pipe *ctx);
-
 	/**
 	 * setup_danger_safe_lut - setup danger safe LUTs
 	 * @ctx: Pointer to pipe context
@@ -422,16 +359,6 @@ struct dpu_hw_sspp_ops {
 	u32 (*get_scaler_ver)(struct dpu_hw_pipe *ctx);
 
 	/**
-	 * setup_ts_prefill - setup prefill traffic shaper
-	 * @ctx: Pointer to pipe context
-	 * @cfg: Pointer to traffic shaper configuration
-	 * @index: rectangle index in multirect
-	 */
-	void (*setup_ts_prefill)(struct dpu_hw_pipe *ctx,
-			struct dpu_hw_pipe_ts_cfg *cfg,
-			enum dpu_sspp_multirect_index index);
-
-	/**
 	 * setup_cdp - setup client driven prefetch
 	 * @ctx: Pointer to pipe context
 	 * @cfg: Pointer to cdp configuration
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_util.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_util.c
index 019a8fa..1ba571e 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_util.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_util.c
@@ -11,7 +11,6 @@
  */
 #define pr_fmt(fmt)	"[drm:%s:%d] " fmt, __func__, __LINE__
 
-#include <uapi/drm/dpu_drm.h>
 #include "msm_drv.h"
 #include "dpu_kms.h"
 #include "dpu_hw_mdss.h"
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_util.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_util.h
index d92cafb..42f1b22 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_util.h
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_util.h
@@ -158,6 +158,162 @@ struct dpu_hw_scaler3_lut_cfg {
 	size_t sep_len;
 };
 
+/**
+ * struct dpu_drm_pix_ext_v1 - version 1 of pixel ext structure
+ * @num_ext_pxls_lr: Number of total horizontal pixels
+ * @num_ext_pxls_tb: Number of total vertical lines
+ * @left_ftch:       Number of extra pixels to overfetch from left
+ * @right_ftch:      Number of extra pixels to overfetch from right
+ * @top_ftch:        Number of extra lines to overfetch from top
+ * @btm_ftch:        Number of extra lines to overfetch from bottom
+ * @left_rpt:        Number of extra pixels to repeat from left
+ * @right_rpt:       Number of extra pixels to repeat from right
+ * @top_rpt:         Number of extra lines to repeat from top
+ * @btm_rpt:         Number of extra lines to repeat from bottom
+ */
+struct dpu_drm_pix_ext_v1 {
+	/*
+	 * Number of pixels ext in left, right, top and bottom direction
+	 * for all color components.
+	 */
+	int32_t num_ext_pxls_lr[DPU_MAX_PLANES];
+	int32_t num_ext_pxls_tb[DPU_MAX_PLANES];
+
+	/*
+	 * Number of pixels needs to be overfetched in left, right, top
+	 * and bottom directions from source image for scaling.
+	 */
+	int32_t left_ftch[DPU_MAX_PLANES];
+	int32_t right_ftch[DPU_MAX_PLANES];
+	int32_t top_ftch[DPU_MAX_PLANES];
+	int32_t btm_ftch[DPU_MAX_PLANES];
+	/*
+	 * Number of pixels needs to be repeated in left, right, top and
+	 * bottom directions for scaling.
+	 */
+	int32_t left_rpt[DPU_MAX_PLANES];
+	int32_t right_rpt[DPU_MAX_PLANES];
+	int32_t top_rpt[DPU_MAX_PLANES];
+	int32_t btm_rpt[DPU_MAX_PLANES];
+
+};
+
+/**
+ * struct dpu_drm_de_v1 - version 1 of detail enhancer structure
+ * @enable:         Enables/disables detail enhancer
+ * @sharpen_level1: Sharpening strength for noise
+ * @sharpen_level2: Sharpening strength for context
+ * @clip:           Clip coefficient
+ * @limit:          Detail enhancer limit factor
+ * @thr_quiet:      Quite zone threshold
+ * @thr_dieout:     Die-out zone threshold
+ * @thr_low:        Linear zone left threshold
+ * @thr_high:       Linear zone right threshold
+ * @prec_shift:     Detail enhancer precision
+ * @adjust_a:       Mapping curves A coefficients
+ * @adjust_b:       Mapping curves B coefficients
+ * @adjust_c:       Mapping curves C coefficients
+ */
+struct dpu_drm_de_v1 {
+	uint32_t enable;
+	int16_t sharpen_level1;
+	int16_t sharpen_level2;
+	uint16_t clip;
+	uint16_t limit;
+	uint16_t thr_quiet;
+	uint16_t thr_dieout;
+	uint16_t thr_low;
+	uint16_t thr_high;
+	uint16_t prec_shift;
+	int16_t adjust_a[DPU_MAX_DE_CURVES];
+	int16_t adjust_b[DPU_MAX_DE_CURVES];
+	int16_t adjust_c[DPU_MAX_DE_CURVES];
+};
+
+/**
+ * struct dpu_drm_scaler_v2 - version 2 of struct dpu_drm_scaler
+ * @enable:            Scaler enable
+ * @dir_en:            Detail enhancer enable
+ * @pe:                Pixel extension settings
+ * @horz_decimate:     Horizontal decimation factor
+ * @vert_decimate:     Vertical decimation factor
+ * @init_phase_x:      Initial scaler phase values for x
+ * @phase_step_x:      Phase step values for x
+ * @init_phase_y:      Initial scaler phase values for y
+ * @phase_step_y:      Phase step values for y
+ * @preload_x:         Horizontal preload value
+ * @preload_y:         Vertical preload value
+ * @src_width:         Source width
+ * @src_height:        Source height
+ * @dst_width:         Destination width
+ * @dst_height:        Destination height
+ * @y_rgb_filter_cfg:  Y/RGB plane filter configuration
+ * @uv_filter_cfg:     UV plane filter configuration
+ * @alpha_filter_cfg:  Alpha filter configuration
+ * @blend_cfg:         Selection of blend coefficients
+ * @lut_flag:          LUT configuration flags
+ * @dir_lut_idx:       2d 4x4 LUT index
+ * @y_rgb_cir_lut_idx: Y/RGB circular LUT index
+ * @uv_cir_lut_idx:    UV circular LUT index
+ * @y_rgb_sep_lut_idx: Y/RGB separable LUT index
+ * @uv_sep_lut_idx:    UV separable LUT index
+ * @de:                Detail enhancer settings
+ */
+struct dpu_drm_scaler_v2 {
+	/*
+	 * General definitions
+	 */
+	uint32_t enable;
+	uint32_t dir_en;
+
+	/*
+	 * Pix ext settings
+	 */
+	struct dpu_drm_pix_ext_v1 pe;
+
+	/*
+	 * Decimation settings
+	 */
+	uint32_t horz_decimate;
+	uint32_t vert_decimate;
+
+	/*
+	 * Phase settings
+	 */
+	int32_t init_phase_x[DPU_MAX_PLANES];
+	int32_t phase_step_x[DPU_MAX_PLANES];
+	int32_t init_phase_y[DPU_MAX_PLANES];
+	int32_t phase_step_y[DPU_MAX_PLANES];
+
+	uint32_t preload_x[DPU_MAX_PLANES];
+	uint32_t preload_y[DPU_MAX_PLANES];
+	uint32_t src_width[DPU_MAX_PLANES];
+	uint32_t src_height[DPU_MAX_PLANES];
+
+	uint32_t dst_width;
+	uint32_t dst_height;
+
+	uint32_t y_rgb_filter_cfg;
+	uint32_t uv_filter_cfg;
+	uint32_t alpha_filter_cfg;
+	uint32_t blend_cfg;
+
+	uint32_t lut_flag;
+	uint32_t dir_lut_idx;
+
+	/* for Y(RGB) and UV planes*/
+	uint32_t y_rgb_cir_lut_idx;
+	uint32_t uv_cir_lut_idx;
+	uint32_t y_rgb_sep_lut_idx;
+	uint32_t uv_sep_lut_idx;
+
+	/*
+	 * Detail enhancer settings
+	 */
+	struct dpu_drm_de_v1 de;
+};
+
+
 u32 *dpu_hw_util_get_log_mask_ptr(void);
 
 void dpu_reg_write(struct dpu_hw_blk_reg_map *c,
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
index 06adb38..e43e1dd 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
@@ -35,7 +35,6 @@
 #include "dpu_encoder.h"
 #include "dpu_plane.h"
 #include "dpu_crtc.h"
-#include "dpu_reg_dma.h"
 
 #define CREATE_TRACE_POINTS
 #include "dpu_trace.h"
@@ -1107,8 +1106,6 @@ static void _dpu_kms_hw_destroy(struct dpu_kms *dpu_kms,
 	if (dpu_kms->mmio)
 		msm_iounmap(pdev, dpu_kms->mmio);
 	dpu_kms->mmio = NULL;
-
-	dpu_reg_dma_deinit();
 }
 
 int dpu_kms_mmu_detach(struct dpu_kms *dpu_kms, bool secure_only)
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
index ba5230d..36e3c15 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
@@ -20,9 +20,6 @@
 
 #include <linux/debugfs.h>
 #include <linux/dma-buf.h>
-#include <uapi/drm/dpu_drm.h>
-#include <uapi/drm/msm_drm_pp.h>
-
 #include "msm_prop.h"
 #include "msm_drv.h"
 
@@ -34,7 +31,6 @@
 #include "dpu_crtc.h"
 #include "dpu_vbif.h"
 #include "dpu_plane.h"
-#include "dpu_color_processing.h"
 
 static bool suspend_blank = true;
 module_param(suspend_blank, bool, 0400);
@@ -93,8 +89,6 @@ enum dpu_plane_qos {
 /*
  * struct dpu_plane - local dpu plane structure
  * @aspace: address space pointer
- * @csc_cfg: Decoded user configuration for csc
- * @csc_usr_ptr: Points to csc_cfg if valid user config available
  * @csc_ptr: Points to dpu_csc_cfg structure to use for current
  * @mplane_list: List of multirect planes of the same pipe
  * @catalog: Points to dpu catalog structure
@@ -112,7 +106,6 @@ struct dpu_plane {
 
 	struct dpu_hw_pipe *pipe_hw;
 	struct dpu_hw_pipe_cfg pipe_cfg;
-	struct dpu_hw_sharp_cfg sharp_cfg;
 	struct dpu_hw_pipe_qos_cfg pipe_qos_cfg;
 	uint32_t color_fill;
 	bool is_error;
@@ -120,16 +113,11 @@ struct dpu_plane {
 	bool is_virtual;
 	struct list_head mplane_list;
 	struct dpu_mdss_cfg *catalog;
-	bool revalidate;
 
-	struct dpu_csc_cfg csc_cfg;
-	struct dpu_csc_cfg *csc_usr_ptr;
 	struct dpu_csc_cfg *csc_ptr;
 
 	const struct dpu_sspp_sub_blks *pipe_sblk;
-
 	char pipe_name[DPU_NAME_SIZE];
-
 	struct msm_property_info property_info;
 	struct msm_property_data property_data[PLANE_PROP_COUNT];
 	struct drm_property_blob *blob_info;
@@ -442,17 +430,6 @@ static void _dpu_plane_set_qos_ctrl(struct drm_plane *plane,
 			&pdpu->pipe_qos_cfg);
 }
 
-void dpu_plane_set_revalidate(struct drm_plane *plane, bool enable)
-{
-	struct dpu_plane *pdpu;
-
-	if (!plane)
-		return;
-
-	pdpu = to_dpu_plane(plane);
-	pdpu->revalidate = enable;
-}
-
 int dpu_plane_danger_signal_ctrl(struct drm_plane *plane, bool enable)
 {
 	struct dpu_plane *pdpu;
@@ -578,55 +555,6 @@ static void _dpu_plane_set_qos_remap(struct drm_plane *plane)
 }
 
 /**
- * _dpu_plane_set_ts_prefill - set prefill with traffic shaper
- * @plane:	Pointer to drm plane
- * @pstate:	Pointer to dpu plane state
- */
-static void _dpu_plane_set_ts_prefill(struct drm_plane *plane,
-		struct dpu_plane_state *pstate)
-{
-	struct dpu_plane *pdpu;
-	struct dpu_hw_pipe_ts_cfg cfg;
-	struct msm_drm_private *priv;
-	struct dpu_kms *dpu_kms;
-
-	if (!plane || !plane->dev) {
-		DPU_ERROR("invalid arguments");
-		return;
-	}
-
-	priv = plane->dev->dev_private;
-	if (!priv || !priv->kms) {
-		DPU_ERROR("invalid KMS reference\n");
-		return;
-	}
-
-	dpu_kms = to_dpu_kms(priv->kms);
-	pdpu = to_dpu_plane(plane);
-	if (!pdpu->pipe_hw) {
-		DPU_ERROR("invalid pipe reference\n");
-		return;
-	}
-
-	if (!pdpu->pipe_hw || !pdpu->pipe_hw->ops.setup_ts_prefill)
-		return;
-
-	_dpu_plane_set_qos_ctrl(plane, false, DPU_PLANE_QOS_VBLANK_AMORTIZE);
-
-	memset(&cfg, 0, sizeof(cfg));
-	cfg.size = dpu_plane_get_property(pstate,
-			PLANE_PROP_PREFILL_SIZE);
-	cfg.time = dpu_plane_get_property(pstate,
-			PLANE_PROP_PREFILL_TIME);
-
-	DPU_DEBUG("plane%d size:%llu time:%llu\n",
-			plane->base.id, cfg.size, cfg.time);
-	DPU_EVT32_VERBOSE(DRMID(plane), cfg.size, cfg.time);
-	pdpu->pipe_hw->ops.setup_ts_prefill(pdpu->pipe_hw, &cfg,
-			pstate->multirect_index);
-}
-
-/**
  * _dpu_plane_get_aspace: gets the address space
  */
 static int _dpu_plane_get_aspace(
@@ -703,36 +631,6 @@ static inline void _dpu_plane_set_scanout(struct drm_plane *plane,
 	}
 }
 
-static int _dpu_plane_setup_scaler3_lut(struct dpu_plane *pdpu,
-		struct dpu_plane_state *pstate)
-{
-	struct dpu_hw_scaler3_cfg *cfg;
-	int ret = 0;
-
-	if (!pdpu || !pstate) {
-		DPU_ERROR("invalid args\n");
-		return -EINVAL;
-	}
-
-	cfg = &pstate->scaler3_cfg;
-
-	cfg->dir_lut = msm_property_get_blob(
-			&pdpu->property_info,
-			&pstate->property_state, &cfg->dir_len,
-			PLANE_PROP_SCALER_LUT_ED);
-	cfg->cir_lut = msm_property_get_blob(
-			&pdpu->property_info,
-			&pstate->property_state, &cfg->cir_len,
-			PLANE_PROP_SCALER_LUT_CIR);
-	cfg->sep_lut = msm_property_get_blob(
-			&pdpu->property_info,
-			&pstate->property_state, &cfg->sep_len,
-			PLANE_PROP_SCALER_LUT_SEP);
-	if (!cfg->dir_lut || !cfg->cir_lut || !cfg->sep_lut)
-		ret = -ENODATA;
-	return ret;
-}
-
 static void _dpu_plane_setup_scaler3(struct dpu_plane *pdpu,
 		struct dpu_plane_state *pstate,
 		uint32_t src_w, uint32_t src_h, uint32_t dst_w, uint32_t dst_h,
@@ -740,7 +638,7 @@ static void _dpu_plane_setup_scaler3(struct dpu_plane *pdpu,
 		const struct dpu_format *fmt,
 		uint32_t chroma_subsmpl_h, uint32_t chroma_subsmpl_v)
 {
-	uint32_t decimated, i;
+	uint32_t i;
 
 	if (!pdpu || !pstate || !scale_cfg || !fmt || !chroma_subsmpl_h ||
 			!chroma_subsmpl_v) {
@@ -754,14 +652,10 @@ static void _dpu_plane_setup_scaler3(struct dpu_plane *pdpu,
 	memset(scale_cfg, 0, sizeof(*scale_cfg));
 	memset(&pstate->pixel_ext, 0, sizeof(struct dpu_hw_pixel_ext));
 
-	decimated = DECIMATED_DIMENSION(src_w,
-			pdpu->pipe_cfg.horz_decimation);
 	scale_cfg->phase_step_x[DPU_SSPP_COMP_0] =
-		mult_frac((1 << PHASE_STEP_SHIFT), decimated, dst_w);
-	decimated = DECIMATED_DIMENSION(src_h,
-			pdpu->pipe_cfg.vert_decimation);
+		mult_frac((1 << PHASE_STEP_SHIFT), src_w, dst_w);
 	scale_cfg->phase_step_y[DPU_SSPP_COMP_0] =
-		mult_frac((1 << PHASE_STEP_SHIFT), decimated, dst_h);
+		mult_frac((1 << PHASE_STEP_SHIFT), src_h, dst_h);
 
 
 	scale_cfg->phase_step_y[DPU_SSPP_COMP_1_2] =
@@ -780,10 +674,8 @@ static void _dpu_plane_setup_scaler3(struct dpu_plane *pdpu,
 		scale_cfg->phase_step_y[DPU_SSPP_COMP_0];
 
 	for (i = 0; i < DPU_MAX_PLANES; i++) {
-		scale_cfg->src_width[i] = DECIMATED_DIMENSION(src_w,
-				pdpu->pipe_cfg.horz_decimation);
-		scale_cfg->src_height[i] = DECIMATED_DIMENSION(src_h,
-				pdpu->pipe_cfg.vert_decimation);
+		scale_cfg->src_width[i] = src_w;
+		scale_cfg->src_height[i] = src_h;
 		if (i == DPU_SSPP_COMP_1_2 || i == DPU_SSPP_COMP_2) {
 			scale_cfg->src_width[i] /= chroma_subsmpl_h;
 			scale_cfg->src_height[i] /= chroma_subsmpl_v;
@@ -809,154 +701,6 @@ static void _dpu_plane_setup_scaler3(struct dpu_plane *pdpu,
 	scale_cfg->enable = 1;
 }
 
-/**
- * _dpu_plane_setup_scaler2 - determine default scaler phase steps/filter type
- * @pdpu: Pointer to DPU plane object
- * @src: Source size
- * @dst: Destination size
- * @phase_steps: Pointer to output array for phase steps
- * @filter: Pointer to output array for filter type
- * @fmt: Pointer to format definition
- * @chroma_subsampling: Subsampling amount for chroma channel
- *
- * Returns: 0 on success
- */
-static int _dpu_plane_setup_scaler2(struct dpu_plane *pdpu,
-		uint32_t src, uint32_t dst, uint32_t *phase_steps,
-		enum dpu_hw_filter *filter, const struct dpu_format *fmt,
-		uint32_t chroma_subsampling)
-{
-	if (!pdpu || !phase_steps || !filter || !fmt) {
-		DPU_ERROR(
-			"invalid arg(s), plane %d phase %d filter %d fmt %d\n",
-			pdpu != 0, phase_steps != 0, filter != 0, fmt != 0);
-		return -EINVAL;
-	}
-
-	/* calculate phase steps, leave init phase as zero */
-	phase_steps[DPU_SSPP_COMP_0] =
-		mult_frac(1 << PHASE_STEP_SHIFT, src, dst);
-	phase_steps[DPU_SSPP_COMP_1_2] =
-		phase_steps[DPU_SSPP_COMP_0] / chroma_subsampling;
-	phase_steps[DPU_SSPP_COMP_2] = phase_steps[DPU_SSPP_COMP_1_2];
-	phase_steps[DPU_SSPP_COMP_3] = phase_steps[DPU_SSPP_COMP_0];
-
-	/* calculate scaler config, if necessary */
-	if (DPU_FORMAT_IS_YUV(fmt) || src != dst) {
-		filter[DPU_SSPP_COMP_3] =
-			(src <= dst) ? DPU_SCALE_FILTER_BIL :
-			DPU_SCALE_FILTER_PCMN;
-
-		if (DPU_FORMAT_IS_YUV(fmt)) {
-			filter[DPU_SSPP_COMP_0] = DPU_SCALE_FILTER_CA;
-			filter[DPU_SSPP_COMP_1_2] = filter[DPU_SSPP_COMP_3];
-		} else {
-			filter[DPU_SSPP_COMP_0] = filter[DPU_SSPP_COMP_3];
-			filter[DPU_SSPP_COMP_1_2] =
-				DPU_SCALE_FILTER_NEAREST;
-		}
-	} else {
-		/* disable scaler */
-		filter[DPU_SSPP_COMP_0] = DPU_SCALE_FILTER_MAX;
-		filter[DPU_SSPP_COMP_1_2] = DPU_SCALE_FILTER_MAX;
-		filter[DPU_SSPP_COMP_3] = DPU_SCALE_FILTER_MAX;
-	}
-	return 0;
-}
-
-/**
- * _dpu_plane_setup_pixel_ext - determine default pixel extension values
- * @pdpu: Pointer to DPU plane object
- * @src: Source size
- * @dst: Destination size
- * @decimated_src: Source size after decimation, if any
- * @phase_steps: Pointer to output array for phase steps
- * @out_src: Output array for pixel extension values
- * @out_edge1: Output array for pixel extension first edge
- * @out_edge2: Output array for pixel extension second edge
- * @filter: Pointer to array for filter type
- * @fmt: Pointer to format definition
- * @chroma_subsampling: Subsampling amount for chroma channel
- * @post_compare: Whether to chroma subsampled source size for comparisions
- */
-static void _dpu_plane_setup_pixel_ext(struct dpu_plane *pdpu,
-		uint32_t src, uint32_t dst, uint32_t decimated_src,
-		uint32_t *phase_steps, uint32_t *out_src, int *out_edge1,
-		int *out_edge2, enum dpu_hw_filter *filter,
-		const struct dpu_format *fmt, uint32_t chroma_subsampling,
-		bool post_compare)
-{
-	int64_t edge1, edge2, caf;
-	uint32_t src_work;
-	int i, tmp;
-
-	if (pdpu && phase_steps && out_src && out_edge1 &&
-			out_edge2 && filter && fmt) {
-		/* handle CAF for YUV formats */
-		if (DPU_FORMAT_IS_YUV(fmt) && *filter == DPU_SCALE_FILTER_CA)
-			caf = PHASE_STEP_UNIT_SCALE;
-		else
-			caf = 0;
-
-		for (i = 0; i < DPU_MAX_PLANES; i++) {
-			src_work = decimated_src;
-			if (i == DPU_SSPP_COMP_1_2 || i == DPU_SSPP_COMP_2)
-				src_work /= chroma_subsampling;
-			if (post_compare)
-				src = src_work;
-			if (!DPU_FORMAT_IS_YUV(fmt) && (src == dst)) {
-				/* unity */
-				edge1 = 0;
-				edge2 = 0;
-			} else if (dst >= src) {
-				/* upscale */
-				edge1 = (1 << PHASE_RESIDUAL);
-				edge1 -= caf;
-				edge2 = (1 << PHASE_RESIDUAL);
-				edge2 += (dst - 1) * *(phase_steps + i);
-				edge2 -= (src_work - 1) * PHASE_STEP_UNIT_SCALE;
-				edge2 += caf;
-				edge2 = -(edge2);
-			} else {
-				/* downscale */
-				edge1 = 0;
-				edge2 = (dst - 1) * *(phase_steps + i);
-				edge2 -= (src_work - 1) * PHASE_STEP_UNIT_SCALE;
-				edge2 += *(phase_steps + i);
-				edge2 = -(edge2);
-			}
-
-			/* only enable CAF for luma plane */
-			caf = 0;
-
-			/* populate output arrays */
-			*(out_src + i) = src_work;
-
-			/* edge updates taken from __pxl_extn_helper */
-			if (edge1 >= 0) {
-				tmp = (uint32_t)edge1;
-				tmp >>= PHASE_STEP_SHIFT;
-				*(out_edge1 + i) = -tmp;
-			} else {
-				tmp = (uint32_t)(-edge1);
-				*(out_edge1 + i) =
-					(tmp + PHASE_STEP_UNIT_SCALE - 1) >>
-					PHASE_STEP_SHIFT;
-			}
-			if (edge2 >= 0) {
-				tmp = (uint32_t)edge2;
-				tmp >>= PHASE_STEP_SHIFT;
-				*(out_edge2 + i) = -tmp;
-			} else {
-				tmp = (uint32_t)(-edge2);
-				*(out_edge2 + i) =
-					(tmp + PHASE_STEP_UNIT_SCALE - 1) >>
-					PHASE_STEP_SHIFT;
-			}
-		}
-	}
-}
-
 static inline void _dpu_plane_setup_csc(struct dpu_plane *pdpu)
 {
 	static const struct dpu_csc_cfg dpu_csc_YUV2RGB_601L = {
@@ -993,10 +737,7 @@ static inline void _dpu_plane_setup_csc(struct dpu_plane *pdpu)
 		return;
 	}
 
-	/* revert to kernel default if override not available */
-	if (pdpu->csc_usr_ptr)
-		pdpu->csc_ptr = pdpu->csc_usr_ptr;
-	else if (BIT(DPU_SSPP_CSC_10BIT) & pdpu->features)
+	if (BIT(DPU_SSPP_CSC_10BIT) & pdpu->features)
 		pdpu->csc_ptr = (struct dpu_csc_cfg *)&dpu_csc10_YUV2RGB_601L;
 	else
 		pdpu->csc_ptr = (struct dpu_csc_cfg *)&dpu_csc_YUV2RGB_601L;
@@ -1007,60 +748,6 @@ static inline void _dpu_plane_setup_csc(struct dpu_plane *pdpu)
 			pdpu->csc_ptr->csc_mv[2]);
 }
 
-static void dpu_color_process_plane_setup(struct drm_plane *plane)
-{
-	struct dpu_plane *pdpu;
-	struct dpu_plane_state *pstate;
-	uint32_t hue, saturation, value, contrast;
-	struct drm_msm_memcol *memcol = NULL;
-	size_t memcol_sz = 0;
-
-	pdpu = to_dpu_plane(plane);
-	pstate = to_dpu_plane_state(plane->state);
-
-	hue = (uint32_t) dpu_plane_get_property(pstate, PLANE_PROP_HUE_ADJUST);
-	if (pdpu->pipe_hw->ops.setup_pa_hue)
-		pdpu->pipe_hw->ops.setup_pa_hue(pdpu->pipe_hw, &hue);
-	saturation = (uint32_t) dpu_plane_get_property(pstate,
-		PLANE_PROP_SATURATION_ADJUST);
-	if (pdpu->pipe_hw->ops.setup_pa_sat)
-		pdpu->pipe_hw->ops.setup_pa_sat(pdpu->pipe_hw, &saturation);
-	value = (uint32_t) dpu_plane_get_property(pstate,
-		PLANE_PROP_VALUE_ADJUST);
-	if (pdpu->pipe_hw->ops.setup_pa_val)
-		pdpu->pipe_hw->ops.setup_pa_val(pdpu->pipe_hw, &value);
-	contrast = (uint32_t) dpu_plane_get_property(pstate,
-		PLANE_PROP_CONTRAST_ADJUST);
-	if (pdpu->pipe_hw->ops.setup_pa_cont)
-		pdpu->pipe_hw->ops.setup_pa_cont(pdpu->pipe_hw, &contrast);
-
-	if (pdpu->pipe_hw->ops.setup_pa_memcolor) {
-		/* Skin memory color setup */
-		memcol = msm_property_get_blob(&pdpu->property_info,
-					&pstate->property_state,
-					&memcol_sz,
-					PLANE_PROP_SKIN_COLOR);
-		pdpu->pipe_hw->ops.setup_pa_memcolor(pdpu->pipe_hw,
-					MEMCOLOR_SKIN, memcol);
-
-		/* Sky memory color setup */
-		memcol = msm_property_get_blob(&pdpu->property_info,
-					&pstate->property_state,
-					&memcol_sz,
-					PLANE_PROP_SKY_COLOR);
-		pdpu->pipe_hw->ops.setup_pa_memcolor(pdpu->pipe_hw,
-					MEMCOLOR_SKY, memcol);
-
-		/* Foliage memory color setup */
-		memcol = msm_property_get_blob(&pdpu->property_info,
-					&pstate->property_state,
-					&memcol_sz,
-					PLANE_PROP_FOLIAGE_COLOR);
-		pdpu->pipe_hw->ops.setup_pa_memcolor(pdpu->pipe_hw,
-					MEMCOLOR_FOLIAGE, memcol);
-	}
-}
-
 static void _dpu_plane_setup_scaler(struct dpu_plane *pdpu,
 		struct dpu_plane_state *pstate,
 		const struct dpu_format *fmt, bool color_fill)
@@ -1076,99 +763,20 @@ static void _dpu_plane_setup_scaler(struct dpu_plane *pdpu,
 
 	pe = &pstate->pixel_ext;
 
-	pdpu->pipe_cfg.horz_decimation =
-		dpu_plane_get_property(pstate, PLANE_PROP_H_DECIMATE);
-	pdpu->pipe_cfg.vert_decimation =
-		dpu_plane_get_property(pstate, PLANE_PROP_V_DECIMATE);
-
 	/* don't chroma subsample if decimating */
-	chroma_subsmpl_h = pdpu->pipe_cfg.horz_decimation ? 1 :
+	chroma_subsmpl_h =
 		drm_format_horz_chroma_subsampling(fmt->base.pixel_format);
-	chroma_subsmpl_v = pdpu->pipe_cfg.vert_decimation ? 1 :
+	chroma_subsmpl_v =
 		drm_format_vert_chroma_subsampling(fmt->base.pixel_format);
 
-	/* update scaler */
-	if (pdpu->features & BIT(DPU_SSPP_SCALER_QSEED3)) {
-		int rc;
-
-		if (!color_fill && !pdpu->debugfs_default_scale)
-			rc = _dpu_plane_setup_scaler3_lut(pdpu, pstate);
-		else
-			rc = -EINVAL;
-		if (rc || pstate->scaler_check_state !=
-			DPU_PLANE_SCLCHECK_SCALER_V2) {
-			/* calculate default config for QSEED3 */
-			_dpu_plane_setup_scaler3(pdpu, pstate,
-					pdpu->pipe_cfg.src_rect.w,
-					pdpu->pipe_cfg.src_rect.h,
-					pdpu->pipe_cfg.dst_rect.w,
-					pdpu->pipe_cfg.dst_rect.h,
-					&pstate->scaler3_cfg, fmt,
-					chroma_subsmpl_h, chroma_subsmpl_v);
-		}
-	} else if (pstate->scaler_check_state != DPU_PLANE_SCLCHECK_SCALER_V1 ||
-			color_fill || pdpu->debugfs_default_scale) {
-		uint32_t deci_dim, i;
-
-		/* calculate default configuration for QSEED2 */
-		memset(pe, 0, sizeof(struct dpu_hw_pixel_ext));
-
-		DPU_DEBUG_PLANE(pdpu, "default config\n");
-		deci_dim = DECIMATED_DIMENSION(pdpu->pipe_cfg.src_rect.w,
-				pdpu->pipe_cfg.horz_decimation);
-		_dpu_plane_setup_scaler2(pdpu,
-				deci_dim,
-				pdpu->pipe_cfg.dst_rect.w,
-				pe->phase_step_x,
-				pe->horz_filter, fmt, chroma_subsmpl_h);
-
-		if (DPU_FORMAT_IS_YUV(fmt))
-			deci_dim &= ~0x1;
-		_dpu_plane_setup_pixel_ext(pdpu, pdpu->pipe_cfg.src_rect.w,
-				pdpu->pipe_cfg.dst_rect.w, deci_dim,
-				pe->phase_step_x,
-				pe->roi_w,
-				pe->num_ext_pxls_left,
-				pe->num_ext_pxls_right, pe->horz_filter, fmt,
-				chroma_subsmpl_h, 0);
-
-		deci_dim = DECIMATED_DIMENSION(pdpu->pipe_cfg.src_rect.h,
-				pdpu->pipe_cfg.vert_decimation);
-		_dpu_plane_setup_scaler2(pdpu,
-				deci_dim,
-				pdpu->pipe_cfg.dst_rect.h,
-				pe->phase_step_y,
-				pe->vert_filter, fmt, chroma_subsmpl_v);
-		_dpu_plane_setup_pixel_ext(pdpu, pdpu->pipe_cfg.src_rect.h,
-				pdpu->pipe_cfg.dst_rect.h, deci_dim,
-				pe->phase_step_y,
-				pe->roi_h,
-				pe->num_ext_pxls_top,
-				pe->num_ext_pxls_btm, pe->vert_filter, fmt,
-				chroma_subsmpl_v, 1);
-
-		for (i = 0; i < DPU_MAX_PLANES; i++) {
-			if (pe->num_ext_pxls_left[i] >= 0)
-				pe->left_rpt[i] = pe->num_ext_pxls_left[i];
-			else
-				pe->left_ftch[i] = pe->num_ext_pxls_left[i];
-
-			if (pe->num_ext_pxls_right[i] >= 0)
-				pe->right_rpt[i] = pe->num_ext_pxls_right[i];
-			else
-				pe->right_ftch[i] = pe->num_ext_pxls_right[i];
-
-			if (pe->num_ext_pxls_top[i] >= 0)
-				pe->top_rpt[i] = pe->num_ext_pxls_top[i];
-			else
-				pe->top_ftch[i] = pe->num_ext_pxls_top[i];
-
-			if (pe->num_ext_pxls_btm[i] >= 0)
-				pe->btm_rpt[i] = pe->num_ext_pxls_btm[i];
-			else
-				pe->btm_ftch[i] = pe->num_ext_pxls_btm[i];
-		}
-	}
+	/* update scaler. calculate default config for QSEED3 */
+	_dpu_plane_setup_scaler3(pdpu, pstate,
+			pdpu->pipe_cfg.src_rect.w,
+			pdpu->pipe_cfg.src_rect.h,
+			pdpu->pipe_cfg.dst_rect.w,
+			pdpu->pipe_cfg.dst_rect.h,
+			&pstate->scaler3_cfg, fmt,
+			chroma_subsmpl_h, chroma_subsmpl_v);
 }
 
 /**
@@ -1465,189 +1073,6 @@ static void dpu_plane_cleanup_fb(struct drm_plane *plane,
 	msm_framebuffer_cleanup(old_state->fb, old_pstate->aspace);
 }
 
-static void _dpu_plane_sspp_atomic_check_mode_changed(struct dpu_plane *pdpu,
-		struct drm_plane_state *state,
-		struct drm_plane_state *old_state)
-{
-	struct dpu_plane_state *pstate = to_dpu_plane_state(state);
-	struct dpu_plane_state *old_pstate = to_dpu_plane_state(old_state);
-	struct drm_framebuffer *fb, *old_fb;
-
-	/* no need to check it again */
-	if (pstate->dirty == DPU_PLANE_DIRTY_ALL)
-		return;
-
-	if (!dpu_plane_enabled(state) || !dpu_plane_enabled(old_state)
-			|| pdpu->is_error) {
-		DPU_DEBUG_PLANE(pdpu,
-			"enabling/disabling full modeset required\n");
-		pstate->dirty |= DPU_PLANE_DIRTY_ALL;
-	} else if (to_dpu_plane_state(old_state)->pending) {
-		DPU_DEBUG_PLANE(pdpu, "still pending\n");
-		pstate->dirty |= DPU_PLANE_DIRTY_ALL;
-	} else if (pstate->multirect_index != old_pstate->multirect_index ||
-			pstate->multirect_mode != old_pstate->multirect_mode) {
-		DPU_DEBUG_PLANE(pdpu, "multirect config updated\n");
-		pstate->dirty |= DPU_PLANE_DIRTY_ALL;
-	} else if (state->crtc_w != old_state->crtc_w ||
-		   state->crtc_h != old_state->crtc_h ||
-		   state->crtc_x != old_state->crtc_x ||
-		   state->crtc_y != old_state->crtc_y) {
-		DPU_DEBUG_PLANE(pdpu, "crtc rect updated\n");
-		pstate->dirty |= DPU_PLANE_DIRTY_RECTS;
-	} else if (pstate->excl_rect.w != old_pstate->excl_rect.w ||
-		   pstate->excl_rect.h != old_pstate->excl_rect.h ||
-		   pstate->excl_rect.x != old_pstate->excl_rect.x ||
-		   pstate->excl_rect.y != old_pstate->excl_rect.y) {
-		DPU_DEBUG_PLANE(pdpu, "excl_rect updated\n");
-		pstate->dirty |= DPU_PLANE_DIRTY_RECTS;
-	}
-
-	fb = state->fb;
-	old_fb = old_state->fb;
-
-	if (!fb || !old_fb) {
-		DPU_DEBUG_PLANE(pdpu, "can't compare fb handles\n");
-	} else if (fb->format->format != old_fb->format->format) {
-		DPU_DEBUG_PLANE(pdpu, "format change\n");
-		pstate->dirty |= DPU_PLANE_DIRTY_FORMAT | DPU_PLANE_DIRTY_RECTS;
-	} else {
-		uint64_t new_mod = fb->modifier;
-		uint64_t old_mod = old_fb->modifier;
-		uint32_t *new_pitches = fb->pitches;
-		uint32_t *old_pitches = old_fb->pitches;
-		uint32_t *new_offset = fb->offsets;
-		uint32_t *old_offset = old_fb->offsets;
-		int i;
-
-		if (new_mod != old_mod) {
-			DPU_DEBUG_PLANE(pdpu,
-				"format modifiers change\"\
-				new_mode:%llu old_mode:%llu\n",
-				new_mod, old_mod);
-			pstate->dirty |= DPU_PLANE_DIRTY_FORMAT |
-				DPU_PLANE_DIRTY_RECTS;
-		}
-
-		for (i = 0; i < ARRAY_SIZE(fb->pitches); i++) {
-			if (new_pitches[i] != old_pitches[i]) {
-				DPU_DEBUG_PLANE(pdpu,
-					"pitches change plane:%d\"\
-					old_pitches:%u new_pitches:%u\n",
-					i, old_pitches[i], new_pitches[i]);
-				pstate->dirty |= DPU_PLANE_DIRTY_RECTS;
-				break;
-			}
-		}
-		for (i = 0; i < ARRAY_SIZE(fb->offsets); i++) {
-			if (new_offset[i] != old_offset[i]) {
-				DPU_DEBUG_PLANE(pdpu,
-					"offset change plane:%d\"\
-					old_offset:%u new_offset:%u\n",
-					i, old_offset[i], new_offset[i]);
-				pstate->dirty |= DPU_PLANE_DIRTY_FORMAT |
-					DPU_PLANE_DIRTY_RECTS;
-				break;
-			}
-		}
-	}
-}
-
-static int _dpu_plane_validate_scaler_v2(struct dpu_plane *pdpu,
-		struct dpu_plane_state *pstate,
-		const struct dpu_format *fmt,
-		uint32_t img_w, uint32_t img_h,
-		uint32_t src_w, uint32_t src_h,
-		uint32_t deci_w, uint32_t deci_h)
-{
-	int i;
-
-	if (!pdpu || !pstate || !fmt) {
-		DPU_ERROR_PLANE(pdpu, "invalid arguments\n");
-		return -EINVAL;
-	}
-
-	/* don't run checks unless scaler data was changed */
-	if (pstate->scaler_check_state != DPU_PLANE_SCLCHECK_SCALER_V2_CHECK)
-		return 0;
-
-	pstate->scaler_check_state = DPU_PLANE_SCLCHECK_INVALID;
-
-	for (i = 0; i < DPU_MAX_PLANES; i++) {
-		uint32_t hor_req_pixels, hor_fetch_pixels;
-		uint32_t vert_req_pixels, vert_fetch_pixels;
-		uint32_t src_w_tmp, src_h_tmp;
-
-		/* re-use color plane 1's config for plane 2 */
-		if (i == 2)
-			continue;
-
-		src_w_tmp = src_w;
-		src_h_tmp = src_h;
-
-		/*
-		 * For chroma plane, width is half for the following sub sampled
-		 * formats. Except in case of decimation, where hardware avoids
-		 * 1 line of decimation instead of downsampling.
-		 */
-		if (i == 1) {
-			if (!deci_w &&
-					(fmt->chroma_sample == DPU_CHROMA_420 ||
-					 fmt->chroma_sample == DPU_CHROMA_H2V1))
-				src_w_tmp >>= 1;
-			if (!deci_h &&
-					(fmt->chroma_sample == DPU_CHROMA_420 ||
-					 fmt->chroma_sample == DPU_CHROMA_H1V2))
-				src_h_tmp >>= 1;
-		}
-
-		hor_req_pixels = pstate->pixel_ext.roi_w[i];
-		vert_req_pixels = pstate->pixel_ext.roi_h[i];
-
-		hor_fetch_pixels = DECIMATED_DIMENSION(src_w_tmp +
-			(int8_t)(pstate->pixel_ext.left_ftch[i] & 0xFF) +
-			(int8_t)(pstate->pixel_ext.right_ftch[i] & 0xFF),
-			deci_w);
-		vert_fetch_pixels = DECIMATED_DIMENSION(src_h_tmp +
-			(int8_t)(pstate->pixel_ext.top_ftch[i] & 0xFF) +
-			(int8_t)(pstate->pixel_ext.btm_ftch[i] & 0xFF),
-			deci_h);
-
-		if ((hor_req_pixels != hor_fetch_pixels) ||
-			(hor_fetch_pixels > img_w) ||
-			(vert_req_pixels != vert_fetch_pixels) ||
-			(vert_fetch_pixels > img_h)) {
-			DPU_ERROR_PLANE(pdpu,
-					"req %d/%d, fetch %d/%d, src %dx%d\n",
-					hor_req_pixels, vert_req_pixels,
-					hor_fetch_pixels, vert_fetch_pixels,
-					img_w, img_h);
-			return -EINVAL;
-		}
-
-		/*
-		 * Alpha plane can only be scaled using bilinear or pixel
-		 * repeat/drop, src_width and src_height are only specified
-		 * for Y and UV plane
-		 */
-		if (i != 3 &&
-			(hor_req_pixels != pstate->scaler3_cfg.src_width[i] ||
-			vert_req_pixels != pstate->scaler3_cfg.src_height[i])) {
-			DPU_ERROR_PLANE(pdpu,
-				"roi[%d] %d/%d, scaler src %dx%d, src %dx%d\n",
-				i, pstate->pixel_ext.roi_w[i],
-				pstate->pixel_ext.roi_h[i],
-				pstate->scaler3_cfg.src_width[i],
-				pstate->scaler3_cfg.src_height[i],
-				src_w, src_h);
-			return -EINVAL;
-		}
-	}
-
-	pstate->scaler_check_state = DPU_PLANE_SCLCHECK_SCALER_V2;
-	return 0;
-}
-
 static int dpu_plane_sspp_atomic_check(struct drm_plane *plane,
 		struct drm_plane_state *state)
 {
@@ -1656,7 +1081,6 @@ static int dpu_plane_sspp_atomic_check(struct drm_plane *plane,
 	struct dpu_plane_state *pstate;
 	const struct dpu_format *fmt;
 	struct dpu_rect src, dst;
-	uint32_t deci_w, deci_h, src_deci_w, src_deci_h;
 	uint32_t max_upscale, max_downscale, min_src_size, max_linewidth;
 	bool q16_data = true;
 
@@ -1676,18 +1100,12 @@ static int dpu_plane_sspp_atomic_check(struct drm_plane *plane,
 		goto exit;
 	}
 
-	deci_w = dpu_plane_get_property(pstate, PLANE_PROP_H_DECIMATE);
-	deci_h = dpu_plane_get_property(pstate, PLANE_PROP_V_DECIMATE);
-
 	/* src values are in Q16 fixed point, convert to integer */
 	POPULATE_RECT(&src, state->src_x, state->src_y, state->src_w,
 		state->src_h, q16_data);
 	POPULATE_RECT(&dst, state->crtc_x, state->crtc_y, state->crtc_w,
 		state->crtc_h, !q16_data);
 
-	src_deci_w = DECIMATED_DIMENSION(src.w, deci_w);
-	src_deci_h = DECIMATED_DIMENSION(src.h, deci_h);
-
 	max_upscale = pdpu->pipe_sblk->maxupscale;
 	max_downscale = pdpu->pipe_sblk->maxdwnscale;
 	max_linewidth = pdpu->pipe_sblk->common->maxlinewidth;
@@ -1696,7 +1114,7 @@ static int dpu_plane_sspp_atomic_check(struct drm_plane *plane,
 		dpu_plane_enabled(plane->state), dpu_plane_enabled(state));
 
 	if (!dpu_plane_enabled(state))
-		goto modeset_update;
+		goto exit;
 
 	fmt = to_dpu_format(msm_framebuffer_format(state->fb));
 
@@ -1734,18 +1152,6 @@ static int dpu_plane_sspp_atomic_check(struct drm_plane *plane,
 		ret = -EINVAL;
 
 	/* decimation validation */
-	} else if (deci_w || deci_h) {
-		if ((deci_w > pdpu->pipe_sblk->common->maxhdeciexp) ||
-			(deci_h > pdpu->pipe_sblk->common->maxvdeciexp)) {
-			DPU_ERROR_PLANE(pdpu,
-					"too much decimation requested\n");
-			ret = -EINVAL;
-		} else if (fmt->fetch_mode != DPU_FETCH_LINEAR) {
-			DPU_ERROR_PLANE(pdpu,
-					"decimation requires linear fetch\n");
-			ret = -EINVAL;
-		}
-
 	} else if (!(pdpu->features & DPU_SSPP_SCALER) &&
 		((src.w != dst.w) || (src.h != dst.h))) {
 		DPU_ERROR_PLANE(pdpu,
@@ -1754,57 +1160,23 @@ static int dpu_plane_sspp_atomic_check(struct drm_plane *plane,
 		ret = -EINVAL;
 
 	/* check decimated source width */
-	} else if (src_deci_w > max_linewidth) {
+	} else if (src.w > max_linewidth) {
 		DPU_ERROR_PLANE(pdpu,
-				"invalid src w:%u, deci w:%u, line w:%u\n",
-				src.w, src_deci_w, max_linewidth);
+				"invalid src w:%u, line w:%u\n",
+				src.w, max_linewidth);
 		ret = -E2BIG;
 
 	/* check max scaler capability */
-	} else if (((src_deci_w * max_upscale) < dst.w) ||
-		((src_deci_h * max_upscale) < dst.h) ||
-		((dst.w * max_downscale) < src_deci_w) ||
-		((dst.h * max_downscale) < src_deci_h)) {
+	} else if (((src.w * max_upscale) < dst.w) ||
+		((src.h * max_upscale) < dst.h) ||
+		((dst.w * max_downscale) < src.w) ||
+		((dst.h * max_downscale) < src.h)) {
 		DPU_ERROR_PLANE(pdpu,
 			"too much scaling requested %ux%u->%ux%u\n",
-			src_deci_w, src_deci_h, dst.w, dst.h);
+			src.w, src.h, dst.w, dst.h);
 		ret = -E2BIG;
-	} else if (_dpu_plane_validate_scaler_v2(pdpu, pstate, fmt,
-				state->fb->width,
-				state->fb->height,
-				src.w, src.h, deci_w, deci_h)) {
-		ret = -EINVAL;
 	}
 
-	/* check excl rect configs */
-	if (!ret && pstate->excl_rect.w && pstate->excl_rect.h) {
-		struct dpu_rect intersect;
-
-		/*
-		 * Check exclusion rect against src rect.
-		 * it must intersect with source rect.
-		 */
-		dpu_kms_rect_intersect(&src, &pstate->excl_rect, &intersect);
-		if (intersect.w != pstate->excl_rect.w ||
-				intersect.h != pstate->excl_rect.h ||
-				DPU_FORMAT_IS_YUV(fmt)) {
-			DPU_ERROR_PLANE(pdpu,
-				"invalid excl_rect:{%d,%d,%d,%d} src:{%d,%d,%d,%d}, fmt: %4.4s\n",
-				pstate->excl_rect.x, pstate->excl_rect.y,
-				pstate->excl_rect.w, pstate->excl_rect.h,
-				src.x, src.y, src.w, src.h,
-				(char *)&fmt->base.pixel_format);
-			ret = -EINVAL;
-		}
-		DPU_DEBUG_PLANE(pdpu, "excl_rect: {%d,%d,%d,%d}\n",
-				pstate->excl_rect.x, pstate->excl_rect.y,
-				pstate->excl_rect.w, pstate->excl_rect.h);
-	}
-
-modeset_update:
-	if (!ret)
-		_dpu_plane_sspp_atomic_check_mode_changed(pdpu,
-				state, plane->state);
 exit:
 	return ret;
 }
@@ -1897,7 +1269,6 @@ static int dpu_plane_sspp_atomic_update(struct drm_plane *plane,
 	struct drm_framebuffer *fb;
 	struct dpu_rect src, dst;
 	bool q16_data = true;
-	int idx;
 
 	if (!plane) {
 		DPU_ERROR("invalid plane\n");
@@ -1927,150 +1298,69 @@ static int dpu_plane_sspp_atomic_update(struct drm_plane *plane,
 	fmt = to_dpu_format(msm_framebuffer_format(fb));
 	nplanes = fmt->num_planes;
 
-	/* force reprogramming of all the parameters, if the flag is set */
-	if (pdpu->revalidate) {
-		DPU_DEBUG("plane:%d - reconfigure all the parameters\n",
-				plane->base.id);
-		pstate->dirty = DPU_PLANE_DIRTY_ALL;
-		pdpu->revalidate = false;
-	}
-
-	/* determine what needs to be refreshed */
-	while ((idx = msm_property_pop_dirty(&pdpu->property_info,
-					&pstate->property_state)) >= 0) {
-		switch (idx) {
-		case PLANE_PROP_SCALER_V1:
-		case PLANE_PROP_SCALER_V2:
-		case PLANE_PROP_SCALER_LUT_ED:
-		case PLANE_PROP_SCALER_LUT_CIR:
-		case PLANE_PROP_SCALER_LUT_SEP:
-		case PLANE_PROP_H_DECIMATE:
-		case PLANE_PROP_V_DECIMATE:
-		case PLANE_PROP_SRC_CONFIG:
-		case PLANE_PROP_ZPOS:
-		case PLANE_PROP_EXCL_RECT_V1:
-			pstate->dirty |= DPU_PLANE_DIRTY_RECTS;
-			break;
-		case PLANE_PROP_CSC_V1:
-			pstate->dirty |= DPU_PLANE_DIRTY_FORMAT;
-			break;
-		case PLANE_PROP_COLOR_FILL:
-			/* potentially need to refresh everything */
-			pstate->dirty = DPU_PLANE_DIRTY_ALL;
-			break;
-		case PLANE_PROP_INFO:
-		case PLANE_PROP_ALPHA:
-		case PLANE_PROP_BLEND_OP:
-			/* no special action required */
-			break;
-		case PLANE_PROP_PREFILL_SIZE:
-		case PLANE_PROP_PREFILL_TIME:
-			pstate->dirty |= DPU_PLANE_DIRTY_PERF;
-			break;
-		default:
-			/* unknown property, refresh everything */
-			pstate->dirty |= DPU_PLANE_DIRTY_ALL;
-			DPU_ERROR("executing full mode set, prp_idx %d\n", idx);
-			break;
-		}
-	}
-
-	/**
-	 * since plane_atomic_check is invoked before crtc_atomic_check
-	 * in the commit sequence, all the parameters for updating the
-	 * plane dirty flag will not be available during
-	 * plane_atomic_check as some features params are updated
-	 * in crtc_atomic_check (eg.:sDMA). So check for mode_change
-	 * before sspp update.
-	 */
-	_dpu_plane_sspp_atomic_check_mode_changed(pdpu, state,
-								old_state);
-
-	if (pstate->dirty & DPU_PLANE_DIRTY_RECTS)
-		memset(&(pdpu->pipe_cfg), 0, sizeof(struct dpu_hw_pipe_cfg));
+	memset(&(pdpu->pipe_cfg), 0, sizeof(struct dpu_hw_pipe_cfg));
 
 	_dpu_plane_set_scanout(plane, pstate, &pdpu->pipe_cfg, fb);
 
-	/* early out if nothing dirty */
-	if (!pstate->dirty)
-		return 0;
 	pstate->pending = true;
 
 	pdpu->is_rt_pipe = (dpu_crtc_get_client_type(crtc) != NRT_CLIENT);
 	_dpu_plane_set_qos_ctrl(plane, false, DPU_PLANE_QOS_PANIC_CTRL);
 
 	/* update roi config */
-	if (pstate->dirty & DPU_PLANE_DIRTY_RECTS) {
-		POPULATE_RECT(&src, state->src_x, state->src_y,
-			state->src_w, state->src_h, q16_data);
-		POPULATE_RECT(&dst, state->crtc_x, state->crtc_y,
-			state->crtc_w, state->crtc_h, !q16_data);
-
-		DPU_DEBUG_PLANE(pdpu,
-			"FB[%u] %u,%u,%ux%u->crtc%u %d,%d,%ux%u, %4.4s ubwc %d\n",
-				fb->base.id, src.x, src.y, src.w, src.h,
-				crtc->base.id, dst.x, dst.y, dst.w, dst.h,
-				(char *)&fmt->base.pixel_format,
-				DPU_FORMAT_IS_UBWC(fmt));
-
-		if (dpu_plane_get_property(pstate, PLANE_PROP_SRC_CONFIG) &
-			BIT(DPU_DRM_DEINTERLACE)) {
-			DPU_DEBUG_PLANE(pdpu, "deinterlace\n");
-			for (idx = 0; idx < DPU_MAX_PLANES; ++idx)
-				pdpu->pipe_cfg.layout.plane_pitch[idx] <<= 1;
-			src.h /= 2;
-			src.y  = DIV_ROUND_UP(src.y, 2);
-			src.y &= ~0x1;
-		}
-
-		pdpu->pipe_cfg.src_rect = src;
-		pdpu->pipe_cfg.dst_rect = dst;
+	POPULATE_RECT(&src, state->src_x, state->src_y,
+		state->src_w, state->src_h, q16_data);
+	POPULATE_RECT(&dst, state->crtc_x, state->crtc_y,
+		state->crtc_w, state->crtc_h, !q16_data);
+
+	DPU_DEBUG_PLANE(pdpu,
+		"FB[%u] %u,%u,%ux%u->crtc%u %d,%d,%ux%u, %4.4s ubwc %d\n",
+			fb->base.id, src.x, src.y, src.w, src.h,
+			crtc->base.id, dst.x, dst.y, dst.w, dst.h,
+			(char *)&fmt->base.pixel_format,
+			DPU_FORMAT_IS_UBWC(fmt));
 
-		_dpu_plane_setup_scaler(pdpu, pstate, fmt, false);
 
-		/* check for color fill */
-		pdpu->color_fill = (uint32_t)dpu_plane_get_property(pstate,
-				PLANE_PROP_COLOR_FILL);
-		if (pdpu->color_fill & DPU_PLANE_COLOR_FILL_FLAG) {
-			/* skip remaining processing on color fill */
-			pstate->dirty = 0x0;
-		} else if (pdpu->pipe_hw->ops.setup_rects) {
-			pdpu->pipe_hw->ops.setup_rects(pdpu->pipe_hw,
-					&pdpu->pipe_cfg,
-					pstate->multirect_index);
-		}
+	pdpu->pipe_cfg.src_rect = src;
+	pdpu->pipe_cfg.dst_rect = dst;
 
-		if (pdpu->pipe_hw->ops.setup_pe &&
-				(pstate->multirect_index != DPU_SSPP_RECT_1))
-			pdpu->pipe_hw->ops.setup_pe(pdpu->pipe_hw,
-					&pstate->pixel_ext);
+	_dpu_plane_setup_scaler(pdpu, pstate, fmt, false);
 
-		/**
-		 * when programmed in multirect mode, scalar block will be
-		 * bypassed. Still we need to update alpha and bitwidth
-		 * ONLY for RECT0
-		 */
-		if (pdpu->pipe_hw->ops.setup_scaler &&
-				pstate->multirect_index != DPU_SSPP_RECT_1)
-			pdpu->pipe_hw->ops.setup_scaler(pdpu->pipe_hw,
-					&pdpu->pipe_cfg, &pstate->pixel_ext,
-					&pstate->scaler3_cfg);
-
-		/* update excl rect */
-		if (pdpu->pipe_hw->ops.setup_excl_rect)
-			pdpu->pipe_hw->ops.setup_excl_rect(pdpu->pipe_hw,
-					&pstate->excl_rect,
-					pstate->multirect_index);
+	/* override for color fill */
+	if (pdpu->color_fill & DPU_PLANE_COLOR_FILL_FLAG) {
+		/* skip remaining processing on color fill */
+		return 0;
+	}
 
-		if (pdpu->pipe_hw->ops.setup_multirect)
-			pdpu->pipe_hw->ops.setup_multirect(
-					pdpu->pipe_hw,
-					pstate->multirect_index,
-					pstate->multirect_mode);
+	if (pdpu->pipe_hw->ops.setup_rects) {
+		pdpu->pipe_hw->ops.setup_rects(pdpu->pipe_hw,
+				&pdpu->pipe_cfg,
+				pstate->multirect_index);
 	}
 
-	if ((pstate->dirty & DPU_PLANE_DIRTY_FORMAT) &&
-			pdpu->pipe_hw->ops.setup_format) {
+	if (pdpu->pipe_hw->ops.setup_pe &&
+			(pstate->multirect_index != DPU_SSPP_RECT_1))
+		pdpu->pipe_hw->ops.setup_pe(pdpu->pipe_hw,
+				&pstate->pixel_ext);
+
+	/**
+	 * when programmed in multirect mode, scalar block will be
+	 * bypassed. Still we need to update alpha and bitwidth
+	 * ONLY for RECT0
+	 */
+	if (pdpu->pipe_hw->ops.setup_scaler &&
+			pstate->multirect_index != DPU_SSPP_RECT_1)
+		pdpu->pipe_hw->ops.setup_scaler(pdpu->pipe_hw,
+				&pdpu->pipe_cfg, &pstate->pixel_ext,
+				&pstate->scaler3_cfg);
+
+	if (pdpu->pipe_hw->ops.setup_multirect)
+		pdpu->pipe_hw->ops.setup_multirect(
+				pdpu->pipe_hw,
+				pstate->multirect_index,
+				pstate->multirect_mode);
+
+	if (pdpu->pipe_hw->ops.setup_format) {
 		src_flags = 0x0;
 
 		/* update format */
@@ -2101,35 +1391,16 @@ static int dpu_plane_sspp_atomic_update(struct drm_plane *plane,
 			pdpu->csc_ptr = 0;
 	}
 
-	dpu_color_process_plane_setup(plane);
-
-	/* update sharpening */
-	if ((pstate->dirty & DPU_PLANE_DIRTY_SHARPEN) &&
-		pdpu->pipe_hw->ops.setup_sharpening) {
-		pdpu->sharp_cfg.strength = SHARP_STRENGTH_DEFAULT;
-		pdpu->sharp_cfg.edge_thr = SHARP_EDGE_THR_DEFAULT;
-		pdpu->sharp_cfg.smooth_thr = SHARP_SMOOTH_THR_DEFAULT;
-		pdpu->sharp_cfg.noise_thr = SHARP_NOISE_THR_DEFAULT;
-
-		pdpu->pipe_hw->ops.setup_sharpening(pdpu->pipe_hw,
-				&pdpu->sharp_cfg);
-	}
-
 	_dpu_plane_set_qos_lut(plane, fb);
 	_dpu_plane_set_danger_lut(plane, fb);
 
 	if (plane->type != DRM_PLANE_TYPE_CURSOR) {
 		_dpu_plane_set_qos_ctrl(plane, true, DPU_PLANE_QOS_PANIC_CTRL);
 		_dpu_plane_set_ot_limit(plane, crtc);
-		if (pstate->dirty & DPU_PLANE_DIRTY_PERF)
-			_dpu_plane_set_ts_prefill(plane, pstate);
 	}
 
 	_dpu_plane_set_qos_remap(plane);
 
-	/* clear dirty */
-	pstate->dirty = 0x0;
-
 	return 0;
 }
 
@@ -2208,13 +1479,6 @@ void dpu_plane_restore(struct drm_plane *plane)
 
 	pdpu = to_dpu_plane(plane);
 
-	/*
-	 * Revalidate is only true here if idle PC occurred and
-	 * there is no plane state update in current commit cycle.
-	 */
-	if (!pdpu->revalidate)
-		return;
-
 	DPU_DEBUG_PLANE(pdpu, "\n");
 
 	/* last plane state is same as current state */
@@ -2225,21 +1489,9 @@ void dpu_plane_restore(struct drm_plane *plane)
 static void _dpu_plane_install_properties(struct drm_plane *plane,
 	struct dpu_mdss_cfg *catalog, u32 master_plane_id)
 {
-	static const struct drm_prop_enum_list e_blend_op[] = {
-		{DPU_DRM_BLEND_OP_NOT_DEFINED,    "not_defined"},
-		{DPU_DRM_BLEND_OP_OPAQUE,         "opaque"},
-		{DPU_DRM_BLEND_OP_PREMULTIPLIED,  "premultiplied"},
-		{DPU_DRM_BLEND_OP_COVERAGE,       "coverage"}
-	};
-	static const struct drm_prop_enum_list e_src_config[] = {
-		{DPU_DRM_DEINTERLACE, "deinterlace"}
-	};
-	const struct dpu_format_extended *format_list;
-	struct dpu_kms_info *info;
 	struct dpu_plane *pdpu = to_dpu_plane(plane);
 	int zpos_max = 255;
 	int zpos_def = 0;
-	char feature_name[256];
 
 	if (!plane || !pdpu) {
 		DPU_ERROR("invalid plane\n");
@@ -2269,353 +1521,6 @@ static void _dpu_plane_install_properties(struct drm_plane *plane,
 
 	msm_property_install_range(&pdpu->property_info, "zpos",
 		0x0, 0, zpos_max, zpos_def, PLANE_PROP_ZPOS);
-
-	msm_property_install_range(&pdpu->property_info, "alpha",
-		0x0, 0, 255, 255, PLANE_PROP_ALPHA);
-
-	if (!master_plane_id) {
-		if (pdpu->pipe_sblk->common->maxhdeciexp) {
-			msm_property_install_range(&pdpu->property_info,
-					"h_decimate", 0x0, 0,
-					pdpu->pipe_sblk->common->maxhdeciexp, 0,
-					PLANE_PROP_H_DECIMATE);
-		}
-
-		if (pdpu->pipe_sblk->common->maxvdeciexp) {
-			msm_property_install_range(&pdpu->property_info,
-					"v_decimate", 0x0, 0,
-					pdpu->pipe_sblk->common->maxvdeciexp, 0,
-					PLANE_PROP_V_DECIMATE);
-		}
-
-		if (pdpu->features & BIT(DPU_SSPP_SCALER_QSEED3)) {
-			msm_property_install_range(
-					&pdpu->property_info, "scaler_v2",
-					0x0, 0, ~0, 0, PLANE_PROP_SCALER_V2);
-			msm_property_install_blob(&pdpu->property_info,
-					"lut_ed", 0, PLANE_PROP_SCALER_LUT_ED);
-			msm_property_install_blob(&pdpu->property_info,
-					"lut_cir", 0,
-					PLANE_PROP_SCALER_LUT_CIR);
-			msm_property_install_blob(&pdpu->property_info,
-					"lut_sep", 0,
-					PLANE_PROP_SCALER_LUT_SEP);
-		} else if (pdpu->features & DPU_SSPP_SCALER) {
-			msm_property_install_range(
-					&pdpu->property_info, "scaler_v1", 0x0,
-					0, ~0, 0, PLANE_PROP_SCALER_V1);
-		}
-
-		if (pdpu->features & BIT(DPU_SSPP_CSC) ||
-		    pdpu->features & BIT(DPU_SSPP_CSC_10BIT))
-			msm_property_install_volatile_range(
-					&pdpu->property_info, "csc_v1", 0x0,
-					0, ~0, 0, PLANE_PROP_CSC_V1);
-
-		if (pdpu->features & BIT(DPU_SSPP_HSIC)) {
-			snprintf(feature_name, sizeof(feature_name), "%s%d",
-				"DPU_SSPP_HUE_V",
-				pdpu->pipe_sblk->hsic_blk.version >> 16);
-			msm_property_install_range(&pdpu->property_info,
-				feature_name, 0, 0, 0xFFFFFFFF, 0,
-				PLANE_PROP_HUE_ADJUST);
-			snprintf(feature_name, sizeof(feature_name), "%s%d",
-				"DPU_SSPP_SATURATION_V",
-				pdpu->pipe_sblk->hsic_blk.version >> 16);
-			msm_property_install_range(&pdpu->property_info,
-				feature_name, 0, 0, 0xFFFFFFFF, 0,
-				PLANE_PROP_SATURATION_ADJUST);
-			snprintf(feature_name, sizeof(feature_name), "%s%d",
-				"DPU_SSPP_VALUE_V",
-				pdpu->pipe_sblk->hsic_blk.version >> 16);
-			msm_property_install_range(&pdpu->property_info,
-				feature_name, 0, 0, 0xFFFFFFFF, 0,
-				PLANE_PROP_VALUE_ADJUST);
-			snprintf(feature_name, sizeof(feature_name), "%s%d",
-				"DPU_SSPP_CONTRAST_V",
-				pdpu->pipe_sblk->hsic_blk.version >> 16);
-			msm_property_install_range(&pdpu->property_info,
-				feature_name, 0, 0, 0xFFFFFFFF, 0,
-				PLANE_PROP_CONTRAST_ADJUST);
-		}
-	}
-
-	if (pdpu->features & BIT(DPU_SSPP_EXCL_RECT))
-		msm_property_install_volatile_range(&pdpu->property_info,
-			"excl_rect_v1", 0x0, 0, ~0, 0, PLANE_PROP_EXCL_RECT_V1);
-
-	msm_property_install_enum(&pdpu->property_info, "blend_op", 0x0, 0,
-		e_blend_op, ARRAY_SIZE(e_blend_op), PLANE_PROP_BLEND_OP);
-
-	msm_property_install_enum(&pdpu->property_info, "src_config", 0x0, 1,
-		e_src_config, ARRAY_SIZE(e_src_config), PLANE_PROP_SRC_CONFIG);
-
-	if (pdpu->pipe_hw->ops.setup_solidfill)
-		msm_property_install_range(&pdpu->property_info, "color_fill",
-				0, 0, 0xFFFFFFFF, 0, PLANE_PROP_COLOR_FILL);
-
-	msm_property_install_range(&pdpu->property_info,
-			"prefill_size", 0x0, 0, ~0, 0,
-			PLANE_PROP_PREFILL_SIZE);
-	msm_property_install_range(&pdpu->property_info,
-			"prefill_time", 0x0, 0, ~0, 0,
-			PLANE_PROP_PREFILL_TIME);
-
-	info = kzalloc(sizeof(struct dpu_kms_info), GFP_KERNEL);
-	if (!info) {
-		DPU_ERROR("failed to allocate info memory\n");
-		return;
-	}
-
-	msm_property_install_blob(&pdpu->property_info, "capabilities",
-		DRM_MODE_PROP_IMMUTABLE, PLANE_PROP_INFO);
-	dpu_kms_info_reset(info);
-
-	if (!master_plane_id) {
-		format_list = pdpu->pipe_sblk->format_list;
-	} else {
-		format_list = pdpu->pipe_sblk->virt_format_list;
-		dpu_kms_info_add_keyint(info, "primary_smart_plane_id",
-						master_plane_id);
-	}
-
-	if (format_list) {
-		dpu_kms_info_start(info, "pixel_formats");
-		while (format_list->fourcc_format) {
-			dpu_kms_info_append_format(info,
-					format_list->fourcc_format,
-					format_list->modifier);
-			++format_list;
-		}
-		dpu_kms_info_stop(info);
-	}
-
-	if (pdpu->pipe_hw && pdpu->pipe_hw->ops.get_scaler_ver)
-		dpu_kms_info_add_keyint(info, "scaler_step_ver",
-			pdpu->pipe_hw->ops.get_scaler_ver(pdpu->pipe_hw));
-
-	dpu_kms_info_add_keyint(info, "max_linewidth",
-			pdpu->pipe_sblk->common->maxlinewidth);
-	dpu_kms_info_add_keyint(info, "max_upscale",
-			pdpu->pipe_sblk->maxupscale);
-	dpu_kms_info_add_keyint(info, "max_downscale",
-			pdpu->pipe_sblk->maxdwnscale);
-	dpu_kms_info_add_keyint(info, "max_horizontal_deci",
-			pdpu->pipe_sblk->common->maxhdeciexp);
-	dpu_kms_info_add_keyint(info, "max_vertical_deci",
-			pdpu->pipe_sblk->common->maxvdeciexp);
-	dpu_kms_info_add_keyint(info, "max_per_pipe_bw",
-			pdpu->pipe_sblk->max_per_pipe_bw * 1000LL);
-	msm_property_set_blob(&pdpu->property_info, &pdpu->blob_info,
-			info->data, DPU_KMS_INFO_DATALEN(info),
-			PLANE_PROP_INFO);
-
-	kfree(info);
-
-	if (pdpu->features & BIT(DPU_SSPP_MEMCOLOR)) {
-		snprintf(feature_name, sizeof(feature_name), "%s%d",
-			"DPU_SSPP_SKIN_COLOR_V",
-			pdpu->pipe_sblk->memcolor_blk.version >> 16);
-		msm_property_install_blob(&pdpu->property_info, feature_name, 0,
-			PLANE_PROP_SKIN_COLOR);
-		snprintf(feature_name, sizeof(feature_name), "%s%d",
-			"DPU_SSPP_SKY_COLOR_V",
-			pdpu->pipe_sblk->memcolor_blk.version >> 16);
-		msm_property_install_blob(&pdpu->property_info, feature_name, 0,
-			PLANE_PROP_SKY_COLOR);
-		snprintf(feature_name, sizeof(feature_name), "%s%d",
-			"DPU_SSPP_FOLIAGE_COLOR_V",
-			pdpu->pipe_sblk->memcolor_blk.version >> 16);
-		msm_property_install_blob(&pdpu->property_info, feature_name, 0,
-			PLANE_PROP_FOLIAGE_COLOR);
-	}
-}
-
-static inline void _dpu_plane_set_csc_v1(struct dpu_plane *pdpu, void *usr_ptr)
-{
-	struct dpu_drm_csc_v1 csc_v1;
-	int i;
-
-	if (!pdpu) {
-		DPU_ERROR("invalid plane\n");
-		return;
-	}
-
-	pdpu->csc_usr_ptr = NULL;
-	if (!usr_ptr) {
-		DPU_DEBUG_PLANE(pdpu, "csc data removed\n");
-		return;
-	}
-
-	if (copy_from_user(&csc_v1, usr_ptr, sizeof(csc_v1))) {
-		DPU_ERROR_PLANE(pdpu, "failed to copy csc data\n");
-		return;
-	}
-
-	/* populate from user space */
-	for (i = 0; i < DPU_CSC_MATRIX_COEFF_SIZE; ++i)
-		pdpu->csc_cfg.csc_mv[i] = csc_v1.ctm_coeff[i] >> 16;
-	for (i = 0; i < DPU_CSC_BIAS_SIZE; ++i) {
-		pdpu->csc_cfg.csc_pre_bv[i] = csc_v1.pre_bias[i];
-		pdpu->csc_cfg.csc_post_bv[i] = csc_v1.post_bias[i];
-	}
-	for (i = 0; i < DPU_CSC_CLAMP_SIZE; ++i) {
-		pdpu->csc_cfg.csc_pre_lv[i] = csc_v1.pre_clamp[i];
-		pdpu->csc_cfg.csc_post_lv[i] = csc_v1.post_clamp[i];
-	}
-	pdpu->csc_usr_ptr = &pdpu->csc_cfg;
-}
-
-static inline void _dpu_plane_set_scaler_v1(struct dpu_plane *pdpu,
-		struct dpu_plane_state *pstate, void *usr)
-{
-	struct dpu_drm_scaler_v1 scale_v1;
-	struct dpu_hw_pixel_ext *pe;
-	int i;
-
-	if (!pdpu || !pstate) {
-		DPU_ERROR("invalid argument(s)\n");
-		return;
-	}
-
-	pstate->scaler_check_state = DPU_PLANE_SCLCHECK_NONE;
-	if (!usr) {
-		DPU_DEBUG_PLANE(pdpu, "scale data removed\n");
-		return;
-	}
-
-	if (copy_from_user(&scale_v1, usr, sizeof(scale_v1))) {
-		DPU_ERROR_PLANE(pdpu, "failed to copy scale data\n");
-		return;
-	}
-
-	/* force property to be dirty, even if the pointer didn't change */
-	msm_property_set_dirty(&pdpu->property_info,
-			&pstate->property_state, PLANE_PROP_SCALER_V1);
-
-	/* populate from user space */
-	pe = &pstate->pixel_ext;
-	memset(pe, 0, sizeof(struct dpu_hw_pixel_ext));
-	for (i = 0; i < DPU_MAX_PLANES; i++) {
-		pe->init_phase_x[i] = scale_v1.init_phase_x[i];
-		pe->phase_step_x[i] = scale_v1.phase_step_x[i];
-		pe->init_phase_y[i] = scale_v1.init_phase_y[i];
-		pe->phase_step_y[i] = scale_v1.phase_step_y[i];
-
-		pe->horz_filter[i] = scale_v1.horz_filter[i];
-		pe->vert_filter[i] = scale_v1.vert_filter[i];
-	}
-	for (i = 0; i < DPU_MAX_PLANES; i++) {
-		pe->left_ftch[i] = scale_v1.pe.left_ftch[i];
-		pe->right_ftch[i] = scale_v1.pe.right_ftch[i];
-		pe->left_rpt[i] = scale_v1.pe.left_rpt[i];
-		pe->right_rpt[i] = scale_v1.pe.right_rpt[i];
-		pe->roi_w[i] = scale_v1.pe.num_ext_pxls_lr[i];
-
-		pe->top_ftch[i] = scale_v1.pe.top_ftch[i];
-		pe->btm_ftch[i] = scale_v1.pe.btm_ftch[i];
-		pe->top_rpt[i] = scale_v1.pe.top_rpt[i];
-		pe->btm_rpt[i] = scale_v1.pe.btm_rpt[i];
-		pe->roi_h[i] = scale_v1.pe.num_ext_pxls_tb[i];
-	}
-
-	pstate->scaler_check_state = DPU_PLANE_SCLCHECK_SCALER_V1;
-
-	DPU_EVT32_VERBOSE(DRMID(&pdpu->base));
-	DPU_DEBUG_PLANE(pdpu, "user property data copied\n");
-}
-
-static inline void _dpu_plane_set_scaler_v2(struct dpu_plane *pdpu,
-		struct dpu_plane_state *pstate, void *usr)
-{
-	struct dpu_drm_scaler_v2 scale_v2;
-	struct dpu_hw_pixel_ext *pe;
-	int i;
-	struct dpu_hw_scaler3_cfg *cfg;
-
-	if (!pdpu || !pstate) {
-		DPU_ERROR("invalid argument(s)\n");
-		return;
-	}
-
-	cfg = &pstate->scaler3_cfg;
-	pstate->scaler_check_state = DPU_PLANE_SCLCHECK_NONE;
-	if (!usr) {
-		DPU_DEBUG_PLANE(pdpu, "scale data removed\n");
-		return;
-	}
-
-	if (copy_from_user(&scale_v2, usr, sizeof(scale_v2))) {
-		DPU_ERROR_PLANE(pdpu, "failed to copy scale data\n");
-		return;
-	}
-
-	/* detach/ignore user data if 'disabled' */
-	if (!scale_v2.enable) {
-		DPU_DEBUG_PLANE(pdpu, "scale data removed\n");
-		return;
-	}
-
-	/* force property to be dirty, even if the pointer didn't change */
-	msm_property_set_dirty(&pdpu->property_info,
-			&pstate->property_state, PLANE_PROP_SCALER_V2);
-
-	/* populate from user space */
-	dpu_set_scaler_v2(cfg, &scale_v2);
-
-	pe = &pstate->pixel_ext;
-	memset(pe, 0, sizeof(struct dpu_hw_pixel_ext));
-
-	for (i = 0; i < DPU_MAX_PLANES; i++) {
-		pe->left_ftch[i] = scale_v2.pe.left_ftch[i];
-		pe->right_ftch[i] = scale_v2.pe.right_ftch[i];
-		pe->left_rpt[i] = scale_v2.pe.left_rpt[i];
-		pe->right_rpt[i] = scale_v2.pe.right_rpt[i];
-		pe->roi_w[i] = scale_v2.pe.num_ext_pxls_lr[i];
-
-		pe->top_ftch[i] = scale_v2.pe.top_ftch[i];
-		pe->btm_ftch[i] = scale_v2.pe.btm_ftch[i];
-		pe->top_rpt[i] = scale_v2.pe.top_rpt[i];
-		pe->btm_rpt[i] = scale_v2.pe.btm_rpt[i];
-		pe->roi_h[i] = scale_v2.pe.num_ext_pxls_tb[i];
-	}
-	pstate->scaler_check_state = DPU_PLANE_SCLCHECK_SCALER_V2_CHECK;
-
-	DPU_EVT32_VERBOSE(DRMID(&pdpu->base), cfg->enable, cfg->de.enable,
-			cfg->src_width[0], cfg->src_height[0],
-			cfg->dst_width, cfg->dst_height);
-	DPU_DEBUG_PLANE(pdpu, "user property data copied\n");
-}
-
-static void _dpu_plane_set_excl_rect_v1(struct dpu_plane *pdpu,
-		struct dpu_plane_state *pstate, void *usr_ptr)
-{
-	struct drm_clip_rect excl_rect_v1;
-
-	if (!pdpu) {
-		DPU_ERROR("invalid plane\n");
-		return;
-	}
-
-	if (!usr_ptr) {
-		DPU_DEBUG_PLANE(pdpu, "invalid  excl_rect user data\n");
-		return;
-	}
-
-	if (copy_from_user(&excl_rect_v1, usr_ptr, sizeof(excl_rect_v1))) {
-		DPU_ERROR_PLANE(pdpu, "failed to copy excl_rect data\n");
-		return;
-	}
-
-	/* populate from user space */
-	pstate->excl_rect.x = excl_rect_v1.x1;
-	pstate->excl_rect.y = excl_rect_v1.y1;
-	pstate->excl_rect.w = excl_rect_v1.x2 - excl_rect_v1.x1;
-	pstate->excl_rect.h = excl_rect_v1.y2 - excl_rect_v1.y1;
-
-	DPU_DEBUG_PLANE(pdpu, "excl_rect: {%d,%d,%d,%d}\n",
-			pstate->excl_rect.x, pstate->excl_rect.y,
-			pstate->excl_rect.w, pstate->excl_rect.h);
 }
 
 static int dpu_plane_atomic_set_property(struct drm_plane *plane,
@@ -2624,7 +1529,7 @@ static int dpu_plane_atomic_set_property(struct drm_plane *plane,
 {
 	struct dpu_plane *pdpu = plane ? to_dpu_plane(plane) : NULL;
 	struct dpu_plane_state *pstate;
-	int idx, ret = -EINVAL;
+	int ret = -EINVAL;
 
 	DPU_DEBUG_PLANE(pdpu, "\n");
 
@@ -2636,31 +1541,6 @@ static int dpu_plane_atomic_set_property(struct drm_plane *plane,
 		pstate = to_dpu_plane_state(state);
 		ret = msm_property_atomic_set(&pdpu->property_info,
 				&pstate->property_state, property, val);
-		if (!ret) {
-			idx = msm_property_index(&pdpu->property_info,
-					property);
-			switch (idx) {
-			case PLANE_PROP_CSC_V1:
-				_dpu_plane_set_csc_v1(pdpu,
-						      u64_to_user_ptr(val));
-				break;
-			case PLANE_PROP_SCALER_V1:
-				_dpu_plane_set_scaler_v1(pdpu, pstate,
-							 u64_to_user_ptr(val));
-				break;
-			case PLANE_PROP_SCALER_V2:
-				_dpu_plane_set_scaler_v2(pdpu, pstate,
-							 u64_to_user_ptr(val));
-				break;
-			case PLANE_PROP_EXCL_RECT_V1:
-				_dpu_plane_set_excl_rect_v1(pdpu, pstate,
-						u64_to_user_ptr(val));
-				break;
-			default:
-				/* nothing to do */
-				break;
-			}
-		}
 	}
 
 	DPU_DEBUG_PLANE(pdpu, "%s[%d] <= 0x%llx ret=%d\n",
@@ -2772,7 +1652,6 @@ static void dpu_plane_destroy_state(struct drm_plane *plane,
 	msm_property_duplicate_state(&pdpu->property_info, old_state, pstate,
 			&pstate->property_state, pstate->property_values);
 
-	pstate->dirty = 0x0;
 	pstate->pending = false;
 
 	__drm_atomic_helper_plane_duplicate_state(plane, &pstate->base);
@@ -3170,6 +2049,8 @@ struct drm_plane *dpu_plane_init(struct drm_device *dev,
 	if (ret)
 		goto clean_sspp;
 
+	pdpu->catalog = kms->catalog;
+
 	/* success! finalize initialization */
 	drm_plane_helper_add(plane, &dpu_plane_helper_funcs);
 
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.h
index 25b6b15..a06c8b4 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.h
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.h
@@ -26,32 +26,6 @@
 #include "dpu_hw_mdss.h"
 #include "dpu_hw_sspp.h"
 
-/* dirty bits for update function */
-#define DPU_PLANE_DIRTY_RECTS	0x1
-#define DPU_PLANE_DIRTY_FORMAT	0x2
-#define DPU_PLANE_DIRTY_SHARPEN	0x4
-#define DPU_PLANE_DIRTY_PERF	0x8
-#define DPU_PLANE_DIRTY_ALL	0xFFFFFFFF
-
-/**
- * enum dpu_plane_sclcheck_state - User scaler data status
- *
- * @DPU_PLANE_SCLCHECK_NONE: No user data provided
- * @DPU_PLANE_SCLCHECK_INVALID: Invalid user data provided
- * @DPU_PLANE_SCLCHECK_SCALER_V1: Valid scaler v1 data
- * @DPU_PLANE_SCLCHECK_SCALER_V1_CHECK: Unchecked scaler v1 data
- * @DPU_PLANE_SCLCHECK_SCALER_V2: Valid scaler v2 data
- * @DPU_PLANE_SCLCHECK_SCALER_V2_CHECK: Unchecked scaler v2 data
- */
-enum dpu_plane_sclcheck_state {
-	DPU_PLANE_SCLCHECK_NONE,
-	DPU_PLANE_SCLCHECK_INVALID,
-	DPU_PLANE_SCLCHECK_SCALER_V1,
-	DPU_PLANE_SCLCHECK_SCALER_V1_CHECK,
-	DPU_PLANE_SCLCHECK_SCALER_V2,
-	DPU_PLANE_SCLCHECK_SCALER_V2_CHECK,
-};
-
 /**
  * struct dpu_plane_state: Define dpu extension of drm plane state object
  * @base:	base drm plane state object
@@ -60,8 +34,6 @@ enum dpu_plane_sclcheck_state {
  * @aspace:	pointer to address space for input/output buffers
  * @input_fence:	dereferenced input fence pointer
  * @stage:	assigned by crtc blender
- * @excl_rect:	exclusion rect values
- * @dirty:	bitmask for which pipe h/w config functions need to be updated
  * @multirect_index: index of the rectangle of SSPP
  * @multirect_mode: parallel or time multiplex multirect mode
  * @pending:	whether the current update is still pending
@@ -77,8 +49,6 @@ struct dpu_plane_state {
 	struct msm_gem_address_space *aspace;
 	void *input_fence;
 	enum dpu_stage stage;
-	struct dpu_rect excl_rect;
-	uint32_t dirty;
 	uint32_t multirect_index;
 	uint32_t multirect_mode;
 	bool pending;
@@ -86,7 +56,6 @@ struct dpu_plane_state {
 	/* scaler configuration */
 	struct dpu_hw_scaler3_cfg scaler3_cfg;
 	struct dpu_hw_pixel_ext pixel_ext;
-	enum dpu_plane_sclcheck_state scaler_check_state;
 
 	struct dpu_hw_pipe_cdp_cfg cdp_cfg;
 };
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_reg_dma.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_reg_dma.c
deleted file mode 100644
index b81e071..0000000
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_reg_dma.c
+++ /dev/null
@@ -1,139 +0,0 @@
-/* Copyright (c) 2017-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_reg_dma.h"
-#include "dpu_hw_reg_dma_v1.h"
-#include "dpu_dbg.h"
-
-static int default_check_support(enum dpu_reg_dma_features feature,
-		     enum dpu_reg_dma_blk blk,
-		     bool *is_supported)
-{
-
-	if (!is_supported)
-		return -EINVAL;
-
-	*is_supported = false;
-	return 0;
-}
-
-static int default_setup_payload(struct dpu_reg_dma_setup_ops_cfg *cfg)
-{
-	DRM_ERROR("not implemented\n");
-	return -EINVAL;
-}
-
-static int default_kick_off(struct dpu_reg_dma_kickoff_cfg *cfg)
-{
-	DRM_ERROR("not implemented\n");
-	return -EINVAL;
-
-}
-
-static int default_reset(struct dpu_hw_ctl *ctl)
-{
-	DRM_ERROR("not implemented\n");
-	return -EINVAL;
-}
-
-struct dpu_reg_dma_buffer *default_alloc_reg_dma_buf(u32 size)
-{
-	DRM_ERROR("not implemented\n");
-	return ERR_PTR(-EINVAL);
-}
-
-int default_dealloc_reg_dma(struct dpu_reg_dma_buffer *lut_buf)
-{
-	DRM_ERROR("not implemented\n");
-	return -EINVAL;
-}
-
-static int default_buf_reset_reg_dma(struct dpu_reg_dma_buffer *lut_buf)
-{
-	DRM_ERROR("not implemented\n");
-	return -EINVAL;
-}
-
-static int default_last_command(struct dpu_hw_ctl *ctl,
-		enum dpu_reg_dma_queue q)
-{
-	return 0;
-}
-
-static struct dpu_hw_reg_dma reg_dma = {
-	.ops = {default_check_support, default_setup_payload,
-		default_kick_off, default_reset, default_alloc_reg_dma_buf,
-		default_dealloc_reg_dma, default_buf_reset_reg_dma,
-		default_last_command},
-};
-
-int dpu_reg_dma_init(void __iomem *addr, struct dpu_mdss_cfg *m,
-		struct drm_device *dev)
-{
-	int rc = 0;
-
-	if (!addr || !m || !dev) {
-		DRM_DEBUG("invalid addr %pK catalog %pK dev %pK\n", addr, m,
-				dev);
-		return 0;
-	}
-
-	reg_dma.drm_dev = dev;
-	reg_dma.caps = &m->dma_cfg;
-	reg_dma.addr = addr;
-
-	if (!m->reg_dma_count)
-		return 0;
-
-	switch (reg_dma.caps->version) {
-	case 1:
-		rc = init_v1(&reg_dma);
-		if (rc)
-			DRM_DEBUG("init v1 dma ops failed\n");
-		else
-			dpu_dbg_reg_register_base("reg_dma", addr,
-					reg_dma.caps->len);
-		break;
-	default:
-		break;
-	}
-
-	return 0;
-}
-
-struct dpu_hw_reg_dma_ops *dpu_reg_dma_get_ops(void)
-{
-	return &reg_dma.ops;
-}
-
-void dpu_reg_dma_deinit(void)
-{
-	struct dpu_hw_reg_dma op = {
-	.ops = {default_check_support, default_setup_payload,
-		default_kick_off, default_reset, default_alloc_reg_dma_buf,
-		default_dealloc_reg_dma, default_buf_reset_reg_dma,
-		default_last_command},
-	};
-
-	if (!reg_dma.drm_dev || !reg_dma.caps)
-		return;
-
-	switch (reg_dma.caps->version) {
-	case 1:
-		deinit_v1();
-		break;
-	default:
-		break;
-	}
-	memset(&reg_dma, 0, sizeof(reg_dma));
-	memcpy(&reg_dma.ops, &op.ops, sizeof(op.ops));
-}
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_reg_dma.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_reg_dma.h
deleted file mode 100644
index 1fb92ed..0000000
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_reg_dma.h
+++ /dev/null
@@ -1,310 +0,0 @@
-/* Copyright (c) 2017-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.
- */
-
-#ifndef _DPU_REG_DMA_H
-#define _DPU_REG_DMA_H
-
-#include "msm_drv.h"
-#include "dpu_hw_catalog.h"
-#include "dpu_hw_mdss.h"
-#include "dpu_hw_top.h"
-#include "dpu_hw_util.h"
-
-/**
- * enum dpu_reg_dma_op - defines operations supported by reg dma
- * @REG_DMA_READ: Read the histogram into buffer provided
- * @REG_DMA_WRITE: Write the reg dma configuration into MDP block
- * @REG_DMA_OP_MAX: Max operation which indicates that op is invalid
- */
-enum dpu_reg_dma_op {
-	REG_DMA_READ,
-	REG_DMA_WRITE,
-	REG_DMA_OP_MAX
-};
-
-/**
- * enum dpu_reg_dma_read_sel - defines the blocks for histogram read
- * @DSPP0_HIST: select dspp0
- * @DSPP1_HIST: select dspp1
- * @DSPP2_HIST: select dspp2
- * @DSPP3_HIST: select dspp3
- * @DSPP_HIST_MAX: invalid selection
- */
-enum dpu_reg_dma_read_sel {
-	DSPP0_HIST,
-	DSPP1_HIST,
-	DSPP2_HIST,
-	DSPP3_HIST,
-	DSPP_HIST_MAX,
-};
-
-/**
- * enum dpu_reg_dma_features - defines features supported by reg dma
- * @QSEED: qseed feature
- * @GAMUT: gamut feature
- * @IGC: inverse gamma correction
- * @PCC: polynomical color correction
- * @VLUT: PA vlut
- * @MEM_COLOR: memory color
- * @SIX_ZONE: six zone
- * @HSIC: Hue, saturation and contrast
- * @GC: gamma correction
- * @REG_DMA_FEATURES_MAX: invalid selection
- */
-enum dpu_reg_dma_features {
-	QSEED,
-	GAMUT,
-	IGC,
-	PCC,
-	VLUT,
-	MEM_COLOR,
-	SIX_ZONE,
-	HSIC,
-	GC,
-	REG_DMA_FEATURES_MAX,
-};
-
-/**
- * enum dpu_reg_dma_queue - defines reg dma write queue values
- * @DMA_CTL_QUEUE0: select queue0
- * @DMA_CTL_QUEUE1: select queue1
- * @DMA_CTL_QUEUE_MAX: invalid selection
- */
-enum dpu_reg_dma_queue {
-	DMA_CTL_QUEUE0,
-	DMA_CTL_QUEUE1,
-	DMA_CTL_QUEUE_MAX,
-};
-
-/**
- * enum dpu_reg_dma_trigger_mode - defines reg dma ops trigger mode
- * @WRITE_IMMEDIATE: trigger write op immediately
- * @WRITE_TRIGGER: trigger write op when sw trigger is issued
- * @READ_IMMEDIATE: trigger read op immediately
- * @READ_TRIGGER: trigger read op when sw trigger is issued
- * @TIGGER_MAX: invalid trigger selection
- */
-enum dpu_reg_dma_trigger_mode {
-	WRITE_IMMEDIATE,
-	WRITE_TRIGGER,
-	READ_IMMEDIATE,
-	READ_TRIGGER,
-	TIGGER_MAX,
-};
-
-/**
- * enum dpu_reg_dma_setup_ops - defines reg dma write configuration
- * @HW_BLK_SELECT: op for selecting the hardware block
- * @REG_SINGLE_WRITE: op for writing single register value
- *                    at the address provided
- * @REG_BLK_WRITE_SINGLE: op for writing multiple registers using hw index
- *                        register
- * @REG_BLK_WRITE_INC: op for writing multiple registers using auto address
- *                     increment
- * @REG_BLK_WRITE_MULTIPLE: op for writing hw index based registers at
- *                         non-consecutive location
- * @REG_DMA_SETUP_OPS_MAX: invalid operation
- */
-enum dpu_reg_dma_setup_ops {
-	HW_BLK_SELECT,
-	REG_SINGLE_WRITE,
-	REG_BLK_WRITE_SINGLE,
-	REG_BLK_WRITE_INC,
-	REG_BLK_WRITE_MULTIPLE,
-	REG_DMA_SETUP_OPS_MAX,
-};
-
-/**
- * enum dpu_reg_dma_blk - defines blocks for which reg dma op should be
- *                        performed
- * @VIG0: select vig0 block
- * @VIG1: select vig1 block
- * @VIG2: select vig2 block
- * @VIG3: select vig3 block
- * @LM0: select lm0 block
- * @LM1: select lm1 block
- * @LM2: select lm2 block
- * @LM3: select lm3 block
- * @DSPP0: select dspp0 block
- * @DSPP1: select dspp1 block
- * @DSPP2: select dspp2 block
- * @DSPP3: select dspp3 block
- * @DMA0: select dma0 block
- * @DMA1: select dma1 block
- * @DMA2: select dma2 block
- * @DMA3: select dma3 block
- * @SSPP_IGC: select sspp igc block
- * @DSPP_IGC: select dspp igc block
- * @MDSS: select mdss block
- */
-enum dpu_reg_dma_blk {
-	VIG0  = BIT(0),
-	VIG1  = BIT(1),
-	VIG2  = BIT(2),
-	VIG3  = BIT(3),
-	LM0   = BIT(4),
-	LM1   = BIT(5),
-	LM2   = BIT(6),
-	LM3   = BIT(7),
-	DSPP0 = BIT(8),
-	DSPP1 = BIT(9),
-	DSPP2 = BIT(10),
-	DSPP3 = BIT(11),
-	DMA0  = BIT(12),
-	DMA1  = BIT(13),
-	DMA2  = BIT(14),
-	DMA3  = BIT(15),
-	SSPP_IGC = BIT(16),
-	DSPP_IGC = BIT(17),
-	MDSS  = BIT(31)
-};
-
-/**
- * struct dpu_reg_dma_buffer - defines reg dma buffer structure.
- * @drm_gem_object *buf: drm gem handle for the buffer
- * @asapce : pointer to address space
- * @buffer_size: buffer size
- * @index: write pointer index
- * @iova: device address
- * @vaddr: cpu address
- * @next_op_allowed: operation allowed on the buffer
- * @ops_completed: operations completed on buffer
- */
-struct dpu_reg_dma_buffer {
-	struct drm_gem_object *buf;
-	struct msm_gem_address_space *aspace;
-	u32 buffer_size;
-	u32 index;
-	u64 iova;
-	void *vaddr;
-	u32 next_op_allowed;
-	u32 ops_completed;
-};
-
-/**
- * struct dpu_reg_dma_setup_ops_cfg - defines structure for reg dma ops on the
- *                                    reg dma buffer.
- * @dpu_reg_dma_setup_ops ops: ops to be performed
- * @dpu_reg_dma_blk blk: block on which op needs to be performed
- * @dpu_reg_dma_features feature: feature on which op needs to be done
- * @wrap_size: valid for REG_BLK_WRITE_MULTIPLE, indicates reg index location
- *             size
- * @inc: valid for REG_BLK_WRITE_MULTIPLE indicates whether reg index location
- *       needs an increment or decrement.
- *       0 - decrement
- *       1 - increment
- * @blk_offset: offset for blk, valid for HW_BLK_SELECT op only
- * @dpu_reg_dma_buffer *dma_buf: reg dma buffer on which op needs to be
- *                                performed
- * @data: pointer to payload which has to be written into reg dma buffer for
- *        selected op.
- * @data_size: size of payload in data
- */
-struct dpu_reg_dma_setup_ops_cfg {
-	enum dpu_reg_dma_setup_ops ops;
-	enum dpu_reg_dma_blk blk;
-	enum dpu_reg_dma_features feature;
-	u32 wrap_size;
-	u32 inc;
-	u32 blk_offset;
-	struct dpu_reg_dma_buffer *dma_buf;
-	u32 *data;
-	u32 data_size;
-};
-
-/**
- * struct dpu_reg_dma_kickoff_cfg - commit reg dma buffer to hw engine
- * @ctl: ctl for which reg dma buffer needs to be committed.
- * @dma_buf: reg dma buffer with iova address and size info
- * @block_select: histogram read select
- * @trigger_mode: reg dma ops trigger mode
- * @queue_select: queue on which reg dma buffer will be submitted
- * @last_command: last command for this vsync
- */
-struct dpu_reg_dma_kickoff_cfg {
-	struct dpu_hw_ctl *ctl;
-	enum dpu_reg_dma_op op;
-	struct dpu_reg_dma_buffer *dma_buf;
-	enum dpu_reg_dma_read_sel block_select;
-	enum dpu_reg_dma_trigger_mode trigger_mode;
-	enum dpu_reg_dma_queue queue_select;
-	u32 last_command;
-};
-
-/**
- * struct dpu_hw_reg_dma_ops - ops supported by reg dma frame work, based on
- *                             version of reg dma appropriate ops will be
- *                             installed during driver probe.
- * @check_support: checks if reg dma is supported on this platform for a
- *                 feature
- * @setup_payload: setup reg dma buffer based on ops and payload provided by
- *                 client
- * @kick_off: submit the reg dma buffer to hw enginge
- * @reset: reset the reg dma hw enginge for a ctl
- * @alloc_reg_dma_buf: allocate reg dma buffer
- * @dealloc_reg_dma: de-allocate reg dma buffer
- * @reset_reg_dma_buf: reset the buffer to init state
- * @last_command: notify control that last command is queued
- */
-struct dpu_hw_reg_dma_ops {
-	int (*check_support)(enum dpu_reg_dma_features feature,
-			     enum dpu_reg_dma_blk blk,
-			     bool *is_supported);
-	int (*setup_payload)(struct dpu_reg_dma_setup_ops_cfg *cfg);
-	int (*kick_off)(struct dpu_reg_dma_kickoff_cfg *cfg);
-	int (*reset)(struct dpu_hw_ctl *ctl);
-	struct dpu_reg_dma_buffer* (*alloc_reg_dma_buf)(u32 size);
-	int (*dealloc_reg_dma)(struct dpu_reg_dma_buffer *lut_buf);
-	int (*reset_reg_dma_buf)(struct dpu_reg_dma_buffer *buf);
-	int (*last_command)(struct dpu_hw_ctl *ctl, enum dpu_reg_dma_queue q);
-};
-
-/**
- * struct dpu_hw_reg_dma - structure to hold reg dma hw info
- * @drm_dev: drm driver dev handle
- * @caps: reg dma hw caps on the platform
- * @ops: reg dma ops supported on the platform
- * @addr: reg dma hw block base address
- */
-struct dpu_hw_reg_dma {
-	struct drm_device *drm_dev;
-	const struct dpu_reg_dma_cfg *caps;
-	struct dpu_hw_reg_dma_ops ops;
-	void __iomem *addr;
-};
-
-/**
- * dpu_reg_dma_init() - function called to initialize reg dma during dpu
- *                         drm driver probe. If reg dma is supported by dpu
- *                         ops for reg dma version will be installed.
- *                         if reg dma is not supported by dpu default ops will
- *                         be installed. check_support of default ops will
- *                         return false, hence the clients should fall back to
- *                         AHB programming.
- * @addr: reg dma block base address
- * @m: catalog which contains dpu hw capabilities and offsets
- * @dev: drm driver device handle
- */
-int dpu_reg_dma_init(void __iomem *addr, struct dpu_mdss_cfg *m,
-		struct drm_device *dev);
-
-/**
- * dpu_reg_dma_get_ops() - singleton module, ops is returned to the clients
- *                            who call this api.
- */
-struct dpu_hw_reg_dma_ops *dpu_reg_dma_get_ops(void);
-
-/**
- * dpu_reg_dma_deinit() - de-initialize the reg dma
- */
-void dpu_reg_dma_deinit(void);
-#endif /* _DPU_REG_DMA_H */
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c
index af8205f..f467bf1 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c
@@ -17,7 +17,6 @@
 #include "dpu_hw_lm.h"
 #include "dpu_hw_ctl.h"
 #include "dpu_hw_cdm.h"
-#include "dpu_hw_dspp.h"
 #include "dpu_hw_ds.h"
 #include "dpu_hw_pingpong.h"
 #include "dpu_hw_intf.h"
@@ -29,7 +28,6 @@
 
 #define RM_RQ_LOCK(r) ((r)->top_ctrl & BIT(DPU_RM_TOPCTL_RESERVE_LOCK))
 #define RM_RQ_CLEAR(r) ((r)->top_ctrl & BIT(DPU_RM_TOPCTL_RESERVE_CLEAR))
-#define RM_RQ_DSPP(r) ((r)->top_ctrl & BIT(DPU_RM_TOPCTL_DSPP))
 #define RM_RQ_DS(r) ((r)->top_ctrl & BIT(DPU_RM_TOPCTL_DS))
 #define RM_IS_TOPOLOGY_MATCH(t, r) ((t).num_lm == (r).num_lm && \
 				(t).num_comp_enc == (r).num_enc && \
@@ -237,9 +235,6 @@ static void _dpu_rm_hw_destroy(enum dpu_hw_blk_type type, void *hw)
 	case DPU_HW_BLK_LM:
 		dpu_hw_lm_destroy(hw);
 		break;
-	case DPU_HW_BLK_DSPP:
-		dpu_hw_dspp_destroy(hw);
-		break;
 	case DPU_HW_BLK_DS:
 		dpu_hw_ds_destroy(hw);
 		break;
@@ -322,9 +317,6 @@ static int _dpu_rm_hw_blk_create(
 	case DPU_HW_BLK_LM:
 		hw = dpu_hw_lm_init(id, mmio, cat);
 		break;
-	case DPU_HW_BLK_DSPP:
-		hw = dpu_hw_dspp_init(id, mmio, cat);
-		break;
 	case DPU_HW_BLK_DS:
 		hw = dpu_hw_ds_init(id, mmio, cat);
 		break;
@@ -435,15 +427,6 @@ int dpu_rm_init(struct dpu_rm *rm,
 		}
 	}
 
-	for (i = 0; i < cat->dspp_count; i++) {
-		rc = _dpu_rm_hw_blk_create(rm, cat, mmio, DPU_HW_BLK_DSPP,
-				cat->dspp[i].id, &cat->dspp[i]);
-		if (rc) {
-			DPU_ERROR("failed: dspp hw not available\n");
-			goto fail;
-		}
-	}
-
 	if (cat->mdp[0].has_dest_scaler) {
 		for (i = 0; i < cat->ds_count; i++) {
 			rc = _dpu_rm_hw_blk_create(rm, cat, mmio, DPU_HW_BLK_DS,
@@ -516,16 +499,14 @@ int dpu_rm_init(struct dpu_rm *rm,
 /**
  * _dpu_rm_check_lm_and_get_connected_blks - check if proposed layer mixer meets
  *	proposed use case requirements, incl. hardwired dependent blocks like
- *	pingpong, and dspp.
+ *	pingpong
  * @rm: dpu resource manager handle
  * @rsvp: reservation currently being created
  * @reqs: proposed use case requirements
  * @lm: proposed layer mixer, function checks if lm, and all other hardwired
- *      blocks connected to the lm (pp, dspp) are available and appropriate
- * @dspp: output parameter, dspp block attached to the layer mixer.
- *        NULL if dspp was not available, or not matching requirements.
+ *      blocks connected to the lm (pp) is available and appropriate
  * @pp: output parameter, pingpong block attached to the layer mixer.
- *      NULL if dspp was not available, or not matching requirements.
+ *      NULL if pp was not available, or not matching requirements.
  * @primary_lm: if non-null, this function check if lm is compatible primary_lm
  *              as well as satisfying all other requirements
  * @Return: true if lm matches all requirements, false otherwise
@@ -535,21 +516,19 @@ static bool _dpu_rm_check_lm_and_get_connected_blks(
 		struct dpu_rm_rsvp *rsvp,
 		struct dpu_rm_requirements *reqs,
 		struct dpu_rm_hw_blk *lm,
-		struct dpu_rm_hw_blk **dspp,
 		struct dpu_rm_hw_blk **ds,
 		struct dpu_rm_hw_blk **pp,
 		struct dpu_rm_hw_blk *primary_lm)
 {
 	const struct dpu_lm_cfg *lm_cfg = to_dpu_hw_mixer(lm->hw)->cap;
 	struct dpu_rm_hw_iter iter;
-	bool is_valid_dspp, is_valid_ds, ret;
+	bool is_valid_ds;
 
-	*dspp = NULL;
 	*ds = NULL;
 	*pp = NULL;
 
-	DPU_DEBUG("check lm %d: dspp %d ds %d pp %d\n",
-			   lm_cfg->id, lm_cfg->dspp,
+	DPU_DEBUG("check lm %d ds %d pp %d\n",
+			   lm_cfg->id,
 			   lm_cfg->ds, lm_cfg->pingpong);
 
 	/* Check if this layer mixer is a peer of the proposed primary LM */
@@ -564,28 +543,13 @@ static bool _dpu_rm_check_lm_and_get_connected_blks(
 		}
 	}
 
-	is_valid_dspp = (lm_cfg->dspp != DSPP_MAX) ? true : false;
 	is_valid_ds = (lm_cfg->ds != DS_MAX) ? true : false;
 
-	/**
-	 * RM_RQ_X: specification of which LMs to choose
-	 * is_valid_X: indicates whether LM is tied with block X
-	 * ret: true if given LM matches the user requirement, false otherwise
-	 */
-	if (RM_RQ_DSPP(reqs) && RM_RQ_DS(reqs))
-		ret = (is_valid_dspp && is_valid_ds);
-	else if (RM_RQ_DSPP(reqs))
-		ret = is_valid_dspp;
-	else if (RM_RQ_DS(reqs))
-		ret = is_valid_ds;
-	else
-		ret = !(is_valid_dspp || is_valid_ds);
+	if (RM_RQ_DS(reqs) && !is_valid_ds) {
+		DPU_DEBUG("fail:lm(%d)req_ds(%d)ds(%d)\n",
+			lm_cfg->id, (bool)(RM_RQ_DS(reqs)), lm_cfg->ds);
 
-	if (!ret) {
-		DPU_DEBUG("fail:lm(%d)req_dspp(%d)dspp(%d)req_ds(%d)ds(%d)\n",
-			lm_cfg->id, (bool)(RM_RQ_DSPP(reqs)), lm_cfg->dspp,
-			(bool)(RM_RQ_DS(reqs)), lm_cfg->ds);
-		return ret;
+		return false;
 	}
 
 	/* Already reserved? */
@@ -594,28 +558,6 @@ static bool _dpu_rm_check_lm_and_get_connected_blks(
 		return false;
 	}
 
-	if (lm_cfg->dspp != DSPP_MAX) {
-		dpu_rm_init_hw_iter(&iter, 0, DPU_HW_BLK_DSPP);
-		while (_dpu_rm_get_hw_locked(rm, &iter)) {
-			if (iter.blk->id == lm_cfg->dspp) {
-				*dspp = iter.blk;
-				break;
-			}
-		}
-
-		if (!*dspp) {
-			DPU_DEBUG("lm %d failed to retrieve dspp %d\n", lm->id,
-					lm_cfg->dspp);
-			return false;
-		}
-
-		if (RESERVED_BY_OTHER(*dspp, rsvp)) {
-			DPU_DEBUG("lm %d dspp %d already reserved\n",
-					lm->id, (*dspp)->id);
-			return false;
-		}
-	}
-
 	if (lm_cfg->ds != DS_MAX) {
 		dpu_rm_init_hw_iter(&iter, 0, DPU_HW_BLK_DS);
 		while (_dpu_rm_get_hw_locked(rm, &iter)) {
@@ -654,7 +596,6 @@ static bool _dpu_rm_check_lm_and_get_connected_blks(
 	if (RESERVED_BY_OTHER(*pp, rsvp)) {
 		DPU_DEBUG("lm %d pp %d already reserved\n", lm->id,
 				(*pp)->id);
-		*dspp = NULL;
 		*ds = NULL;
 		return false;
 	}
@@ -669,7 +610,6 @@ static int _dpu_rm_reserve_lms(
 
 {
 	struct dpu_rm_hw_blk *lm[MAX_BLOCKS];
-	struct dpu_rm_hw_blk *dspp[MAX_BLOCKS];
 	struct dpu_rm_hw_blk *ds[MAX_BLOCKS];
 	struct dpu_rm_hw_blk *pp[MAX_BLOCKS];
 	struct dpu_rm_hw_iter iter_i, iter_j;
@@ -686,7 +626,6 @@ static int _dpu_rm_reserve_lms(
 	while (lm_count != reqs->topology->num_lm &&
 			_dpu_rm_get_hw_locked(rm, &iter_i)) {
 		memset(&lm, 0, sizeof(lm));
-		memset(&dspp, 0, sizeof(dspp));
 		memset(&ds, 0, sizeof(ds));
 		memset(&pp, 0, sizeof(pp));
 
@@ -694,8 +633,7 @@ static int _dpu_rm_reserve_lms(
 		lm[lm_count] = iter_i.blk;
 
 		if (!_dpu_rm_check_lm_and_get_connected_blks(
-				rm, rsvp, reqs, lm[lm_count],
-				&dspp[lm_count], &ds[lm_count],
+				rm, rsvp, reqs, lm[lm_count], &ds[lm_count],
 				&pp[lm_count], NULL))
 			continue;
 
@@ -711,8 +649,8 @@ static int _dpu_rm_reserve_lms(
 
 			if (!_dpu_rm_check_lm_and_get_connected_blks(
 					rm, rsvp, reqs, iter_j.blk,
-					&dspp[lm_count], &ds[lm_count],
-					&pp[lm_count], iter_i.blk))
+					&ds[lm_count], &pp[lm_count],
+					iter_i.blk))
 				continue;
 
 			lm[lm_count] = iter_j.blk;
@@ -731,14 +669,11 @@ static int _dpu_rm_reserve_lms(
 
 		lm[i]->rsvp_nxt = rsvp;
 		pp[i]->rsvp_nxt = rsvp;
-		if (dspp[i])
-			dspp[i]->rsvp_nxt = rsvp;
 
 		if (ds[i])
 			ds[i]->rsvp_nxt = rsvp;
 
 		DPU_EVT32(lm[i]->type, rsvp->enc_id, lm[i]->id, pp[i]->id,
-				dspp[i] ? dspp[i]->id : 0,
 				ds[i] ? ds[i]->id : 0);
 	}
 
@@ -919,18 +854,7 @@ static int _dpu_rm_make_next_rsvp(
 	rsvp->topology = reqs->topology->top_name;
 	list_add_tail(&rsvp->list, &rm->rsvps);
 
-	/*
-	 * Assign LMs and blocks whose usage is tied to them: DSPP & Pingpong.
-	 * Do assignment preferring to give away low-resource mixers first:
-	 * - Check mixers without DSPPs
-	 * - Only then allow to grab from mixers with DSPP capability
-	 */
 	ret = _dpu_rm_reserve_lms(rm, rsvp, reqs);
-	if (ret && !RM_RQ_DSPP(reqs)) {
-		reqs->top_ctrl |= BIT(DPU_RM_TOPCTL_DSPP);
-		ret = _dpu_rm_reserve_lms(rm, rsvp, reqs);
-	}
-
 	if (ret) {
 		DPU_ERROR("unable to find appropriate mixers\n");
 		return ret;
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.h
index 4c77874..ef3f67b 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.h
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.h
@@ -45,13 +45,11 @@ enum dpu_rm_topology_name {
  *                               release any reservation held by this display.
  *                               Normal behavior would not impact the
  *                               reservation list during the AtomicTest phase.
- * @DPU_RM_TOPCTL_DSPP: Require layer mixers with DSPP capabilities
  * @DPU_RM_TOPCTL_DS  : Require layer mixers with DS capabilities
  */
 enum dpu_rm_topology_control {
 	DPU_RM_TOPCTL_RESERVE_LOCK,
 	DPU_RM_TOPCTL_RESERVE_CLEAR,
-	DPU_RM_TOPCTL_DSPP,
 	DPU_RM_TOPCTL_DS,
 };
 
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_wb.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_wb.c
index cc78786..9b47bb2 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_wb.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_wb.c
@@ -13,8 +13,6 @@
 
 #define pr_fmt(fmt)	"[drm:%s:%d] " fmt, __func__, __LINE__
 
-#include <uapi/drm/dpu_drm.h>
-
 #include "msm_kms.h"
 #include "dpu_kms.h"
 #include "dpu_wb.h"
diff --git a/drivers/gpu/drm/msm/msm_drv.h b/drivers/gpu/drm/msm/msm_drv.h
index 954ac12..5baff27 100644
--- a/drivers/gpu/drm/msm/msm_drv.h
+++ b/drivers/gpu/drm/msm/msm_drv.h
@@ -77,39 +77,11 @@ struct msm_file_private {
 };
 
 enum msm_mdp_plane_property {
-	/* blob properties, always put these first */
-	PLANE_PROP_SCALER_V1,
-	PLANE_PROP_SCALER_V2,
-	PLANE_PROP_CSC_V1,
-	PLANE_PROP_INFO,
-	PLANE_PROP_SCALER_LUT_ED,
-	PLANE_PROP_SCALER_LUT_CIR,
-	PLANE_PROP_SCALER_LUT_SEP,
-	PLANE_PROP_SKIN_COLOR,
-	PLANE_PROP_SKY_COLOR,
-	PLANE_PROP_FOLIAGE_COLOR,
-	PLANE_PROP_ROT_CAPS_V1,
-
 	/* # of blob properties */
 	PLANE_PROP_BLOBCOUNT,
 
 	/* range properties */
 	PLANE_PROP_ZPOS = PLANE_PROP_BLOBCOUNT,
-	PLANE_PROP_ALPHA,
-	PLANE_PROP_COLOR_FILL,
-	PLANE_PROP_H_DECIMATE,
-	PLANE_PROP_V_DECIMATE,
-	PLANE_PROP_HUE_ADJUST,
-	PLANE_PROP_SATURATION_ADJUST,
-	PLANE_PROP_VALUE_ADJUST,
-	PLANE_PROP_CONTRAST_ADJUST,
-	PLANE_PROP_EXCL_RECT_V1,
-	PLANE_PROP_PREFILL_SIZE,
-	PLANE_PROP_PREFILL_TIME,
-
-	/* enum/bitmask properties */
-	PLANE_PROP_BLEND_OP,
-	PLANE_PROP_SRC_CONFIG,
 
 	/* total # of properties */
 	PLANE_PROP_COUNT
diff --git a/include/uapi/drm/dpu_drm.h b/include/uapi/drm/dpu_drm.h
index da73279..93af1fb 100644
--- a/include/uapi/drm/dpu_drm.h
+++ b/include/uapi/drm/dpu_drm.h
@@ -66,193 +66,6 @@
 /* DRM bitmasks are restricted to 0..63 */
 #define DPU_DRM_BITMASK_COUNT       64
 
-/**
- * struct dpu_drm_pix_ext_v1 - version 1 of pixel ext structure
- * @num_ext_pxls_lr: Number of total horizontal pixels
- * @num_ext_pxls_tb: Number of total vertical lines
- * @left_ftch:       Number of extra pixels to overfetch from left
- * @right_ftch:      Number of extra pixels to overfetch from right
- * @top_ftch:        Number of extra lines to overfetch from top
- * @btm_ftch:        Number of extra lines to overfetch from bottom
- * @left_rpt:        Number of extra pixels to repeat from left
- * @right_rpt:       Number of extra pixels to repeat from right
- * @top_rpt:         Number of extra lines to repeat from top
- * @btm_rpt:         Number of extra lines to repeat from bottom
- */
-struct dpu_drm_pix_ext_v1 {
-	/*
-	 * Number of pixels ext in left, right, top and bottom direction
-	 * for all color components.
-	 */
-	int32_t num_ext_pxls_lr[DPU_MAX_PLANES];
-	int32_t num_ext_pxls_tb[DPU_MAX_PLANES];
-
-	/*
-	 * Number of pixels needs to be overfetched in left, right, top
-	 * and bottom directions from source image for scaling.
-	 */
-	int32_t left_ftch[DPU_MAX_PLANES];
-	int32_t right_ftch[DPU_MAX_PLANES];
-	int32_t top_ftch[DPU_MAX_PLANES];
-	int32_t btm_ftch[DPU_MAX_PLANES];
-	/*
-	 * Number of pixels needs to be repeated in left, right, top and
-	 * bottom directions for scaling.
-	 */
-	int32_t left_rpt[DPU_MAX_PLANES];
-	int32_t right_rpt[DPU_MAX_PLANES];
-	int32_t top_rpt[DPU_MAX_PLANES];
-	int32_t btm_rpt[DPU_MAX_PLANES];
-
-};
-
-/**
- * struct dpu_drm_scaler_v1 - version 1 of struct dpu_drm_scaler
- * @lr:            Pixel extension settings for left/right
- * @tb:            Pixel extension settings for top/botton
- * @init_phase_x:  Initial scaler phase values for x
- * @phase_step_x:  Phase step values for x
- * @init_phase_y:  Initial scaler phase values for y
- * @phase_step_y:  Phase step values for y
- * @horz_filter:   Horizontal filter array
- * @vert_filter:   Vertical filter array
- */
-struct dpu_drm_scaler_v1 {
-	/*
-	 * Pix ext settings
-	 */
-	struct dpu_drm_pix_ext_v1 pe;
-	/*
-	 * Phase settings
-	 */
-	int32_t init_phase_x[DPU_MAX_PLANES];
-	int32_t phase_step_x[DPU_MAX_PLANES];
-	int32_t init_phase_y[DPU_MAX_PLANES];
-	int32_t phase_step_y[DPU_MAX_PLANES];
-
-	/*
-	 * Filter type to be used for scaling in horizontal and vertical
-	 * directions
-	 */
-	uint32_t horz_filter[DPU_MAX_PLANES];
-	uint32_t vert_filter[DPU_MAX_PLANES];
-};
-
-/**
- * struct dpu_drm_de_v1 - version 1 of detail enhancer structure
- * @enable:         Enables/disables detail enhancer
- * @sharpen_level1: Sharpening strength for noise
- * @sharpen_level2: Sharpening strength for context
- * @clip:           Clip coefficient
- * @limit:          Detail enhancer limit factor
- * @thr_quiet:      Quite zone threshold
- * @thr_dieout:     Die-out zone threshold
- * @thr_low:        Linear zone left threshold
- * @thr_high:       Linear zone right threshold
- * @prec_shift:     Detail enhancer precision
- * @adjust_a:       Mapping curves A coefficients
- * @adjust_b:       Mapping curves B coefficients
- * @adjust_c:       Mapping curves C coefficients
- */
-struct dpu_drm_de_v1 {
-	uint32_t enable;
-	int16_t sharpen_level1;
-	int16_t sharpen_level2;
-	uint16_t clip;
-	uint16_t limit;
-	uint16_t thr_quiet;
-	uint16_t thr_dieout;
-	uint16_t thr_low;
-	uint16_t thr_high;
-	uint16_t prec_shift;
-	int16_t adjust_a[DPU_MAX_DE_CURVES];
-	int16_t adjust_b[DPU_MAX_DE_CURVES];
-	int16_t adjust_c[DPU_MAX_DE_CURVES];
-};
-
-/**
- * struct dpu_drm_scaler_v2 - version 2 of struct dpu_drm_scaler
- * @enable:            Scaler enable
- * @dir_en:            Detail enhancer enable
- * @pe:                Pixel extension settings
- * @horz_decimate:     Horizontal decimation factor
- * @vert_decimate:     Vertical decimation factor
- * @init_phase_x:      Initial scaler phase values for x
- * @phase_step_x:      Phase step values for x
- * @init_phase_y:      Initial scaler phase values for y
- * @phase_step_y:      Phase step values for y
- * @preload_x:         Horizontal preload value
- * @preload_y:         Vertical preload value
- * @src_width:         Source width
- * @src_height:        Source height
- * @dst_width:         Destination width
- * @dst_height:        Destination height
- * @y_rgb_filter_cfg:  Y/RGB plane filter configuration
- * @uv_filter_cfg:     UV plane filter configuration
- * @alpha_filter_cfg:  Alpha filter configuration
- * @blend_cfg:         Selection of blend coefficients
- * @lut_flag:          LUT configuration flags
- * @dir_lut_idx:       2d 4x4 LUT index
- * @y_rgb_cir_lut_idx: Y/RGB circular LUT index
- * @uv_cir_lut_idx:    UV circular LUT index
- * @y_rgb_sep_lut_idx: Y/RGB separable LUT index
- * @uv_sep_lut_idx:    UV separable LUT index
- * @de:                Detail enhancer settings
- */
-struct dpu_drm_scaler_v2 {
-	/*
-	 * General definitions
-	 */
-	uint32_t enable;
-	uint32_t dir_en;
-
-	/*
-	 * Pix ext settings
-	 */
-	struct dpu_drm_pix_ext_v1 pe;
-
-	/*
-	 * Decimation settings
-	 */
-	uint32_t horz_decimate;
-	uint32_t vert_decimate;
-
-	/*
-	 * Phase settings
-	 */
-	int32_t init_phase_x[DPU_MAX_PLANES];
-	int32_t phase_step_x[DPU_MAX_PLANES];
-	int32_t init_phase_y[DPU_MAX_PLANES];
-	int32_t phase_step_y[DPU_MAX_PLANES];
-
-	uint32_t preload_x[DPU_MAX_PLANES];
-	uint32_t preload_y[DPU_MAX_PLANES];
-	uint32_t src_width[DPU_MAX_PLANES];
-	uint32_t src_height[DPU_MAX_PLANES];
-
-	uint32_t dst_width;
-	uint32_t dst_height;
-
-	uint32_t y_rgb_filter_cfg;
-	uint32_t uv_filter_cfg;
-	uint32_t alpha_filter_cfg;
-	uint32_t blend_cfg;
-
-	uint32_t lut_flag;
-	uint32_t dir_lut_idx;
-
-	/* for Y(RGB) and UV planes*/
-	uint32_t y_rgb_cir_lut_idx;
-	uint32_t uv_cir_lut_idx;
-	uint32_t y_rgb_sep_lut_idx;
-	uint32_t uv_sep_lut_idx;
-
-	/*
-	 * Detail enhancer settings
-	 */
-	struct dpu_drm_de_v1 de;
-};
-
 /* Number of dest scalers supported */
 #define DPU_MAX_DS_COUNT 2
 
diff --git a/include/uapi/drm/msm_drm.h b/include/uapi/drm/msm_drm.h
index 404f201..60b1a30 100644
--- a/include/uapi/drm/msm_drm.h
+++ b/include/uapi/drm/msm_drm.h
@@ -26,7 +26,6 @@
 #define __MSM_DRM_H__
 
 #include "drm.h"
-#include "dpu_drm.h"
 
 #if defined(__cplusplus)
 extern "C" {
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

_______________________________________________
Freedreno mailing list
Freedreno@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/freedreno

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

* [DPU PATCH v2 3/7] drm/msm: enable zpos normalization
       [not found] ` <1528256738-30652-1-git-send-email-jsanka-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
  2018-06-06  3:45   ` [DPU PATCH v2 2/7] drm/msm/dpu: clean up dpu plane " Jeykumar Sankaran
@ 2018-06-06  3:45   ` Jeykumar Sankaran
  2018-06-06  3:45   ` [DPU PATCH v2 4/7] drm/msm/dpu: switch to drm zpos property Jeykumar Sankaran
                     ` (2 subsequent siblings)
  4 siblings, 0 replies; 10+ messages in thread
From: Jeykumar Sankaran @ 2018-06-06  3:45 UTC (permalink / raw)
  To: dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	freedreno-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	linux-arm-msm-u79uwXL29TY76Z2rM5mHXA
  Cc: hoegsberg-hpIqsD4AKlfQT0dZR+AlfA, Jeykumar Sankaran,
	seanpaul-F7+t8E8rja9g9hUCZPvPmw,
	robdclark-Re5JQEeQqe8AvxtiuMwx3w

Enable drm core zpos normalization for planes.

changes in v2:
	- none

Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
---
 drivers/gpu/drm/msm/msm_drv.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c
index ebc40a9..549359e 100644
--- a/drivers/gpu/drm/msm/msm_drv.c
+++ b/drivers/gpu/drm/msm/msm_drv.c
@@ -592,6 +592,9 @@ static int msm_drm_init(struct device *dev, struct drm_driver *drv)
 	ddev->mode_config.funcs = &mode_config_funcs;
 	ddev->mode_config.helper_private = &mode_config_helper_funcs;
 
+	/* Enable normalization of plane zpos */
+	ddev->mode_config.normalize_zpos = true;
+
 	if (kms) {
 		ret = kms->funcs->hw_init(kms);
 		if (ret) {
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

_______________________________________________
Freedreno mailing list
Freedreno@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/freedreno

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

* [DPU PATCH v2 4/7] drm/msm/dpu: switch to drm zpos property
       [not found] ` <1528256738-30652-1-git-send-email-jsanka-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
  2018-06-06  3:45   ` [DPU PATCH v2 2/7] drm/msm/dpu: clean up dpu plane " Jeykumar Sankaran
  2018-06-06  3:45   ` [DPU PATCH v2 3/7] drm/msm: enable zpos normalization Jeykumar Sankaran
@ 2018-06-06  3:45   ` Jeykumar Sankaran
  2018-06-06  3:45   ` [DPU PATCH v2 5/7] drm/msm/dpu: clean up dpu crtc custom properties Jeykumar Sankaran
  2018-06-06  3:45   ` [DPU PATCH v2 6/7] drm/msm: remove msm_prop files Jeykumar Sankaran
  4 siblings, 0 replies; 10+ messages in thread
From: Jeykumar Sankaran @ 2018-06-06  3:45 UTC (permalink / raw)
  To: dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	freedreno-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	linux-arm-msm-u79uwXL29TY76Z2rM5mHXA
  Cc: hoegsberg-hpIqsD4AKlfQT0dZR+AlfA, Jeykumar Sankaran,
	seanpaul-F7+t8E8rja9g9hUCZPvPmw,
	robdclark-Re5JQEeQqe8AvxtiuMwx3w

Replace custom plane zpos property with drm core zpos
property. CRTC relies on the normalized zpos values
to configure blend stages of each plane.

changes in v2:
	- Move out unrelated changes in plane init (Sean Paul)

Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
---
 drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c  | 36 +------------------------------
 drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 16 +++++++++++---
 2 files changed, 14 insertions(+), 38 deletions(-)

diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
index 24bf9c4..48361fb 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
@@ -2582,24 +2582,6 @@ struct plane_state {
 	u32 pipe_id;
 };
 
-static int pstate_cmp(const void *a, const void *b)
-{
-	struct plane_state *pa = (struct plane_state *)a;
-	struct plane_state *pb = (struct plane_state *)b;
-	int rc = 0;
-	int pa_zpos, pb_zpos;
-
-	pa_zpos = dpu_plane_get_property(pa->dpu_pstate, PLANE_PROP_ZPOS);
-	pb_zpos = dpu_plane_get_property(pb->dpu_pstate, PLANE_PROP_ZPOS);
-
-	if (pa_zpos != pb_zpos)
-		rc = pa_zpos - pb_zpos;
-	else
-		rc = pa->drm_pstate->crtc_x - pb->drm_pstate->crtc_x;
-
-	return rc;
-}
-
 static int dpu_crtc_atomic_check(struct drm_crtc *crtc,
 		struct drm_crtc_state *state)
 {
@@ -2665,8 +2647,7 @@ static int dpu_crtc_atomic_check(struct drm_crtc *crtc,
 
 		pstates[cnt].dpu_pstate = to_dpu_plane_state(pstate);
 		pstates[cnt].drm_pstate = pstate;
-		pstates[cnt].stage = dpu_plane_get_property(
-				pstates[cnt].dpu_pstate, PLANE_PROP_ZPOS);
+		pstates[cnt].stage = pstate->normalized_zpos;
 		pstates[cnt].pipe_id = dpu_plane_pipe(plane);
 
 		/* check dim layer stage with every plane */
@@ -2722,21 +2703,6 @@ static int dpu_crtc_atomic_check(struct drm_crtc *crtc,
 		}
 	}
 
-	/* assign mixer stages based on sorted zpos property */
-	sort(pstates, cnt, sizeof(pstates[0]), pstate_cmp, NULL);
-
-	if (!dpu_is_custom_client()) {
-		int stage_old = pstates[0].stage;
-
-		z_pos = 0;
-		for (i = 0; i < cnt; i++) {
-			if (stage_old != pstates[i].stage)
-				++z_pos;
-			stage_old = pstates[i].stage;
-			pstates[i].stage = z_pos;
-		}
-	}
-
 	z_pos = -1;
 	for (i = 0; i < cnt; i++) {
 		/* reset counts at every new blend stage */
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
index 36e3c15..28735c8 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
@@ -59,6 +59,7 @@
 #define DPU_NAME_SIZE  12
 
 #define DPU_PLANE_COLOR_FILL_FLAG	BIT(31)
+#define DPU_ZPOS_MAX 255
 
 /* multirect rect index */
 enum {
@@ -1518,9 +1519,6 @@ static void _dpu_plane_install_properties(struct drm_plane *plane,
 		/* reserve zpos == 0 for primary planes */
 		zpos_def = drm_plane_index(plane) + 1;
 	}
-
-	msm_property_install_range(&pdpu->property_info, "zpos",
-		0x0, 0, zpos_max, zpos_def, PLANE_PROP_ZPOS);
 }
 
 static int dpu_plane_atomic_set_property(struct drm_plane *plane,
@@ -1958,6 +1956,7 @@ struct drm_plane *dpu_plane_init(struct drm_device *dev,
 	struct msm_drm_private *priv;
 	struct dpu_kms *kms;
 	enum drm_plane_type type;
+	int zpos_max = DPU_ZPOS_MAX;
 	int ret = -EINVAL;
 
 	if (!dev) {
@@ -2051,6 +2050,17 @@ struct drm_plane *dpu_plane_init(struct drm_device *dev,
 
 	pdpu->catalog = kms->catalog;
 
+	if (kms->catalog->mixer_count &&
+		kms->catalog->mixer[0].sblk->maxblendstages) {
+		zpos_max = kms->catalog->mixer[0].sblk->maxblendstages - 1;
+		if (zpos_max > DPU_STAGE_MAX - DPU_STAGE_0 - 1)
+			zpos_max = DPU_STAGE_MAX - DPU_STAGE_0 - 1;
+	}
+
+	ret = drm_plane_create_zpos_property(plane, 0, 0, zpos_max);
+	if (ret)
+		DPU_ERROR("failed to install zpos property, rc = %d\n", ret);
+
 	/* success! finalize initialization */
 	drm_plane_helper_add(plane, &dpu_plane_helper_funcs);
 
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

_______________________________________________
Freedreno mailing list
Freedreno@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/freedreno

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

* [DPU PATCH v2 5/7] drm/msm/dpu: clean up dpu crtc custom properties
       [not found] ` <1528256738-30652-1-git-send-email-jsanka-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
                     ` (2 preceding siblings ...)
  2018-06-06  3:45   ` [DPU PATCH v2 4/7] drm/msm/dpu: switch to drm zpos property Jeykumar Sankaran
@ 2018-06-06  3:45   ` Jeykumar Sankaran
  2018-06-06  3:45   ` [DPU PATCH v2 6/7] drm/msm: remove msm_prop files Jeykumar Sankaran
  4 siblings, 0 replies; 10+ messages in thread
From: Jeykumar Sankaran @ 2018-06-06  3:45 UTC (permalink / raw)
  To: dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	freedreno-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	linux-arm-msm-u79uwXL29TY76Z2rM5mHXA
  Cc: hoegsberg-hpIqsD4AKlfQT0dZR+AlfA, Jeykumar Sankaran,
	seanpaul-F7+t8E8rja9g9hUCZPvPmw,
	robdclark-Re5JQEeQqe8AvxtiuMwx3w

Remove dpu crtc custom properties and its handlers.

changes in v2:
	- none

Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
---
 drivers/gpu/drm/msm/Makefile                  |   1 -
 drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c |  28 -
 drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c      | 856 +-------------------------
 drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h      |  27 +-
 drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c   |  12 -
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ds.c     | 149 -----
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ds.h     | 111 ----
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.c     |  67 --
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.h     |  14 -
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_mdss.h   |  16 -
 drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c        |  71 +--
 drivers/gpu/drm/msm/msm_drv.h                 |  15 -
 12 files changed, 11 insertions(+), 1356 deletions(-)
 delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ds.c
 delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ds.h

diff --git a/drivers/gpu/drm/msm/Makefile b/drivers/gpu/drm/msm/Makefile
index 7bc3921..d289503 100644
--- a/drivers/gpu/drm/msm/Makefile
+++ b/drivers/gpu/drm/msm/Makefile
@@ -57,7 +57,6 @@ msm-y := \
 	disp/dpu1/dpu_hw_catalog.o \
 	disp/dpu1/dpu_hw_cdm.o \
 	disp/dpu1/dpu_hw_ctl.o \
-	disp/dpu1/dpu_hw_ds.o \
 	disp/dpu1/dpu_hw_interrupts.o \
 	disp/dpu1/dpu_hw_intf.o \
 	disp/dpu1/dpu_hw_lm.o \
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c
index 981f77f..c4820de 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c
@@ -102,34 +102,6 @@ static void _dpu_core_perf_calc_crtc(struct dpu_kms *kms,
 	dpu_cstate = to_dpu_crtc_state(state);
 	memset(perf, 0, sizeof(struct dpu_core_perf_params));
 
-	perf->bw_ctl[DPU_POWER_HANDLE_DBUS_ID_MNOC] =
-		dpu_crtc_get_property(dpu_cstate, CRTC_PROP_CORE_AB);
-	perf->max_per_pipe_ib[DPU_POWER_HANDLE_DBUS_ID_MNOC] =
-		dpu_crtc_get_property(dpu_cstate, CRTC_PROP_CORE_IB);
-
-	if (dpu_cstate->bw_split_vote) {
-		perf->bw_ctl[DPU_POWER_HANDLE_DBUS_ID_LLCC] =
-			dpu_crtc_get_property(dpu_cstate, CRTC_PROP_LLCC_AB);
-		perf->max_per_pipe_ib[DPU_POWER_HANDLE_DBUS_ID_LLCC] =
-			dpu_crtc_get_property(dpu_cstate, CRTC_PROP_LLCC_IB);
-		perf->bw_ctl[DPU_POWER_HANDLE_DBUS_ID_EBI] =
-			dpu_crtc_get_property(dpu_cstate, CRTC_PROP_DRAM_AB);
-		perf->max_per_pipe_ib[DPU_POWER_HANDLE_DBUS_ID_EBI] =
-			dpu_crtc_get_property(dpu_cstate, CRTC_PROP_DRAM_IB);
-	} else {
-		perf->bw_ctl[DPU_POWER_HANDLE_DBUS_ID_LLCC] =
-			dpu_crtc_get_property(dpu_cstate, CRTC_PROP_CORE_AB);
-		perf->max_per_pipe_ib[DPU_POWER_HANDLE_DBUS_ID_LLCC] =
-			dpu_crtc_get_property(dpu_cstate, CRTC_PROP_CORE_IB);
-		perf->bw_ctl[DPU_POWER_HANDLE_DBUS_ID_EBI] =
-			dpu_crtc_get_property(dpu_cstate, CRTC_PROP_CORE_AB);
-		perf->max_per_pipe_ib[DPU_POWER_HANDLE_DBUS_ID_EBI] =
-			dpu_crtc_get_property(dpu_cstate, CRTC_PROP_CORE_IB);
-	}
-
-	perf->core_clk_rate =
-			dpu_crtc_get_property(dpu_cstate, CRTC_PROP_CORE_CLK);
-
 	if (!dpu_cstate->bw_control) {
 		for (i = 0; i < DPU_POWER_HANDLE_DBUS_ID_MAX; i++) {
 			perf->bw_ctl[i] = kms->catalog->perf.max_bw_high *
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
index 48361fb..0c25c45 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
@@ -570,18 +570,6 @@ static void _dpu_crtc_deinit_events(struct dpu_crtc *dpu_crtc)
 		return;
 }
 
-/**
- * dpu_crtc_destroy_dest_scaler - free memory allocated for scaler lut
- * @dpu_crtc: Pointer to dpu crtc
- */
-static void _dpu_crtc_destroy_dest_scaler(struct dpu_crtc *dpu_crtc)
-{
-	if (!dpu_crtc)
-		return;
-
-	kfree(dpu_crtc->scl3_lut_cfg);
-}
-
 static void dpu_crtc_destroy(struct drm_crtc *crtc)
 {
 	struct dpu_crtc *dpu_crtc = to_dpu_crtc(crtc);
@@ -594,7 +582,6 @@ static void dpu_crtc_destroy(struct drm_crtc *crtc)
 	if (dpu_crtc->blob_info)
 		drm_property_blob_put(dpu_crtc->blob_info);
 	msm_property_destroy(&dpu_crtc->property_info);
-	_dpu_crtc_destroy_dest_scaler(dpu_crtc);
 
 	_dpu_crtc_deinit_events(dpu_crtc);
 
@@ -630,71 +617,6 @@ static void _dpu_crtc_setup_blend_cfg(struct dpu_crtc_mixer *mixer,
 				DPU_BLEND_BG_ALPHA_BG_CONST);
 }
 
-static void _dpu_crtc_setup_dim_layer_cfg(struct drm_crtc *crtc,
-		struct dpu_crtc *dpu_crtc, struct dpu_crtc_mixer *mixer,
-		struct dpu_hw_dim_layer *dim_layer)
-{
-	struct dpu_crtc_state *cstate;
-	struct dpu_hw_mixer *lm;
-	struct dpu_hw_dim_layer split_dim_layer;
-	int i;
-
-	if (!dim_layer->rect.w || !dim_layer->rect.h) {
-		DPU_DEBUG("empty dim_layer\n");
-		return;
-	}
-
-	cstate = to_dpu_crtc_state(crtc->state);
-
-	DPU_DEBUG("dim_layer - flags:%d, stage:%d\n",
-			dim_layer->flags, dim_layer->stage);
-
-	split_dim_layer.stage = dim_layer->stage;
-	split_dim_layer.color_fill = dim_layer->color_fill;
-
-	/*
-	 * traverse through the layer mixers attached to crtc and find the
-	 * intersecting dim layer rect in each LM and program accordingly.
-	 */
-	for (i = 0; i < dpu_crtc->num_mixers; i++) {
-		split_dim_layer.flags = dim_layer->flags;
-
-		dpu_kms_rect_intersect(&cstate->lm_bounds[i], &dim_layer->rect,
-					&split_dim_layer.rect);
-		if (dpu_kms_rect_is_null(&split_dim_layer.rect)) {
-			/*
-			 * no extra programming required for non-intersecting
-			 * layer mixers with INCLUSIVE dim layer
-			 */
-			if (split_dim_layer.flags & DPU_DRM_DIM_LAYER_INCLUSIVE)
-				continue;
-
-			/*
-			 * program the other non-intersecting layer mixers with
-			 * INCLUSIVE dim layer of full size for uniformity
-			 * with EXCLUSIVE dim layer config.
-			 */
-			split_dim_layer.flags &= ~DPU_DRM_DIM_LAYER_EXCLUSIVE;
-			split_dim_layer.flags |= DPU_DRM_DIM_LAYER_INCLUSIVE;
-			memcpy(&split_dim_layer.rect, &cstate->lm_bounds[i],
-					sizeof(split_dim_layer.rect));
-
-		} else {
-			split_dim_layer.rect.x =
-					split_dim_layer.rect.x -
-						cstate->lm_bounds[i].x;
-		}
-
-		DPU_DEBUG("split_dim_layer - LM:%d, rect:{%d,%d,%d,%d}}\n",
-			i, split_dim_layer.rect.x, split_dim_layer.rect.y,
-			split_dim_layer.rect.w, split_dim_layer.rect.h);
-
-		lm = mixer[i].hw_lm;
-		mixer[i].mixer_op_mode |= 1 << split_dim_layer.stage;
-		lm->ops.setup_dim_layer(lm, &split_dim_layer);
-	}
-}
-
 static void _dpu_crtc_program_lm_output_roi(struct drm_crtc *crtc)
 {
 	struct dpu_crtc *dpu_crtc;
@@ -738,7 +660,6 @@ static void _dpu_crtc_blend_setup_mixer(struct drm_crtc *crtc,
 	u32 flush_mask;
 	uint32_t stage_idx, lm_idx;
 	int zpos_cnt[DPU_STAGE_MAX + 1] = { 0 };
-	int i;
 	bool bg_alpha_enable = false;
 
 	if (!dpu_crtc || !mixer) {
@@ -814,13 +735,6 @@ static void _dpu_crtc_blend_setup_mixer(struct drm_crtc *crtc,
 		}
 	}
 
-	if (lm && lm->ops.setup_dim_layer) {
-		cstate = to_dpu_crtc_state(crtc->state);
-		for (i = 0; i < cstate->num_dim_layers; i++)
-			_dpu_crtc_setup_dim_layer_cfg(crtc, dpu_crtc,
-					mixer, &cstate->dim_layer[i]);
-	}
-
 	 _dpu_crtc_program_lm_output_roi(crtc);
 }
 
@@ -862,11 +776,6 @@ static void _dpu_crtc_blend_setup(struct drm_crtc *crtc)
 		if (mixer[i].hw_ctl->ops.clear_all_blendstages)
 			mixer[i].hw_ctl->ops.clear_all_blendstages(
 					mixer[i].hw_ctl);
-
-		/* clear dim_layer settings */
-		lm = mixer[i].hw_lm;
-		if (lm->ops.clear_dim_layer)
-			lm->ops.clear_dim_layer(lm);
 	}
 
 	/* initialize stage cfg */
@@ -898,163 +807,6 @@ static void _dpu_crtc_blend_setup(struct drm_crtc *crtc)
 }
 
 /**
- * _dpu_crtc_setup_scaler3_lut - Set up scaler lut
- * LUTs are configured only once during boot
- * @dpu_crtc: Pointer to dpu crtc
- * @cstate: Pointer to dpu crtc state
- */
-static int _dpu_crtc_set_dest_scaler_lut(struct dpu_crtc *dpu_crtc,
-		struct dpu_crtc_state *cstate, uint32_t lut_idx)
-{
-	struct dpu_hw_scaler3_lut_cfg *cfg;
-	u32 *lut_data = NULL;
-	size_t len = 0;
-	int ret = 0;
-
-	if (!dpu_crtc || !cstate || !dpu_crtc->scl3_lut_cfg) {
-		DPU_ERROR("invalid args\n");
-		return -EINVAL;
-	}
-
-	if (dpu_crtc->scl3_lut_cfg->is_configured) {
-		DPU_DEBUG("lut already configured\n");
-		return 0;
-	}
-
-	lut_data = msm_property_get_blob(&dpu_crtc->property_info,
-			&cstate->property_state, &len, lut_idx);
-	if (!lut_data || !len) {
-		DPU_ERROR("lut(%d): no data, len(%zu)\n", lut_idx, len);
-		return -ENODATA;
-	}
-
-	cfg = dpu_crtc->scl3_lut_cfg;
-
-	switch (lut_idx) {
-	case CRTC_PROP_DEST_SCALER_LUT_ED:
-		cfg->dir_lut = lut_data;
-		cfg->dir_len = len;
-		break;
-	case CRTC_PROP_DEST_SCALER_LUT_CIR:
-		cfg->cir_lut = lut_data;
-		cfg->cir_len = len;
-		break;
-	case CRTC_PROP_DEST_SCALER_LUT_SEP:
-		cfg->sep_lut = lut_data;
-		cfg->sep_len = len;
-		break;
-	default:
-		ret = -EINVAL;
-		DPU_ERROR("invalid LUT index = %d", lut_idx);
-		break;
-	}
-
-	if (cfg->dir_lut && cfg->cir_lut && cfg->sep_lut)
-		cfg->is_configured = true;
-
-	return ret;
-}
-
-/**
- * _dpu_crtc_dest_scaler_setup - Set up dest scaler block
- * @crtc: Pointer to drm crtc
- */
-static void _dpu_crtc_dest_scaler_setup(struct drm_crtc *crtc)
-{
-	struct dpu_crtc *dpu_crtc;
-	struct dpu_crtc_state *cstate;
-	struct dpu_hw_mixer *hw_lm;
-	struct dpu_hw_ctl *hw_ctl;
-	struct dpu_hw_ds *hw_ds;
-	struct dpu_hw_ds_cfg *cfg;
-	struct dpu_kms *kms;
-	u32 flush_mask = 0, op_mode = 0;
-	u32 lm_idx = 0, num_mixers = 0;
-	int i, count = 0;
-
-	if (!crtc)
-		return;
-
-	dpu_crtc   = to_dpu_crtc(crtc);
-	cstate = to_dpu_crtc_state(crtc->state);
-	kms    = _dpu_crtc_get_kms(crtc);
-	num_mixers = dpu_crtc->num_mixers;
-
-	DPU_DEBUG("crtc%d\n", crtc->base.id);
-
-	if (!cstate->ds_dirty) {
-		DPU_DEBUG("no change in settings, skip commit\n");
-	} else if (!kms || !kms->catalog) {
-		DPU_ERROR("invalid parameters\n");
-	} else if (!kms->catalog->mdp[0].has_dest_scaler) {
-		DPU_DEBUG("dest scaler feature not supported\n");
-	} else if (num_mixers > CRTC_DUAL_MIXERS) {
-		DPU_ERROR("invalid number mixers: %d\n", num_mixers);
-	} else if (!dpu_crtc->scl3_lut_cfg->is_configured) {
-		DPU_DEBUG("no LUT data available\n");
-	} else {
-		count = cstate->num_ds_enabled ? cstate->num_ds : num_mixers;
-
-		for (i = 0; i < count; i++) {
-			cfg = &cstate->ds_cfg[i];
-
-			if (!cfg->flags)
-				continue;
-
-			lm_idx = cfg->ndx;
-			hw_lm  = dpu_crtc->mixers[lm_idx].hw_lm;
-			hw_ctl = dpu_crtc->mixers[lm_idx].hw_ctl;
-			hw_ds  = dpu_crtc->mixers[lm_idx].hw_ds;
-
-			/* Setup op mode - Dual/single */
-			if (cfg->flags & DPU_DRM_DESTSCALER_ENABLE)
-				op_mode |= BIT(hw_ds->idx - DS_0);
-
-			if ((i == count-1) && hw_ds->ops.setup_opmode) {
-				op_mode |= (cstate->num_ds_enabled ==
-					CRTC_DUAL_MIXERS) ?
-					DPU_DS_OP_MODE_DUAL : 0;
-				hw_ds->ops.setup_opmode(hw_ds, op_mode);
-				DPU_EVT32(DRMID(crtc), op_mode);
-			}
-
-			/* Setup scaler */
-			if ((cfg->flags & DPU_DRM_DESTSCALER_SCALE_UPDATE) ||
-				(cfg->flags &
-					DPU_DRM_DESTSCALER_ENHANCER_UPDATE)) {
-				if (hw_ds->ops.setup_scaler)
-					hw_ds->ops.setup_scaler(hw_ds,
-							cfg->scl3_cfg,
-							dpu_crtc->scl3_lut_cfg);
-
-				/**
-				 * Clear the flags as the block doesn't have to
-				 * be programmed in each commit if no updates
-				 */
-				cfg->flags &= ~DPU_DRM_DESTSCALER_SCALE_UPDATE;
-				cfg->flags &=
-					~DPU_DRM_DESTSCALER_ENHANCER_UPDATE;
-			}
-
-			/*
-			 * Dest scaler shares the flush bit of the LM in control
-			 */
-			if (cfg->set_lm_flush && hw_lm && hw_ctl &&
-				hw_ctl->ops.get_bitmask_mixer) {
-				flush_mask = hw_ctl->ops.get_bitmask_mixer(
-						hw_ctl, hw_lm->idx);
-				DPU_DEBUG("Set lm[%d] flush = %d",
-					hw_lm->idx, flush_mask);
-				hw_ctl->ops.update_pending_flush(hw_ctl,
-								flush_mask);
-			}
-			cfg->set_lm_flush = false;
-		}
-		cstate->ds_dirty = false;
-	}
-}
-
-/**
  *  _dpu_crtc_complete_flip - signal pending page_flip events
  * Any pending vblank events are added to the vblank_event_list
  * so that the next vblank interrupt shall signal them.
@@ -1312,448 +1064,6 @@ void dpu_crtc_complete_commit(struct drm_crtc *crtc,
 	DPU_EVT32_VERBOSE(DRMID(crtc));
 }
 
-/* _dpu_crtc_set_idle_timeout - update idle timeout wait duration */
-static void _dpu_crtc_set_idle_timeout(struct drm_crtc *crtc, u64 val)
-{
-	struct drm_encoder *encoder;
-
-	if (!crtc) {
-		DPU_ERROR("invalid crtc\n");
-		return;
-	}
-
-	drm_for_each_encoder(encoder, crtc->dev) {
-		if (encoder->crtc != crtc)
-			continue;
-
-		dpu_encoder_set_idle_timeout(encoder, (u32) val);
-	}
-}
-
-/**
- * _dpu_crtc_set_dim_layer_v1 - copy dim layer settings from userspace
- * @cstate:      Pointer to dpu crtc state
- * @user_ptr:    User ptr for dpu_drm_dim_layer_v1 struct
- */
-static void _dpu_crtc_set_dim_layer_v1(struct dpu_crtc_state *cstate,
-		void __user *usr_ptr)
-{
-	struct dpu_drm_dim_layer_v1 dim_layer_v1;
-	struct dpu_drm_dim_layer_cfg *user_cfg;
-	struct dpu_hw_dim_layer *dim_layer;
-	u32 count, i;
-
-	if (!cstate) {
-		DPU_ERROR("invalid cstate\n");
-		return;
-	}
-	dim_layer = cstate->dim_layer;
-
-	if (!usr_ptr) {
-		DPU_DEBUG("dim_layer data removed\n");
-		return;
-	}
-
-	if (copy_from_user(&dim_layer_v1, usr_ptr, sizeof(dim_layer_v1))) {
-		DPU_ERROR("failed to copy dim_layer data\n");
-		return;
-	}
-
-	count = dim_layer_v1.num_layers;
-	if (count > DPU_MAX_DIM_LAYERS) {
-		DPU_ERROR("invalid number of dim_layers:%d", count);
-		return;
-	}
-
-	/* populate from user space */
-	cstate->num_dim_layers = count;
-	for (i = 0; i < count; i++) {
-		user_cfg = &dim_layer_v1.layer_cfg[i];
-
-		dim_layer[i].flags = user_cfg->flags;
-		dim_layer[i].stage = user_cfg->stage + DPU_STAGE_0;
-
-		dim_layer[i].rect.x = user_cfg->rect.x1;
-		dim_layer[i].rect.y = user_cfg->rect.y1;
-		dim_layer[i].rect.w = user_cfg->rect.x2 - user_cfg->rect.x1;
-		dim_layer[i].rect.h = user_cfg->rect.y2 - user_cfg->rect.y1;
-
-		dim_layer[i].color_fill = (struct dpu_mdss_color) {
-				user_cfg->color_fill.color_0,
-				user_cfg->color_fill.color_1,
-				user_cfg->color_fill.color_2,
-				user_cfg->color_fill.color_3,
-		};
-
-		DPU_DEBUG("dim_layer[%d] - flags:%d, stage:%d\n",
-				i, dim_layer[i].flags, dim_layer[i].stage);
-		DPU_DEBUG(" rect:{%d,%d,%d,%d}, color:{%d,%d,%d,%d}\n",
-				dim_layer[i].rect.x, dim_layer[i].rect.y,
-				dim_layer[i].rect.w, dim_layer[i].rect.h,
-				dim_layer[i].color_fill.color_0,
-				dim_layer[i].color_fill.color_1,
-				dim_layer[i].color_fill.color_2,
-				dim_layer[i].color_fill.color_3);
-	}
-}
-
-/**
- * _dpu_crtc_dest_scaler_init - allocate memory for scaler lut
- * @dpu_crtc    :  Pointer to dpu crtc
- * @catalog :  Pointer to mdss catalog info
- */
-static void _dpu_crtc_dest_scaler_init(struct dpu_crtc *dpu_crtc,
-				struct dpu_mdss_cfg *catalog)
-{
-	if (!dpu_crtc || !catalog)
-		return;
-
-	if (!catalog->mdp[0].has_dest_scaler) {
-		DPU_DEBUG("dest scaler feature not supported\n");
-		return;
-	}
-
-	dpu_crtc->scl3_lut_cfg = kzalloc(sizeof(struct dpu_hw_scaler3_lut_cfg),
-				GFP_KERNEL);
-	if (!dpu_crtc->scl3_lut_cfg)
-		DPU_ERROR("failed to create scale LUT for dest scaler");
-}
-
-/**
- * _dpu_crtc_set_dest_scaler - copy dest scaler settings from userspace
- * @dpu_crtc   :  Pointer to dpu crtc
- * @cstate :  Pointer to dpu crtc state
- * @usr_ptr:  User ptr for dpu_drm_dest_scaler_data struct
- */
-static int _dpu_crtc_set_dest_scaler(struct dpu_crtc *dpu_crtc,
-				struct dpu_crtc_state *cstate,
-				void __user *usr_ptr)
-{
-	struct dpu_drm_dest_scaler_data ds_data;
-	struct dpu_drm_dest_scaler_cfg *ds_cfg_usr;
-	struct dpu_drm_scaler_v2 scaler_v2;
-	void __user *scaler_v2_usr;
-	int i, count, ret = 0;
-
-	if (!dpu_crtc || !cstate) {
-		DPU_ERROR("invalid dpu_crtc/state\n");
-		return -EINVAL;
-	}
-
-	DPU_DEBUG("crtc %s\n", dpu_crtc->name);
-
-	cstate->num_ds = 0;
-	cstate->ds_dirty = false;
-	if (!usr_ptr) {
-		DPU_DEBUG("ds data removed\n");
-		return 0;
-	}
-
-	if (copy_from_user(&ds_data, usr_ptr, sizeof(ds_data))) {
-		DPU_ERROR("failed to copy dest scaler data from user\n");
-		return -EINVAL;
-	}
-
-	count = ds_data.num_dest_scaler;
-	if (!dpu_crtc->num_mixers || count > dpu_crtc->num_mixers ||
-		(count && (count != dpu_crtc->num_mixers) &&
-		!(ds_data.ds_cfg[0].flags & DPU_DRM_DESTSCALER_PU_ENABLE))) {
-		DPU_ERROR("invalid config:num ds(%d), mixers(%d),flags(%d)\n",
-			count, dpu_crtc->num_mixers, ds_data.ds_cfg[0].flags);
-		return -EINVAL;
-	}
-
-	/* Populate from user space */
-	for (i = 0; i < count; i++) {
-		ds_cfg_usr = &ds_data.ds_cfg[i];
-
-		cstate->ds_cfg[i].ndx = ds_cfg_usr->index;
-		cstate->ds_cfg[i].flags = ds_cfg_usr->flags;
-		cstate->ds_cfg[i].lm_width = ds_cfg_usr->lm_width;
-		cstate->ds_cfg[i].lm_height = ds_cfg_usr->lm_height;
-		cstate->ds_cfg[i].scl3_cfg = NULL;
-
-		if (ds_cfg_usr->scaler_cfg) {
-			scaler_v2_usr =
-			(void __user *)((uintptr_t)ds_cfg_usr->scaler_cfg);
-
-			memset(&scaler_v2, 0, sizeof(scaler_v2));
-
-			cstate->ds_cfg[i].scl3_cfg =
-				kzalloc(sizeof(struct dpu_hw_scaler3_cfg),
-					GFP_KERNEL);
-
-			if (!cstate->ds_cfg[i].scl3_cfg) {
-				ret = -ENOMEM;
-				goto err;
-			}
-
-			if (copy_from_user(&scaler_v2, scaler_v2_usr,
-					sizeof(scaler_v2))) {
-				DPU_ERROR("scale data:copy from user failed\n");
-				ret = -EINVAL;
-				goto err;
-			}
-
-			dpu_set_scaler_v2(cstate->ds_cfg[i].scl3_cfg,
-					&scaler_v2);
-
-			DPU_DEBUG("en(%d)dir(%d)de(%d) src(%dx%d) dst(%dx%d)\n",
-				scaler_v2.enable, scaler_v2.dir_en,
-				scaler_v2.de.enable, scaler_v2.src_width[0],
-				scaler_v2.src_height[0], scaler_v2.dst_width,
-				scaler_v2.dst_height);
-			DPU_EVT32_VERBOSE(DRMID(&dpu_crtc->base),
-				scaler_v2.enable, scaler_v2.dir_en,
-				scaler_v2.de.enable, scaler_v2.src_width[0],
-				scaler_v2.src_height[0], scaler_v2.dst_width,
-				scaler_v2.dst_height);
-		}
-
-		DPU_DEBUG("ds cfg[%d]-ndx(%d) flags(%d) lm(%dx%d)\n",
-			i, ds_cfg_usr->index, ds_cfg_usr->flags,
-			ds_cfg_usr->lm_width, ds_cfg_usr->lm_height);
-		DPU_EVT32_VERBOSE(DRMID(&dpu_crtc->base), i, ds_cfg_usr->index,
-			ds_cfg_usr->flags, ds_cfg_usr->lm_width,
-			ds_cfg_usr->lm_height);
-	}
-
-	cstate->num_ds = count;
-	cstate->ds_dirty = true;
-	return 0;
-
-err:
-	for (; i >= 0; i--)
-		kfree(cstate->ds_cfg[i].scl3_cfg);
-
-	return ret;
-}
-
-/**
- * _dpu_crtc_check_dest_scaler_data - validate the dest scaler data
- * @crtc  :  Pointer to drm crtc
- * @state :  Pointer to drm crtc state
- */
-static int _dpu_crtc_check_dest_scaler_data(struct drm_crtc *crtc,
-				struct drm_crtc_state *state)
-{
-	struct dpu_crtc *dpu_crtc;
-	struct dpu_crtc_state *cstate;
-	struct drm_display_mode *mode;
-	struct dpu_kms *kms;
-	struct dpu_hw_ds *hw_ds;
-	struct dpu_hw_ds_cfg *cfg;
-	u32 i, ret = 0, lm_idx;
-	u32 num_ds_enable = 0;
-	u32 max_in_width = 0, max_out_width = 0;
-	u32 prev_lm_width = 0, prev_lm_height = 0;
-
-	if (!crtc || !state)
-		return -EINVAL;
-
-	dpu_crtc = to_dpu_crtc(crtc);
-	cstate = to_dpu_crtc_state(state);
-	kms = _dpu_crtc_get_kms(crtc);
-	mode = &state->adjusted_mode;
-
-	DPU_DEBUG("crtc%d\n", crtc->base.id);
-
-	if (!cstate->ds_dirty && !cstate->num_ds_enabled) {
-		DPU_DEBUG("dest scaler property not set, skip validation\n");
-		return 0;
-	}
-
-	if (!kms || !kms->catalog) {
-		DPU_ERROR("invalid parameters\n");
-		return -EINVAL;
-	}
-
-	if (!kms->catalog->mdp[0].has_dest_scaler) {
-		DPU_DEBUG("dest scaler feature not supported\n");
-		return 0;
-	}
-
-	if (!dpu_crtc->num_mixers) {
-		DPU_ERROR("mixers not allocated\n");
-		return -EINVAL;
-	}
-
-	/**
-	 * Check if sufficient hw resources are
-	 * available as per target caps & topology
-	 */
-	if (dpu_crtc->num_mixers > CRTC_DUAL_MIXERS) {
-		DPU_ERROR("invalid config: mixers(%d) max(%d)\n",
-			dpu_crtc->num_mixers, CRTC_DUAL_MIXERS);
-		ret = -EINVAL;
-		goto err;
-	}
-
-	for (i = 0; i < dpu_crtc->num_mixers; i++) {
-		if (!dpu_crtc->mixers[i].hw_lm || !dpu_crtc->mixers[i].hw_ds) {
-			DPU_ERROR("insufficient HW resources allocated\n");
-			ret = -EINVAL;
-			goto err;
-		}
-	}
-
-	/**
-	 * Check if DS needs to be enabled or disabled
-	 * In case of enable, validate the data
-	 */
-	if (!cstate->ds_dirty || !cstate->num_ds ||
-		!(cstate->ds_cfg[0].flags & DPU_DRM_DESTSCALER_ENABLE)) {
-		DPU_DEBUG("disable dest scaler,dirty(%d)num(%d)flags(%d)\n",
-			cstate->ds_dirty, cstate->num_ds,
-			cstate->ds_cfg[0].flags);
-		goto disable;
-	}
-
-	/**
-	 * No of dest scalers shouldn't exceed hw ds block count and
-	 * also, match the num of mixers unless it is partial update
-	 * left only/right only use case - currently PU + DS is not supported
-	 */
-	if (cstate->num_ds > kms->catalog->ds_count ||
-		((cstate->num_ds != dpu_crtc->num_mixers) &&
-		!(cstate->ds_cfg[0].flags & DPU_DRM_DESTSCALER_PU_ENABLE))) {
-		DPU_ERROR("invalid cfg: num_ds(%d), hw_ds_cnt(%d) flags(%d)\n",
-			cstate->num_ds, kms->catalog->ds_count,
-			cstate->ds_cfg[0].flags);
-		ret = -EINVAL;
-		goto err;
-	}
-
-	/* Validate the DS data */
-	for (i = 0; i < cstate->num_ds; i++) {
-		cfg = &cstate->ds_cfg[i];
-		lm_idx = cfg->ndx;
-
-		/**
-		 * Validate against topology
-		 * No of dest scalers should match the num of mixers
-		 * unless it is partial update left only/right only use case
-		 */
-		if (lm_idx >= dpu_crtc->num_mixers || (i != lm_idx &&
-			!(cfg->flags & DPU_DRM_DESTSCALER_PU_ENABLE))) {
-			DPU_ERROR("invalid user data(%d):idx(%d), flags(%d)\n",
-				i, lm_idx, cfg->flags);
-			ret = -EINVAL;
-			goto err;
-		}
-
-		hw_ds = dpu_crtc->mixers[lm_idx].hw_ds;
-
-		if (!max_in_width && !max_out_width) {
-			max_in_width = hw_ds->scl->top->maxinputwidth;
-			max_out_width = hw_ds->scl->top->maxoutputwidth;
-
-			if (cstate->num_ds == CRTC_DUAL_MIXERS)
-				max_in_width -= DPU_DS_OVERFETCH_SIZE;
-
-			DPU_DEBUG("max DS width [%d,%d] for num_ds = %d\n",
-				max_in_width, max_out_width, cstate->num_ds);
-		}
-
-		/* Check LM width and height */
-		if (cfg->lm_width > (mode->hdisplay/dpu_crtc->num_mixers) ||
-			cfg->lm_height > mode->vdisplay ||
-			!cfg->lm_width || !cfg->lm_height) {
-			DPU_ERROR("invalid lm size[%d,%d] display [%d,%d]\n",
-				cfg->lm_width,
-				cfg->lm_height,
-				mode->hdisplay/dpu_crtc->num_mixers,
-				mode->vdisplay);
-			ret = -E2BIG;
-			goto err;
-		}
-
-		if (!prev_lm_width && !prev_lm_height) {
-			prev_lm_width = cfg->lm_width;
-			prev_lm_height = cfg->lm_height;
-		} else {
-			if (cfg->lm_width != prev_lm_width ||
-				cfg->lm_height != prev_lm_height) {
-				DPU_ERROR("lm size:left[%d,%d], right[%d %d]\n",
-					cfg->lm_width, cfg->lm_height,
-					prev_lm_width, prev_lm_height);
-				ret = -EINVAL;
-				goto err;
-			}
-		}
-
-		/* Check scaler data */
-		if (cfg->flags & DPU_DRM_DESTSCALER_SCALE_UPDATE ||
-			cfg->flags & DPU_DRM_DESTSCALER_ENHANCER_UPDATE) {
-			if (!cfg->scl3_cfg) {
-				ret = -EINVAL;
-				DPU_ERROR("null scale data\n");
-				goto err;
-			}
-			if (cfg->scl3_cfg->src_width[0] > max_in_width ||
-				cfg->scl3_cfg->dst_width > max_out_width ||
-				!cfg->scl3_cfg->src_width[0] ||
-				!cfg->scl3_cfg->dst_width) {
-				DPU_ERROR("scale width(%d %d) for ds-%d:\n",
-					cfg->scl3_cfg->src_width[0],
-					cfg->scl3_cfg->dst_width,
-					hw_ds->idx - DS_0);
-				DPU_ERROR("scale_en = %d, DE_en =%d\n",
-					cfg->scl3_cfg->enable,
-					cfg->scl3_cfg->de.enable);
-
-				cfg->flags &=
-					~DPU_DRM_DESTSCALER_SCALE_UPDATE;
-				cfg->flags &=
-					~DPU_DRM_DESTSCALER_ENHANCER_UPDATE;
-
-				ret = -EINVAL;
-				goto err;
-			}
-		}
-
-		if (cfg->flags & DPU_DRM_DESTSCALER_ENABLE)
-			num_ds_enable++;
-
-		/**
-		 * Validation successful, indicator for flush to be issued
-		 */
-		cfg->set_lm_flush = true;
-
-		DPU_DEBUG("ds[%d]: flags = 0x%X\n",
-			hw_ds->idx - DS_0, cfg->flags);
-	}
-
-disable:
-	DPU_DEBUG("dest scaler enable status, old = %d, new = %d",
-		cstate->num_ds_enabled, num_ds_enable);
-	DPU_EVT32(DRMID(crtc), cstate->num_ds_enabled, num_ds_enable,
-		cstate->ds_dirty);
-
-	if (cstate->num_ds_enabled != num_ds_enable) {
-		/* Disabling destination scaler */
-		if (!num_ds_enable) {
-			for (i = 0; i < dpu_crtc->num_mixers; i++) {
-				cfg = &cstate->ds_cfg[i];
-				cfg->ndx = i;
-				/* Update scaler settings in disable case */
-				cfg->flags = DPU_DRM_DESTSCALER_SCALE_UPDATE;
-				cfg->scl3_cfg->enable = 0;
-				cfg->scl3_cfg->de.enable = 0;
-				cfg->set_lm_flush = true;
-			}
-		}
-		cstate->num_ds_enabled = num_ds_enable;
-		cstate->ds_dirty = true;
-	}
-
-	return 0;
-
-err:
-	cstate->ds_dirty = false;
-	return ret;
-}
-
 static void _dpu_crtc_setup_mixer_for_encoder(
 		struct drm_crtc *crtc,
 		struct drm_encoder *enc)
@@ -1764,11 +1074,10 @@ static void _dpu_crtc_setup_mixer_for_encoder(
 	struct dpu_crtc_mixer *mixer;
 	struct dpu_hw_ctl *last_valid_ctl = NULL;
 	int i;
-	struct dpu_rm_hw_iter lm_iter, ctl_iter, ds_iter;
+	struct dpu_rm_hw_iter lm_iter, ctl_iter;
 
 	dpu_rm_init_hw_iter(&lm_iter, enc->base.id, DPU_HW_BLK_LM);
 	dpu_rm_init_hw_iter(&ctl_iter, enc->base.id, DPU_HW_BLK_CTL);
-	dpu_rm_init_hw_iter(&ds_iter, enc->base.id, DPU_HW_BLK_DS);
 
 	/* Set up all the mixers and ctls reserved by this encoder */
 	for (i = dpu_crtc->num_mixers; i < ARRAY_SIZE(dpu_crtc->mixers); i++) {
@@ -1795,10 +1104,6 @@ static void _dpu_crtc_setup_mixer_for_encoder(
 			return;
 		}
 
-		/* DS may be null */
-		(void) dpu_rm_get_hw(rm, &ds_iter);
-		mixer->hw_ds = (struct dpu_hw_ds *)ds_iter.hw;
-
 		mixer->encoder = enc;
 
 		dpu_crtc->num_mixers++;
@@ -1806,9 +1111,6 @@ static void _dpu_crtc_setup_mixer_for_encoder(
 				i, mixer->hw_lm->idx - LM_0);
 		DPU_DEBUG("setup mixer %d: ctl %d\n",
 				i, mixer->hw_ctl->idx - CTL_0);
-		if (mixer->hw_ds)
-			DPU_DEBUG("setup mixer %d: ds %d\n",
-				i, mixer->hw_ds->idx - DS_0);
 	}
 }
 
@@ -1924,7 +1226,6 @@ static void dpu_crtc_atomic_begin(struct drm_crtc *crtc,
 		return;
 
 	_dpu_crtc_blend_setup(crtc);
-	_dpu_crtc_dest_scaler_setup(crtc);
 
 	/*
 	 * PP_DONE irq is only used by command mode for now.
@@ -2623,13 +1924,6 @@ static int dpu_crtc_atomic_check(struct drm_crtc *crtc,
 
 	memset(pipe_staged, 0, sizeof(pipe_staged));
 
-	rc = _dpu_crtc_check_dest_scaler_data(crtc, state);
-	if (rc) {
-		DPU_ERROR("crtc%d failed dest scaler check %d\n",
-			crtc->base.id, rc);
-		goto end;
-	}
-
 	mixer_width = dpu_crtc_get_mixer_width(dpu_crtc, cstate, mode);
 
 	_dpu_crtc_setup_lm_bounds(crtc, state);
@@ -2650,19 +1944,6 @@ static int dpu_crtc_atomic_check(struct drm_crtc *crtc,
 		pstates[cnt].stage = pstate->normalized_zpos;
 		pstates[cnt].pipe_id = dpu_plane_pipe(plane);
 
-		/* check dim layer stage with every plane */
-		for (i = 0; i < cstate->num_dim_layers; i++) {
-			if (cstate->dim_layer[i].stage
-					== (pstates[cnt].stage + DPU_STAGE_0)) {
-				DPU_ERROR(
-					"plane:%d/dim_layer:%i-same stage:%d\n",
-					plane->base.id, i,
-					cstate->dim_layer[i].stage);
-				rc = -EINVAL;
-				goto end;
-			}
-		}
-
 		if (pipe_staged[pstates[cnt].pipe_id]) {
 			multirect_plane[multirect_count].r0 =
 				pipe_staged[pstates[cnt].pipe_id];
@@ -2898,52 +2179,11 @@ static void dpu_crtc_install_properties(struct drm_crtc *crtc,
 		return;
 	}
 
-	/* range properties */
-	msm_property_install_range(&dpu_crtc->property_info,
-			"core_clk", 0x0, 0, U64_MAX,
-			dpu_kms->perf.max_core_clk_rate,
-			CRTC_PROP_CORE_CLK);
-	msm_property_install_range(&dpu_crtc->property_info,
-			"core_ab", 0x0, 0, U64_MAX,
-			catalog->perf.max_bw_high * 1000ULL,
-			CRTC_PROP_CORE_AB);
-	msm_property_install_range(&dpu_crtc->property_info,
-			"core_ib", 0x0, 0, U64_MAX,
-			catalog->perf.max_bw_high * 1000ULL,
-			CRTC_PROP_CORE_IB);
-	msm_property_install_range(&dpu_crtc->property_info,
-			"llcc_ab", 0x0, 0, U64_MAX,
-			catalog->perf.max_bw_high * 1000ULL,
-			CRTC_PROP_LLCC_AB);
-	msm_property_install_range(&dpu_crtc->property_info,
-			"llcc_ib", 0x0, 0, U64_MAX,
-			catalog->perf.max_bw_high * 1000ULL,
-			CRTC_PROP_LLCC_IB);
-	msm_property_install_range(&dpu_crtc->property_info,
-			"dram_ab", 0x0, 0, U64_MAX,
-			catalog->perf.max_bw_high * 1000ULL,
-			CRTC_PROP_DRAM_AB);
-	msm_property_install_range(&dpu_crtc->property_info,
-			"dram_ib", 0x0, 0, U64_MAX,
-			catalog->perf.max_bw_high * 1000ULL,
-			CRTC_PROP_DRAM_IB);
-
-	msm_property_install_range(&dpu_crtc->property_info,
-		"idle_timeout", IDLE_TIMEOUT, 0, U64_MAX, 0,
-		CRTC_PROP_IDLE_TIMEOUT);
-
 	msm_property_install_blob(&dpu_crtc->property_info, "capabilities",
 		DRM_MODE_PROP_IMMUTABLE, CRTC_PROP_INFO);
 
 	dpu_kms_info_reset(info);
 
-	if (catalog->caps->has_dim_layer) {
-		msm_property_install_volatile_range(&dpu_crtc->property_info,
-			"dim_layer_v1", 0x0, 0, ~0, 0, CRTC_PROP_DIM_LAYER_V1);
-		dpu_kms_info_add_keyint(info, "dim_layer_v1_max_layers",
-				DPU_MAX_DIM_LAYERS);
-	}
-
 	dpu_kms_info_add_keyint(info, "hw_version", catalog->hwversion);
 	dpu_kms_info_add_keyint(info, "max_linewidth",
 			catalog->caps->max_mixer_width);
@@ -2963,39 +2203,6 @@ static void dpu_crtc_install_properties(struct drm_crtc *crtc,
 					"smart_dma_rev", "smart_dma_v2");
 	}
 
-	if (catalog->mdp[0].has_dest_scaler) {
-		dpu_kms_info_add_keyint(info, "has_dest_scaler",
-				catalog->mdp[0].has_dest_scaler);
-		dpu_kms_info_add_keyint(info, "dest_scaler_count",
-					catalog->ds_count);
-
-		if (catalog->ds[0].top) {
-			dpu_kms_info_add_keyint(info,
-					"max_dest_scaler_input_width",
-					catalog->ds[0].top->maxinputwidth);
-			dpu_kms_info_add_keyint(info,
-					"max_dest_scaler_output_width",
-					catalog->ds[0].top->maxinputwidth);
-			dpu_kms_info_add_keyint(info, "max_dest_scale_up",
-					catalog->ds[0].top->maxupscale);
-		}
-
-		if (catalog->ds[0].features & BIT(DPU_SSPP_SCALER_QSEED3)) {
-			msm_property_install_volatile_range(
-					&dpu_crtc->property_info, "dest_scaler",
-					0x0, 0, ~0, 0, CRTC_PROP_DEST_SCALER);
-			msm_property_install_blob(&dpu_crtc->property_info,
-					"ds_lut_ed", 0,
-					CRTC_PROP_DEST_SCALER_LUT_ED);
-			msm_property_install_blob(&dpu_crtc->property_info,
-					"ds_lut_cir", 0,
-					CRTC_PROP_DEST_SCALER_LUT_CIR);
-			msm_property_install_blob(&dpu_crtc->property_info,
-					"ds_lut_sep", 0,
-					CRTC_PROP_DEST_SCALER_LUT_SEP);
-		}
-	}
-
 	dpu_kms_info_add_keyint(info, "has_src_split",
 				catalog->caps->has_src_split);
 	if (catalog->perf.max_bw_low)
@@ -3064,7 +2271,7 @@ static int dpu_crtc_atomic_set_property(struct drm_crtc *crtc,
 {
 	struct dpu_crtc *dpu_crtc;
 	struct dpu_crtc_state *cstate;
-	int idx, ret = -EINVAL;
+	int ret = -EINVAL;
 
 	if (!crtc || !state || !property) {
 		DPU_ERROR("invalid argument(s)\n");
@@ -3073,45 +2280,8 @@ static int dpu_crtc_atomic_set_property(struct drm_crtc *crtc,
 		cstate = to_dpu_crtc_state(state);
 		ret = msm_property_atomic_set(&dpu_crtc->property_info,
 				&cstate->property_state, property, val);
-		if (!ret) {
-			idx = msm_property_index(&dpu_crtc->property_info,
-					property);
-			switch (idx) {
-			case CRTC_PROP_DIM_LAYER_V1:
-				_dpu_crtc_set_dim_layer_v1(cstate,
-							u64_to_user_ptr(val));
-				break;
-			case CRTC_PROP_DEST_SCALER:
-				ret = _dpu_crtc_set_dest_scaler(dpu_crtc,
-						cstate, u64_to_user_ptr(val));
-				break;
-			case CRTC_PROP_DEST_SCALER_LUT_ED:
-			case CRTC_PROP_DEST_SCALER_LUT_CIR:
-			case CRTC_PROP_DEST_SCALER_LUT_SEP:
-				ret = _dpu_crtc_set_dest_scaler_lut(dpu_crtc,
-								cstate, idx);
-				break;
-			case CRTC_PROP_CORE_CLK:
-			case CRTC_PROP_CORE_AB:
-			case CRTC_PROP_CORE_IB:
-				cstate->bw_control = true;
-				break;
-			case CRTC_PROP_LLCC_AB:
-			case CRTC_PROP_LLCC_IB:
-			case CRTC_PROP_DRAM_AB:
-			case CRTC_PROP_DRAM_IB:
-				cstate->bw_control = true;
-				cstate->bw_split_vote = true;
-				break;
-			case CRTC_PROP_IDLE_TIMEOUT:
-				_dpu_crtc_set_idle_timeout(crtc, val);
-			default:
-				/* nothing to do */
-				break;
-			}
-		} else {
+		if (ret)
 			DRM_ERROR("failed to set the property\n");
-		}
 
 		DPU_DEBUG("crtc%d %s[%d] <= 0x%llx ret=%d\n", crtc->base.id,
 				property->name, property->base.id, val, ret);
@@ -3227,23 +2397,6 @@ static int _dpu_debugfs_status_show(struct seq_file *s, void *data)
 
 	seq_puts(s, "\n");
 
-	for (i = 0; i < cstate->num_dim_layers; i++) {
-		struct dpu_hw_dim_layer *dim_layer = &cstate->dim_layer[i];
-
-		seq_printf(s, "\tdim_layer:%d] stage:%d flags:%d\n",
-				i, dim_layer->stage, dim_layer->flags);
-		seq_printf(s, "\tdst_x:%d dst_y:%d dst_w:%d dst_h:%d\n",
-				dim_layer->rect.x, dim_layer->rect.y,
-				dim_layer->rect.w, dim_layer->rect.h);
-		seq_printf(s,
-			"\tcolor_0:%d color_1:%d color_2:%d color_3:%d\n",
-				dim_layer->color_fill.color_0,
-				dim_layer->color_fill.color_1,
-				dim_layer->color_fill.color_2,
-				dim_layer->color_fill.color_3);
-		seq_puts(s, "\n");
-	}
-
 	drm_atomic_crtc_for_each_plane(plane, crtc) {
 		pstate = to_dpu_plane_state(plane->state);
 		state = plane->state;
@@ -3730,9 +2883,6 @@ struct drm_crtc *dpu_crtc_init(struct drm_device *dev, struct drm_plane *plane)
 
 	dpu_crtc_install_properties(crtc, kms->catalog);
 
-	/* Init dest scaler */
-	_dpu_crtc_dest_scaler_init(dpu_crtc, kms->catalog);
-
 	DPU_DEBUG("%s: successfully initialized crtc\n", dpu_crtc->name);
 	return crtc;
 }
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h
index 5f380b8..6628eb3 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h
@@ -26,7 +26,6 @@
 #include "dpu_kms.h"
 #include "dpu_core_perf.h"
 #include "dpu_hw_blk.h"
-#include "dpu_hw_ds.h"
 
 #define DPU_CRTC_NAME_SIZE	12
 
@@ -87,7 +86,6 @@ struct dpu_crtc_smmu_state_data {
  * struct dpu_crtc_mixer: stores the map for each virtual pipeline in the CRTC
  * @hw_lm:	LM HW Driver context
  * @hw_ctl:	CTL Path HW driver context
- * @hw_ds:	DS HW driver context
  * @encoder:	Encoder attached to this lm & ctl
  * @mixer_op_mode:	mixer blending operation mode
  * @flush_mask:	mixer flush mask for ctl, mixer and pipe
@@ -95,7 +93,6 @@ struct dpu_crtc_smmu_state_data {
 struct dpu_crtc_mixer {
 	struct dpu_hw_mixer *hw_lm;
 	struct dpu_hw_ctl *hw_ctl;
-	struct dpu_hw_ds *hw_ds;
 	struct drm_encoder *encoder;
 	u32 mixer_op_mode;
 	u32 flush_mask;
@@ -314,12 +311,6 @@ struct dpu_crtc_respool {
  * @property_state: Local storage for msm_prop properties
  * @property_values: Current crtc property values
  * @input_fence_timeout_ns : Cached input fence timeout, in ns
- * @num_dim_layers: Number of dim layers
- * @dim_layer: Dim layer configs
- * @num_ds: Number of destination scalers to be configured
- * @num_ds_enabled: Number of destination scalers enabled
- * @ds_dirty: Boolean to indicate if dirty or not
- * @ds_cfg: Destination scaler config
  * @new_perf: new performance state being requested
  */
 struct dpu_crtc_state {
@@ -336,12 +327,6 @@ struct dpu_crtc_state {
 	struct msm_property_state property_state;
 	struct msm_property_value property_values[CRTC_PROP_COUNT];
 	uint64_t input_fence_timeout_ns;
-	uint32_t num_dim_layers;
-	struct dpu_hw_dim_layer dim_layer[DPU_MAX_DIM_LAYERS];
-	uint32_t num_ds;
-	uint32_t num_ds_enabled;
-	bool ds_dirty;
-	struct dpu_hw_ds_cfg ds_cfg[DPU_MAX_DS_COUNT];
 
 	struct dpu_core_perf_params new_perf;
 	struct dpu_crtc_respool rp;
@@ -362,7 +347,6 @@ struct dpu_crtc_state {
 /**
  * dpu_crtc_get_mixer_width - get the mixer width
  * Mixer width will be same as panel width(/2 for split)
- * unless destination scaler feature is enabled
  */
 static inline int dpu_crtc_get_mixer_width(struct dpu_crtc *dpu_crtc,
 	struct dpu_crtc_state *cstate, struct drm_display_mode *mode)
@@ -372,10 +356,7 @@ static inline int dpu_crtc_get_mixer_width(struct dpu_crtc *dpu_crtc,
 	if (!dpu_crtc || !cstate || !mode)
 		return 0;
 
-	if (cstate->num_ds_enabled)
-		mixer_width = cstate->ds_cfg[0].lm_width;
-	else
-		mixer_width = (dpu_crtc->num_mixers == CRTC_DUAL_MIXERS ?
+	mixer_width = (dpu_crtc->num_mixers == CRTC_DUAL_MIXERS ?
 			mode->hdisplay / CRTC_DUAL_MIXERS : mode->hdisplay);
 
 	return mixer_width;
@@ -383,8 +364,7 @@ static inline int dpu_crtc_get_mixer_width(struct dpu_crtc *dpu_crtc,
 
 /**
  * dpu_crtc_get_mixer_height - get the mixer height
- * Mixer height will be same as panel height unless
- * destination scaler feature is enabled
+ * Mixer height will be same as panel height
  */
 static inline int dpu_crtc_get_mixer_height(struct dpu_crtc *dpu_crtc,
 		struct dpu_crtc_state *cstate, struct drm_display_mode *mode)
@@ -392,8 +372,7 @@ static inline int dpu_crtc_get_mixer_height(struct dpu_crtc *dpu_crtc,
 	if (!dpu_crtc || !cstate || !mode)
 		return 0;
 
-	return (cstate->num_ds_enabled ?
-			cstate->ds_cfg[0].lm_height : mode->vdisplay);
+	return mode->vdisplay;
 }
 
 /**
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
index 77d3571..62660e0 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
@@ -230,18 +230,6 @@ struct dpu_encoder_virt {
 };
 
 #define to_dpu_encoder_virt(x) container_of(x, struct dpu_encoder_virt, base)
-
-void dpu_encoder_set_idle_timeout(struct drm_encoder *drm_enc, u32 idle_timeout)
-{
-	struct dpu_encoder_virt *dpu_enc;
-
-	if (!drm_enc)
-		return;
-
-	dpu_enc = to_dpu_encoder_virt(drm_enc);
-	dpu_enc->idle_timeout = idle_timeout;
-}
-
 static inline int _dpu_encoder_power_enable(struct dpu_encoder_virt *dpu_enc,
 								bool enable)
 {
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ds.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ds.c
deleted file mode 100644
index fad19fb..0000000
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ds.c
+++ /dev/null
@@ -1,149 +0,0 @@
-/* Copyright (c) 2017-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_ds.h"
-#include "dpu_formats.h"
-#include "dpu_dbg.h"
-#include "dpu_kms.h"
-
-/* Destination scaler TOP registers */
-#define DEST_SCALER_OP_MODE     0x00
-#define DEST_SCALER_HW_VERSION  0x10
-
-static void dpu_hw_ds_setup_opmode(struct dpu_hw_ds *hw_ds,
-				u32 op_mode)
-{
-	struct dpu_hw_blk_reg_map *hw = &hw_ds->hw;
-
-	DPU_REG_WRITE(hw, DEST_SCALER_OP_MODE, op_mode);
-}
-
-static void dpu_hw_ds_setup_scaler3(struct dpu_hw_ds *hw_ds,
-			void *scaler_cfg, void *scaler_lut_cfg)
-{
-	struct dpu_hw_scaler3_cfg *scl3_cfg = scaler_cfg;
-	struct dpu_hw_scaler3_lut_cfg *scl3_lut_cfg = scaler_lut_cfg;
-
-	if (!hw_ds || !hw_ds->scl || !scl3_cfg || !scl3_lut_cfg)
-		return;
-
-	/*
-	 * copy LUT values to scaler structure
-	 */
-	if (scl3_lut_cfg->is_configured) {
-		scl3_cfg->dir_lut = scl3_lut_cfg->dir_lut;
-		scl3_cfg->dir_len = scl3_lut_cfg->dir_len;
-		scl3_cfg->cir_lut = scl3_lut_cfg->cir_lut;
-		scl3_cfg->cir_len = scl3_lut_cfg->cir_len;
-		scl3_cfg->sep_lut = scl3_lut_cfg->sep_lut;
-		scl3_cfg->sep_len = scl3_lut_cfg->sep_len;
-	}
-
-	dpu_hw_setup_scaler3(&hw_ds->hw, scl3_cfg,
-			 hw_ds->scl->base,
-			 hw_ds->scl->version,
-			 dpu_get_dpu_format(DRM_FORMAT_XBGR2101010));
-}
-
-static void _setup_ds_ops(struct dpu_hw_ds_ops *ops, unsigned long features)
-{
-	ops->setup_opmode = dpu_hw_ds_setup_opmode;
-
-	if (test_bit(DPU_SSPP_SCALER_QSEED3, &features))
-		ops->setup_scaler = dpu_hw_ds_setup_scaler3;
-}
-
-static struct dpu_ds_cfg *_ds_offset(enum dpu_ds ds,
-		struct dpu_mdss_cfg *m,
-		void __iomem *addr,
-		struct dpu_hw_blk_reg_map *b)
-{
-	int i;
-
-	if (!m || !addr || !b)
-		return ERR_PTR(-EINVAL);
-
-	for (i = 0; i < m->ds_count; i++) {
-		if ((ds == m->ds[i].id) &&
-			 (m->ds[i].top)) {
-			b->base_off = addr;
-			b->blk_off = m->ds[i].top->base;
-			b->length = m->ds[i].top->len;
-			b->hwversion = m->hwversion;
-			b->log_mask = DPU_DBG_MASK_DS;
-			return &m->ds[i];
-		}
-	}
-
-	return ERR_PTR(-EINVAL);
-}
-
-static struct dpu_hw_blk_ops dpu_hw_ops = {
-	.start = NULL,
-	.stop = NULL,
-};
-
-struct dpu_hw_ds *dpu_hw_ds_init(enum dpu_ds idx,
-			void __iomem *addr,
-			struct dpu_mdss_cfg *m)
-{
-	struct dpu_hw_ds *hw_ds;
-	struct dpu_ds_cfg *cfg;
-	int rc;
-
-	if (!addr || !m)
-		return ERR_PTR(-EINVAL);
-
-	hw_ds = kzalloc(sizeof(*hw_ds), GFP_KERNEL);
-	if (!hw_ds)
-		return ERR_PTR(-ENOMEM);
-
-	cfg = _ds_offset(idx, m, addr, &hw_ds->hw);
-	if (IS_ERR_OR_NULL(cfg)) {
-		DPU_ERROR("failed to get ds cfg\n");
-		kfree(hw_ds);
-		return ERR_PTR(-EINVAL);
-	}
-
-	/* Assign ops */
-	hw_ds->idx = idx;
-	hw_ds->scl = cfg;
-	_setup_ds_ops(&hw_ds->ops, hw_ds->scl->features);
-
-	rc = dpu_hw_blk_init(&hw_ds->base, DPU_HW_BLK_DS, idx, &dpu_hw_ops);
-	if (rc) {
-		DPU_ERROR("failed to init hw blk %d\n", rc);
-		goto blk_init_error;
-	}
-
-	if (cfg->len) {
-		dpu_dbg_reg_register_dump_range(DPU_DBG_NAME, cfg->name,
-				hw_ds->hw.blk_off + cfg->base,
-				hw_ds->hw.blk_off + cfg->base + cfg->len,
-				hw_ds->hw.xin_id);
-	}
-
-	return hw_ds;
-
-blk_init_error:
-	kzfree(hw_ds);
-
-	return ERR_PTR(rc);
-
-}
-
-void dpu_hw_ds_destroy(struct dpu_hw_ds *hw_ds)
-{
-	if (hw_ds)
-		dpu_hw_blk_destroy(&hw_ds->base);
-	kfree(hw_ds);
-}
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ds.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ds.h
deleted file mode 100644
index 2455920..0000000
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ds.h
+++ /dev/null
@@ -1,111 +0,0 @@
-/* Copyright (c) 2017-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.
- */
-
-#ifndef _DPU_HW_DS_H
-#define _DPU_HW_DS_H
-
-#include "dpu_hw_mdss.h"
-#include "dpu_hw_util.h"
-#include "dpu_hw_catalog.h"
-#include "dpu_hw_blk.h"
-
-struct dpu_hw_ds;
-
-/* Destination Scaler DUAL mode overfetch pixel count */
-#define DPU_DS_OVERFETCH_SIZE 5
-
-/* Destination scaler DUAL mode operation bit */
-#define DPU_DS_OP_MODE_DUAL BIT(16)
-
-/* struct dpu_hw_ds_cfg - destination scaler config
- * @ndx          : DS selection index
- * @flags        : Flag to switch between mode for DS
- * @lm_width     : Layer mixer width configuration
- * @lm_heigh     : Layer mixer height configuration
- * @set_lm_flush : LM flush bit
- * @scl3_cfg     : Pointer to dpu_hw_scaler3_cfg.
- */
-struct dpu_hw_ds_cfg {
-	u32 ndx;
-	int flags;
-	u32 lm_width;
-	u32 lm_height;
-	bool set_lm_flush;
-	struct dpu_hw_scaler3_cfg *scl3_cfg;
-};
-
-/**
- * struct dpu_hw_ds_ops - interface to the destination scaler
- * hardware driver functions
- * Caller must call the init function to get the ds context for each ds
- * Assumption is these functions will be called after clocks are enabled
- */
-struct dpu_hw_ds_ops {
-	/**
-	 * setup_opmode - destination scaler op mode setup
-	 * @hw_ds   : Pointer to ds context
-	 * @op_mode : Op mode configuration
-	 */
-	void (*setup_opmode)(struct dpu_hw_ds *hw_ds,
-				u32 op_mode);
-
-	/**
-	 * setup_scaler - destination scaler block setup
-	 * @hw_ds          : Pointer to ds context
-	 * @scaler_cfg     : Pointer to scaler data
-	 * @scaler_lut_cfg : Pointer to scaler lut
-	 */
-	void (*setup_scaler)(struct dpu_hw_ds *hw_ds,
-				void *scaler_cfg,
-				void *scaler_lut_cfg);
-
-};
-
-/**
- * struct dpu_hw_ds - destination scaler description
- * @base : Hardware block base structure
- * @hw   : Block hardware details
- * @idx  : Destination scaler index
- * @scl  : Pointer to
- *          - scaler offset relative to top offset
- *          - capabilities
- * @ops  : Pointer to operations for this DS
- */
-struct dpu_hw_ds {
-	struct dpu_hw_blk base;
-	struct dpu_hw_blk_reg_map hw;
-	enum dpu_ds idx;
-	const struct dpu_ds_cfg *scl;
-	struct dpu_hw_ds_ops ops;
-};
-
-/**
- * dpu_hw_ds_init - initializes the destination scaler
- * hw driver object and should be called once before
- * accessing every destination scaler
- * @idx : DS index for which driver object is required
- * @addr: Mapped register io address of MDP
- * @m   : MDSS catalog information
- * @Return: pointer to structure or ERR_PTR
- */
-struct dpu_hw_ds *dpu_hw_ds_init(enum dpu_ds idx,
-			void __iomem *addr,
-			struct dpu_mdss_cfg *m);
-
-/**
- * dpu_hw_ds_destroy - destroys destination scaler
- * driver context
- * @hw_ds:   Pointer to DS context
- */
-void dpu_hw_ds_destroy(struct dpu_hw_ds *hw_ds);
-
-#endif /*_DPU_HW_DS_H */
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.c
index 75a30db..830b69e 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.c
@@ -172,68 +172,6 @@ static void dpu_hw_lm_gc(struct dpu_hw_mixer *mixer,
 {
 }
 
-static void dpu_hw_lm_clear_dim_layer(struct dpu_hw_mixer *ctx)
-{
-	struct dpu_hw_blk_reg_map *c = &ctx->hw;
-	const struct dpu_lm_sub_blks *sblk = ctx->cap->sblk;
-	int stage_off, i;
-	u32 reset = BIT(16), val;
-
-	reset = ~reset;
-	for (i = DPU_STAGE_0; i < sblk->maxblendstages; i++) {
-		stage_off = _stage_offset(ctx, i);
-		if (WARN_ON(stage_off < 0))
-			return;
-
-		/*
-		 * read the existing blendn_op register and clear only DIM layer
-		 * bit (color_fill bit)
-		 */
-		val = DPU_REG_READ(c, LM_BLEND0_OP + stage_off);
-		val &= reset;
-		DPU_REG_WRITE(c, LM_BLEND0_OP + stage_off, val);
-	}
-}
-
-static void dpu_hw_lm_setup_dim_layer(struct dpu_hw_mixer *ctx,
-		struct dpu_hw_dim_layer *dim_layer)
-{
-	struct dpu_hw_blk_reg_map *c = &ctx->hw;
-	int stage_off;
-	u32 val = 0, alpha = 0;
-
-	stage_off = _stage_offset(ctx, dim_layer->stage);
-	if (stage_off < 0) {
-		DPU_ERROR("invalid stage_off:%d for dim layer\n", stage_off);
-		return;
-	}
-
-	alpha = dim_layer->color_fill.color_3 & 0xFF;
-	val = ((dim_layer->color_fill.color_1 << 2) & 0xFFF) << 16 |
-			((dim_layer->color_fill.color_0 << 2) & 0xFFF);
-	DPU_REG_WRITE(c, LM_FG_COLOR_FILL_COLOR_0 + stage_off, val);
-
-	val = (alpha << 4) << 16 |
-			((dim_layer->color_fill.color_2 << 2) & 0xFFF);
-	DPU_REG_WRITE(c, LM_FG_COLOR_FILL_COLOR_1 + stage_off, val);
-
-	val = dim_layer->rect.h << 16 | dim_layer->rect.w;
-	DPU_REG_WRITE(c, LM_FG_COLOR_FILL_SIZE + stage_off, val);
-
-	val = dim_layer->rect.y << 16 | dim_layer->rect.x;
-	DPU_REG_WRITE(c, LM_FG_COLOR_FILL_XY + stage_off, val);
-
-	val = BIT(16); /* enable dim layer */
-	val |= DPU_BLEND_FG_ALPHA_FG_CONST | DPU_BLEND_BG_ALPHA_BG_CONST;
-	if (dim_layer->flags & DPU_DRM_DIM_LAYER_EXCLUSIVE)
-		val |= BIT(17);
-	else
-		val &= ~BIT(17);
-	DPU_REG_WRITE(c, LM_BLEND0_OP + stage_off, val);
-	val = (alpha << 16) | (0xff - alpha);
-	DPU_REG_WRITE(c, LM_BLEND0_CONST_ALPHA + stage_off, val);
-}
-
 static void dpu_hw_lm_setup_misr(struct dpu_hw_mixer *ctx,
 				bool enable, u32 frame_count)
 {
@@ -272,11 +210,6 @@ static void _setup_mixer_ops(struct dpu_mdss_cfg *m,
 	ops->setup_gc = dpu_hw_lm_gc;
 	ops->setup_misr = dpu_hw_lm_setup_misr;
 	ops->collect_misr = dpu_hw_lm_collect_misr;
-
-	if (test_bit(DPU_DIM_LAYER, &features)) {
-		ops->setup_dim_layer = dpu_hw_lm_setup_dim_layer;
-		ops->clear_dim_layer = dpu_hw_lm_clear_dim_layer;
-	}
 };
 
 static struct dpu_hw_blk_ops dpu_hw_ops = {
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.h
index ef22c86..e29e5da 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.h
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.h
@@ -67,20 +67,6 @@ struct dpu_hw_lm_ops {
 	void (*setup_gc)(struct dpu_hw_mixer *mixer,
 			void *cfg);
 
-	/**
-	 * setup_dim_layer: configure dim layer settings
-	 * @ctx: Pointer to layer mixer context
-	 * @dim_layer: dim layer configs
-	 */
-	void (*setup_dim_layer)(struct dpu_hw_mixer *ctx,
-			struct dpu_hw_dim_layer *dim_layer);
-
-	/**
-	 * clear_dim_layer: clear dim layer settings
-	 * @ctx: Pointer to layer mixer context
-	 */
-	void (*clear_dim_layer)(struct dpu_hw_mixer *ctx);
-
 	/* setup_misr: enables/disables MISR in HW register */
 	void (*setup_misr)(struct dpu_hw_mixer *ctx,
 			bool enable, u32 frame_count);
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_mdss.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_mdss.h
index fcd164f..836ff9e 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_mdss.h
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_mdss.h
@@ -99,7 +99,6 @@ enum dpu_hw_blk_type {
 	DPU_HW_BLK_TOP = 0,
 	DPU_HW_BLK_SSPP,
 	DPU_HW_BLK_LM,
-	DPU_HW_BLK_DS,
 	DPU_HW_BLK_CTL,
 	DPU_HW_BLK_CDM,
 	DPU_HW_BLK_PINGPONG,
@@ -469,20 +468,5 @@ struct dpu_mdss_color {
 #define DPU_DBG_MASK_TOP      (1 << 8)
 #define DPU_DBG_MASK_VBIF     (1 << 9)
 #define DPU_DBG_MASK_ROT      (1 << 10)
-#define DPU_DBG_MASK_DS       (1 << 11)
-
-/**
- * struct dpu_hw_dim_layer: dim layer configs
- * @flags: Flag to represent INCLUSIVE/EXCLUSIVE
- * @stage: Blending stage of dim layer
- * @color_fill: Color fill to be used for the layer
- * @rect: Dim layer coordinates
- */
-struct dpu_hw_dim_layer {
-	uint32_t flags;
-	uint32_t stage;
-	struct dpu_mdss_color color_fill;
-	struct dpu_rect rect;
-};
 
 #endif  /* _DPU_HW_MDSS_H */
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c
index f467bf1..0af2996 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c
@@ -17,7 +17,6 @@
 #include "dpu_hw_lm.h"
 #include "dpu_hw_ctl.h"
 #include "dpu_hw_cdm.h"
-#include "dpu_hw_ds.h"
 #include "dpu_hw_pingpong.h"
 #include "dpu_hw_intf.h"
 #include "dpu_hw_wb.h"
@@ -235,9 +234,6 @@ static void _dpu_rm_hw_destroy(enum dpu_hw_blk_type type, void *hw)
 	case DPU_HW_BLK_LM:
 		dpu_hw_lm_destroy(hw);
 		break;
-	case DPU_HW_BLK_DS:
-		dpu_hw_ds_destroy(hw);
-		break;
 	case DPU_HW_BLK_CTL:
 		dpu_hw_ctl_destroy(hw);
 		break;
@@ -317,9 +313,6 @@ static int _dpu_rm_hw_blk_create(
 	case DPU_HW_BLK_LM:
 		hw = dpu_hw_lm_init(id, mmio, cat);
 		break;
-	case DPU_HW_BLK_DS:
-		hw = dpu_hw_ds_init(id, mmio, cat);
-		break;
 	case DPU_HW_BLK_CTL:
 		hw = dpu_hw_ctl_init(id, mmio, cat);
 		break;
@@ -427,17 +420,6 @@ int dpu_rm_init(struct dpu_rm *rm,
 		}
 	}
 
-	if (cat->mdp[0].has_dest_scaler) {
-		for (i = 0; i < cat->ds_count; i++) {
-			rc = _dpu_rm_hw_blk_create(rm, cat, mmio, DPU_HW_BLK_DS,
-					cat->ds[i].id, &cat->ds[i]);
-			if (rc) {
-				DPU_ERROR("failed: ds hw not available\n");
-				goto fail;
-			}
-		}
-	}
-
 	for (i = 0; i < cat->pingpong_count; i++) {
 		rc = _dpu_rm_hw_blk_create(rm, cat, mmio, DPU_HW_BLK_PINGPONG,
 				cat->pingpong[i].id, &cat->pingpong[i]);
@@ -516,20 +498,16 @@ static bool _dpu_rm_check_lm_and_get_connected_blks(
 		struct dpu_rm_rsvp *rsvp,
 		struct dpu_rm_requirements *reqs,
 		struct dpu_rm_hw_blk *lm,
-		struct dpu_rm_hw_blk **ds,
 		struct dpu_rm_hw_blk **pp,
 		struct dpu_rm_hw_blk *primary_lm)
 {
 	const struct dpu_lm_cfg *lm_cfg = to_dpu_hw_mixer(lm->hw)->cap;
 	struct dpu_rm_hw_iter iter;
-	bool is_valid_ds;
 
-	*ds = NULL;
 	*pp = NULL;
 
-	DPU_DEBUG("check lm %d ds %d pp %d\n",
-			   lm_cfg->id,
-			   lm_cfg->ds, lm_cfg->pingpong);
+	DPU_DEBUG("check lm %d pp %d\n",
+			   lm_cfg->id, lm_cfg->pingpong);
 
 	/* Check if this layer mixer is a peer of the proposed primary LM */
 	if (primary_lm) {
@@ -543,43 +521,12 @@ static bool _dpu_rm_check_lm_and_get_connected_blks(
 		}
 	}
 
-	is_valid_ds = (lm_cfg->ds != DS_MAX) ? true : false;
-
-	if (RM_RQ_DS(reqs) && !is_valid_ds) {
-		DPU_DEBUG("fail:lm(%d)req_ds(%d)ds(%d)\n",
-			lm_cfg->id, (bool)(RM_RQ_DS(reqs)), lm_cfg->ds);
-
-		return false;
-	}
-
 	/* Already reserved? */
 	if (RESERVED_BY_OTHER(lm, rsvp)) {
 		DPU_DEBUG("lm %d already reserved\n", lm_cfg->id);
 		return false;
 	}
 
-	if (lm_cfg->ds != DS_MAX) {
-		dpu_rm_init_hw_iter(&iter, 0, DPU_HW_BLK_DS);
-		while (_dpu_rm_get_hw_locked(rm, &iter)) {
-			if (iter.blk->id == lm_cfg->ds) {
-				*ds = iter.blk;
-				break;
-			}
-		}
-
-		if (!*ds) {
-			DPU_DEBUG("lm %d failed to retrieve ds %d\n", lm->id,
-					lm_cfg->ds);
-			return false;
-		}
-
-		if (RESERVED_BY_OTHER(*ds, rsvp)) {
-			DPU_DEBUG("lm %d ds %d already reserved\n",
-					lm->id, (*ds)->id);
-			return false;
-		}
-	}
-
 	dpu_rm_init_hw_iter(&iter, 0, DPU_HW_BLK_PINGPONG);
 	while (_dpu_rm_get_hw_locked(rm, &iter)) {
 		if (iter.blk->id == lm_cfg->pingpong) {
@@ -596,7 +543,6 @@ static bool _dpu_rm_check_lm_and_get_connected_blks(
 	if (RESERVED_BY_OTHER(*pp, rsvp)) {
 		DPU_DEBUG("lm %d pp %d already reserved\n", lm->id,
 				(*pp)->id);
-		*ds = NULL;
 		return false;
 	}
 
@@ -610,7 +556,6 @@ static int _dpu_rm_reserve_lms(
 
 {
 	struct dpu_rm_hw_blk *lm[MAX_BLOCKS];
-	struct dpu_rm_hw_blk *ds[MAX_BLOCKS];
 	struct dpu_rm_hw_blk *pp[MAX_BLOCKS];
 	struct dpu_rm_hw_iter iter_i, iter_j;
 	int lm_count = 0;
@@ -626,14 +571,13 @@ static int _dpu_rm_reserve_lms(
 	while (lm_count != reqs->topology->num_lm &&
 			_dpu_rm_get_hw_locked(rm, &iter_i)) {
 		memset(&lm, 0, sizeof(lm));
-		memset(&ds, 0, sizeof(ds));
 		memset(&pp, 0, sizeof(pp));
 
 		lm_count = 0;
 		lm[lm_count] = iter_i.blk;
 
 		if (!_dpu_rm_check_lm_and_get_connected_blks(
-				rm, rsvp, reqs, lm[lm_count], &ds[lm_count],
+				rm, rsvp, reqs, lm[lm_count],
 				&pp[lm_count], NULL))
 			continue;
 
@@ -649,8 +593,7 @@ static int _dpu_rm_reserve_lms(
 
 			if (!_dpu_rm_check_lm_and_get_connected_blks(
 					rm, rsvp, reqs, iter_j.blk,
-					&ds[lm_count], &pp[lm_count],
-					iter_i.blk))
+					&pp[lm_count], iter_i.blk))
 				continue;
 
 			lm[lm_count] = iter_j.blk;
@@ -670,11 +613,7 @@ static int _dpu_rm_reserve_lms(
 		lm[i]->rsvp_nxt = rsvp;
 		pp[i]->rsvp_nxt = rsvp;
 
-		if (ds[i])
-			ds[i]->rsvp_nxt = rsvp;
-
-		DPU_EVT32(lm[i]->type, rsvp->enc_id, lm[i]->id, pp[i]->id,
-				ds[i] ? ds[i]->id : 0);
+		DPU_EVT32(lm[i]->type, rsvp->enc_id, lm[i]->id, pp[i]->id);
 	}
 
 	return rc;
diff --git a/drivers/gpu/drm/msm/msm_drv.h b/drivers/gpu/drm/msm/msm_drv.h
index 5baff27..8e80b4b 100644
--- a/drivers/gpu/drm/msm/msm_drv.h
+++ b/drivers/gpu/drm/msm/msm_drv.h
@@ -89,25 +89,10 @@ enum msm_mdp_plane_property {
 
 enum msm_mdp_crtc_property {
 	CRTC_PROP_INFO,
-	CRTC_PROP_DEST_SCALER_LUT_ED,
-	CRTC_PROP_DEST_SCALER_LUT_CIR,
-	CRTC_PROP_DEST_SCALER_LUT_SEP,
 
 	/* # of blob properties */
 	CRTC_PROP_BLOBCOUNT,
 
-	/* range properties */
-	CRTC_PROP_DIM_LAYER_V1 = CRTC_PROP_BLOBCOUNT,
-	CRTC_PROP_CORE_CLK,
-	CRTC_PROP_CORE_AB,
-	CRTC_PROP_CORE_IB,
-	CRTC_PROP_LLCC_AB,
-	CRTC_PROP_LLCC_IB,
-	CRTC_PROP_DRAM_AB,
-	CRTC_PROP_DRAM_IB,
-	CRTC_PROP_IDLE_TIMEOUT,
-	CRTC_PROP_DEST_SCALER,
-
 	/* total # of properties */
 	CRTC_PROP_COUNT
 };
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

_______________________________________________
Freedreno mailing list
Freedreno@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/freedreno

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

* [DPU PATCH v2 6/7] drm/msm: remove msm_prop files
       [not found] ` <1528256738-30652-1-git-send-email-jsanka-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
                     ` (3 preceding siblings ...)
  2018-06-06  3:45   ` [DPU PATCH v2 5/7] drm/msm/dpu: clean up dpu crtc custom properties Jeykumar Sankaran
@ 2018-06-06  3:45   ` Jeykumar Sankaran
  4 siblings, 0 replies; 10+ messages in thread
From: Jeykumar Sankaran @ 2018-06-06  3:45 UTC (permalink / raw)
  To: dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	freedreno-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	linux-arm-msm-u79uwXL29TY76Z2rM5mHXA
  Cc: hoegsberg-hpIqsD4AKlfQT0dZR+AlfA, Jeykumar Sankaran,
	seanpaul-F7+t8E8rja9g9hUCZPvPmw,
	robdclark-Re5JQEeQqe8AvxtiuMwx3w

Remove hand rolled msm property caching to handle DPU
custom properties. This change also cleans up all its
dependencies to cache and restore respective drm
states.

changs in v2:
	- none

Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
---
 drivers/gpu/drm/msm/Makefile                  |   1 -
 drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c |   2 -
 drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c      | 239 +--------
 drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h      |  16 -
 drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.h   |   2 -
 drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c     | 123 +----
 drivers/gpu/drm/msm/disp/dpu1/dpu_plane.h     |  12 -
 drivers/gpu/drm/msm/msm_drv.h                 |  16 +-
 drivers/gpu/drm/msm/msm_prop.c                | 688 --------------------------
 drivers/gpu/drm/msm/msm_prop.h                | 438 ----------------
 10 files changed, 8 insertions(+), 1529 deletions(-)
 delete mode 100644 drivers/gpu/drm/msm/msm_prop.c
 delete mode 100644 drivers/gpu/drm/msm/msm_prop.h

diff --git a/drivers/gpu/drm/msm/Makefile b/drivers/gpu/drm/msm/Makefile
index d289503..5331188 100644
--- a/drivers/gpu/drm/msm/Makefile
+++ b/drivers/gpu/drm/msm/Makefile
@@ -76,7 +76,6 @@ msm-y := \
 	dpu_io_util.o \
 	dpu_dbg_evtlog.o \
 	dpu_power_handle.o \
-	msm_prop.o \
 	msm_atomic.o \
 	msm_debugfs.o \
 	msm_drv.o \
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c
index c4820de..e4b82d5 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c
@@ -19,8 +19,6 @@
 #include <linux/clk.h>
 #include <linux/bitmap.h>
 
-#include "msm_prop.h"
-
 #include "dpu_kms.h"
 #include "dpu_trace.h"
 #include "dpu_crtc.h"
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
index 0c25c45..dd8c91e 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
@@ -579,10 +579,6 @@ static void dpu_crtc_destroy(struct drm_crtc *crtc)
 	if (!crtc)
 		return;
 
-	if (dpu_crtc->blob_info)
-		drm_property_blob_put(dpu_crtc->blob_info);
-	msm_property_destroy(&dpu_crtc->property_info);
-
 	_dpu_crtc_deinit_events(dpu_crtc);
 
 	drm_crtc_cleanup(crtc);
@@ -1341,9 +1337,7 @@ static void dpu_crtc_destroy_state(struct drm_crtc *crtc,
 
 	__drm_atomic_helper_crtc_destroy_state(state);
 
-	/* destroy value helper */
-	msm_property_destroy_state(&dpu_crtc->property_info, cstate,
-			&cstate->property_state);
+	kfree(cstate);
 }
 
 static int _dpu_crtc_wait_for_frame_done(struct drm_crtc *crtc)
@@ -1592,17 +1586,12 @@ static struct drm_crtc_state *dpu_crtc_duplicate_state(struct drm_crtc *crtc)
 
 	dpu_crtc = to_dpu_crtc(crtc);
 	old_cstate = to_dpu_crtc_state(crtc->state);
-	cstate = msm_property_alloc_state(&dpu_crtc->property_info);
+	cstate = kmemdup(old_cstate, sizeof(*old_cstate), GFP_KERNEL);
 	if (!cstate) {
 		DPU_ERROR("failed to allocate state\n");
 		return NULL;
 	}
 
-	/* duplicate value helper */
-	msm_property_duplicate_state(&dpu_crtc->property_info,
-			old_cstate, cstate,
-			&cstate->property_state, cstate->property_values);
-
 	/* duplicate base helper */
 	__drm_atomic_helper_crtc_duplicate_state(crtc, &cstate->base);
 
@@ -1638,17 +1627,12 @@ static void dpu_crtc_reset(struct drm_crtc *crtc)
 	}
 
 	dpu_crtc = to_dpu_crtc(crtc);
-	cstate = msm_property_alloc_state(&dpu_crtc->property_info);
+	cstate = kzalloc(sizeof(*cstate), GFP_KERNEL);
 	if (!cstate) {
 		DPU_ERROR("failed to allocate state\n");
 		return;
 	}
 
-	/* reset value helper */
-	msm_property_reset_state(&dpu_crtc->property_info, cstate,
-			&cstate->property_state,
-			cstate->property_values);
-
 	_dpu_crtc_rp_reset(&cstate->rp, &dpu_crtc->rp_lock,
 			&dpu_crtc->rp_head);
 
@@ -2145,212 +2129,6 @@ void dpu_crtc_cancel_pending_flip(struct drm_crtc *crtc, struct drm_file *file)
 	_dpu_crtc_complete_flip(crtc, file);
 }
 
-/**
- * dpu_crtc_install_properties - install all drm properties for crtc
- * @crtc: Pointer to drm crtc structure
- */
-static void dpu_crtc_install_properties(struct drm_crtc *crtc,
-				struct dpu_mdss_cfg *catalog)
-{
-	struct dpu_crtc *dpu_crtc;
-	struct drm_device *dev;
-	struct dpu_kms_info *info;
-	struct dpu_kms *dpu_kms;
-
-	DPU_DEBUG("\n");
-
-	if (!crtc || !catalog) {
-		DPU_ERROR("invalid crtc or catalog\n");
-		return;
-	}
-
-	dpu_crtc = to_dpu_crtc(crtc);
-	dev = crtc->dev;
-	dpu_kms = _dpu_crtc_get_kms(crtc);
-
-	if (!dpu_kms) {
-		DPU_ERROR("invalid argument\n");
-		return;
-	}
-
-	info = kzalloc(sizeof(struct dpu_kms_info), GFP_KERNEL);
-	if (!info) {
-		DPU_ERROR("failed to allocate info memory\n");
-		return;
-	}
-
-	msm_property_install_blob(&dpu_crtc->property_info, "capabilities",
-		DRM_MODE_PROP_IMMUTABLE, CRTC_PROP_INFO);
-
-	dpu_kms_info_reset(info);
-
-	dpu_kms_info_add_keyint(info, "hw_version", catalog->hwversion);
-	dpu_kms_info_add_keyint(info, "max_linewidth",
-			catalog->caps->max_mixer_width);
-	dpu_kms_info_add_keyint(info, "max_blendstages",
-			catalog->caps->max_mixer_blendstages);
-	if (catalog->caps->qseed_type == DPU_SSPP_SCALER_QSEED2)
-		dpu_kms_info_add_keystr(info, "qseed_type", "qseed2");
-	if (catalog->caps->qseed_type == DPU_SSPP_SCALER_QSEED3)
-		dpu_kms_info_add_keystr(info, "qseed_type", "qseed3");
-
-	if (dpu_is_custom_client()) {
-		if (catalog->caps->smart_dma_rev == DPU_SSPP_SMART_DMA_V1)
-			dpu_kms_info_add_keystr(info,
-					"smart_dma_rev", "smart_dma_v1");
-		if (catalog->caps->smart_dma_rev == DPU_SSPP_SMART_DMA_V2)
-			dpu_kms_info_add_keystr(info,
-					"smart_dma_rev", "smart_dma_v2");
-	}
-
-	dpu_kms_info_add_keyint(info, "has_src_split",
-				catalog->caps->has_src_split);
-	if (catalog->perf.max_bw_low)
-		dpu_kms_info_add_keyint(info, "max_bandwidth_low",
-				catalog->perf.max_bw_low * 1000LL);
-	if (catalog->perf.max_bw_high)
-		dpu_kms_info_add_keyint(info, "max_bandwidth_high",
-				catalog->perf.max_bw_high * 1000LL);
-	if (catalog->perf.min_core_ib)
-		dpu_kms_info_add_keyint(info, "min_core_ib",
-				catalog->perf.min_core_ib * 1000LL);
-	if (catalog->perf.min_llcc_ib)
-		dpu_kms_info_add_keyint(info, "min_llcc_ib",
-				catalog->perf.min_llcc_ib * 1000LL);
-	if (catalog->perf.min_dram_ib)
-		dpu_kms_info_add_keyint(info, "min_dram_ib",
-				catalog->perf.min_dram_ib * 1000LL);
-	if (dpu_kms->perf.max_core_clk_rate)
-		dpu_kms_info_add_keyint(info, "max_mdp_clk",
-				dpu_kms->perf.max_core_clk_rate);
-	dpu_kms_info_add_keystr(info, "core_ib_ff",
-			catalog->perf.core_ib_ff);
-	dpu_kms_info_add_keystr(info, "core_clk_ff",
-			catalog->perf.core_clk_ff);
-	dpu_kms_info_add_keystr(info, "comp_ratio_rt",
-			catalog->perf.comp_ratio_rt);
-	dpu_kms_info_add_keystr(info, "comp_ratio_nrt",
-			catalog->perf.comp_ratio_nrt);
-	dpu_kms_info_add_keyint(info, "dest_scale_prefill_lines",
-			catalog->perf.dest_scale_prefill_lines);
-	dpu_kms_info_add_keyint(info, "undersized_prefill_lines",
-			catalog->perf.undersized_prefill_lines);
-	dpu_kms_info_add_keyint(info, "macrotile_prefill_lines",
-			catalog->perf.macrotile_prefill_lines);
-	dpu_kms_info_add_keyint(info, "yuv_nv12_prefill_lines",
-			catalog->perf.yuv_nv12_prefill_lines);
-	dpu_kms_info_add_keyint(info, "linear_prefill_lines",
-			catalog->perf.linear_prefill_lines);
-	dpu_kms_info_add_keyint(info, "downscaling_prefill_lines",
-			catalog->perf.downscaling_prefill_lines);
-	dpu_kms_info_add_keyint(info, "xtra_prefill_lines",
-			catalog->perf.xtra_prefill_lines);
-	dpu_kms_info_add_keyint(info, "amortizable_threshold",
-			catalog->perf.amortizable_threshold);
-	dpu_kms_info_add_keyint(info, "min_prefill_lines",
-			catalog->perf.min_prefill_lines);
-
-	msm_property_set_blob(&dpu_crtc->property_info, &dpu_crtc->blob_info,
-			info->data, DPU_KMS_INFO_DATALEN(info), CRTC_PROP_INFO);
-
-	kfree(info);
-}
-
-/**
- * dpu_crtc_atomic_set_property - atomically set a crtc drm property
- * @crtc: Pointer to drm crtc structure
- * @state: Pointer to drm crtc state structure
- * @property: Pointer to targeted drm property
- * @val: Updated property value
- * @Returns: Zero on success
- */
-static int dpu_crtc_atomic_set_property(struct drm_crtc *crtc,
-		struct drm_crtc_state *state,
-		struct drm_property *property,
-		uint64_t val)
-{
-	struct dpu_crtc *dpu_crtc;
-	struct dpu_crtc_state *cstate;
-	int ret = -EINVAL;
-
-	if (!crtc || !state || !property) {
-		DPU_ERROR("invalid argument(s)\n");
-	} else {
-		dpu_crtc = to_dpu_crtc(crtc);
-		cstate = to_dpu_crtc_state(state);
-		ret = msm_property_atomic_set(&dpu_crtc->property_info,
-				&cstate->property_state, property, val);
-		if (ret)
-			DRM_ERROR("failed to set the property\n");
-
-		DPU_DEBUG("crtc%d %s[%d] <= 0x%llx ret=%d\n", crtc->base.id,
-				property->name, property->base.id, val, ret);
-	}
-
-	return ret;
-}
-
-/**
- * dpu_crtc_set_property - set a crtc drm property
- * @crtc: Pointer to drm crtc structure
- * @property: Pointer to targeted drm property
- * @val: Updated property value
- * @Returns: Zero on success
- */
-static int dpu_crtc_set_property(struct drm_crtc *crtc,
-		struct drm_property *property, uint64_t val)
-{
-	DPU_DEBUG("\n");
-
-	return dpu_crtc_atomic_set_property(crtc, crtc->state, property, val);
-}
-
-/**
- * dpu_crtc_atomic_get_property - retrieve a crtc drm property
- * @crtc: Pointer to drm crtc structure
- * @state: Pointer to drm crtc state structure
- * @property: Pointer to targeted drm property
- * @val: Pointer to variable for receiving property value
- * @Returns: Zero on success
- */
-static int dpu_crtc_atomic_get_property(struct drm_crtc *crtc,
-		const struct drm_crtc_state *state,
-		struct drm_property *property,
-		uint64_t *val)
-{
-	struct dpu_crtc *dpu_crtc;
-	struct dpu_crtc_state *cstate;
-	struct drm_encoder *encoder;
-	int i, ret = -EINVAL;
-	bool is_cmd = true;
-
-	if (!crtc || !state) {
-		DPU_ERROR("invalid argument(s)\n");
-	} else {
-		dpu_crtc = to_dpu_crtc(crtc);
-		cstate = to_dpu_crtc_state(state);
-
-		/**
-		 * set the cmd flag only when all the encoders attached
-		 * to the crtc are in cmd mode. Consider all other cases
-		 * as video mode.
-		 */
-		drm_for_each_encoder(encoder, crtc->dev) {
-			if (encoder->crtc == crtc)
-				is_cmd = dpu_encoder_check_mode(encoder,
-						MSM_DISPLAY_CAP_CMD_MODE);
-		}
-
-		i = msm_property_index(&dpu_crtc->property_info, property);
-		ret = msm_property_atomic_get(&dpu_crtc->property_info,
-				&cstate->property_state,
-				property, val);
-		if (ret)
-			DRM_ERROR("get property failed\n");
-	}
-	return ret;
-}
-
 #ifdef CONFIG_DEBUG_FS
 static int _dpu_debugfs_status_show(struct seq_file *s, void *data)
 {
@@ -2710,9 +2488,6 @@ static void dpu_crtc_early_unregister(struct drm_crtc *crtc)
 	.set_config = drm_atomic_helper_set_config,
 	.destroy = dpu_crtc_destroy,
 	.page_flip = drm_atomic_helper_page_flip,
-	.set_property = dpu_crtc_set_property,
-	.atomic_set_property = dpu_crtc_atomic_set_property,
-	.atomic_get_property = dpu_crtc_atomic_get_property,
 	.reset = dpu_crtc_reset,
 	.atomic_duplicate_state = dpu_crtc_duplicate_state,
 	.atomic_destroy_state = dpu_crtc_destroy_state,
@@ -2875,14 +2650,6 @@ struct drm_crtc *dpu_crtc_init(struct drm_device *dev, struct drm_plane *plane)
 		return ERR_PTR(rc);
 	}
 
-	/* create CRTC properties */
-	msm_property_init(&dpu_crtc->property_info, &crtc->base, dev,
-			priv->crtc_property, dpu_crtc->property_data,
-			CRTC_PROP_COUNT, CRTC_PROP_BLOBCOUNT,
-			sizeof(struct dpu_crtc_state));
-
-	dpu_crtc_install_properties(crtc, kms->catalog);
-
 	DPU_DEBUG("%s: successfully initialized crtc\n", dpu_crtc->name);
 	return crtc;
 }
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h
index 6628eb3..f752101 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h
@@ -22,7 +22,6 @@
 #include <linux/kthread.h>
 #include <uapi/drm/dpu_drm.h>
 #include <drm/drm_crtc.h>
-#include "msm_prop.h"
 #include "dpu_kms.h"
 #include "dpu_core_perf.h"
 #include "dpu_hw_blk.h"
@@ -200,10 +199,6 @@ struct dpu_crtc {
 	struct drm_pending_vblank_event *event;
 	u32 vsync_count;
 
-	struct msm_property_info property_info;
-	struct msm_property_data property_data[CRTC_PROP_COUNT];
-	struct drm_property_blob *blob_info;
-
 	struct dpu_hw_stage_cfg stage_cfg;
 	struct dentry *debugfs_root;
 
@@ -324,8 +319,6 @@ struct dpu_crtc_state {
 	bool is_ppsplit;
 	struct dpu_rect lm_bounds[CRTC_DUAL_MIXERS];
 
-	struct msm_property_state property_state;
-	struct msm_property_value property_values[CRTC_PROP_COUNT];
 	uint64_t input_fence_timeout_ns;
 
 	struct dpu_core_perf_params new_perf;
@@ -336,15 +329,6 @@ struct dpu_crtc_state {
 	container_of(x, struct dpu_crtc_state, base)
 
 /**
- * dpu_crtc_get_property - query integer value of crtc property
- * @S: Pointer to crtc state
- * @X: Property index, from enum msm_mdp_crtc_property
- * Returns: Integer value of requested property
- */
-#define dpu_crtc_get_property(S, X) \
-	((S) && ((X) < CRTC_PROP_COUNT) ? ((S)->property_values[(X)].value) : 0)
-
-/**
  * dpu_crtc_get_mixer_width - get the mixer width
  * Mixer width will be same as panel width(/2 for split)
  */
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.h
index d853ad9..0339dfd 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.h
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.h
@@ -20,8 +20,6 @@
 #define __DPU_ENCODER_H__
 
 #include <drm/drm_crtc.h>
-
-#include "msm_prop.h"
 #include "dpu_hw_mdss.h"
 
 #define DPU_ENCODER_FRAME_EVENT_DONE			BIT(0)
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
index 28735c8..faf5903 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
@@ -20,9 +20,8 @@
 
 #include <linux/debugfs.h>
 #include <linux/dma-buf.h>
-#include "msm_prop.h"
-#include "msm_drv.h"
 
+#include "msm_drv.h"
 #include "dpu_kms.h"
 #include "dpu_formats.h"
 #include "dpu_hw_sspp.h"
@@ -119,9 +118,6 @@ struct dpu_plane {
 
 	const struct dpu_sspp_sub_blks *pipe_sblk;
 	char pipe_name[DPU_NAME_SIZE];
-	struct msm_property_info property_info;
-	struct msm_property_data property_data[PLANE_PROP_COUNT];
-	struct drm_property_blob *blob_info;
 
 	/* debugfs related stuff */
 	struct dentry *debugfs_root;
@@ -1401,7 +1397,6 @@ static int dpu_plane_sspp_atomic_update(struct drm_plane *plane,
 	}
 
 	_dpu_plane_set_qos_remap(plane);
-
 	return 0;
 }
 
@@ -1486,89 +1481,6 @@ void dpu_plane_restore(struct drm_plane *plane)
 	dpu_plane_atomic_update(plane, plane->state);
 }
 
-/* helper to install properties which are common to planes and crtcs */
-static void _dpu_plane_install_properties(struct drm_plane *plane,
-	struct dpu_mdss_cfg *catalog, u32 master_plane_id)
-{
-	struct dpu_plane *pdpu = to_dpu_plane(plane);
-	int zpos_max = 255;
-	int zpos_def = 0;
-
-	if (!plane || !pdpu) {
-		DPU_ERROR("invalid plane\n");
-		return;
-	} else if (!pdpu->pipe_hw || !pdpu->pipe_sblk) {
-		DPU_ERROR("invalid plane, pipe_hw %d pipe_sblk %d\n",
-				pdpu->pipe_hw != 0, pdpu->pipe_sblk != 0);
-		return;
-	} else if (!catalog) {
-		DPU_ERROR("invalid catalog\n");
-		return;
-	}
-
-	pdpu->catalog = catalog;
-
-	if (dpu_is_custom_client()) {
-		if (catalog->mixer_count &&
-				catalog->mixer[0].sblk->maxblendstages) {
-			zpos_max = catalog->mixer[0].sblk->maxblendstages - 1;
-			if (zpos_max > DPU_STAGE_MAX - DPU_STAGE_0 - 1)
-				zpos_max = DPU_STAGE_MAX - DPU_STAGE_0 - 1;
-		}
-	} else if (plane->type != DRM_PLANE_TYPE_PRIMARY) {
-		/* reserve zpos == 0 for primary planes */
-		zpos_def = drm_plane_index(plane) + 1;
-	}
-}
-
-static int dpu_plane_atomic_set_property(struct drm_plane *plane,
-		struct drm_plane_state *state, struct drm_property *property,
-		uint64_t val)
-{
-	struct dpu_plane *pdpu = plane ? to_dpu_plane(plane) : NULL;
-	struct dpu_plane_state *pstate;
-	int ret = -EINVAL;
-
-	DPU_DEBUG_PLANE(pdpu, "\n");
-
-	if (!plane) {
-		DPU_ERROR("invalid plane\n");
-	} else if (!state) {
-		DPU_ERROR_PLANE(pdpu, "invalid state\n");
-	} else {
-		pstate = to_dpu_plane_state(state);
-		ret = msm_property_atomic_set(&pdpu->property_info,
-				&pstate->property_state, property, val);
-	}
-
-	DPU_DEBUG_PLANE(pdpu, "%s[%d] <= 0x%llx ret=%d\n",
-			property->name, property->base.id, val, ret);
-
-	return ret;
-}
-
-static int dpu_plane_atomic_get_property(struct drm_plane *plane,
-		const struct drm_plane_state *state,
-		struct drm_property *property, uint64_t *val)
-{
-	struct dpu_plane *pdpu = plane ? to_dpu_plane(plane) : NULL;
-	struct dpu_plane_state *pstate;
-	int ret = -EINVAL;
-
-	if (!plane) {
-		DPU_ERROR("invalid plane\n");
-	} else if (!state) {
-		DPU_ERROR("invalid state\n");
-	} else {
-		DPU_DEBUG_PLANE(pdpu, "\n");
-		pstate = to_dpu_plane_state(state);
-		ret = msm_property_atomic_get(&pdpu->property_info,
-				&pstate->property_state, property, val);
-	}
-
-	return ret;
-}
-
 static void dpu_plane_destroy(struct drm_plane *plane)
 {
 	struct dpu_plane *pdpu = plane ? to_dpu_plane(plane) : NULL;
@@ -1578,9 +1490,6 @@ static void dpu_plane_destroy(struct drm_plane *plane)
 	if (pdpu) {
 		_dpu_plane_set_qos_ctrl(plane, false, DPU_PLANE_QOS_PANIC_CTRL);
 
-		if (pdpu->blob_info)
-			drm_property_blob_put(pdpu->blob_info);
-		msm_property_destroy(&pdpu->property_info);
 		mutex_destroy(&pdpu->lock);
 
 		drm_plane_helper_disable(plane);
@@ -1598,7 +1507,6 @@ static void dpu_plane_destroy(struct drm_plane *plane)
 static void dpu_plane_destroy_state(struct drm_plane *plane,
 		struct drm_plane_state *state)
 {
-	struct dpu_plane *pdpu;
 	struct dpu_plane_state *pstate;
 
 	if (!plane || !state) {
@@ -1607,18 +1515,13 @@ static void dpu_plane_destroy_state(struct drm_plane *plane,
 		return;
 	}
 
-	pdpu = to_dpu_plane(plane);
 	pstate = to_dpu_plane_state(state);
 
-	DPU_DEBUG_PLANE(pdpu, "\n");
-
 	/* remove ref count for frame buffers */
 	if (state->fb)
 		drm_framebuffer_put(state->fb);
 
-	/* destroy value helper */
-	msm_property_destroy_state(&pdpu->property_info, pstate,
-			&pstate->property_state);
+	kfree(pstate);
 }
 
 static struct drm_plane_state *
@@ -1638,7 +1541,7 @@ static void dpu_plane_destroy_state(struct drm_plane *plane,
 
 	old_state = to_dpu_plane_state(plane->state);
 	pdpu = to_dpu_plane(plane);
-	pstate = msm_property_alloc_state(&pdpu->property_info);
+	pstate = kmemdup(old_state, sizeof(*old_state), GFP_KERNEL);
 	if (!pstate) {
 		DPU_ERROR_PLANE(pdpu, "failed to allocate state\n");
 		return NULL;
@@ -1646,10 +1549,6 @@ static void dpu_plane_destroy_state(struct drm_plane *plane,
 
 	DPU_DEBUG_PLANE(pdpu, "\n");
 
-	/* duplicate value helper */
-	msm_property_duplicate_state(&pdpu->property_info, old_state, pstate,
-			&pstate->property_state, pstate->property_values);
-
 	pstate->pending = false;
 
 	__drm_atomic_helper_plane_duplicate_state(plane, &pstate->base);
@@ -1676,17 +1575,12 @@ static void dpu_plane_reset(struct drm_plane *plane)
 		plane->state = 0;
 	}
 
-	pstate = msm_property_alloc_state(&pdpu->property_info);
+	pstate = kzalloc(sizeof(*pstate), GFP_KERNEL);
 	if (!pstate) {
 		DPU_ERROR_PLANE(pdpu, "failed to allocate state\n");
 		return;
 	}
 
-	/* reset value helper */
-	msm_property_reset_state(&pdpu->property_info, pstate,
-			&pstate->property_state,
-			pstate->property_values);
-
 	pstate->base.plane = plane;
 
 	plane->state = &pstate->base;
@@ -1919,8 +1813,6 @@ static void dpu_plane_early_unregister(struct drm_plane *plane)
 		.update_plane = drm_atomic_helper_update_plane,
 		.disable_plane = drm_atomic_helper_disable_plane,
 		.destroy = dpu_plane_destroy,
-		.atomic_set_property = dpu_plane_atomic_set_property,
-		.atomic_get_property = dpu_plane_atomic_get_property,
 		.reset = dpu_plane_reset,
 		.atomic_duplicate_state = dpu_plane_duplicate_state,
 		.atomic_destroy_state = dpu_plane_destroy_state,
@@ -2064,13 +1956,6 @@ struct drm_plane *dpu_plane_init(struct drm_device *dev,
 	/* success! finalize initialization */
 	drm_plane_helper_add(plane, &dpu_plane_helper_funcs);
 
-	msm_property_init(&pdpu->property_info, &plane->base, dev,
-			priv->plane_property, pdpu->property_data,
-			PLANE_PROP_COUNT, PLANE_PROP_BLOBCOUNT,
-			sizeof(struct dpu_plane_state));
-
-	_dpu_plane_install_properties(plane, kms->catalog, master_plane_id);
-
 	/* save user friendly pipe name for later */
 	snprintf(pdpu->pipe_name, DPU_NAME_SIZE, "plane%u", plane->base.id);
 
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.h
index a06c8b4..f6fe6dd 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.h
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.h
@@ -21,7 +21,6 @@
 
 #include <drm/drm_crtc.h>
 
-#include "msm_prop.h"
 #include "dpu_kms.h"
 #include "dpu_hw_mdss.h"
 #include "dpu_hw_sspp.h"
@@ -44,8 +43,6 @@
  */
 struct dpu_plane_state {
 	struct drm_plane_state base;
-	struct msm_property_state property_state;
-	struct msm_property_value property_values[PLANE_PROP_COUNT];
 	struct msm_gem_address_space *aspace;
 	void *input_fence;
 	enum dpu_stage stage;
@@ -74,15 +71,6 @@ struct dpu_multirect_plane_states {
 	container_of(x, struct dpu_plane_state, base)
 
 /**
- * dpu_plane_get_property - Query integer value of plane property
- * @S: Pointer to plane state
- * @X: Property index, from enum msm_mdp_plane_property
- * Returns: Integer value of requested property
- */
-#define dpu_plane_get_property(S, X) ((S) && ((X) < PLANE_PROP_COUNT) ? \
-	((S)->property_values[(X)].value) : 0)
-
-/**
  * dpu_plane_pipe - return sspp identifier for the given plane
  * @plane:   Pointer to DRM plane object
  * Returns: sspp identifier of the given plane
diff --git a/drivers/gpu/drm/msm/msm_drv.h b/drivers/gpu/drm/msm/msm_drv.h
index 8e80b4b..edb395d 100644
--- a/drivers/gpu/drm/msm/msm_drv.h
+++ b/drivers/gpu/drm/msm/msm_drv.h
@@ -77,26 +77,13 @@ struct msm_file_private {
 };
 
 enum msm_mdp_plane_property {
-	/* # of blob properties */
-	PLANE_PROP_BLOBCOUNT,
-
 	/* range properties */
-	PLANE_PROP_ZPOS = PLANE_PROP_BLOBCOUNT,
+	PLANE_PROP_ZPOS,
 
 	/* total # of properties */
 	PLANE_PROP_COUNT
 };
 
-enum msm_mdp_crtc_property {
-	CRTC_PROP_INFO,
-
-	/* # of blob properties */
-	CRTC_PROP_BLOBCOUNT,
-
-	/* total # of properties */
-	CRTC_PROP_COUNT
-};
-
 struct msm_vblank_ctrl {
 	struct kthread_work work;
 	struct list_head event_list;
@@ -364,7 +351,6 @@ struct msm_drm_private {
 
 	/* Properties */
 	struct drm_property *plane_property[PLANE_PROP_COUNT];
-	struct drm_property *crtc_property[CRTC_PROP_COUNT];
 
 	/* Color processing properties for the crtc */
 	struct drm_property **cp_property;
diff --git a/drivers/gpu/drm/msm/msm_prop.c b/drivers/gpu/drm/msm/msm_prop.c
deleted file mode 100644
index 8f27cde..0000000
--- a/drivers/gpu/drm/msm/msm_prop.c
+++ /dev/null
@@ -1,688 +0,0 @@
-/* Copyright (c) 2016-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 "msm_prop.h"
-
-void msm_property_init(struct msm_property_info *info,
-		struct drm_mode_object *base,
-		struct drm_device *dev,
-		struct drm_property **property_array,
-		struct msm_property_data *property_data,
-		uint32_t property_count,
-		uint32_t blob_count,
-		uint32_t state_size)
-{
-	/* prevent access if any of these are NULL */
-	if (!base || !dev || !property_array || !property_data) {
-		property_count = 0;
-		blob_count = 0;
-
-		DRM_ERROR("invalid arguments, forcing zero properties\n");
-		return;
-	}
-
-	/* can't have more blob properties than total properties */
-	if (blob_count > property_count) {
-		blob_count = property_count;
-
-		DBG("Capping number of blob properties to %d", blob_count);
-	}
-
-	if (!info) {
-		DRM_ERROR("info pointer is NULL\n");
-	} else {
-		info->base = base;
-		info->dev = dev;
-		info->property_array = property_array;
-		info->property_data = property_data;
-		info->property_count = property_count;
-		info->blob_count = blob_count;
-		info->install_request = 0;
-		info->install_count = 0;
-		info->recent_idx = 0;
-		info->is_active = false;
-		info->state_size = state_size;
-		info->state_cache_size = 0;
-		mutex_init(&info->property_lock);
-
-		memset(property_data,
-				0,
-				sizeof(struct msm_property_data) *
-				property_count);
-	}
-}
-
-void msm_property_destroy(struct msm_property_info *info)
-{
-	if (!info)
-		return;
-
-	/* free state cache */
-	while (info->state_cache_size > 0)
-		kfree(info->state_cache[--(info->state_cache_size)]);
-
-	mutex_destroy(&info->property_lock);
-}
-
-int msm_property_pop_dirty(struct msm_property_info *info,
-		struct msm_property_state *property_state)
-{
-	struct list_head *item;
-	int rc = 0;
-
-	if (!info || !property_state || !property_state->values) {
-		DRM_ERROR("invalid argument(s)\n");
-		return -EINVAL;
-	}
-
-	mutex_lock(&info->property_lock);
-	if (list_empty(&property_state->dirty_list)) {
-		rc = -EAGAIN;
-	} else {
-		item = property_state->dirty_list.next;
-		list_del_init(item);
-		rc = container_of(item, struct msm_property_value, dirty_node)
-			- property_state->values;
-		DRM_DEBUG_KMS("property %d dirty\n", rc);
-	}
-	mutex_unlock(&info->property_lock);
-
-	return rc;
-}
-
-/**
- * _msm_property_set_dirty_no_lock - flag given property as being dirty
- *                                   This function doesn't mutex protect the
- *                                   dirty linked list.
- * @info: Pointer to property info container struct
- * @property_state: Pointer to property state container struct
- * @property_idx: Property index
- */
-static void _msm_property_set_dirty_no_lock(
-		struct msm_property_info *info,
-		struct msm_property_state *property_state,
-		uint32_t property_idx)
-{
-	if (!info || !property_state || !property_state->values ||
-			property_idx >= info->property_count) {
-		DRM_ERROR("invalid argument(s), idx %u\n", property_idx);
-		return;
-	}
-
-	/* avoid re-inserting if already dirty */
-	if (!list_empty(&property_state->values[property_idx].dirty_node)) {
-		DRM_DEBUG_KMS("property %u already dirty\n", property_idx);
-		return;
-	}
-
-	list_add_tail(&property_state->values[property_idx].dirty_node,
-			&property_state->dirty_list);
-}
-
-/**
- * _msm_property_install_integer - install standard drm range property
- * @info: Pointer to property info container struct
- * @name: Property name
- * @flags: Other property type flags, e.g. DRM_MODE_PROP_IMMUTABLE
- * @min: Min property value
- * @max: Max property value
- * @init: Default Property value
- * @property_idx: Property index
- * @force_dirty: Whether or not to filter 'dirty' status on unchanged values
- */
-static void _msm_property_install_integer(struct msm_property_info *info,
-		const char *name, int flags, uint64_t min, uint64_t max,
-		uint64_t init, uint32_t property_idx, bool force_dirty)
-{
-	struct drm_property **prop;
-
-	if (!info)
-		return;
-
-	++info->install_request;
-
-	if (!name || (property_idx >= info->property_count)) {
-		DRM_ERROR("invalid argument(s), %s\n", name ? name : "null");
-	} else {
-		prop = &info->property_array[property_idx];
-		/*
-		 * Properties need to be attached to each drm object that
-		 * uses them, but only need to be created once
-		 */
-		if (*prop == 0) {
-			*prop = drm_property_create_range(info->dev,
-					flags, name, min, max);
-			if (*prop == 0)
-				DRM_ERROR("create %s property failed\n", name);
-		}
-
-		/* save init value for later */
-		info->property_data[property_idx].default_value = init;
-		info->property_data[property_idx].force_dirty = force_dirty;
-
-		/* always attach property, if created */
-		if (*prop) {
-			drm_object_attach_property(info->base, *prop, init);
-			++info->install_count;
-		}
-	}
-}
-
-void msm_property_install_range(struct msm_property_info *info,
-		const char *name, int flags, uint64_t min, uint64_t max,
-		uint64_t init, uint32_t property_idx)
-{
-	_msm_property_install_integer(info, name, flags,
-			min, max, init, property_idx, false);
-}
-
-void msm_property_install_volatile_range(struct msm_property_info *info,
-		const char *name, int flags, uint64_t min, uint64_t max,
-		uint64_t init, uint32_t property_idx)
-{
-	_msm_property_install_integer(info, name, flags,
-			min, max, init, property_idx, true);
-}
-
-void msm_property_install_rotation(struct msm_property_info *info,
-		struct drm_plane *plane, unsigned int rotation,
-		unsigned int supported_rotations, uint32_t property_idx)
-{
-	if (!info || !plane)
-		return;
-
-	++info->install_request;
-
-	if (property_idx >= info->property_count) {
-		DRM_ERROR("invalid property index %d\n", property_idx);
-		return;
-	}
-
-	if (drm_plane_create_rotation_property(plane,
-			rotation, supported_rotations)) {
-		DRM_ERROR("create rotation property failed\n");
-		return;
-	}
-
-	if (plane->rotation_property) {
-		info->property_array[property_idx] = plane->rotation_property;
-
-		/* save init value for later */
-		info->property_data[property_idx].default_value = rotation;
-		info->property_data[property_idx].force_dirty = false;
-
-		++info->install_count;
-	}
-}
-
-void msm_property_install_enum(struct msm_property_info *info,
-		const char *name, int flags, int is_bitmask,
-		const struct drm_prop_enum_list *values, int num_values,
-		uint32_t property_idx)
-{
-	struct drm_property **prop;
-
-	if (!info)
-		return;
-
-	++info->install_request;
-
-	if (!name || !values || !num_values ||
-			(property_idx >= info->property_count)) {
-		DRM_ERROR("invalid argument(s), %s\n", name ? name : "null");
-	} else {
-		prop = &info->property_array[property_idx];
-		/*
-		 * Properties need to be attached to each drm object that
-		 * uses them, but only need to be created once
-		 */
-		if (*prop == 0) {
-			/* 'bitmask' is a special type of 'enum' */
-			if (is_bitmask)
-				*prop = drm_property_create_bitmask(info->dev,
-						DRM_MODE_PROP_BITMASK | flags,
-						name, values, num_values, -1);
-			else
-				*prop = drm_property_create_enum(info->dev,
-						DRM_MODE_PROP_ENUM | flags,
-						name, values, num_values);
-			if (*prop == 0)
-				DRM_ERROR("create %s property failed\n", name);
-		}
-
-		/* save init value for later */
-		info->property_data[property_idx].default_value = 0;
-		info->property_data[property_idx].force_dirty = false;
-
-		/* select first defined value for enums */
-		if (!is_bitmask)
-			info->property_data[property_idx].default_value =
-				values->type;
-
-		/* always attach property, if created */
-		if (*prop) {
-			drm_object_attach_property(info->base, *prop,
-					info->property_data
-					[property_idx].default_value);
-			++info->install_count;
-		}
-	}
-}
-
-void msm_property_install_blob(struct msm_property_info *info,
-		const char *name, int flags, uint32_t property_idx)
-{
-	struct drm_property **prop;
-
-	if (!info)
-		return;
-
-	++info->install_request;
-
-	if (!name || (property_idx >= info->blob_count)) {
-		DRM_ERROR("invalid argument(s), %s\n", name ? name : "null");
-	} else {
-		prop = &info->property_array[property_idx];
-		/*
-		 * Properties need to be attached to each drm object that
-		 * uses them, but only need to be created once
-		 */
-		if (*prop == 0) {
-			/* use 'create' for blob property place holder */
-			*prop = drm_property_create(info->dev,
-					DRM_MODE_PROP_BLOB | flags, name, 0);
-			if (*prop == 0)
-				DRM_ERROR("create %s property failed\n", name);
-		}
-
-		/* save init value for later */
-		info->property_data[property_idx].default_value = 0;
-		info->property_data[property_idx].force_dirty = true;
-
-		/* always attach property, if created */
-		if (*prop) {
-			drm_object_attach_property(info->base, *prop, -1);
-			++info->install_count;
-		}
-	}
-}
-
-int msm_property_install_get_status(struct msm_property_info *info)
-{
-	int rc = -ENOMEM;
-
-	if (info && (info->install_request == info->install_count))
-		rc = 0;
-
-	return rc;
-}
-
-int msm_property_index(struct msm_property_info *info,
-		struct drm_property *property)
-{
-	uint32_t count;
-	int32_t idx;
-	int rc = -EINVAL;
-
-	if (!info || !property) {
-		DRM_ERROR("invalid argument(s)\n");
-	} else {
-		/*
-		 * Linear search, but start from last found index. This will
-		 * help if any single property is accessed multiple times in a
-		 * row. Ideally, we could keep a list of properties sorted in
-		 * the order of most recent access, but that may be overkill
-		 * for now.
-		 */
-		mutex_lock(&info->property_lock);
-		idx = info->recent_idx;
-		count = info->property_count;
-		while (count) {
-			--count;
-
-			/* stop searching on match */
-			if (info->property_array[idx] == property) {
-				info->recent_idx = idx;
-				rc = idx;
-				break;
-			}
-
-			/* move to next valid index */
-			if (--idx < 0)
-				idx = info->property_count - 1;
-		}
-		mutex_unlock(&info->property_lock);
-	}
-
-	return rc;
-}
-
-int msm_property_set_dirty(struct msm_property_info *info,
-		struct msm_property_state *property_state,
-		int property_idx)
-{
-	if (!info || !property_state || !property_state->values) {
-		DRM_ERROR("invalid argument(s)\n");
-		return -EINVAL;
-	}
-	mutex_lock(&info->property_lock);
-	_msm_property_set_dirty_no_lock(info, property_state, property_idx);
-	mutex_unlock(&info->property_lock);
-	return 0;
-}
-
-int msm_property_atomic_set(struct msm_property_info *info,
-		struct msm_property_state *property_state,
-		struct drm_property *property, uint64_t val)
-{
-	struct drm_property_blob *blob;
-	int property_idx, rc = -EINVAL;
-
-	property_idx = msm_property_index(info, property);
-	if (!info || !property_state ||
-			(property_idx == -EINVAL) || !property_state->values) {
-		DRM_DEBUG("invalid argument(s)\n");
-	} else {
-		/* extra handling for incoming properties */
-		mutex_lock(&info->property_lock);
-		if ((property->flags & DRM_MODE_PROP_BLOB) &&
-			(property_idx < info->blob_count)) {
-			/* DRM lookup also takes a reference */
-			blob = drm_property_lookup_blob(info->dev,
-				(uint32_t)val);
-			if (!blob) {
-				DRM_ERROR("blob not found\n");
-				val = 0;
-			} else {
-				DBG("Blob %u saved", blob->base.id);
-				val = blob->base.id;
-
-				/* save blob - need to clear previous ref */
-				if (property_state->values[property_idx].blob)
-					drm_property_blob_put(
-						property_state->values[
-						property_idx].blob);
-				property_state->values[property_idx].blob =
-					blob;
-			}
-		}
-
-		/* update value and flag as dirty */
-		if (property_state->values[property_idx].value != val ||
-				info->property_data[property_idx].force_dirty) {
-			property_state->values[property_idx].value = val;
-			_msm_property_set_dirty_no_lock(info, property_state,
-					property_idx);
-
-			DBG("%s - %lld", property->name, val);
-		}
-		mutex_unlock(&info->property_lock);
-		rc = 0;
-	}
-
-	return rc;
-}
-
-int msm_property_atomic_get(struct msm_property_info *info,
-		struct msm_property_state *property_state,
-		struct drm_property *property, uint64_t *val)
-{
-	int property_idx, rc = -EINVAL;
-
-	property_idx = msm_property_index(info, property);
-	if (!info || (property_idx == -EINVAL) ||
-			!property_state->values || !val) {
-		DRM_DEBUG("Invalid argument(s)\n");
-	} else {
-		mutex_lock(&info->property_lock);
-		*val = property_state->values[property_idx].value;
-		mutex_unlock(&info->property_lock);
-		rc = 0;
-	}
-
-	return rc;
-}
-
-void *msm_property_alloc_state(struct msm_property_info *info)
-{
-	void *state = NULL;
-
-	if (!info) {
-		DRM_ERROR("invalid property info\n");
-		return NULL;
-	}
-
-	mutex_lock(&info->property_lock);
-	if (info->state_cache_size)
-		state = info->state_cache[--(info->state_cache_size)];
-	mutex_unlock(&info->property_lock);
-
-	if (!state && info->state_size)
-		state = kmalloc(info->state_size, GFP_KERNEL);
-
-	if (!state)
-		DRM_ERROR("failed to allocate state\n");
-
-	return state;
-}
-
-/**
- * _msm_property_free_state - helper function for freeing local state objects
- * @info: Pointer to property info container struct
- * @st: Pointer to state object
- */
-static void _msm_property_free_state(struct msm_property_info *info, void *st)
-{
-	if (!info || !st)
-		return;
-
-	mutex_lock(&info->property_lock);
-	if (info->state_cache_size < MSM_PROP_STATE_CACHE_SIZE)
-		info->state_cache[(info->state_cache_size)++] = st;
-	else
-		kfree(st);
-	mutex_unlock(&info->property_lock);
-}
-
-void msm_property_reset_state(struct msm_property_info *info, void *state,
-		struct msm_property_state *property_state,
-		struct msm_property_value *property_values)
-{
-	uint32_t i;
-
-	if (!info) {
-		DRM_ERROR("invalid property info\n");
-		return;
-	}
-
-	if (state)
-		memset(state, 0, info->state_size);
-
-	if (property_state) {
-		property_state->property_count = info->property_count;
-		property_state->values = property_values;
-		INIT_LIST_HEAD(&property_state->dirty_list);
-	}
-
-	/*
-	 * Assign default property values. This helper is mostly used
-	 * to initialize newly created state objects.
-	 */
-	if (property_values)
-		for (i = 0; i < info->property_count; ++i) {
-			property_values[i].value =
-				info->property_data[i].default_value;
-			property_values[i].blob = NULL;
-			INIT_LIST_HEAD(&property_values[i].dirty_node);
-		}
-}
-
-void msm_property_duplicate_state(struct msm_property_info *info,
-		void *old_state, void *state,
-		struct msm_property_state *property_state,
-		struct msm_property_value *property_values)
-{
-	uint32_t i;
-
-	if (!info || !old_state || !state) {
-		DRM_ERROR("invalid argument(s)\n");
-		return;
-	}
-
-	memcpy(state, old_state, info->state_size);
-
-	if (!property_state)
-		return;
-
-	INIT_LIST_HEAD(&property_state->dirty_list);
-	property_state->values = property_values;
-
-	if (property_state->values)
-		/* add ref count for blobs and initialize dirty nodes */
-		for (i = 0; i < info->property_count; ++i) {
-			if (property_state->values[i].blob)
-				drm_property_blob_get(
-						property_state->values[i].blob);
-			INIT_LIST_HEAD(&property_state->values[i].dirty_node);
-		}
-}
-
-void msm_property_destroy_state(struct msm_property_info *info, void *state,
-		struct msm_property_state *property_state)
-{
-	uint32_t i;
-
-	if (!info || !state) {
-		DRM_ERROR("invalid argument(s)\n");
-		return;
-	}
-	if (property_state && property_state->values) {
-		/* remove ref count for blobs */
-		for (i = 0; i < info->property_count; ++i)
-			if (property_state->values[i].blob) {
-				drm_property_blob_put(
-						property_state->values[i].blob);
-				property_state->values[i].blob = NULL;
-			}
-	}
-
-	_msm_property_free_state(info, state);
-}
-
-void *msm_property_get_blob(struct msm_property_info *info,
-		struct msm_property_state *property_state,
-		size_t *byte_len,
-		uint32_t property_idx)
-{
-	struct drm_property_blob *blob;
-	size_t len = 0;
-	void *rc = 0;
-
-	if (!info || !property_state || !property_state->values ||
-			(property_idx >= info->blob_count)) {
-		DRM_ERROR("invalid argument(s)\n");
-	} else {
-		blob = property_state->values[property_idx].blob;
-		if (blob) {
-			len = blob->length;
-			rc = &blob->data;
-		}
-	}
-
-	if (byte_len)
-		*byte_len = len;
-
-	return rc;
-}
-
-int msm_property_set_blob(struct msm_property_info *info,
-		struct drm_property_blob **blob_reference,
-		void *blob_data,
-		size_t byte_len,
-		uint32_t property_idx)
-{
-	struct drm_property_blob *blob = NULL;
-	int rc = -EINVAL;
-
-	if (!info || !blob_reference || (property_idx >= info->blob_count)) {
-		DRM_ERROR("invalid argument(s)\n");
-	} else {
-		/* create blob */
-		if (blob_data && byte_len) {
-			blob = drm_property_create_blob(info->dev,
-					byte_len,
-					blob_data);
-			if (IS_ERR_OR_NULL(blob)) {
-				rc = PTR_ERR(blob);
-				DRM_ERROR("failed to create blob, %d\n", rc);
-				goto exit;
-			}
-		}
-
-		/* update drm object */
-		rc = drm_object_property_set_value(info->base,
-				info->property_array[property_idx],
-				blob ? blob->base.id : 0);
-		if (rc) {
-			DRM_ERROR("failed to set blob to property\n");
-			if (blob)
-				drm_property_blob_put(blob);
-			goto exit;
-		}
-
-		/* update local reference */
-		if (*blob_reference)
-			drm_property_blob_put(*blob_reference);
-		*blob_reference = blob;
-	}
-
-exit:
-	return rc;
-}
-
-int msm_property_set_property(struct msm_property_info *info,
-		struct msm_property_state *property_state,
-		uint32_t property_idx,
-		uint64_t val)
-{
-	int rc = -EINVAL;
-
-	if (!info || (property_idx >= info->property_count) ||
-			property_idx < info->blob_count ||
-			!property_state || !property_state->values) {
-		DRM_ERROR("invalid argument(s)\n");
-	} else {
-		struct drm_property *drm_prop;
-
-		mutex_lock(&info->property_lock);
-
-		/* update cached value */
-		property_state->values[property_idx].value = val;
-
-		/* update the new default value for immutables */
-		drm_prop = info->property_array[property_idx];
-		if (drm_prop->flags & DRM_MODE_PROP_IMMUTABLE)
-			info->property_data[property_idx].default_value = val;
-
-		mutex_unlock(&info->property_lock);
-
-		/* update drm object */
-		rc = drm_object_property_set_value(info->base, drm_prop, val);
-		if (rc)
-			DRM_ERROR("failed set property value, idx %d rc %d\n",
-					property_idx, rc);
-
-	}
-
-	return rc;
-}
-
diff --git a/drivers/gpu/drm/msm/msm_prop.h b/drivers/gpu/drm/msm/msm_prop.h
deleted file mode 100644
index 6785955..0000000
--- a/drivers/gpu/drm/msm/msm_prop.h
+++ /dev/null
@@ -1,438 +0,0 @@
-/* Copyright (c) 2016-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.
- */
-
-#ifndef _MSM_PROP_H_
-#define _MSM_PROP_H_
-
-#include <linux/list.h>
-#include "msm_drv.h"
-
-#define MSM_PROP_STATE_CACHE_SIZE	2
-
-/**
- * struct msm_property_data - opaque structure for tracking per
- *                            drm-object per property stuff
- * @default_value: Default property value for this drm object
- * @force_dirty: Always dirty property on incoming sets, rather than checking
- *               for modified values
- */
-struct msm_property_data {
-	uint64_t default_value;
-	bool force_dirty;
-};
-
-/**
- * struct msm_property_value - opaque structure for tracking per
- *                             drm-object per property stuff
- * @value: Current property value for this drm object
- * @blob: Pointer to associated blob data, if available
- * @dirty_node: Linked list node to track if property is dirty or not
- */
-struct msm_property_value {
-	uint64_t value;
-	struct drm_property_blob *blob;
-	struct list_head dirty_node;
-};
-
-/**
- * struct msm_property_info: Structure for property/state helper functions
- * @base: Pointer to base drm object (plane/crtc/etc.)
- * @dev: Pointer to drm device object
- * @property_array: Pointer to array for storing created property objects
- * @property_data: Pointer to array for storing private property data
- * @property_count: Total number of properties
- * @blob_count: Total number of blob properties, should be <= count
- * @install_request: Total number of property 'install' requests
- * @install_count: Total number of successful 'install' requests
- * @recent_idx: Index of property most recently accessed by set/get
- * @is_active: Whether or not drm component properties are 'active'
- * @state_cache: Cache of local states, to prevent alloc/free thrashing
- * @state_size: Size of local state structures
- * @state_cache_size: Number of state structures currently stored in state_cache
- * @property_lock: Mutex to protect local variables
- */
-struct msm_property_info {
-	struct drm_mode_object *base;
-	struct drm_device *dev;
-
-	struct drm_property **property_array;
-	struct msm_property_data *property_data;
-	uint32_t property_count;
-	uint32_t blob_count;
-	uint32_t install_request;
-	uint32_t install_count;
-
-	int32_t recent_idx;
-
-	bool is_active;
-
-	void *state_cache[MSM_PROP_STATE_CACHE_SIZE];
-	uint32_t state_size;
-	int32_t state_cache_size;
-	struct mutex property_lock;
-};
-
-/**
- * struct msm_property_state - Structure for local property state information
- * @property_count: Total number of properties
- * @values: Pointer to array of msm_property_value objects
- * @dirty_list: List of all properties that have been 'atomic_set' but not
- *              yet cleared with 'msm_property_pop_dirty'
- */
-struct msm_property_state {
-	uint32_t property_count;
-	struct msm_property_value *values;
-	struct list_head dirty_list;
-};
-
-/**
- * msm_property_index_to_drm_property - get drm property struct from prop index
- * @info: Pointer to property info container struct
- * @property_idx: Property index
- * Returns: drm_property pointer associated with property index
- */
-static inline
-struct drm_property *msm_property_index_to_drm_property(
-		struct msm_property_info *info, uint32_t property_idx)
-{
-	if (!info || property_idx >= info->property_count)
-		return NULL;
-
-	return info->property_array[property_idx];
-}
-
-/**
- * msm_property_get_default - query default value of a property
- * @info: Pointer to property info container struct
- * @property_idx: Property index
- * Returns: Default value for specified property
- */
-static inline
-uint64_t msm_property_get_default(struct msm_property_info *info,
-		uint32_t property_idx)
-{
-	uint64_t rc = 0;
-
-	if (!info)
-		return 0;
-
-	mutex_lock(&info->property_lock);
-	if (property_idx < info->property_count)
-		rc = info->property_data[property_idx].default_value;
-	mutex_unlock(&info->property_lock);
-
-	return rc;
-}
-
-/**
- * msm_property_set_is_active - set overall 'active' status for all properties
- * @info: Pointer to property info container struct
- * @is_active: New 'is active' status
- */
-static inline
-void msm_property_set_is_active(struct msm_property_info *info, bool is_active)
-{
-	if (info) {
-		mutex_lock(&info->property_lock);
-		info->is_active = is_active;
-		mutex_unlock(&info->property_lock);
-	}
-}
-
-/**
- * msm_property_get_is_active - query property 'is active' status
- * @info: Pointer to property info container struct
- * Returns: Current 'is active's status
- */
-static inline
-bool msm_property_get_is_active(struct msm_property_info *info)
-{
-	bool rc = false;
-
-	if (info) {
-		mutex_lock(&info->property_lock);
-		rc = info->is_active;
-		mutex_unlock(&info->property_lock);
-	}
-
-	return rc;
-}
-
-/**
- * msm_property_pop_dirty - determine next dirty property and clear
- *                          its dirty flag
- * @info: Pointer to property info container struct
- * @property_state: Pointer to property state container struct
- * Returns: Valid msm property index on success,
- *          -EAGAIN if no dirty properties are available
- *          Property indicies returned from this function are similar
- *          to those returned by the msm_property_index function.
- */
-int msm_property_pop_dirty(struct msm_property_info *info,
-		struct msm_property_state *property_state);
-
-/**
- * msm_property_init - initialize property info structure
- * @info: Pointer to property info container struct
- * @base: Pointer to base drm object (plane/crtc/etc.)
- * @dev: Pointer to drm device object
- * @property_array: Pointer to array for storing created property objects
- * @property_data: Pointer to array for storing private property data
- * @property_count: Total number of properties
- * @blob_count: Total number of blob properties, should be <= count
- * @state_size: Size of local state object
- */
-void msm_property_init(struct msm_property_info *info,
-		struct drm_mode_object *base,
-		struct drm_device *dev,
-		struct drm_property **property_array,
-		struct msm_property_data *property_data,
-		uint32_t property_count,
-		uint32_t blob_count,
-		uint32_t state_size);
-
-/**
- * msm_property_destroy - destroy helper info structure
- *
- * @info: Pointer to property info container struct
- */
-void msm_property_destroy(struct msm_property_info *info);
-
-/**
- * msm_property_install_range - install standard drm range property
- * @info: Pointer to property info container struct
- * @name: Property name
- * @flags: Other property type flags, e.g. DRM_MODE_PROP_IMMUTABLE
- * @min: Min property value
- * @max: Max property value
- * @init: Default Property value
- * @property_idx: Property index
- */
-void msm_property_install_range(struct msm_property_info *info,
-		const char *name,
-		int flags,
-		uint64_t min,
-		uint64_t max,
-		uint64_t init,
-		uint32_t property_idx);
-
-/**
- * msm_property_install_volatile_range - install drm range property
- *	This function is similar to msm_property_install_range, but assumes
- *	that the property is meant for holding user pointers or descriptors
- *	that may reference volatile data without having an updated value.
- * @info: Pointer to property info container struct
- * @name: Property name
- * @flags: Other property type flags, e.g. DRM_MODE_PROP_IMMUTABLE
- * @min: Min property value
- * @max: Max property value
- * @init: Default Property value
- * @property_idx: Property index
- */
-void msm_property_install_volatile_range(struct msm_property_info *info,
-		const char *name,
-		int flags,
-		uint64_t min,
-		uint64_t max,
-		uint64_t init,
-		uint32_t property_idx);
-
-/**
- * msm_property_install_rotation - install standard drm rotation property
- * @info: Pointer to property info container struct
- * @plane: Pointer to drm_plane which this property is installed on
- * @rotation: The default value for this new property
- * @supported_rotations: Bitmask of supported rotation values (see
- *                       drm_plane_create_rotation_property for more details)
- * @property_idx: Property index
- */
-void msm_property_install_rotation(struct msm_property_info *info,
-		struct drm_plane *plane,
-		unsigned int rotation,
-		unsigned int supported_rotations,
-		uint32_t property_idx);
-
-/**
- * msm_property_install_enum - install standard drm enum/bitmask property
- * @info: Pointer to property info container struct
- * @name: Property name
- * @flags: Other property type flags, e.g. DRM_MODE_PROP_IMMUTABLE
- * @is_bitmask: Set to non-zero to create a bitmask property, rather than an
- *              enumeration one
- * @values: Array of allowable enumeration/bitmask values
- * @num_values: Size of values array
- * @property_idx: Property index
- */
-void msm_property_install_enum(struct msm_property_info *info,
-		const char *name,
-		int flags,
-		int is_bitmask,
-		const struct drm_prop_enum_list *values,
-		int num_values,
-		uint32_t property_idx);
-
-/**
- * msm_property_install_blob - install standard drm blob property
- * @info: Pointer to property info container struct
- * @name: Property name
- * @flags: Extra flags for property creation
- * @property_idx: Property index
- */
-void msm_property_install_blob(struct msm_property_info *info,
-		const char *name,
-		int flags,
-		uint32_t property_idx);
-
-/**
- * msm_property_install_get_status - query overal status of property additions
- * @info: Pointer to property info container struct
- * Returns: Zero if previous property install calls were all successful
- */
-int msm_property_install_get_status(struct msm_property_info *info);
-
-/**
- * msm_property_index - determine property index from drm_property ptr
- * @info: Pointer to property info container struct
- * @property: Incoming property pointer
- * Returns: Valid property index, or -EINVAL on error
- */
-int msm_property_index(struct msm_property_info *info,
-		struct drm_property *property);
-
-/**
- * msm_property_set_dirty - forcibly flag a property as dirty
- * @info: Pointer to property info container struct
- * @property_state: Pointer to property state container struct
- * @property_idx: Property index
- * Returns: Zero on success
- */
-int msm_property_set_dirty(struct msm_property_info *info,
-		struct msm_property_state *property_state,
-		int property_idx);
-
-/**
- * msm_property_atomic_set - helper function for atomic property set callback
- * @info: Pointer to property info container struct
- * @property_state: Pointer to local state structure
- * @property: Incoming property pointer
- * @val: Incoming property value
- * Returns: Zero on success
- */
-int msm_property_atomic_set(struct msm_property_info *info,
-		struct msm_property_state *property_state,
-		struct drm_property *property,
-		uint64_t val);
-
-/**
- * msm_property_atomic_get - helper function for atomic property get callback
- * @info: Pointer to property info container struct
- * @property_state: Pointer to local state structure
- * @property: Incoming property pointer
- * @val: Pointer to variable for receiving property value
- * Returns: Zero on success
- */
-int msm_property_atomic_get(struct msm_property_info *info,
-		struct msm_property_state *property_state,
-		struct drm_property *property,
-		uint64_t *val);
-
-/**
- * msm_property_alloc_state - helper function for allocating local state objects
- * @info: Pointer to property info container struct
- */
-void *msm_property_alloc_state(struct msm_property_info *info);
-
-/**
- * msm_property_reset_state - helper function for state reset callback
- * @info: Pointer to property info container struct
- * @state: Pointer to local state structure
- * @property_state: Pointer to property state container struct
- * @property_values: Pointer to property values cache array
- */
-void msm_property_reset_state(struct msm_property_info *info, void *state,
-		struct msm_property_state *property_state,
-		struct msm_property_value *property_values);
-
-/**
- * msm_property_duplicate_state - helper function for duplicate state cb
- * @info: Pointer to property info container struct
- * @old_state: Pointer to original state structure
- * @state: Pointer to newly created state structure
- * @property_state: Pointer to destination property state container struct
- * @property_values: Pointer to property values cache array
- */
-void msm_property_duplicate_state(struct msm_property_info *info,
-		void *old_state,
-		void *state,
-		struct msm_property_state *property_state,
-		struct msm_property_value *property_values);
-
-/**
- * msm_property_destroy_state - helper function for destroy state cb
- * @info: Pointer to property info container struct
- * @state: Pointer to local state structure
- * @property_state: Pointer to property state container struct
- */
-void msm_property_destroy_state(struct msm_property_info *info,
-		void *state,
-		struct msm_property_state *property_state);
-
-/**
- * msm_property_get_blob - obtain cached data pointer for drm blob property
- * @info: Pointer to property info container struct
- * @property_state: Pointer to property state container struct
- * @byte_len: Optional pointer to variable for accepting blob size
- * @property_idx: Property index
- * Returns: Pointer to blob data
- */
-void *msm_property_get_blob(struct msm_property_info *info,
-		struct msm_property_state *property_state,
-		size_t *byte_len,
-		uint32_t property_idx);
-
-/**
- * msm_property_set_blob - update blob property on a drm object
- * This function updates the blob property value of the given drm object. Its
- * intended use is to update blob properties that have been created with the
- * DRM_MODE_PROP_IMMUTABLE flag set.
- * @info: Pointer to property info container struct
- * @blob_reference: Reference to a pointer that holds the created data blob
- * @blob_data: Pointer to blob data
- * @byte_len: Length of blob data, in bytes
- * @property_idx: Property index
- * Returns: Zero on success
- */
-int msm_property_set_blob(struct msm_property_info *info,
-		struct drm_property_blob **blob_reference,
-		void *blob_data,
-		size_t byte_len,
-		uint32_t property_idx);
-
-/**
- * msm_property_set_property - update property on a drm object
- * This function updates the property value of the given drm object. Its
- * intended use is to update properties that have been created with the
- * DRM_MODE_PROP_IMMUTABLE flag set.
- * Note: This function cannot be called on a blob.
- * @info: Pointer to property info container struct
- * @property_state: Pointer to property state container struct
- * @property_idx: Property index
- * @val: value of the property to set
- * Returns: Zero on success
- */
-int msm_property_set_property(struct msm_property_info *info,
-		struct msm_property_state *property_state,
-		uint32_t property_idx,
-		uint64_t val);
-
-#endif /* _MSM_PROP_H_ */
-
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

_______________________________________________
Freedreno mailing list
Freedreno@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/freedreno

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

* [DPU PATCH v2 7/7] drm/msm: remove dpu specific uapi header
  2018-06-06  3:45 [DPU PATCH v2 0/7] clean up DPU custom properties Jeykumar Sankaran
  2018-06-06  3:45 ` [DPU PATCH v2 1/7] drm/msm: remove connector " Jeykumar Sankaran
       [not found] ` <1528256738-30652-1-git-send-email-jsanka-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
@ 2018-06-06  3:45 ` Jeykumar Sankaran
  2018-06-07 20:02 ` [Freedreno] [DPU PATCH v2 0/7] clean up DPU custom properties Sean Paul
  3 siblings, 0 replies; 10+ messages in thread
From: Jeykumar Sankaran @ 2018-06-06  3:45 UTC (permalink / raw)
  To: dri-devel, freedreno, linux-arm-msm; +Cc: hoegsberg

remove unwanted dpu uapi headers exposing custom
payload layouts for custom properties

changs in v2:
	- none

Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
---
 drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h  |   1 -
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.c |   1 -
 include/uapi/drm/dpu_drm.h                | 220 -------------------
 include/uapi/drm/msm_drm_pp.h             | 345 ------------------------------
 4 files changed, 567 deletions(-)
 delete mode 100644 include/uapi/drm/dpu_drm.h
 delete mode 100644 include/uapi/drm/msm_drm_pp.h

diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h
index f752101..9c89102 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h
@@ -20,7 +20,6 @@
 #define _DPU_CRTC_H_
 
 #include <linux/kthread.h>
-#include <uapi/drm/dpu_drm.h>
 #include <drm/drm_crtc.h>
 #include "dpu_kms.h"
 #include "dpu_core_perf.h"
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.c
index 830b69e..5b4d529 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.c
@@ -10,7 +10,6 @@
  * GNU General Public License for more details.
  */
 
-#include <uapi/drm/dpu_drm.h>
 #include "dpu_kms.h"
 #include "dpu_hw_catalog.h"
 #include "dpu_hwio.h"
diff --git a/include/uapi/drm/dpu_drm.h b/include/uapi/drm/dpu_drm.h
deleted file mode 100644
index 93af1fb..0000000
--- a/include/uapi/drm/dpu_drm.h
+++ /dev/null
@@ -1,220 +0,0 @@
-#ifndef _DPU_DRM_H_
-#define _DPU_DRM_H_
-
-#include "drm.h"
-
-/* Total number of supported color planes */
-#define DPU_MAX_PLANES  4
-
-/* Total number of parameterized detail enhancer mapping curves */
-#define DPU_MAX_DE_CURVES 3
-
- /* Y/RGB and UV filter configuration */
-#define FILTER_EDGE_DIRECTED_2D		0x0
-#define FILTER_CIRCULAR_2D		0x1
-#define FILTER_SEPARABLE_1D		0x2
-#define FILTER_BILINEAR			0x3
-
-/* Alpha filters */
-#define FILTER_ALPHA_DROP_REPEAT	0x0
-#define FILTER_ALPHA_BILINEAR		0x1
-#define FILTER_ALPHA_2D			0x3
-
-/* Blend filters */
-#define FILTER_BLEND_CIRCULAR_2D	0x0
-#define FILTER_BLEND_SEPARABLE_1D	0x1
-
-/* LUT configuration flags */
-#define SCALER_LUT_SWAP			0x1
-#define SCALER_LUT_DIR_WR		0x2
-#define SCALER_LUT_Y_CIR_WR		0x4
-#define SCALER_LUT_UV_CIR_WR		0x8
-#define SCALER_LUT_Y_SEP_WR		0x10
-#define SCALER_LUT_UV_SEP_WR		0x20
-
-/**
- * Blend operations for "blend_op" property
- *
- * @DPU_DRM_BLEND_OP_NOT_DEFINED:   No blend operation defined for the layer.
- * @DPU_DRM_BLEND_OP_OPAQUE:        Apply a constant blend operation. The layer
- *                                  would appear opaque in case fg plane alpha
- *                                  is 0xff.
- * @DPU_DRM_BLEND_OP_PREMULTIPLIED: Apply source over blend rule. Layer already
- *                                  has alpha pre-multiplication done. If the fg
- *                                  plane alpha is less than 0xff, apply
- *                                  modulation as well. This operation is
- *                                  intended on layers having alpha channel.
- * @DPU_DRM_BLEND_OP_COVERAGE:      Apply source over blend rule. Layer is not
- *                                  alpha pre-multiplied. Apply
- *                                  pre-multiplication. If fg plane alpha is
- *                                  less than 0xff, apply modulation as well.
- * @DPU_DRM_BLEND_OP_MAX:           Used to track maximum blend operation
- *                                  possible by mdp.
- */
-#define DPU_DRM_BLEND_OP_NOT_DEFINED    0
-#define DPU_DRM_BLEND_OP_OPAQUE         1
-#define DPU_DRM_BLEND_OP_PREMULTIPLIED  2
-#define DPU_DRM_BLEND_OP_COVERAGE       3
-#define DPU_DRM_BLEND_OP_MAX            4
-
-/**
- * Bit masks for "src_config" property
- * construct bitmask via (1UL << DPU_DRM_<flag>)
- */
-#define DPU_DRM_DEINTERLACE         0   /* Specifies interlaced input */
-
-/* DRM bitmasks are restricted to 0..63 */
-#define DPU_DRM_BITMASK_COUNT       64
-
-/* Number of dest scalers supported */
-#define DPU_MAX_DS_COUNT 2
-
-/*
- * Destination scaler flag config
- */
-#define DPU_DRM_DESTSCALER_ENABLE           0x1
-#define DPU_DRM_DESTSCALER_SCALE_UPDATE     0x2
-#define DPU_DRM_DESTSCALER_ENHANCER_UPDATE  0x4
-#define DPU_DRM_DESTSCALER_PU_ENABLE        0x8
-
-/**
- * struct dpu_drm_dest_scaler_cfg - destination scaler config structure
- * @flags:      Flag to switch between mode for destination scaler
- *              refer to destination scaler flag config
- * @index:      Destination scaler selection index
- * @lm_width:   Layer mixer width configuration
- * @lm_height:  Layer mixer height configuration
- * @scaler_cfg: The scaling parameters for all the mode except disable
- *              Userspace pointer to struct dpu_drm_scaler_v2
- */
-struct dpu_drm_dest_scaler_cfg {
-	uint32_t flags;
-	uint32_t index;
-	uint32_t lm_width;
-	uint32_t lm_height;
-	uint64_t scaler_cfg;
-};
-
-/**
- * struct dpu_drm_dest_scaler_data - destination scaler data struct
- * @num_dest_scaler: Number of dest scalers to be configured
- * @ds_cfg:          Destination scaler block configuration
- */
-struct dpu_drm_dest_scaler_data {
-	uint32_t num_dest_scaler;
-	struct dpu_drm_dest_scaler_cfg ds_cfg[DPU_MAX_DS_COUNT];
-};
-
-/*
- * Define constants for struct dpu_drm_csc
- */
-#define DPU_CSC_MATRIX_COEFF_SIZE   9
-#define DPU_CSC_CLAMP_SIZE          6
-#define DPU_CSC_BIAS_SIZE           3
-
-/**
- * struct dpu_drm_csc_v1 - version 1 of struct dpu_drm_csc
- * @ctm_coeff:          Matrix coefficients, in S31.32 format
- * @pre_bias:           Pre-bias array values
- * @post_bias:          Post-bias array values
- * @pre_clamp:          Pre-clamp array values
- * @post_clamp:         Post-clamp array values
- */
-struct dpu_drm_csc_v1 {
-	int64_t ctm_coeff[DPU_CSC_MATRIX_COEFF_SIZE];
-	uint32_t pre_bias[DPU_CSC_BIAS_SIZE];
-	uint32_t post_bias[DPU_CSC_BIAS_SIZE];
-	uint32_t pre_clamp[DPU_CSC_CLAMP_SIZE];
-	uint32_t post_clamp[DPU_CSC_CLAMP_SIZE];
-};
-
-/**
- * struct dpu_drm_color - struct to store the color and alpha values
- * @color_0: Color 0 value
- * @color_1: Color 1 value
- * @color_2: Color 2 value
- * @color_3: Color 3 value
- */
-struct dpu_drm_color {
-	uint32_t color_0;
-	uint32_t color_1;
-	uint32_t color_2;
-	uint32_t color_3;
-};
-
-/* Total number of supported dim layers */
-#define DPU_MAX_DIM_LAYERS 7
-
-/* DPU_DRM_DIM_LAYER_CONFIG_FLAG - flags for Dim Layer */
-/* Color fill inside of the rect, including border */
-#define DPU_DRM_DIM_LAYER_INCLUSIVE     0x1
-/* Color fill outside of the rect, excluding border */
-#define DPU_DRM_DIM_LAYER_EXCLUSIVE     0x2
-
-/**
- * struct dpu_drm_dim_layer - dim layer cfg struct
- * @flags:         Refer DPU_DRM_DIM_LAYER_CONFIG_FLAG for possible values
- * @stage:         Blending stage of the dim layer
- * @color_fill:    Color fill for dim layer
- * @rect:          Dim layer coordinates
- */
-struct dpu_drm_dim_layer_cfg {
-	uint32_t flags;
-	uint32_t stage;
-	struct dpu_drm_color color_fill;
-	struct drm_clip_rect rect;
-};
-
-/**
- * struct dpu_drm_dim_layer_v1 - version 1 of dim layer struct
- * @num_layers:    Numer of Dim Layers
- * @layer:         Dim layer user cfgs ptr for the num_layers
- */
-struct dpu_drm_dim_layer_v1 {
-	uint32_t num_layers;
-	struct dpu_drm_dim_layer_cfg layer_cfg[DPU_MAX_DIM_LAYERS];
-};
-
-/* Writeback Config version definition */
-#define DPU_DRM_WB_CFG		0x1
-
-/* DPU_DRM_WB_CONFIG_FLAGS - Writeback configuration flags */
-#define DPU_DRM_WB_CFG_FLAGS_CONNECTED	(1<<0)
-
-/**
- * struct dpu_drm_wb_cfg - Writeback configuration structure
- * @flags:		see DRM_MSM_WB_CONFIG_FLAGS
- * @connector_id:	writeback connector identifier
- * @count_modes:	Count of modes in modes_ptr
- * @modes:		Pointer to struct drm_mode_modeinfo
- */
-struct dpu_drm_wb_cfg {
-	uint32_t flags;
-	uint32_t connector_id;
-	uint32_t count_modes;
-	uint64_t modes;
-};
-
-#define DPU_MAX_ROI_V1	4
-
-/**
- * struct dpu_drm_roi_v1 - list of regions of interest for a drm object
- * @num_rects: number of valid rectangles in the roi array
- * @roi: list of roi rectangles
- */
-struct dpu_drm_roi_v1 {
-	uint32_t num_rects;
-	struct drm_clip_rect roi[DPU_MAX_ROI_V1];
-};
-
-/**
- * Define extended power modes supported by the DPU connectors.
- */
-#define DPU_MODE_DPMS_ON	0
-#define DPU_MODE_DPMS_LP1	1
-#define DPU_MODE_DPMS_LP2	2
-#define DPU_MODE_DPMS_STANDBY	3
-#define DPU_MODE_DPMS_SUSPEND	4
-#define DPU_MODE_DPMS_OFF	5
-
-#endif /* _DPU_DRM_H_ */
diff --git a/include/uapi/drm/msm_drm_pp.h b/include/uapi/drm/msm_drm_pp.h
deleted file mode 100644
index a3b5794..0000000
--- a/include/uapi/drm/msm_drm_pp.h
+++ /dev/null
@@ -1,345 +0,0 @@
-#ifndef _MSM_DRM_PP_H_
-#define _MSM_DRM_PP_H_
-
-#include <linux/types.h>
-/**
- * struct drm_msm_pcc_coeff - PCC coefficient structure for each color
- *                            component.
- * @c: constant coefficient.
- * @r: red coefficient.
- * @g: green coefficient.
- * @b: blue coefficient.
- * @rg: red green coefficient.
- * @gb: green blue coefficient.
- * @rb: red blue coefficient.
- * @rgb: red blue green coefficient.
- */
-
-struct drm_msm_pcc_coeff {
-	__u32 c;
-	__u32 r;
-	__u32 g;
-	__u32 b;
-	__u32 rg;
-	__u32 gb;
-	__u32 rb;
-	__u32 rgb;
-};
-
-/**
- * struct drm_msm_pcc - pcc feature structure
- * @flags: for customizing operations
- * @r: red coefficients.
- * @g: green coefficients.
- * @b: blue coefficients.
- * @r_rr: second order coefficients
- * @r_gg: second order coefficients
- * @r_bb: second order coefficients
- * @g_rr: second order coefficients
- * @g_gg: second order coefficients
- * @g_bb: second order coefficients
- * @b_rr: second order coefficients
- * @b_gg: second order coefficients
- * @b_bb: second order coefficients
- */
-#define DRM_MSM_PCC3
-struct drm_msm_pcc {
-	__u64 flags;
-	struct drm_msm_pcc_coeff r;
-	struct drm_msm_pcc_coeff g;
-	struct drm_msm_pcc_coeff b;
-	__u32 r_rr;
-	__u32 r_gg;
-	__u32 r_bb;
-	__u32 g_rr;
-	__u32 g_gg;
-	__u32 g_bb;
-	__u32 b_rr;
-	__u32 b_gg;
-	__u32 b_bb;
-};
-
-/* struct drm_msm_pa_vlut - picture adjustment vLUT structure
- * flags: for customizing vlut operation
- * val: vLUT values
- */
-#define PA_VLUT_SIZE 256
-struct drm_msm_pa_vlut {
-	__u64 flags;
-	__u32 val[PA_VLUT_SIZE];
-};
-
-/* struct drm_msm_memcol - Memory color feature structure.
- *                         Skin, sky, foliage features are supported.
- * @prot_flags: Bit mask for enabling protection feature.
- * @color_adjust_p0: Adjustment curve.
- * @color_adjust_p1: Adjustment curve.
- * @color_adjust_p2: Adjustment curve.
- * @blend_gain: Blend gain weightage from othe PA features.
- * @sat_hold: Saturation hold value.
- * @val_hold: Value hold info.
- * @hue_region: Hue qualifier.
- * @sat_region: Saturation qualifier.
- * @val_region: Value qualifier.
- */
-#define DRM_MSM_MEMCOL
-struct drm_msm_memcol {
-	__u64 prot_flags;
-	__u32 color_adjust_p0;
-	__u32 color_adjust_p1;
-	__u32 color_adjust_p2;
-	__u32 blend_gain;
-	__u32 sat_hold;
-	__u32 val_hold;
-	__u32 hue_region;
-	__u32 sat_region;
-	__u32 val_region;
-};
-
-#define GAMUT_3D_MODE_17 1
-#define GAMUT_3D_MODE_5 2
-#define GAMUT_3D_MODE_13 3
-
-#define GAMUT_3D_MODE17_TBL_SZ 1229
-#define GAMUT_3D_MODE5_TBL_SZ 32
-#define GAMUT_3D_MODE13_TBL_SZ 550
-#define GAMUT_3D_SCALE_OFF_SZ 16
-#define GAMUT_3D_SCALEB_OFF_SZ 12
-#define GAMUT_3D_TBL_NUM 4
-#define GAMUT_3D_SCALE_OFF_TBL_NUM 3
-#define GAMUT_3D_MAP_EN (1 << 0)
-
-/**
- * struct drm_msm_3d_col - 3d gamut color component structure
- * @c0: Holds c0 value
- * @c2_c1: Holds c2/c1 values
- */
-struct drm_msm_3d_col {
-	__u32 c2_c1;
-	__u32 c0;
-};
-/**
- * struct drm_msm_3d_gamut - 3d gamut feature structure
- * @flags: flags for the feature values are:
- *         0 - no map
- *         GAMUT_3D_MAP_EN - enable map
- * @mode: lut mode can take following values:
- *        - GAMUT_3D_MODE_17
- *        - GAMUT_3D_MODE_5
- *        - GAMUT_3D_MODE_13
- * @scale_off: Scale offset table
- * @col: Color component tables
- */
-struct drm_msm_3d_gamut {
-	__u64 flags;
-	__u32 mode;
-	__u32 scale_off[GAMUT_3D_SCALE_OFF_TBL_NUM][GAMUT_3D_SCALE_OFF_SZ];
-	struct drm_msm_3d_col col[GAMUT_3D_TBL_NUM][GAMUT_3D_MODE17_TBL_SZ];
-};
-
-#define PGC_TBL_LEN 512
-#define PGC_8B_ROUND (1 << 0)
-/**
- * struct drm_msm_pgc_lut - pgc lut feature structure
- * @flags: flags for the featue values can be:
- *         - PGC_8B_ROUND
- * @c0: color0 component lut
- * @c1: color1 component lut
- * @c2: color2 component lut
- */
-struct drm_msm_pgc_lut {
-	__u64 flags;
-	__u32 c0[PGC_TBL_LEN];
-	__u32 c1[PGC_TBL_LEN];
-	__u32 c2[PGC_TBL_LEN];
-};
-
-#define IGC_TBL_LEN 256
-#define IGC_DITHER_ENABLE (1 << 0)
-/**
- * struct drm_msm_igc_lut - igc lut feature structure
- * @flags: flags for the feature customization, values can be:
- *             - IGC_DITHER_ENABLE: Enable dither functionality
- * @c0: color0 component lut
- * @c1: color1 component lut
- * @c2: color2 component lut
- * @strength: dither strength, considered valid when IGC_DITHER_ENABLE
- *            is set in flags. Strength value based on source bit width.
- */
-struct drm_msm_igc_lut {
-	__u64 flags;
-	__u32 c0[IGC_TBL_LEN];
-	__u32 c1[IGC_TBL_LEN];
-	__u32 c2[IGC_TBL_LEN];
-	__u32 strength;
-};
-
-#define AD4_LUT_GRP0_SIZE 33
-#define AD4_LUT_GRP1_SIZE 32
-/*
- * struct drm_msm_ad4_init - ad4 init structure set by user-space client.
- *                           Init param values can change based on tuning
- *                           hence it is passed by user-space clients.
- */
-struct drm_msm_ad4_init {
-	__u32 init_param_001[AD4_LUT_GRP0_SIZE];
-	__u32 init_param_002[AD4_LUT_GRP0_SIZE];
-	__u32 init_param_003[AD4_LUT_GRP0_SIZE];
-	__u32 init_param_004[AD4_LUT_GRP0_SIZE];
-	__u32 init_param_005[AD4_LUT_GRP1_SIZE];
-	__u32 init_param_006[AD4_LUT_GRP1_SIZE];
-	__u32 init_param_007[AD4_LUT_GRP0_SIZE];
-	__u32 init_param_008[AD4_LUT_GRP0_SIZE];
-	__u32 init_param_009;
-	__u32 init_param_010;
-	__u32 init_param_011;
-	__u32 init_param_012;
-	__u32 init_param_013;
-	__u32 init_param_014;
-	__u32 init_param_015;
-	__u32 init_param_016;
-	__u32 init_param_017;
-	__u32 init_param_018;
-	__u32 init_param_019;
-	__u32 init_param_020;
-	__u32 init_param_021;
-	__u32 init_param_022;
-	__u32 init_param_023;
-	__u32 init_param_024;
-	__u32 init_param_025;
-	__u32 init_param_026;
-	__u32 init_param_027;
-	__u32 init_param_028;
-	__u32 init_param_029;
-	__u32 init_param_030;
-	__u32 init_param_031;
-	__u32 init_param_032;
-	__u32 init_param_033;
-	__u32 init_param_034;
-	__u32 init_param_035;
-	__u32 init_param_036;
-	__u32 init_param_037;
-	__u32 init_param_038;
-	__u32 init_param_039;
-	__u32 init_param_040;
-	__u32 init_param_041;
-	__u32 init_param_042;
-	__u32 init_param_043;
-	__u32 init_param_044;
-	__u32 init_param_045;
-	__u32 init_param_046;
-	__u32 init_param_047;
-	__u32 init_param_048;
-	__u32 init_param_049;
-	__u32 init_param_050;
-	__u32 init_param_051;
-	__u32 init_param_052;
-	__u32 init_param_053;
-	__u32 init_param_054;
-	__u32 init_param_055;
-	__u32 init_param_056;
-	__u32 init_param_057;
-	__u32 init_param_058;
-	__u32 init_param_059;
-	__u32 init_param_060;
-	__u32 init_param_061;
-	__u32 init_param_062;
-	__u32 init_param_063;
-	__u32 init_param_064;
-	__u32 init_param_065;
-	__u32 init_param_066;
-	__u32 init_param_067;
-	__u32 init_param_068;
-	__u32 init_param_069;
-	__u32 init_param_070;
-	__u32 init_param_071;
-	__u32 init_param_072;
-	__u32 init_param_073;
-	__u32 init_param_074;
-	__u32 init_param_075;
-};
-
-/*
- * struct drm_msm_ad4_cfg - ad4 config structure set by user-space client.
- *                           Config param values can vary based on tuning,
- *                           hence it is passed by user-space clients.
- */
-struct drm_msm_ad4_cfg {
-	__u32 cfg_param_001;
-	__u32 cfg_param_002;
-	__u32 cfg_param_003;
-	__u32 cfg_param_004;
-	__u32 cfg_param_005;
-	__u32 cfg_param_006;
-	__u32 cfg_param_007;
-	__u32 cfg_param_008;
-	__u32 cfg_param_009;
-	__u32 cfg_param_010;
-	__u32 cfg_param_011;
-	__u32 cfg_param_012;
-	__u32 cfg_param_013;
-	__u32 cfg_param_014;
-	__u32 cfg_param_015;
-	__u32 cfg_param_016;
-	__u32 cfg_param_017;
-	__u32 cfg_param_018;
-	__u32 cfg_param_019;
-	__u32 cfg_param_020;
-	__u32 cfg_param_021;
-	__u32 cfg_param_022;
-	__u32 cfg_param_023;
-	__u32 cfg_param_024;
-	__u32 cfg_param_025;
-	__u32 cfg_param_026;
-	__u32 cfg_param_027;
-	__u32 cfg_param_028;
-	__u32 cfg_param_029;
-	__u32 cfg_param_030;
-	__u32 cfg_param_031;
-	__u32 cfg_param_032;
-	__u32 cfg_param_033;
-	__u32 cfg_param_034;
-	__u32 cfg_param_035;
-	__u32 cfg_param_036;
-	__u32 cfg_param_037;
-	__u32 cfg_param_038;
-	__u32 cfg_param_039;
-	__u32 cfg_param_040;
-	__u32 cfg_param_041;
-	__u32 cfg_param_042;
-	__u32 cfg_param_043;
-	__u32 cfg_param_044;
-	__u32 cfg_param_045;
-	__u32 cfg_param_046;
-	__u32 cfg_param_047;
-	__u32 cfg_param_048;
-	__u32 cfg_param_049;
-	__u32 cfg_param_050;
-	__u32 cfg_param_051;
-	__u32 cfg_param_052;
-	__u32 cfg_param_053;
-};
-
-#define DITHER_MATRIX_SZ 16
-
-/**
- * struct drm_msm_dither - dither feature structure
- * @flags: for customizing operations
- * @temporal_en: temperal dither enable
- * @c0_bitdepth: c0 component bit depth
- * @c1_bitdepth: c1 component bit depth
- * @c2_bitdepth: c2 component bit depth
- * @c3_bitdepth: c2 component bit depth
- * @matrix: dither strength matrix
- */
-struct drm_msm_dither {
-	__u64 flags;
-	__u32 temporal_en;
-	__u32 c0_bitdepth;
-	__u32 c1_bitdepth;
-	__u32 c2_bitdepth;
-	__u32 c3_bitdepth;
-	__u32 matrix[DITHER_MATRIX_SZ];
-};
-
-#endif /* _MSM_DRM_PP_H_ */
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [Freedreno] [DPU PATCH v2 0/7] clean up DPU custom properties
  2018-06-06  3:45 [DPU PATCH v2 0/7] clean up DPU custom properties Jeykumar Sankaran
                   ` (2 preceding siblings ...)
  2018-06-06  3:45 ` [DPU PATCH v2 7/7] drm/msm: remove dpu specific uapi header Jeykumar Sankaran
@ 2018-06-07 20:02 ` Sean Paul
  3 siblings, 0 replies; 10+ messages in thread
From: Sean Paul @ 2018-06-07 20:02 UTC (permalink / raw)
  To: Jeykumar Sankaran; +Cc: linux-arm-msm, dri-devel, hoegsberg, freedreno

On Tue, Jun 05, 2018 at 08:45:31PM -0700, Jeykumar Sankaran wrote:
> Submitting a series of patches to further clean up DPU driver by stripping
> down a list of custom properties supporting proprietary features. It 
> removes the property installers/handlers and cleans up relevant files of
> of some of the advanced features. This series is based on the patch[1] 
> available on the drm-next tip.
> 
> [1]https://patchwork.kernel.org/patch/10202847/
> 
> Thanks.

Lots of conflicts when I applied this set, what branch did you base this on?

Sean

> 
> changes in v2:
> 	- remove stale code in blend config
> 	- move unrelated code while updating zpos property
> 	- Makefile changes
> 
> Jeykumar Sankaran (7):
>   drm/msm: remove connector custom properties
>   drm/msm/dpu: clean up dpu plane custom properties
>   drm/msm: enable zpos normalization
>   drm/msm/dpu: switch to drm zpos property
>   drm/msm/dpu: clean up dpu crtc custom properties
>   drm/msm: remove msm_prop files
>   drm/msm: remove dpu specific uapi header
> 
>  drivers/gpu/drm/msm/Makefile                       |   10 -
>  drivers/gpu/drm/msm/disp/dpu1/dpu_ad4.h            |   99 --
>  .../gpu/drm/msm/disp/dpu1/dpu_color_processing.c   | 1521 --------------------
>  .../gpu/drm/msm/disp/dpu1/dpu_color_processing.h   |  120 --
>  drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c      |   30 -
>  drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c           | 1328 +----------------
>  drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h           |   45 +-
>  drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c        |   14 -
>  drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.h        |    2 -
>  .../gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c    |    1 -
>  drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ad4.c         | 1443 -------------------
>  drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c     |   72 +-
>  drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h     |   89 --
>  .../msm/disp/dpu1/dpu_hw_color_proc_common_v4.h    |   69 -
>  .../gpu/drm/msm/disp/dpu1/dpu_hw_color_proc_v4.c   |  242 ----
>  .../gpu/drm/msm/disp/dpu1/dpu_hw_color_proc_v4.h   |   40 -
>  .../drm/msm/disp/dpu1/dpu_hw_color_processing.h    |   20 -
>  .../msm/disp/dpu1/dpu_hw_color_processing_v1_7.c   |  565 --------
>  .../msm/disp/dpu1/dpu_hw_color_processing_v1_7.h   |   92 --
>  drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c         |   44 -
>  drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.h         |   15 -
>  drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ds.c          |  149 --
>  drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ds.h          |  111 --
>  drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dspp.c        |  209 ---
>  drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dspp.h        |  220 ---
>  drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.c          |   67 -
>  drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.h          |   14 -
>  drivers/gpu/drm/msm/disp/dpu1/dpu_hw_mdss.h        |   58 +-
>  drivers/gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.c    |   68 -
>  drivers/gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.h    |    6 -
>  drivers/gpu/drm/msm/disp/dpu1/dpu_hw_reg_dma_v1.c  |  757 ----------
>  drivers/gpu/drm/msm/disp/dpu1/dpu_hw_reg_dma_v1.h  |   27 -
>  .../msm/disp/dpu1/dpu_hw_reg_dma_v1_color_proc.c   |  943 ------------
>  .../msm/disp/dpu1/dpu_hw_reg_dma_v1_color_proc.h   |   75 -
>  drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c        |  219 ---
>  drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.h        |   73 -
>  drivers/gpu/drm/msm/disp/dpu1/dpu_hw_util.c        |    1 -
>  drivers/gpu/drm/msm/disp/dpu1/dpu_hw_util.h        |  156 ++
>  drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c            |    3 -
>  drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c          | 1404 ++----------------
>  drivers/gpu/drm/msm/disp/dpu1/dpu_plane.h          |   43 -
>  drivers/gpu/drm/msm/disp/dpu1/dpu_reg_dma.c        |  139 --
>  drivers/gpu/drm/msm/disp/dpu1/dpu_reg_dma.h        |  310 ----
>  drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c             |  149 +-
>  drivers/gpu/drm/msm/disp/dpu1/dpu_rm.h             |    2 -
>  drivers/gpu/drm/msm/disp/dpu1/dpu_wb.c             |    2 -
>  drivers/gpu/drm/msm/msm_drv.c                      |    3 +
>  drivers/gpu/drm/msm/msm_drv.h                      |   86 +-
>  drivers/gpu/drm/msm/msm_prop.c                     |  688 ---------
>  drivers/gpu/drm/msm/msm_prop.h                     |  438 ------
>  include/uapi/drm/dpu_drm.h                         |  407 ------
>  include/uapi/drm/msm_drm.h                         |    1 -
>  include/uapi/drm/msm_drm_pp.h                      |  345 -----
>  53 files changed, 297 insertions(+), 12737 deletions(-)
>  delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_ad4.h
>  delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_color_processing.c
>  delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_color_processing.h
>  delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ad4.c
>  delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_color_proc_common_v4.h
>  delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_color_proc_v4.c
>  delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_color_proc_v4.h
>  delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_color_processing.h
>  delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_color_processing_v1_7.c
>  delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_color_processing_v1_7.h
>  delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ds.c
>  delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ds.h
>  delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dspp.c
>  delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dspp.h
>  delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_reg_dma_v1.c
>  delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_reg_dma_v1.h
>  delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_reg_dma_v1_color_proc.c
>  delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_reg_dma_v1_color_proc.h
>  delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_reg_dma.c
>  delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_reg_dma.h
>  delete mode 100644 drivers/gpu/drm/msm/msm_prop.c
>  delete mode 100644 drivers/gpu/drm/msm/msm_prop.h
>  delete mode 100644 include/uapi/drm/dpu_drm.h
>  delete mode 100644 include/uapi/drm/msm_drm_pp.h
> 
> -- 
> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
> a Linux Foundation Collaborative Project
> 
> _______________________________________________
> Freedreno mailing list
> Freedreno@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/freedreno

-- 
Sean Paul, Software Engineer, Google / Chromium OS
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [DPU PATCH v2 2/7] drm/msm/dpu: clean up dpu plane custom properties
       [not found]     ` <1528256738-30652-3-git-send-email-jsanka-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
@ 2018-06-07 20:49       ` Sean Paul
  0 siblings, 0 replies; 10+ messages in thread
From: Sean Paul @ 2018-06-07 20:49 UTC (permalink / raw)
  To: Jeykumar Sankaran
  Cc: linux-arm-msm-u79uwXL29TY76Z2rM5mHXA,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	robdclark-Re5JQEeQqe8AvxtiuMwx3w,
	seanpaul-F7+t8E8rja9g9hUCZPvPmw,
	hoegsberg-hpIqsD4AKlfQT0dZR+AlfA,
	freedreno-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

On Tue, Jun 05, 2018 at 08:45:33PM -0700, Jeykumar Sankaran wrote:
> This change removes all the dpu plane custom properties
> and its handlers.
> 
> changs in v2:
> 	- remove stale code in blend config(Sean Paul)
> 	- Makefile changes to remove warning flags(Sean Paul)
> 
> Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
> ---
>  drivers/gpu/drm/msm/Makefile                       |    8 -
>  drivers/gpu/drm/msm/disp/dpu1/dpu_ad4.h            |   99 --
>  .../gpu/drm/msm/disp/dpu1/dpu_color_processing.c   | 1521 --------------------
>  .../gpu/drm/msm/disp/dpu1/dpu_color_processing.h   |  120 --
>  drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c           |  205 +--
>  drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h           |    3 +-
>  drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c        |    2 -
>  .../gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c    |    1 -
>  drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ad4.c         | 1443 -------------------
>  drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c     |   72 +-
>  drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h     |   89 --
>  .../msm/disp/dpu1/dpu_hw_color_proc_common_v4.h    |   69 -
>  .../gpu/drm/msm/disp/dpu1/dpu_hw_color_proc_v4.c   |  242 ----
>  .../gpu/drm/msm/disp/dpu1/dpu_hw_color_proc_v4.h   |   40 -
>  .../drm/msm/disp/dpu1/dpu_hw_color_processing.h    |   20 -
>  .../msm/disp/dpu1/dpu_hw_color_processing_v1_7.c   |  565 --------
>  .../msm/disp/dpu1/dpu_hw_color_processing_v1_7.h   |   92 --
>  drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c         |   44 -
>  drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.h         |   15 -
>  drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dspp.c        |  209 ---
>  drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dspp.h        |  220 ---
>  drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.c          |    1 +
>  drivers/gpu/drm/msm/disp/dpu1/dpu_hw_mdss.h        |   44 +-
>  drivers/gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.c    |   68 -
>  drivers/gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.h    |    6 -
>  drivers/gpu/drm/msm/disp/dpu1/dpu_hw_reg_dma_v1.c  |  757 ----------
>  drivers/gpu/drm/msm/disp/dpu1/dpu_hw_reg_dma_v1.h  |   27 -
>  .../msm/disp/dpu1/dpu_hw_reg_dma_v1_color_proc.c   |  943 ------------
>  .../msm/disp/dpu1/dpu_hw_reg_dma_v1_color_proc.h   |   75 -
>  drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c        |  219 ---
>  drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.h        |   73 -
>  drivers/gpu/drm/msm/disp/dpu1/dpu_hw_util.c        |    1 -
>  drivers/gpu/drm/msm/disp/dpu1/dpu_hw_util.h        |  156 ++
>  drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c            |    3 -
>  drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c          | 1269 +---------------
>  drivers/gpu/drm/msm/disp/dpu1/dpu_plane.h          |   31 -
>  drivers/gpu/drm/msm/disp/dpu1/dpu_reg_dma.c        |  139 --
>  drivers/gpu/drm/msm/disp/dpu1/dpu_reg_dma.h        |  310 ----
>  drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c             |  102 +-
>  drivers/gpu/drm/msm/disp/dpu1/dpu_rm.h             |    2 -
>  drivers/gpu/drm/msm/disp/dpu1/dpu_wb.c             |    2 -
>  drivers/gpu/drm/msm/msm_drv.h                      |   28 -
>  include/uapi/drm/dpu_drm.h                         |  187 ---
>  include/uapi/drm/msm_drm.h                         |    1 -
>  44 files changed, 282 insertions(+), 9241 deletions(-)
>  delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_ad4.h
>  delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_color_processing.c
>  delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_color_processing.h
>  delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ad4.c
>  delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_color_proc_common_v4.h
>  delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_color_proc_v4.c
>  delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_color_proc_v4.h
>  delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_color_processing.h
>  delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_color_processing_v1_7.c
>  delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_color_processing_v1_7.h
>  delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dspp.c
>  delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dspp.h
>  delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_reg_dma_v1.c
>  delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_reg_dma_v1.h
>  delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_reg_dma_v1_color_proc.c
>  delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_reg_dma_v1_color_proc.h
>  delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_reg_dma.c
>  delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_reg_dma.h
> 

/snip

> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_reg_dma.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_reg_dma.c

/snip

> -
> -int dpu_reg_dma_init(void __iomem *addr, struct dpu_mdss_cfg *m,
> -		struct drm_device *dev)
> -{
> -	int rc = 0;
> -
> -	if (!addr || !m || !dev) {
> -		DRM_DEBUG("invalid addr %pK catalog %pK dev %pK\n", addr, m,
> -				dev);
> -		return 0;
> -	}
> -
> -	reg_dma.drm_dev = dev;
> -	reg_dma.caps = &m->dma_cfg;
> -	reg_dma.addr = addr;
> -
> -	if (!m->reg_dma_count)
> -		return 0;
> -
> -	switch (reg_dma.caps->version) {
> -	case 1:
> -		rc = init_v1(&reg_dma);
> -		if (rc)
> -			DRM_DEBUG("init v1 dma ops failed\n");
> -		else
> -			dpu_dbg_reg_register_base("reg_dma", addr,
> -					reg_dma.caps->len);
> -		break;
> -	default:
> -		break;
> -	}
> -
> -	return 0;
> -}
> -

../scripts/Makefile.build:559: recipe for target 'drivers/gpu/drm' failed
../scripts/Makefile.build:559: recipe for target 'drivers/gpu' failed
/usr/local/google/home/seanpaul/s/dpu-staging/Makefile:1060: recipe for target 'drivers' failed
make[1]: Leaving directory '/usr/local/google/home/seanpaul/s/dpu-staging/.build_arm'
Makefile:146: recipe for target 'sub-make' failed
../drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c: In function ‘dpu_crtc_atomic_check’:
../drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c:2097:1: warning: the frame size of 1048 bytes is larger than 1024 bytes [-Wframe-larger-than=]
 }
 ^
../drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c: In function ‘dpu_kms_hw_init’:
../drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c:1512:7: error: implicit declaration of function ‘dpu_reg_dma_init’; did you mean ‘dpu_rm_init’? [-Werror=implicit-function-declaration]
  rc = dpu_reg_dma_init(dpu_kms->reg_dma, dpu_kms->catalog,
       ^~~~~~~~~~~~~~~~
       dpu_rm_init
cc1: some warnings being treated as errors

/snip

-- 
Sean Paul, Software Engineer, Google / Chromium OS
_______________________________________________
Freedreno mailing list
Freedreno@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/freedreno

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

end of thread, other threads:[~2018-06-07 20:49 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-06  3:45 [DPU PATCH v2 0/7] clean up DPU custom properties Jeykumar Sankaran
2018-06-06  3:45 ` [DPU PATCH v2 1/7] drm/msm: remove connector " Jeykumar Sankaran
     [not found] ` <1528256738-30652-1-git-send-email-jsanka-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2018-06-06  3:45   ` [DPU PATCH v2 2/7] drm/msm/dpu: clean up dpu plane " Jeykumar Sankaran
     [not found]     ` <1528256738-30652-3-git-send-email-jsanka-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2018-06-07 20:49       ` Sean Paul
2018-06-06  3:45   ` [DPU PATCH v2 3/7] drm/msm: enable zpos normalization Jeykumar Sankaran
2018-06-06  3:45   ` [DPU PATCH v2 4/7] drm/msm/dpu: switch to drm zpos property Jeykumar Sankaran
2018-06-06  3:45   ` [DPU PATCH v2 5/7] drm/msm/dpu: clean up dpu crtc custom properties Jeykumar Sankaran
2018-06-06  3:45   ` [DPU PATCH v2 6/7] drm/msm: remove msm_prop files Jeykumar Sankaran
2018-06-06  3:45 ` [DPU PATCH v2 7/7] drm/msm: remove dpu specific uapi header Jeykumar Sankaran
2018-06-07 20:02 ` [Freedreno] [DPU PATCH v2 0/7] clean up DPU custom properties Sean Paul

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.