Quellcode durchsuchen

mm-drivers: hw_fence: remove deprecated workarounds for no dpu-ipc signals

Remove HW Fence driver deprecated support of platforms without dpu-ipc
signaling, e.g. targets prior to kalama.

Change-Id: I8491a96040b4c3857a32a9bf6092e53479284a64
Signed-off-by: Grace An <[email protected]>
Grace An vor 2 Jahren
Ursprung
Commit
d39f91c9bd

+ 1 - 7
hw_fence/include/hw_fence_drv_ipc.h

@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: GPL-2.0-only */
 /*
- * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
  */
 
 #ifndef __HW_FENCE_DRV_IPC_H
@@ -36,14 +36,10 @@
 #define HW_FENCE_IPC_CLIENT_ID_IFE6_PID 17
 #define HW_FENCE_IPC_CLIENT_ID_IFE7_PID 18
 
-#define HW_FENCE_IPC_COMPUTE_L1_PROTOCOL_ID_LAHAINA 2
-#define HW_FENCE_IPC_COMPUTE_L1_PROTOCOL_ID_WAIPIO 1
 #define HW_FENCE_IPC_COMPUTE_L1_PROTOCOL_ID_KALAMA 2
 #define HW_FENCE_IPC_COMPUTE_L1_PROTOCOL_ID_PINEAPPLE 2
 #define HW_FENCE_IPC_FENCE_PROTOCOL_ID_PINEAPPLE 4
 
-#define HW_FENCE_IPCC_HW_REV_100 0x00010000  /* Lahaina */
-#define HW_FENCE_IPCC_HW_REV_110 0x00010100  /* Waipio */
 #define HW_FENCE_IPCC_HW_REV_170 0x00010700  /* Kalama */
 #define HW_FENCE_IPCC_HW_REV_203 0x00020003  /* Pineapple */
 
