<html><body><p>
<pre>
On Mon, 2025-07-07 at 09:31 +0800, shangyao lin wrote:
> From: "shangyao.lin" <shangyao.lin@mediatek.com>
>
> Introduce state management and debugging mechanisms for the MediaTek ISP7.x
> camsys platform. State management establishes control over ISP operations and
> events, defining distinct states for request handling, sensor control, and
> frame synchronization, ensuring proper event processing. The debugging
> mechanism ensures stable operation and timely data collection during anomalies.
>
> ---
>
> Changes in v2:
> - Removed mtk_cam-debug.c and mtk_cam-debug.h, along with related code
> - Various fixes per review comments
>
> Signed-off-by: shangyao.lin <shangyao.lin@mediatek.com>
> ---
[snip]
> +static bool mtk_cam_request_drained(struct mtk_camsys_sensor_ctrl *sensor_ctrl)
> +{
> +struct mtk_cam_ctx *ctx = sensor_ctrl->ctx;
You use struct mtk_cam_ctx in this patch, but it's defined in patch [8/13].
You should define it first and then use it.
But here you use struct mtk_cam_ctx which is defined in later patch.
To prevent this, you could apply one patch and build code once.
For example,
After apply patch [5/13], build code.
After apply patch [6/13], build code.
After apply patch [7/13], build code.
...
The step would help you to prevent using symbol which has not defined.
In addition, this patch just add .c file but not add it in Makefile.
When you add .c, also add it in Makefile so you could check it could be built successfully.
Regards,
CK
> +int sensor_seq_no_next =
> +atomic_read(&sensor_ctrl->sensor_request_seq_no) + 1;
> +int res = 0;
> +
> +if (sensor_seq_no_next <= atomic_read(&ctx->enqueued_frame_seq_no))
> +res = 1;
> +/* Send V4L2_EVENT_REQUEST_DRAINED event */
> +if (res == 0) {
> +mtk_cam_event_request_drained(ctx->pipe);
> +dev_dbg(ctx->cam->dev, "request_drained:(%d)\n",
> +sensor_seq_no_next);
> +}
> +return (res == 0);
> +}
> +
</pre>
</p></body></html><!--type:text--><!--{--><pre>************* MEDIATEK Confidentiality Notice
********************
The information contained in this e-mail message (including any
attachments) may be confidential, proprietary, privileged, or otherwise
exempt from disclosure under applicable laws. It is intended to be
conveyed only to the designated recipient(s). Any use, dissemination,
distribution, printing, retaining or copying of this e-mail (including its
attachments) by unintended recipient(s) is strictly prohibited and may
be unlawful. If you are not an intended recipient of this e-mail, or believe
that you have received this e-mail in error, please notify the sender
immediately (by replying to this e-mail), delete any and all copies of
this e-mail (including any attachments) from your system, and do not
disclose the content of this e-mail to any other person. Thank you!
</pre><!--}-->