|
@@ -1,6 +1,6 @@
|
|
// SPDX-License-Identifier: GPL-2.0-only
|
|
// SPDX-License-Identifier: GPL-2.0-only
|
|
/*
|
|
/*
|
|
- * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
|
|
|
|
|
|
+ * Copyright (c) 2017-2020, The Linux Foundation. All rights reserved.
|
|
*/
|
|
*/
|
|
|
|
|
|
#include <linux/debugfs.h>
|
|
#include <linux/debugfs.h>
|
|
@@ -451,6 +451,17 @@ int32_t cam_context_prepare_dev_to_hw(struct cam_context *ctx,
|
|
"[%s][%d] : Moving req[%llu] from free_list to pending_list",
|
|
"[%s][%d] : Moving req[%llu] from free_list to pending_list",
|
|
ctx->dev_name, ctx->ctx_id, req->request_id);
|
|
ctx->dev_name, ctx->ctx_id, req->request_id);
|
|
|
|
|
|
|
|
+ for (j = 0; j < req->num_in_map_entries; j++) {
|
|
|
|
+ rc = cam_sync_check_valid(
|
|
|
|
+ req->in_map_entries[j].sync_id);
|
|
|
|
+ if (rc) {
|
|
|
|
+ CAM_ERR(CAM_CTXT,
|
|
|
|
+ "invalid in map sync object %d",
|
|
|
|
+ req->in_map_entries[j].sync_id);
|
|
|
|
+ goto put_ref;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
for (j = 0; j < req->num_in_map_entries; j++) {
|
|
for (j = 0; j < req->num_in_map_entries; j++) {
|
|
cam_context_getref(ctx);
|
|
cam_context_getref(ctx);
|
|
rc = cam_sync_register_callback(
|
|
rc = cam_sync_register_callback(
|
|
@@ -472,7 +483,8 @@ int32_t cam_context_prepare_dev_to_hw(struct cam_context *ctx,
|
|
ctx->dev_name, ctx->ctx_id,
|
|
ctx->dev_name, ctx->ctx_id,
|
|
req->request_id);
|
|
req->request_id);
|
|
|
|
|
|
- goto put_ctx_ref;
|
|
|
|
|
|
+ cam_context_putref(ctx);
|
|
|
|
+ goto put_ref;
|
|
}
|
|
}
|
|
CAM_DBG(CAM_CTXT, "register in fence cb: %d ret = %d",
|
|
CAM_DBG(CAM_CTXT, "register in fence cb: %d ret = %d",
|
|
req->in_map_entries[j].sync_id, rc);
|
|
req->in_map_entries[j].sync_id, rc);
|
|
@@ -480,9 +492,6 @@ int32_t cam_context_prepare_dev_to_hw(struct cam_context *ctx,
|
|
}
|
|
}
|
|
|
|
|
|
return rc;
|
|
return rc;
|
|
-put_ctx_ref:
|
|
|
|
- for (; j >= 0; j--)
|
|
|
|
- cam_context_putref(ctx);
|
|
|
|
put_ref:
|
|
put_ref:
|
|
for (--i; i >= 0; i--) {
|
|
for (--i; i >= 0; i--) {
|
|
if (cam_sync_put_obj_ref(req->out_map_entries[i].sync_id))
|
|
if (cam_sync_put_obj_ref(req->out_map_entries[i].sync_id))
|