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

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

Merge "msm: mdss: debugfs: add support to serialize wait4pingpong"

parents cc911079 7da4b041
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2015, The Linux Foundation. All rights reserved.
 *
 *
 * This program is free software; you can redistribute it and/or modify
 * 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
 * it under the terms of the GNU General Public License version 2 and
@@ -216,6 +216,7 @@ struct mdss_data_type {


	u32 enable_bw_release;
	u32 enable_bw_release;
	u32 enable_rotator_bw_release;
	u32 enable_rotator_bw_release;
	u32 serialize_wait4pp;


	struct mdss_hw_settings *hw_settings;
	struct mdss_hw_settings *hw_settings;


+2 −2
Original line number Original line Diff line number Diff line
/*
/*
 * Copyright (c) 2012-2014, The Linux Foundation. All rights reserved.
 * Copyright (c) 2012-2015, The Linux Foundation. All rights reserved.
 *
 *
 * This program is free software; you can redistribute it and/or modify
 * 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
 * it under the terms of the GNU General Public License version 2 and
@@ -908,7 +908,7 @@ void mdss_mdp_mixer_unstage_all(struct mdss_mdp_mixer *mixer);
int mdss_mdp_display_commit(struct mdss_mdp_ctl *ctl, void *arg,
int mdss_mdp_display_commit(struct mdss_mdp_ctl *ctl, void *arg,
	struct mdss_mdp_commit_cb *commit_cb);
	struct mdss_mdp_commit_cb *commit_cb);
int mdss_mdp_display_wait4comp(struct mdss_mdp_ctl *ctl);
int mdss_mdp_display_wait4comp(struct mdss_mdp_ctl *ctl);
int mdss_mdp_display_wait4pingpong(struct mdss_mdp_ctl *ctl);
int mdss_mdp_display_wait4pingpong(struct mdss_mdp_ctl *ctl, bool use_lock);
int mdss_mdp_display_wakeup_time(struct mdss_mdp_ctl *ctl,
int mdss_mdp_display_wakeup_time(struct mdss_mdp_ctl *ctl,
				 ktime_t *wakeup_time);
				 ktime_t *wakeup_time);


+26 −20
Original line number Original line Diff line number Diff line
/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2015, The Linux Foundation. All rights reserved.
 *
 *
 * This program is free software; you can redistribute it and/or modify
 * 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
 * it under the terms of the GNU General Public License version 2 and
@@ -3372,22 +3372,36 @@ int mdss_mdp_display_wait4comp(struct mdss_mdp_ctl *ctl)
	return ret;
	return ret;
}
}


int mdss_mdp_display_wait4pingpong(struct mdss_mdp_ctl *ctl)
int mdss_mdp_display_wait4pingpong(struct mdss_mdp_ctl *ctl, bool use_lock)
{
{
	struct mdss_mdp_ctl *sctl = NULL;
	int ret;
	int ret;


	if (use_lock) {
		ret = mutex_lock_interruptible(&ctl->lock);
		ret = mutex_lock_interruptible(&ctl->lock);
		if (ret)
		if (ret)
			return ret;
			return ret;
	}


	if (!mdss_mdp_ctl_is_power_on(ctl)) {
	if (!mdss_mdp_ctl_is_power_on(ctl) || !ctl->wait_pingpong) {
		if (use_lock)
			mutex_unlock(&ctl->lock);
			mutex_unlock(&ctl->lock);
		return 0;
		return 0;
	}
	}


	if (ctl->wait_pingpong)
	ATRACE_BEGIN("wait_pingpong");
		ret = ctl->wait_pingpong(ctl, NULL);
	ctl->wait_pingpong(ctl, NULL);
	ATRACE_END("wait_pingpong");

	sctl = mdss_mdp_get_split_ctl(ctl);


	if (sctl && sctl->wait_pingpong) {
		ATRACE_BEGIN("wait_pingpong sctl");
		sctl->wait_pingpong(sctl, NULL);
		ATRACE_END("wait_pingpong sctl");
	}

	if (use_lock)
		mutex_unlock(&ctl->lock);
		mutex_unlock(&ctl->lock);


	return ret;
	return ret;
@@ -3512,17 +3526,9 @@ int mdss_mdp_display_commit(struct mdss_mdp_ctl *ctl, void *arg,
	mdss_mdp_ctl_notify(ctl, MDP_NOTIFY_FRAME_READY);
	mdss_mdp_ctl_notify(ctl, MDP_NOTIFY_FRAME_READY);
	ATRACE_END("frame_ready");
	ATRACE_END("frame_ready");


	if (ctl->wait_pingpong) {
	if (ctl->wait_pingpong && !mdata->serialize_wait4pp)
		ATRACE_BEGIN("wait_pingpong");
		mdss_mdp_display_wait4pingpong(ctl, false);
		ctl->wait_pingpong(ctl, NULL);
		ATRACE_END("wait_pingpong");


		if (sctl && sctl->wait_pingpong) {
			ATRACE_BEGIN("wait_pingpong sctl");
			sctl->wait_pingpong(sctl, NULL);
			ATRACE_END("wait_pingpong sctl");
		}
	}
	if (commit_cb)
	if (commit_cb)
		commit_cb->commit_cb_fnc(MDP_COMMIT_STAGE_READY_FOR_KICKOFF,
		commit_cb->commit_cb_fnc(MDP_COMMIT_STAGE_READY_FOR_KICKOFF,
			commit_cb->data);
			commit_cb->data);
+3 −1
Original line number Original line Diff line number Diff line
/*
/*
 * Copyright (c) 2014, The Linux Foundation. All rights reserved.
 * Copyright (c) 2014-2015, The Linux Foundation. All rights reserved.
 *
 *
 * This program is free software; you can redistribute it and/or modify
 * 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
 * it under the terms of the GNU General Public License version 2 and
@@ -348,6 +348,8 @@ int mdss_mdp_debugfs_init(struct mdss_data_type *mdata)
			&mdss_debugfs_buffers_fops);
			&mdss_debugfs_buffers_fops);
	debugfs_create_file("stat", 0644, mdd->root, mdata,
	debugfs_create_file("stat", 0644, mdd->root, mdata,
			&mdss_debugfs_stats_fops);
			&mdss_debugfs_stats_fops);
	debugfs_create_bool("serialize_wait4pp", 0644, mdd->root,
		(u32 *)&mdata->serialize_wait4pp);


	return 0;
	return 0;
}
}
+3 −1
Original line number Original line Diff line number Diff line
/* Copyright (c) 2012-2014, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2015, The Linux Foundation. All rights reserved.
 *
 *
 * This program is free software; you can redistribute it and/or modify
 * 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
 * it under the terms of the GNU General Public License version 2 and
@@ -1686,6 +1686,8 @@ int mdss_mdp_overlay_kickoff(struct msm_fb_data_type *mfd,
		mdss_mdp_set_roi(ctl, &temp_data);
		mdss_mdp_set_roi(ctl, &temp_data);
	}
	}


	if (ctl->wait_pingpong && mdp5_data->mdata->serialize_wait4pp)
		mdss_mdp_display_wait4pingpong(ctl, true);


	/*
	/*
	 * Setup pipe in solid fill before unstaging,
	 * Setup pipe in solid fill before unstaging,