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

Commit cc8c2ab9 authored by Xiaoming Zhou's avatar Xiaoming Zhou
Browse files

msm: mdss: refactor the rotation logic



Creating a rotation session manager to manage the rotation sessions.
At creation time, rotation object is not assigned to the underlying
hardware resources (i.e. pipe, mixer, controller, and write-back).
The hardware assignment happens only at the time of commit, and released
after the commit is done.

Change-Id: I33bf625a177362953c11eefc2a779a5af409964b
Signed-off-by: default avatarXiaoming Zhou <zhoux@codeaurora.org>
parent c3e1cf6f
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -53,6 +53,7 @@
#include "mdss_panel.h"
#include "mdss_debug.h"
#include "mdss_mdp_debug.h"
#include "mdss_mdp_rotator.h"

#define CREATE_TRACE_POINTS
#include "mdss_mdp_trace.h"
@@ -1547,6 +1548,11 @@ static int mdss_mdp_probe(struct platform_device *pdev)
		pr_err("unable to register bus scaling\n");
		goto probe_done;
	}
	rc = mdss_mdp_rot_mgr_init();
	if (rc) {
		pr_err("unable to initialize rotation mgr\n");
		goto probe_done;
	}

	rc = mdss_mdp_debug_init(mdata);
	if (rc) {
+544 −319

File changed.

Preview size limit exceeded, changes collapsed.

+3 −3
Original line number Diff line number Diff line
@@ -21,7 +21,6 @@

struct mdss_mdp_rotator_session {
	u32 session_id;
	u32 ref_cnt;
	u32 params_changed;
	int pid;

@@ -36,7 +35,6 @@ struct mdss_mdp_rotator_session {
	u32 dnsc_factor_h;

	u32 bwc_mode;
	struct mdss_mdp_pipe *pipe;

	struct mutex lock;
	u8 busy;
@@ -48,7 +46,6 @@ struct mdss_mdp_rotator_session {
	bool use_sync_pt;
	struct list_head head;
	struct list_head list;
	struct mdss_mdp_rotator_session *next;
	struct msm_sync_pt_data *rot_sync_pt_data;
	struct work_struct commit_work;
};
@@ -92,4 +89,7 @@ struct msm_sync_pt_data *mdss_mdp_rotator_sync_pt_get(
int mdss_mdp_rotator_play(struct msm_fb_data_type *mfd,
			    struct msmfb_overlay_data *req);
int mdss_mdp_rotator_unset(int ndx);

int mdss_mdp_rot_mgr_init(void);

#endif /* MDSS_MDP_ROTATOR_H */