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

Commit 40a1dc71 authored by Jeevan Shriram's avatar Jeevan Shriram
Browse files

mdss: mdp: fix incorrect programming of scalar enable



In use-cases where scaling is required in one direction
and not on other, scalar extension parameter will be set
to update the scale register. Add proper check to this enable
scale bit only in the required direction.

Change-Id: I5527f22c83fe456d0124af12516c5bdb240e80a9
Signed-off-by: default avatarJeevan Shriram <jshriram@codeaurora.org>
parent 6242563c
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -1071,7 +1071,7 @@ static int mdss_mdp_scale_setup(struct mdss_mdp_pipe *pipe)
	    (pipe->pp_res.pp_sts.sharp_sts & PP_STS_ENABLE) ||
	    (pipe->pp_res.pp_sts.sharp_sts & PP_STS_ENABLE) ||
	    (chroma_sample == MDSS_MDP_CHROMA_420) ||
	    (chroma_sample == MDSS_MDP_CHROMA_420) ||
	    (chroma_sample == MDSS_MDP_CHROMA_H1V2) ||
	    (chroma_sample == MDSS_MDP_CHROMA_H1V2) ||
	    pipe->scale.enable_pxl_ext) {
	    (pipe->scale.enable_pxl_ext && (src_h != pipe->dst.h))) {
		pr_debug("scale y - src_h=%d dst_h=%d\n", src_h, pipe->dst.h);
		pr_debug("scale y - src_h=%d dst_h=%d\n", src_h, pipe->dst.h);


		if ((src_h / MAX_DOWNSCALE_RATIO) > pipe->dst.h) {
		if ((src_h / MAX_DOWNSCALE_RATIO) > pipe->dst.h) {
@@ -1127,7 +1127,7 @@ static int mdss_mdp_scale_setup(struct mdss_mdp_pipe *pipe)
	    (pipe->pp_res.pp_sts.sharp_sts & PP_STS_ENABLE) ||
	    (pipe->pp_res.pp_sts.sharp_sts & PP_STS_ENABLE) ||
	    (chroma_sample == MDSS_MDP_CHROMA_420) ||
	    (chroma_sample == MDSS_MDP_CHROMA_420) ||
	    (chroma_sample == MDSS_MDP_CHROMA_H2V1) ||
	    (chroma_sample == MDSS_MDP_CHROMA_H2V1) ||
	    pipe->scale.enable_pxl_ext) {
	    (pipe->scale.enable_pxl_ext && (src_w != pipe->dst.w))) {
		pr_debug("scale x - src_w=%d dst_w=%d\n", src_w, pipe->dst.w);
		pr_debug("scale x - src_w=%d dst_w=%d\n", src_w, pipe->dst.w);


		if ((src_w / MAX_DOWNSCALE_RATIO) > pipe->dst.w) {
		if ((src_w / MAX_DOWNSCALE_RATIO) > pipe->dst.w) {