Loading drivers/media/platform/msm/camera/cam_isp/cam_isp_context.c +37 −7 Original line number Diff line number Diff line Loading @@ -22,6 +22,8 @@ static const char isp_dev_name[] = "isp"; static struct cam_isp_ctx_debug isp_ctx_debug; #define INC_STATE_MONITOR_HEAD(head) \ (atomic64_add_return(1, head) % \ CAM_ISP_CTX_STATE_MONITOR_MAX_ENTRIES) Loading Loading @@ -3440,12 +3442,6 @@ static int __cam_isp_ctx_stop_dev_in_activated_unlock( (struct cam_isp_context *) ctx->ctx_priv; struct cam_isp_stop_args stop_isp; /* Mask off all the incoming hardware events */ spin_lock_bh(&ctx->lock); ctx_isp->substate_activated = CAM_ISP_CTX_ACTIVATED_HALT; spin_unlock_bh(&ctx->lock); CAM_DBG(CAM_ISP, "next substate %d", ctx_isp->substate_activated); /* stop hw first */ if (ctx_isp->hw_ctx) { stop.ctxt_to_hw_map = ctx_isp->hw_ctx; Loading @@ -3462,6 +3458,12 @@ static int __cam_isp_ctx_stop_dev_in_activated_unlock( &stop); } /* Mask off all the incoming hardware events */ spin_lock_bh(&ctx->lock); ctx_isp->substate_activated = CAM_ISP_CTX_ACTIVATED_HALT; spin_unlock_bh(&ctx->lock); CAM_DBG(CAM_ISP, "next substate %d", ctx_isp->substate_activated); while (!list_empty(&ctx->pending_req_list)) { req = list_first_entry(&ctx->pending_req_list, struct cam_ctx_request, list); Loading Loading @@ -3725,6 +3727,7 @@ static int __cam_isp_ctx_handle_irq_in_activated(void *context, } else { CAM_DBG(CAM_ISP, "No handle function for substate %d", ctx_isp->substate_activated); if (isp_ctx_debug.enable_state_monitor_dump) __cam_isp_ctx_dump_state_monitor_array(ctx_isp); } Loading Loading @@ -3867,6 +3870,31 @@ static int cam_isp_context_dump_active_request(void *data, unsigned long iova, return rc; } static int cam_isp_context_debug_register(void) { isp_ctx_debug.dentry = debugfs_create_dir("camera_isp_ctx", NULL); if (!isp_ctx_debug.dentry) { CAM_ERR(CAM_ISP, "failed to create dentry"); return -ENOMEM; } if (!debugfs_create_u32("enable_state_monitor_dump", 0644, isp_ctx_debug.dentry, &isp_ctx_debug.enable_state_monitor_dump)) { CAM_ERR(CAM_ISP, "failed to create enable_state_monitor_dump"); goto err; } return 0; err: debugfs_remove_recursive(isp_ctx_debug.dentry); return -ENOMEM; } int cam_isp_context_init(struct cam_isp_context *ctx, struct cam_context *ctx_base, struct cam_req_mgr_kmd_ops *crm_node_intf, Loading Loading @@ -3918,6 +3946,8 @@ int cam_isp_context_init(struct cam_isp_context *ctx, CAM_ISP_CTX_ACTIVATED_MAX; } atomic64_set(&ctx->state_monitor_head, -1); cam_isp_context_debug_register(); err: return rc; } Loading drivers/media/platform/msm/camera/cam_isp/cam_isp_context.h +12 −0 Original line number Diff line number Diff line Loading @@ -70,6 +70,18 @@ enum cam_isp_state_change_trigger { CAM_ISP_STATE_CHANGE_TRIGGER_MAX }; /** * struct cam_isp_ctx_debug - Contains debug parameters * * @dentry: Debugfs entry * @enable_state_monitor_dump: Enable isp state monitor dump * */ struct cam_isp_ctx_debug { struct dentry *dentry; uint32_t enable_state_monitor_dump; }; /** * struct cam_isp_ctx_irq_ops - Function table for handling IRQ callbacks * Loading Loading
drivers/media/platform/msm/camera/cam_isp/cam_isp_context.c +37 −7 Original line number Diff line number Diff line Loading @@ -22,6 +22,8 @@ static const char isp_dev_name[] = "isp"; static struct cam_isp_ctx_debug isp_ctx_debug; #define INC_STATE_MONITOR_HEAD(head) \ (atomic64_add_return(1, head) % \ CAM_ISP_CTX_STATE_MONITOR_MAX_ENTRIES) Loading Loading @@ -3440,12 +3442,6 @@ static int __cam_isp_ctx_stop_dev_in_activated_unlock( (struct cam_isp_context *) ctx->ctx_priv; struct cam_isp_stop_args stop_isp; /* Mask off all the incoming hardware events */ spin_lock_bh(&ctx->lock); ctx_isp->substate_activated = CAM_ISP_CTX_ACTIVATED_HALT; spin_unlock_bh(&ctx->lock); CAM_DBG(CAM_ISP, "next substate %d", ctx_isp->substate_activated); /* stop hw first */ if (ctx_isp->hw_ctx) { stop.ctxt_to_hw_map = ctx_isp->hw_ctx; Loading @@ -3462,6 +3458,12 @@ static int __cam_isp_ctx_stop_dev_in_activated_unlock( &stop); } /* Mask off all the incoming hardware events */ spin_lock_bh(&ctx->lock); ctx_isp->substate_activated = CAM_ISP_CTX_ACTIVATED_HALT; spin_unlock_bh(&ctx->lock); CAM_DBG(CAM_ISP, "next substate %d", ctx_isp->substate_activated); while (!list_empty(&ctx->pending_req_list)) { req = list_first_entry(&ctx->pending_req_list, struct cam_ctx_request, list); Loading Loading @@ -3725,6 +3727,7 @@ static int __cam_isp_ctx_handle_irq_in_activated(void *context, } else { CAM_DBG(CAM_ISP, "No handle function for substate %d", ctx_isp->substate_activated); if (isp_ctx_debug.enable_state_monitor_dump) __cam_isp_ctx_dump_state_monitor_array(ctx_isp); } Loading Loading @@ -3867,6 +3870,31 @@ static int cam_isp_context_dump_active_request(void *data, unsigned long iova, return rc; } static int cam_isp_context_debug_register(void) { isp_ctx_debug.dentry = debugfs_create_dir("camera_isp_ctx", NULL); if (!isp_ctx_debug.dentry) { CAM_ERR(CAM_ISP, "failed to create dentry"); return -ENOMEM; } if (!debugfs_create_u32("enable_state_monitor_dump", 0644, isp_ctx_debug.dentry, &isp_ctx_debug.enable_state_monitor_dump)) { CAM_ERR(CAM_ISP, "failed to create enable_state_monitor_dump"); goto err; } return 0; err: debugfs_remove_recursive(isp_ctx_debug.dentry); return -ENOMEM; } int cam_isp_context_init(struct cam_isp_context *ctx, struct cam_context *ctx_base, struct cam_req_mgr_kmd_ops *crm_node_intf, Loading Loading @@ -3918,6 +3946,8 @@ int cam_isp_context_init(struct cam_isp_context *ctx, CAM_ISP_CTX_ACTIVATED_MAX; } atomic64_set(&ctx->state_monitor_head, -1); cam_isp_context_debug_register(); err: return rc; } Loading
drivers/media/platform/msm/camera/cam_isp/cam_isp_context.h +12 −0 Original line number Diff line number Diff line Loading @@ -70,6 +70,18 @@ enum cam_isp_state_change_trigger { CAM_ISP_STATE_CHANGE_TRIGGER_MAX }; /** * struct cam_isp_ctx_debug - Contains debug parameters * * @dentry: Debugfs entry * @enable_state_monitor_dump: Enable isp state monitor dump * */ struct cam_isp_ctx_debug { struct dentry *dentry; uint32_t enable_state_monitor_dump; }; /** * struct cam_isp_ctx_irq_ops - Function table for handling IRQ callbacks * Loading