msm: camera: common: Return err on flush and log req id

When UMD requests to flush specific request that was submitted
to HW/FW, return error code back to userspace and log the particular
active request id if the device does not flush active request.
Currently devices that do not support flushing a specific active
request are ICP, OPE, and CRE.

Return error if there is no request to flush upon UMD call to
flush specific request.

Print all ICP requests' id from all active streams when encountering
WD or ICP fatal errors.

CRs-Fixed: 3438283
Change-Id: I7921463250c6e5e45ec263ccdce9d60d2b0f1ed3
Signed-off-by: Sokchetra Eung <quic_eung@quicinc.com>
This commit is contained in:
Sokchetra Eung
2023-03-23 16:08:34 -07:00
committed by Camera Software Integration
szülő ac85b2936a
commit d525a7300c
9 fájl változott, egészen pontosan 86 új sor hozzáadva és 27 régi sor törölve

Fájl megtekintése

@@ -1,6 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (c) 2017-2021, The Linux Foundation. All rights reserved.
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
*/
#include <linux/module.h>
@@ -105,10 +106,14 @@ static int __cam_lrme_ctx_flush_dev_in_activated(struct cam_context *ctx,
struct cam_flush_dev_cmd *cmd)
{
int rc;
struct cam_context_utils_flush_args flush_args;
CAM_DBG(CAM_LRME, "Enter ctx %d", ctx->ctx_id);
rc = cam_context_flush_dev_to_hw(ctx, cmd);
flush_args.cmd = cmd;
flush_args.flush_active_req = true;
rc = cam_context_flush_dev_to_hw(ctx, &flush_args);
if (rc)
CAM_ERR(CAM_LRME, "Failed to flush device");