Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit aaab1ef8 authored by Venkat Chinta's avatar Venkat Chinta Committed by Gerrit - the friendly Code Review server
Browse files

msm: camera: isp: Stop HW immediately in flush



When the userspace issues flush, ISP driver needs to ensure that
wait and active list requests are flushed and corresponding
buffer fences are signaled with error. For active and wait lists
IFE hardware is stopped immediately. Therefore IFE must also be
reset to ensure that VFE BUS FIFOs are cleared. Start IFE HW
after receiving init packet again.

CRs-Fixed: 2513939
Change-Id: I9a35ce05c24d6b63016e264a870d376eabb2b56f
Signed-off-by: default avatarVenkat Chinta <vchinta@codeaurora.org>
parent a5dc6c6c
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -32,8 +32,9 @@ enum cam_context_state {
	CAM_CTX_AVAILABLE            = 1,
	CAM_CTX_ACQUIRED             = 2,
	CAM_CTX_READY                = 3,
	CAM_CTX_ACTIVATED            = 4,
	CAM_CTX_STATE_MAX            = 5,
	CAM_CTX_FLUSHED              = 4,
	CAM_CTX_ACTIVATED            = 5,
	CAM_CTX_STATE_MAX            = 6,
};

/**
+12 −0
Original line number Diff line number Diff line
@@ -287,6 +287,16 @@ struct cam_hw_dump_pf_args {
	bool                           *mem_found;
};

/**
 * struct cam_hw_reset_args -hw reset arguments
 *
 * @ctxt_to_hw_map:        HW context from the acquire
 *
 */
struct cam_hw_reset_args {
	void                           *ctxt_to_hw_map;
};

/* enum cam_hw_mgr_command - Hardware manager command type */
enum cam_hw_mgr_command {
	CAM_HW_MGR_CMD_INTERNAL,
@@ -341,6 +351,7 @@ struct cam_hw_cmd_args {
 * @hw_open:                   Function pointer for HW init
 * @hw_close:                  Function pointer for HW deinit
 * @hw_flush:                  Function pointer for HW flush
 * @hw_reset:                  Function pointer for HW reset
 *
 */
struct cam_hw_mgr_intf {
@@ -361,6 +372,7 @@ struct cam_hw_mgr_intf {
	int (*hw_open)(void *hw_priv, void *fw_download_args);
	int (*hw_close)(void *hw_priv, void *hw_close_args);
	int (*hw_flush)(void *hw_priv, void *hw_flush_args);
	int (*hw_reset)(void *hw_priv, void *hw_reset_args);
};

#endif /* _CAM_HW_MGR_INTF_H_ */
+2 −0
Original line number Diff line number Diff line
@@ -874,6 +874,8 @@ static struct cam_ctx_ops
		.irq_ops = NULL,
		.pagefault_ops = NULL,
	},
	/* Flushed */
	{},
	/* Activated */
	{
		.ioctl_ops = {
+2 −0
Original line number Diff line number Diff line
@@ -189,6 +189,8 @@ static struct cam_ctx_ops
		.crm_ops = {},
		.irq_ops = NULL,
	},
	/* Flushed */
	{},
	/* Activated */
	{
		.ioctl_ops = {
+2 −0
Original line number Diff line number Diff line
@@ -250,6 +250,8 @@ static struct cam_ctx_ops
		.irq_ops = __cam_icp_handle_buf_done_in_ready,
		.pagefault_ops = cam_icp_context_dump_active_request,
	},
	/* Flushed */
	{},
	/* Activated */
	{
		.ioctl_ops = {},
Loading