msm: camera: sync: Add monitor information for sync objects

Monitor sync object operations such as create, register callback,
signal, unregister callback which is useful in debugging. Introduce
debugfs to dynamically set the monitor mask. Apply dump on error
when CAM_GENERIC_FENCE_TYPE_xx is set in cam_sync_monitor_mask and
apply dump on release when CAM_GENERIC_FENCE_TYPE_xx_DUMP is also set
at the same time. Apply dynamic memory allocation for monitor data
in synx and dma. Refactor APIs into generic ones and add memory
checkings.

CRs-Fixed: 3350863
Change-Id: I70cfdc1215be5f6bf564c672a874e6ba7997cdfa
Signed-off-by: Pavan Kumar Chilamkurthi <quic_pchilamk@quicinc.com>
Signed-off-by: Haochen Yang <quic_haocyang@quicinc.com>
Tento commit je obsažen v:
Pavan Kumar Chilamkurthi
2022-09-13 16:37:01 -07:00
odevzdal Camera Software Integration
rodič d18230b5e5
revize 07b3c215a1
8 změnil soubory, kde provedl 1098 přidání a 103 odebrání

Zobrazit soubor

@@ -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 __CAM_SYNC_SYNX_H__
#define __CAM_SYNC_SYNX_H__
@@ -15,6 +15,7 @@
#define CAM_SYNX_MAX_OBJS 256
#define CAM_SYNX_OBJ_NAME_LEN 64
#define CAM_SYNX_TABLE_SZ (CAM_SYNX_MAX_OBJS / CAM_GENERIC_MONITOR_TABLE_ENTRY_SZ)
/* Synx obj state */
enum cam_synx_obj_state {
@@ -136,6 +137,12 @@ int cam_synx_obj_signal_obj(struct cam_synx_obj_signal *signal_synx_obj);
int cam_synx_obj_register_cb(int32_t *sync_obj, int32_t row_idx,
cam_sync_callback_for_synx_obj sync_cb);
/**
* @brief: cam synx driver open
*
*/
void cam_synx_obj_open(void);
/**
* @brief: cam synx driver close
*