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

Commit 59d9684b authored by Jeyaprakash Soundrapandian's avatar Jeyaprakash Soundrapandian Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: camera: isp: put tasklet cmd back to free list at start" into dev/msm-4.9-camx

parents e09480fd e14cca18
Loading
Loading
Loading
Loading
+7 −8
Original line number Diff line number Diff line
/* Copyright (c) 2017, The Linux Foundation. All rights reserved.
/* Copyright (c) 2017-2018, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -273,8 +273,7 @@ static void cam_tasklet_flush(void *tasklet_info)
int cam_tasklet_start(void  *tasklet_info)
{
	struct cam_tasklet_info       *tasklet = tasklet_info;
	struct cam_tasklet_queue_cmd  *tasklet_cmd;
	struct cam_tasklet_queue_cmd  *tasklet_cmd_temp;
	int i = 0;

	if (atomic_read(&tasklet->tasklet_active)) {
		CAM_ERR(CAM_ISP, "Tasklet already active. idx = %d",
@@ -283,11 +282,11 @@ int cam_tasklet_start(void *tasklet_info)
	}
	atomic_set(&tasklet->tasklet_active, 1);

	/* flush the command queue first */
	list_for_each_entry_safe(tasklet_cmd, tasklet_cmd_temp,
		&tasklet->used_cmd_list, list) {
		list_del_init(&tasklet_cmd->list);
		list_add_tail(&tasklet_cmd->list, &tasklet->free_cmd_list);
	/* clean up the command queue first */
	for (i = 0; i < CAM_TASKLETQ_SIZE; i++) {
		list_del_init(&tasklet->cmd_queue[i].list);
		list_add_tail(&tasklet->cmd_queue[i].list,
			&tasklet->free_cmd_list);
	}

	tasklet_enable(&tasklet->tasklet);