@@ -73,7 +69,6 @@ void hw_fence_ipcc_trigger_signal(struct hw_fence_driver_data *drv_data,
  */
 int hw_fence_ipcc_enable_signaling(struct hw_fence_driver_data *drv_data);
 
-#ifdef HW_DPU_IPCC
 /**
  * hw_fence_ipcc_enable_dpu_signaling() - Enable ipcc signaling for dpu client.
  * @drv_data: driver data.
@@ -81,7 +76,6 @@ int hw_fence_ipcc_enable_signaling(struct hw_fence_driver_data *drv_data);
  * Return: 0 on success or negative errno (-EINVAL)
  */
 int hw_fence_ipcc_enable_dpu_signaling(struct hw_fence_driver_data *drv_data);
-#endif /* HW_DPU_IPCC */
 
 /**
  * hw_fence_ipcc_get_client_virt_id() - Returns the ipc client virtual id that corresponds to the

+ 0 - 50
hw_fence/include/hw_fence_drv_priv.h

@@ -14,9 +14,6 @@
 #include <linux/dma-fence-array.h>
 #include <linux/slab.h>
 
-/* Add define only for platforms that support IPCC in dpu-hw */
-#define HW_DPU_IPCC 1
-
 /* max u64 to indicate invalid fence */
 #define HW_FENCE_INVALID_PARENT_FENCE (~0ULL)
 
@@ -82,45 +79,6 @@ enum hw_fence_lookup_ops {
 	HW_FENCE_LOOKUP_OP_FIND_FENCE
 };
 
-/**
- * enum hw_fence_loopback_id - Enum with the clients having a loopback signal (i.e AP to AP signal).
- * HW_FENCE_LOOPBACK_DPU_CTL_0: dpu client 0. Used in platforms with no dpu-ipc.
- * HW_FENCE_LOOPBACK_DPU_CTL_1: dpu client 1. Used in platforms with no dpu-ipc.
- * HW_FENCE_LOOPBACK_DPU_CTL_2: dpu client 2. Used in platforms with no dpu-ipc.
- * HW_FENCE_LOOPBACK_DPU_CTL_3: dpu client 3. Used in platforms with no dpu-ipc.
- * HW_FENCE_LOOPBACK_DPU_CTL_4: dpu client 4. Used in platforms with no dpu-ipc.
- * HW_FENCE_LOOPBACK_DPU_CTL_5: dpu client 5. Used in platforms with no dpu-ipc.
- * HW_FENCE_LOOPBACK_DPU_CTX_0: gfx client 0. Used in platforms with no gmu support.
- * HW_FENCE_LOOPBACK_VAL_0: debug validation client 0.
- * HW_FENCE_LOOPBACK_VAL_1: debug validation client 1.
- * HW_FENCE_LOOPBACK_VAL_2: debug validation client 2.
- * HW_FENCE_LOOPBACK_VAL_3: debug validation client 3.
- * HW_FENCE_LOOPBACK_VAL_4: debug validation client 4.
- * HW_FENCE_LOOPBACK_VAL_5: debug validation client 5.
- * HW_FENCE_LOOPBACK_VAL_6: debug validation client 6.
- */
-enum hw_fence_loopback_id {
-	HW_FENCE_LOOPBACK_DPU_CTL_0,
-	HW_FENCE_LOOPBACK_DPU_CTL_1,
-	HW_FENCE_LOOPBACK_DPU_CTL_2,
-	HW_FENCE_LOOPBACK_DPU_CTL_3,
-	HW_FENCE_LOOPBACK_DPU_CTL_4,
-	HW_FENCE_LOOPBACK_DPU_CTL_5,
-	HW_FENCE_LOOPBACK_GFX_CTX_0,
-#if IS_ENABLED(CONFIG_DEBUG_FS)
-	HW_FENCE_LOOPBACK_VAL_0 = HW_FENCE_CLIENT_ID_VAL0,
-	HW_FENCE_LOOPBACK_VAL_1,
-	HW_FENCE_LOOPBACK_VAL_2,
-	HW_FENCE_LOOPBACK_VAL_3,
-	HW_FENCE_LOOPBACK_VAL_4,
-	HW_FENCE_LOOPBACK_VAL_5,
-	HW_FENCE_LOOPBACK_VAL_6,
-#endif /* CONFIG_DEBUG_FS */
-	HW_FENCE_LOOPBACK_MAX,
-};
-
-#define HW_FENCE_MAX_DPU_LOOPBACK_CLIENTS (HW_FENCE_LOOPBACK_DPU_CTL_5 + 1)
-
 /**
  * enum hw_fence_client_data_id - Enum with the clients having client_data, an optional
  *                                parameter passed from the waiting client and returned
@@ -334,8 +292,6 @@ struct hw_fence_client_queue_desc {
  * @qtime_reg_base: qtimer register base address
  * @qtime_io_mem: qtimer io mem map
  * @qtime_size: qtimer io mem map size
- * @ctl_start_ptr: pointer to the ctl_start registers of the display hw (platforms with no dpu-ipc)
- * @ctl_start_size: size of the ctl_start registers of the display hw (platforms with no dpu-ipc)
  * @client_id_mask: bitmask for tracking registered client_ids
  * @clients_register_lock: lock to synchronize clients registration and deregistration
  * @clients: table with the handles of the registered clients; size is equal to clients_num
@@ -409,10 +365,6 @@ struct hw_fence_driver_data {
 	void __iomem *qtime_io_mem;
 	uint32_t qtime_size;
 
-	/* base address for dpu ctl start regs */
-	void *ctl_start_ptr[HW_FENCE_MAX_DPU_LOOPBACK_CLIENTS];
-	uint32_t ctl_start_size[HW_FENCE_MAX_DPU_LOOPBACK_CLIENTS];
-
 	/* synchronize client_ids registration and deregistration */
 	struct mutex clients_register_lock;
 
@@ -420,10 +372,8 @@ struct hw_fence_driver_data {
 	struct msm_hw_fence_client **clients;
 
 	bool vm_ready;
-#ifdef HW_DPU_IPCC
 	/* state variables */
 	bool ipcc_dpu_initialized;
-#endif /* HW_DPU_IPCC */
 };
 
 /**

+ 0 - 9
hw_fence/include/hw_fence_drv_utils.h

@@ -106,15 +106,6 @@ int hw_fence_utils_map_ipcc(struct hw_fence_driver_data *drv_data);
  */
 int hw_fence_utils_map_qtime(struct hw_fence_driver_data *drv_data);
 
-/**
- * hw_fence_utils_map_ctl_start() -  Maps ctl_start registers from dpu hw
- * @drv_data: hw fence driver data
- *
- * Returns zero if success, otherwise returns negative error code. This API is only used
- * for simulation purposes in platforms where dpu does not support ipc signal.
- */
-int hw_fence_utils_map_ctl_start(struct hw_fence_driver_data *drv_data);
-
 /**
  * hw_fence_utils_cleanup_fence() -  Cleanup the hw-fence from a specified client
  * @drv_data: hw fence driver data

+ 2 - 6
hw_fence/src/hw_fence_drv_debug.c

@@ -112,7 +112,6 @@ static ssize_t hw_fence_dbg_ipcc_write(struct file *file, const char __user *use
 		drv_data->ipcc_client_vid);
 }
 
-#ifdef HW_DPU_IPCC
 /**
  * hw_fence_dbg_ipcc_dpu_write() - debugfs write to trigger an ipcc irq to dpu core.
  * @file: file handler.
@@ -137,7 +136,6 @@ static const struct file_operations hw_fence_dbg_ipcc_dpu_fops = {
 	.open = simple_open,
 	.write = hw_fence_dbg_ipcc_dpu_write,
 };
-#endif /* HW_DPU_IPCC */
 
 static const struct file_operations hw_fence_dbg_ipcc_fops = {
 	.open = simple_open,
@@ -897,9 +895,9 @@ int process_validation_client_loopback(struct hw_fence_driver_data *drv_data,
 {
 	struct msm_hw_fence_client *hw_fence_client;
 
-	if (client_id < HW_FENCE_LOOPBACK_VAL_0 || client_id > HW_FENCE_LOOPBACK_VAL_6) {
+	if (client_id < HW_FENCE_CLIENT_ID_VAL0 || client_id > HW_FENCE_CLIENT_ID_VAL6) {
 		HWFNC_ERR("invalid client_id: %d min: %d max: %d\n", client_id,
-				HW_FENCE_LOOPBACK_VAL_0, HW_FENCE_LOOPBACK_VAL_6);
+				HW_FENCE_CLIENT_ID_VAL0, HW_FENCE_CLIENT_ID_VAL6);
 		return -EINVAL;
 	}
 
@@ -982,10 +980,8 @@ int hw_fence_debug_debugfs_register(struct hw_fence_driver_data *drv_data)
 
 	debugfs_create_file("ipc_trigger", 0600, debugfs_root, drv_data,
 		&hw_fence_dbg_ipcc_fops);
-#ifdef HW_DPU_IPCC
 	debugfs_create_file("dpu_trigger", 0600, debugfs_root, drv_data,
 		&hw_fence_dbg_ipcc_dpu_fops);
-#endif /* HW_DPU_IPCC */
 	debugfs_create_file("hw_fence_reset_client", 0600, debugfs_root, drv_data,
 		&hw_fence_reset_client_fops);
 	debugfs_create_file("hw_fence_register_clients", 0600, debugfs_root, drv_data,

+ 2 - 59
hw_fence/src/hw_fence_drv_ipc.c

@@ -32,37 +32,6 @@ struct hw_fence_client_ipc_map {
 	bool send_ipc;
 };
 
-/**
- * struct hw_fence_clients_ipc_map_no_dpu - Table makes the 'client to signal' mapping, which
- *		is used by the hw fence driver to trigger ipc signal when the hw fence is already
- *		signaled.
- *		This no_dpu version is for targets that do not support dpu client id
- *
- * Notes:
- * The index of this struct must match the enum hw_fence_client_id.
- * To change to a loopback signal instead of GMU, change ctx0 row to use:
- *   {HW_FENCE_IPC_CLIENT_ID_APPS, 20}.
- */
-struct hw_fence_client_ipc_map hw_fence_clients_ipc_map_no_dpu[HW_FENCE_IPC_MAP_MAX] = {
-	{HW_FENCE_IPC_CLIENT_ID_APPS_VID, HW_FENCE_IPC_CLIENT_ID_APPS_VID, 1, true, true},/* ctrlq*/
-	{HW_FENCE_IPC_CLIENT_ID_GPU_VID, HW_FENCE_IPC_CLIENT_ID_GPU_VID, 0, false, false},/* ctx0 */
-	{HW_FENCE_IPC_CLIENT_ID_APPS_VID, HW_FENCE_IPC_CLIENT_ID_APPS_VID, 14, false, true},/*ctl0*/
-	{HW_FENCE_IPC_CLIENT_ID_APPS_VID, HW_FENCE_IPC_CLIENT_ID_APPS_VID, 15, false, true},/*ctl1*/
-	{HW_FENCE_IPC_CLIENT_ID_APPS_VID, HW_FENCE_IPC_CLIENT_ID_APPS_VID, 16, false, true},/*ctl2*/
-	{HW_FENCE_IPC_CLIENT_ID_APPS_VID, HW_FENCE_IPC_CLIENT_ID_APPS_VID, 17, false, true},/*ctl3*/
-	{HW_FENCE_IPC_CLIENT_ID_APPS_VID, HW_FENCE_IPC_CLIENT_ID_APPS_VID, 18, false, true},/*ctl4*/
-	{HW_FENCE_IPC_CLIENT_ID_APPS_VID, HW_FENCE_IPC_CLIENT_ID_APPS_VID, 19, false, true},/*ctl5*/
-#if IS_ENABLED(CONFIG_DEBUG_FS)
-	{HW_FENCE_IPC_CLIENT_ID_APPS_VID, HW_FENCE_IPC_CLIENT_ID_APPS_VID, 21, true, false},/*val0*/
-	{HW_FENCE_IPC_CLIENT_ID_APPS_VID, HW_FENCE_IPC_CLIENT_ID_APPS_VID, 22, true, false},/*val1*/
-	{HW_FENCE_IPC_CLIENT_ID_APPS_VID, HW_FENCE_IPC_CLIENT_ID_APPS_VID, 23, true, false},/*val2*/
-	{HW_FENCE_IPC_CLIENT_ID_APPS_VID, HW_FENCE_IPC_CLIENT_ID_APPS_VID, 24, true, false},/*val3*/
-	{HW_FENCE_IPC_CLIENT_ID_APPS_VID, HW_FENCE_IPC_CLIENT_ID_APPS_VID, 25, true, false},/*val4*/
-	{HW_FENCE_IPC_CLIENT_ID_APPS_VID, HW_FENCE_IPC_CLIENT_ID_APPS_VID, 26, true, false},/*val5*/
-	{HW_FENCE_IPC_CLIENT_ID_APPS_VID, HW_FENCE_IPC_CLIENT_ID_APPS_VID, 27, true, false},/*val6*/
-#endif /* CONFIG_DEBUG_FS */
-};
-
 /**
  * struct hw_fence_clients_ipc_map - Table makes the 'client to signal' mapping, which is
  *		used by the hw fence driver to trigger ipc signal when hw fence is already
@@ -337,20 +306,6 @@ static int _hw_fence_ipcc_hwrev_init(struct hw_fence_driver_data *drv_data, u32
 	int ret = 0;
 
 	switch (hwrev) {
-	case HW_FENCE_IPCC_HW_REV_100:
-		drv_data->ipcc_client_vid = HW_FENCE_IPC_CLIENT_ID_APPS_VID;
-		drv_data->ipcc_client_pid = HW_FENCE_IPC_CLIENT_ID_APPS_VID;
-		drv_data->protocol_id = HW_FENCE_IPC_COMPUTE_L1_PROTOCOL_ID_LAHAINA;
-		drv_data->ipc_clients_table = hw_fence_clients_ipc_map_no_dpu;
-		HWFNC_DBG_INIT("ipcc protocol_id: Lahaina\n");
-		break;
-	case HW_FENCE_IPCC_HW_REV_110:
-		drv_data->ipcc_client_vid = HW_FENCE_IPC_CLIENT_ID_APPS_VID;
-		drv_data->ipcc_client_pid = HW_FENCE_IPC_CLIENT_ID_APPS_VID;
-		drv_data->protocol_id = HW_FENCE_IPC_COMPUTE_L1_PROTOCOL_ID_WAIPIO;
-		drv_data->ipc_clients_table = hw_fence_clients_ipc_map_no_dpu;
-		HWFNC_DBG_INIT("ipcc protocol_id: Waipio\n");
-		break;
 	case HW_FENCE_IPCC_HW_REV_170:
 		drv_data->ipcc_client_vid = HW_FENCE_IPC_CLIENT_ID_APPS_VID;
 		drv_data->ipcc_client_pid = HW_FENCE_IPC_CLIENT_ID_APPS_VID;
@@ -381,20 +336,10 @@ int hw_fence_ipcc_enable_signaling(struct hw_fence_driver_data *drv_data)
 
 	HWFNC_DBG_H("enable ipc +\n");
 
-	/**
-	 * Attempt to read the ipc version from dt, if not available, then attempt
-	 * to read from the registers.
-	 */
 	ret = of_property_read_u32(drv_data->dev->of_node, "qcom,hw-fence-ipc-ver", &val);
 	if (ret || !val) {
-		/* if no device tree prop, attempt to get the version from the registers*/
-		HWFNC_DBG_H("missing hw fences ipc-ver entry or invalid ret:%d val:%d\n", ret, val);
-
-		/* Read IPC Version from Client=0x8 (apps) for protocol=2 (compute_l1) */
-		val = readl_relaxed(IPC_PROTOCOLp_CLIENTc_VERSION(drv_data->ipcc_io_mem,
-			HW_FENCE_IPC_COMPUTE_L1_PROTOCOL_ID_LAHAINA,
-			HW_FENCE_IPC_CLIENT_ID_APPS_VID));
-		HWFNC_DBG_INIT("ipcc version:0x%x\n", val);
+		HWFNC_ERR("missing hw fences ipc-ver entry or invalid ret:%d val:%d\n", ret, val);
+		return -EINVAL;
 	}
 
 	if (_hw_fence_ipcc_hwrev_init(drv_data, val)) {
@@ -421,7 +366,6 @@ int hw_fence_ipcc_enable_signaling(struct hw_fence_driver_data *drv_data)
 	return 0;
 }
 
-#ifdef HW_DPU_IPCC
 int hw_fence_ipcc_enable_dpu_signaling(struct hw_fence_driver_data *drv_data)
 {
 	struct hw_fence_client_ipc_map *hw_fence_client;
@@ -482,4 +426,3 @@ int hw_fence_ipcc_enable_dpu_signaling(struct hw_fence_driver_data *drv_data)
 
 	return 0;
 }
-#endif /* HW_DPU_IPCC */

+ 0 - 11
hw_fence/src/hw_fence_drv_priv.c

@@ -567,15 +567,6 @@ int hw_fence_init(struct hw_fence_driver_data *drv_data)
 		goto exit;
 	}
 
-	/* Map ctl_start registers */
-	ret = hw_fence_utils_map_ctl_start(drv_data);
-	if (ret) {
-		/* This is not fatal error, since platfoms with dpu-ipc
-		 * won't use this option
-		 */
-		HWFNC_WARN("no ctl_start regs, won't trigger the frame\n");
-	}
-
 	/* Init debugfs */
 	ret = hw_fence_debug_debugfs_register(drv_data);
 	if (ret) {
@@ -665,7 +656,6 @@ int hw_fence_init_controller_signal(struct hw_fence_driver_data *drv_data,
 	case HW_FENCE_CLIENT_ID_CTL3:
 	case HW_FENCE_CLIENT_ID_CTL4:
 	case HW_FENCE_CLIENT_ID_CTL5:
-#ifdef HW_DPU_IPCC
 		/* initialize ipcc signals for dpu clients */
 		HWFNC_DBG_H("init_controller_signal: DPU client_id_ext:%d initialized:%d\n",
 			hw_fence_client->client_id_ext, drv_data->ipcc_dpu_initialized);
@@ -675,7 +665,6 @@ int hw_fence_init_controller_signal(struct hw_fence_driver_data *drv_data,
 			/* Init dpu client ipcc signal */
 			hw_fence_ipcc_enable_dpu_signaling(drv_data);
 		}
-#endif /* HW_DPU_IPCC */
 		break;
 	case HW_FENCE_CLIENT_ID_IPE ... HW_FENCE_CLIENT_ID_IPE +
 			MSM_HW_FENCE_MAX_SIGNAL_PER_CLIENT - 1:

+ 11 - 128
hw_fence/src/hw_fence_drv_utils.c

@@ -52,7 +52,7 @@
 
 /*
  * Each bit in this mask represents each of the loopback clients supported in
- * the enum hw_fence_loopback_id
+ * the enum hw_fence_client_id
  */
 #define HW_FENCE_LOOPBACK_CLIENTS_MASK 0x7fff
 
@@ -170,89 +170,20 @@ void global_atomic_store(struct hw_fence_driver_data *drv_data, uint64_t *lock,
 	}
 }
 
-static inline int _process_dpu_client_loopback(struct hw_fence_driver_data *drv_data,
-	int client_id)
-{
-	int ctl_id = client_id; /* dpu ctl path id is mapped to client id used for the loopback */
-	void *ctl_start_reg;
-	u32 val;
-
-	if (ctl_id > HW_FENCE_LOOPBACK_DPU_CTL_5) {
-		HWFNC_ERR("invalid ctl_id:%d\n", ctl_id);
-		return -EINVAL;
-	}
-
-	ctl_start_reg = drv_data->ctl_start_ptr[ctl_id];
-	if (!ctl_start_reg) {
-		HWFNC_ERR("ctl_start reg not valid for ctl_id:%d\n", ctl_id);
-		return -EINVAL;
-	}
-
-	HWFNC_DBG_H("Processing DPU loopback ctl_id:%d\n", ctl_id);
-
-	val = 0x1; /* ctl_start trigger */
-#ifdef CTL_START_SIM
-	HWFNC_DBG_IRQ("ctl_id:%d Write: to RegOffset:0x%pK val:0x%x\n", ctl_start_reg, val, ctl_id);
-	writel_relaxed(val, ctl_start_reg);
-#else
-	HWFNC_DBG_IRQ("ctl_id:%d Write: to RegOffset:0x%pK val:0x%x (COMMENTED)\n", ctl_id,
-		ctl_start_reg, val);
-#endif
-
-	return 0;
-}
-
-static inline int _process_gfx_client_loopback(struct hw_fence_driver_data *drv_data,
-	int client_id)
-{
-	int queue_type = HW_FENCE_RX_QUEUE - 1; /* rx queue index */
-	struct msm_hw_fence_queue_payload payload;
-	int read = 1;
-
-	HWFNC_DBG_IRQ("Processing GFX loopback client_id:%d\n", client_id);
-	while (read) {
-		/*
-		 * 'client_id' is the loopback-client-id, not the hw-fence client_id,
-		 * so use GFX hw-fence client id, to get the client data
-		 */
-		read = hw_fence_read_queue(drv_data->clients[HW_FENCE_CLIENT_ID_CTX0], &payload,
-			queue_type);
-		if (read < 0) {
-			HWFNC_ERR("unable to read gfx rxq\n");
-			break;
-		}
-		HWFNC_DBG_L("GFX loopback rxq read: hash:%llu ctx:%llu seq:%llu f:%llu e:%lu\n",
-			payload.hash, payload.ctxt_id, payload.seqno, payload.flags, payload.error);
-	}
-
-	return read;
-}
-
 static int _process_doorbell_client(struct hw_fence_driver_data *drv_data, int client_id)
 {
 	int ret;
 
-	HWFNC_DBG_H("Processing loopback client_id:%d\n", client_id);
+	HWFNC_DBG_H("Processing doorbell client_id:%d\n", client_id);
 	switch (client_id) {
-	case HW_FENCE_LOOPBACK_DPU_CTL_0:
-	case HW_FENCE_LOOPBACK_DPU_CTL_1:
-	case HW_FENCE_LOOPBACK_DPU_CTL_2:
-	case HW_FENCE_LOOPBACK_DPU_CTL_3:
-	case HW_FENCE_LOOPBACK_DPU_CTL_4:
-	case HW_FENCE_LOOPBACK_DPU_CTL_5:
-		ret = _process_dpu_client_loopback(drv_data, client_id);
-		break;
-	case HW_FENCE_LOOPBACK_GFX_CTX_0:
-		ret = _process_gfx_client_loopback(drv_data, client_id);
-		break;
 #if IS_ENABLED(CONFIG_DEBUG_FS)
-	case HW_FENCE_LOOPBACK_VAL_0:
-	case HW_FENCE_LOOPBACK_VAL_1:
-	case HW_FENCE_LOOPBACK_VAL_2:
-	case HW_FENCE_LOOPBACK_VAL_3:
-	case HW_FENCE_LOOPBACK_VAL_4:
-	case HW_FENCE_LOOPBACK_VAL_5:
-	case HW_FENCE_LOOPBACK_VAL_6:
+	case HW_FENCE_CLIENT_ID_VAL0:
+	case HW_FENCE_CLIENT_ID_VAL1:
+	case HW_FENCE_CLIENT_ID_VAL2:
+	case HW_FENCE_CLIENT_ID_VAL3:
+	case HW_FENCE_CLIENT_ID_VAL4:
+	case HW_FENCE_CLIENT_ID_VAL5:
+	case HW_FENCE_CLIENT_ID_VAL6:
 		ret = process_validation_client_loopback(drv_data, client_id);
 		break;
 #endif /* CONFIG_DEBUG_FS */
@@ -266,10 +197,10 @@ static int _process_doorbell_client(struct hw_fence_driver_data *drv_data, int c
 
 void hw_fence_utils_process_doorbell_mask(struct hw_fence_driver_data *drv_data, u64 db_flags)
 {
-	int client_id = HW_FENCE_LOOPBACK_DPU_CTL_0;
+	int client_id = HW_FENCE_CLIENT_ID_CTL0;
 	u64 mask;
 
-	for (; client_id < HW_FENCE_LOOPBACK_MAX; client_id++) {
+	for (; client_id <= HW_FENCE_CLIENT_ID_VAL6; client_id++) {
 		mask = 1 << client_id;
 		if (mask & db_flags) {
 			HWFNC_DBG_H("client_id:%d signaled! flags:0x%llx\n", client_id, db_flags);
@@ -946,54 +877,6 @@ int hw_fence_utils_map_qtime(struct hw_fence_driver_data *drv_data)
 	return ret;
 }
 
-static int _map_ctl_start(struct hw_fence_driver_data *drv_data, u32 ctl_id,
-	void **iomem_ptr, uint32_t *iomem_size)
-{
-	u32 reg_config[2];
-	void __iomem *ptr;
-	char name[30] = {0};
-	int ret;
-
-	snprintf(name, sizeof(name), "qcom,dpu-ctl-start-%d-reg", ctl_id);
-	ret = of_property_read_u32_array(drv_data->dev->of_node, name, reg_config, 2);
-	if (ret)
-		return 0; /* this is an optional property */
-
-	/* Mmap registers */
-	ptr = devm_ioremap(drv_data->dev, reg_config[0], reg_config[1]);
-	if (!ptr) {
-		HWFNC_ERR("failed to ioremap %s reg\n", name);
-		return -ENOMEM;
-	}
-
-	*iomem_ptr = ptr;
-	*iomem_size = reg_config[1];
-
-	HWFNC_DBG_INIT("mapped ctl_start ctl_id:%d name:%s address:0x%x size:0x%x io_mem:0x%pK\n",
-		ctl_id, name, reg_config[0], reg_config[1], ptr);
-
-	return 0;
-}
-
-int hw_fence_utils_map_ctl_start(struct hw_fence_driver_data *drv_data)
-{
-	u32 ctl_id = HW_FENCE_LOOPBACK_DPU_CTL_0;
-
-	for (; ctl_id <= HW_FENCE_LOOPBACK_DPU_CTL_5; ctl_id++) {
-		if (_map_ctl_start(drv_data, ctl_id, &drv_data->ctl_start_ptr[ctl_id],
-			&drv_data->ctl_start_size[ctl_id])) {
-			HWFNC_ERR("cannot map ctl_start ctl_id:%d\n", ctl_id);
-		} else {
-			if (drv_data->ctl_start_ptr[ctl_id])
-				HWFNC_DBG_INIT("mapped ctl_id:%d ctl_start_ptr:0x%pK size:%u\n",
-					ctl_id, drv_data->ctl_start_ptr[ctl_id],
-					drv_data->ctl_start_size[ctl_id]);
-		}
-	}
-
-	return 0;
-}
-
 enum hw_fence_client_id hw_fence_utils_get_client_id_priv(struct hw_fence_driver_data *drv_data,
 	enum hw_fence_client_id client_id)
 {