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

Commit ca209333 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: wfd: Restart hrtimer after forwarding it"

parents 99b282c8 1e17fd55
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -24,6 +24,12 @@
#define DEFAULT_MODE ((enum vsg_modes)VSG_MODE_CFR)
#define MAX_BUFS_BUSY_WITH_ENC 5

static void vsg_reset_timer(struct hrtimer *timer, ktime_t time)
{
	hrtimer_forward_now(timer, time);
	hrtimer_restart(timer);
}

static int vsg_release_input_buffer(struct vsg_context *context,
		struct vsg_buf_info *buf)
{
@@ -114,7 +120,7 @@ static void vsg_work_func(struct work_struct *task)
	INIT_LIST_HEAD(&buf_info->node);

	ktime_get_ts(&buf_info->time);
	hrtimer_forward_now(&context->threshold_timer, ns_to_ktime(
	vsg_reset_timer(&context->threshold_timer, ns_to_ktime(
				context->max_frame_interval));

	temp = NULL;
@@ -438,7 +444,7 @@ static long vsg_queue_buffer(struct v4l2_subdev *sd, void *arg)
			 * otherwise, diff between two consecutive frames might
			 * be less than max_frame_interval (for just one sample)
			 */
			hrtimer_forward_now(&context->threshold_timer,
			vsg_reset_timer(&context->threshold_timer,
				ns_to_ktime(context->max_frame_interval));
		}
	}