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

Commit c3d96a66 authored by Ingrid Gallardo's avatar Ingrid Gallardo Committed by Gerrit - the friendly Code Review server
Browse files

msm: mdss: reduce rotator fps for high resolution



For 4k video playback, video only expects to decode
at 30fps for current target. This means that
rotator is only expected to run at 30fps for 4k
resolutions, this change considers this for the
rotator bandwidth calculation in order to optimize
the bandwith vote.

Change-Id: I416a5f2bda00bdd962fa7d26fba2ed19f4247d81
Signed-off-by: default avatarIngrid Gallardo <ingridg@codeaurora.org>
parent 7ec67867
Loading
Loading
Loading
Loading
+15 −2
Original line number Diff line number Diff line
@@ -495,6 +495,20 @@ static inline u32 get_panel_xres(struct mdss_panel_info *pinfo)
	return xres;
}

static u32 mdss_mdp_get_rotator_fps(struct mdss_mdp_pipe *pipe)
{
	struct mdss_data_type *mdata = mdss_mdp_get_mdata();
	u32 fps = DEFAULT_FRAME_RATE;

	if (mdata->traffic_shaper_en)
		fps = DEFAULT_ROTATOR_FRAME_RATE;

	if (pipe->src.w >= 3840 || pipe->src.h >= 3840)
		fps = ROTATOR_LOW_FRAME_RATE;

	return fps;
}

/**
 * mdss_mdp_perf_calc_pipe() - calculate performance numbers required by pipe
 * @pipe:	Source pipe struct containing updated pipe params
@@ -540,8 +554,7 @@ int mdss_mdp_perf_calc_pipe(struct mdss_mdp_pipe *pipe,
	src = pipe->src;

	if (mixer->rotator_mode) {
		if (mdata->traffic_shaper_en)
			fps = DEFAULT_ROTATOR_FRAME_RATE;
		fps = mdss_mdp_get_rotator_fps(pipe);
	} else if (mixer->type != MDSS_MDP_MIXER_TYPE_WRITEBACK) {
		struct mdss_panel_info *pinfo;

+1 −0
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@ struct panel_id {

#define DEFAULT_FRAME_RATE	60
#define DEFAULT_ROTATOR_FRAME_RATE 120
#define ROTATOR_LOW_FRAME_RATE 30
#define MDSS_DSI_RST_SEQ_LEN	10
#define MDSS_MDP_MAX_FETCH 12