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

Commit 912c8b79 authored by Shivaraj Shetty's avatar Shivaraj Shetty Committed by Ramakant Singh
Browse files

msm: mdss: provide interface to pass BLIT fps for mdp3



On 8909 for PPP bandwidth voting driver will either vote
for 60fps or will reduce it based on some assumptions.
Add interface to send the fps information from userspace
and use the same for bandwidth requirement calculations.

Change-Id: Ic42a512950691c38c48aad12f4f16e623f2f9af1
Signed-off-by: default avatarShivaraj Shetty <shivaraj@codeaurora.org>
parent a9a5b4df
Loading
Loading
Loading
Loading
+15 −2
Original line number Diff line number Diff line
@@ -446,7 +446,8 @@ int mdp3_calc_ppp_res(struct msm_fb_data_type *mfd, struct blit_req_list *lreq)
	u32 dst_read_bw = 0;
	u32 dst_write_bw = 0;
	u64 honest_ppp_ab = 0;
	u32 fps;
	u32 fps = 0;

	ATRACE_BEGIN(__func__);
	lcount = lreq->count;
	if (lcount == 0) {
@@ -466,7 +467,15 @@ int mdp3_calc_ppp_res(struct msm_fb_data_type *mfd, struct blit_req_list *lreq)
	for (i = 0; i < lcount; i++) {
		req = &(lreq->req_list[i]);

		if (req->fps > 0 && req->fps <= panel_info->mipi.frame_rate) {
			if (fps == 0)
				fps = req->fps;
			else
				fps = panel_info->mipi.frame_rate;
		}

		mdp3_get_bpp_info(req->src.format, &bpp);

		src_read_bw = req->src_rect.w * req->src_rect.h *
						bpp.bpp_num / bpp.bpp_den;
		src_read_bw = mdp3_adjust_scale_factor(req,
@@ -482,7 +491,11 @@ int mdp3_calc_ppp_res(struct msm_fb_data_type *mfd, struct blit_req_list *lreq)
						bpp.bpp_num / bpp.bpp_den;
		honest_ppp_ab += (src_read_bw + dst_read_bw + dst_write_bw);
	}

	if (fps != 0)
		honest_ppp_ab = honest_ppp_ab * fps;
	else
		honest_ppp_ab = honest_ppp_ab * panel_info->mipi.frame_rate;

	if (honest_ppp_ab != ppp_res.next_ab) {
		pr_debug("bandwidth vote update for ppp: ab = %llx\n",
+1 −0
Original line number Diff line number Diff line
@@ -301,6 +301,7 @@ struct mdp_blit_req {
	uint32_t flags;
	int sharpening_strength;  /* -127 <--> 127, default 64 */
	uint8_t color_space;
	uint32_t fps;
};

struct mdp_blit_req_list {