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

Commit 6822f2bd authored by Ujwal Patel's avatar Ujwal Patel Committed by Gerrit - the friendly Code Review server
Browse files

msm: mdss: propagate pipe priority to user-space



Priority is returned by the driver when overlay is set for the first
time. It indicates the priority of the underlying pipe serving the
overlay. This priority can be used by user-space in source split when
pipes are re-used and shuffled around to reduce fall-backs related
priority restrictions.

Change-Id: Ibfda0280279e7057a1d3494f4e5f68962b26ef4a
Signed-off-by: default avatarUjwal Patel <ujwalp@codeaurora.org>
parent 00ba3b8f
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -2224,6 +2224,7 @@ static int __to_user_mdp_overlay(struct mdp_overlay32 __user *ov32,
	ret |= put_user(ov->transp_mask, &ov32->transp_mask);
	ret |= put_user(ov->flags, &ov32->flags);
	ret |= put_user(ov->id, &ov32->id);
	ret |= put_user(ov->priority, &ov32->priority);
	if (ret)
		return -EFAULT;

@@ -2277,7 +2278,9 @@ static int __from_user_mdp_overlay(struct mdp_overlay *ov,
	    get_user(data, &ov32->flags) ||
	    put_user(data, &ov->flags) ||
	    get_user(data, &ov32->id) ||
	    put_user(data, &ov->id))
	    put_user(data, &ov->id) ||
	    get_user(data, &ov32->priority) ||
	    put_user(data, &ov->priority))
		return -EFAULT;

	if (copy_in_user(&ov->user_data, &ov32->user_data,
+1 −0
Original line number Diff line number Diff line
@@ -356,6 +356,7 @@ struct mdp_overlay32 {
	uint32_t transp_mask;
	uint32_t flags;
	uint32_t id;
	uint8_t priority;
	uint32_t user_data[6];
	uint32_t bg_color;
	uint8_t horz_deci;
+3 −1
Original line number Diff line number Diff line
@@ -699,6 +699,7 @@ static int mdss_mdp_overlay_pipe_setup(struct msm_fb_data_type *mfd,
	pipe->bg_color = req->bg_color;

	req->id = pipe->ndx;
	req->priority = pipe->priority;
	pipe->req_data = *req;

	if (pipe->flags & MDP_OVERLAY_PP_CFG_EN) {
@@ -2537,6 +2538,7 @@ static int __mdss_overlay_map(struct mdp_overlay *ovs,
			if ((ovs[j].dst_rect.x == op_ovs[k].dst_rect.x) &&
			    (ovs[j].z_order == op_ovs[k].z_order)) {
				op_ovs[k].id = ovs[j].id;
				op_ovs[k].priority = ovs[j].priority;
				break;
			}
		}
+6 −0
Original line number Diff line number Diff line
@@ -586,6 +586,11 @@ struct mdp_scale_data {
 *		4: decimation by 16 (drop 15 lines for each line fetched)
 * @overlay_pp_cfg: Overlay post processing configuration, for more information
 *		see struct mdp_overlay_pp_params.
 * @priority:	Priority is returned by the driver when overlay is set for the
 *		first time. It indicates the priority of the underlying pipe
 *		serving the overlay. This priority can be used by user-space
 *		in source split when pipes are re-used and shuffled around to
 *		reduce fallbacks.
 */
struct mdp_overlay {
	struct msmfb_img src;
@@ -598,6 +603,7 @@ struct mdp_overlay {
	uint32_t transp_mask;
	uint32_t flags;
	uint32_t id;
	uint8_t priority;
	uint32_t user_data[6];
	uint32_t bg_color;
	uint8_t horz_deci;