msm: mdss: rotator: return dst format for request match optimization
As per current implementation, every successful OVERLAY_SET IOCTL should return destination format for that request. Now there is a driver based optimization where if back to back OVERLAY_SET IOCTLs request same configurations then driver avoids extra register writes. However this optimization doesn't return correct destination format which violates the IOCTL spec and may result in inefficiencies. Fix this by returning correct destination format for this optimization. Change-Id: I792e2f44f17bceb1efc7b1d389db84478581c474 Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
This commit is contained in:
parent
52de12b7ca
commit
9bb028df1e
1 changed files with 12 additions and 2 deletions
|
@ -811,10 +811,11 @@ static int mdss_mdp_rotator_config(struct msm_fb_data_type *mfd,
|
||||||
if (rot->flags & MDP_ROT_90)
|
if (rot->flags & MDP_ROT_90)
|
||||||
swap(rot->dst.w, rot->dst.h);
|
swap(rot->dst.w, rot->dst.h);
|
||||||
|
|
||||||
|
rot->req_data = *req;
|
||||||
|
|
||||||
req->src.format = mdss_mdp_get_rotator_dst_format(req->src.format,
|
req->src.format = mdss_mdp_get_rotator_dst_format(req->src.format,
|
||||||
req->flags & MDP_ROT_90, req->flags & MDP_BWC_EN);
|
req->flags & MDP_ROT_90, req->flags & MDP_BWC_EN);
|
||||||
|
|
||||||
rot->req_data = *req;
|
|
||||||
rot->params_changed++;
|
rot->params_changed++;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -896,8 +897,17 @@ static int mdss_mdp_rotator_config_ex(struct msm_fb_data_type *mfd,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* if session hasn't changed, skip reconfiguration */
|
/* if session hasn't changed, skip reconfiguration */
|
||||||
if (!memcmp(req, &rot->req_data, sizeof(*req)))
|
if (!memcmp(req, &rot->req_data, sizeof(*req))) {
|
||||||
|
/*
|
||||||
|
* as per the IOCTL spec, every successful rotator setup
|
||||||
|
* needs to return corresponding destination format.
|
||||||
|
*/
|
||||||
|
req->src.format = mdss_mdp_get_rotator_dst_format(
|
||||||
|
req->src.format, req->flags & MDP_ROT_90,
|
||||||
|
req->flags & MDP_BWC_EN);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
flush_work(&rot->commit_work);
|
flush_work(&rot->commit_work);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue