msm: mdss: Fix apq8084 compilation failure due to large struct size
Due to overlay struct size increase, the stack size requirement for function is increasing when it is used as local variable. This causes the compilation failure due to fix stack size on APQ8084. This change fixes the issue by using overlay structure from heap instead of stack. Change-Id: I9ca116a8db9c01f488a7cbc85c659827ba3693b3 Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
This commit is contained in:
parent
737b46a4bc
commit
6fada7ee2f
1 changed files with 31 additions and 24 deletions
|
@ -2781,7 +2781,7 @@ static int mdss_mdp_hw_cursor_pipe_update(struct msm_fb_data_type *mfd,
|
||||||
struct mdss_mdp_mixer *mixer;
|
struct mdss_mdp_mixer *mixer;
|
||||||
struct fb_image *img = &cursor->image;
|
struct fb_image *img = &cursor->image;
|
||||||
struct mdss_data_type *mdata = mdss_mdp_get_mdata();
|
struct mdss_data_type *mdata = mdss_mdp_get_mdata();
|
||||||
struct mdp_overlay req;
|
struct mdp_overlay *req = NULL;
|
||||||
struct mdss_rect roi;
|
struct mdss_rect roi;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
u32 xres = mfd->fbi->var.xres;
|
u32 xres = mfd->fbi->var.xres;
|
||||||
|
@ -2879,24 +2879,30 @@ static int mdss_mdp_hw_cursor_pipe_update(struct msm_fb_data_type *mfd,
|
||||||
roi.w = min(xres - start_x, img->width - roi.x);
|
roi.w = min(xres - start_x, img->width - roi.x);
|
||||||
roi.h = min(yres - start_y, img->height - roi.y);
|
roi.h = min(yres - start_y, img->height - roi.y);
|
||||||
|
|
||||||
memset(&req, 0, sizeof(struct mdp_overlay));
|
req = kzalloc(sizeof(struct mdp_overlay), GFP_KERNEL);
|
||||||
req.pipe_type = PIPE_TYPE_CURSOR;
|
if (!req) {
|
||||||
req.z_order = MDSS_MDP_STAGE_6;
|
pr_err("not able to allocate memory for req\n");
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
|
||||||
req.src.width = img->width;
|
req->pipe_type = PIPE_TYPE_CURSOR;
|
||||||
req.src.height = img->height;
|
req->z_order = MDSS_MDP_STAGE_6;
|
||||||
req.src.format = MDP_ARGB_8888;
|
|
||||||
|
|
||||||
mdss_mdp_set_rect(&req.src_rect, roi.x, roi.y, img->width, img->height);
|
req->src.width = img->width;
|
||||||
mdss_mdp_set_rect(&req.dst_rect, start_x, start_y, roi.w, roi.h);
|
req->src.height = img->height;
|
||||||
|
req->src.format = MDP_ARGB_8888;
|
||||||
|
|
||||||
req.bg_color = img->bg_color;
|
mdss_mdp_set_rect(&req->src_rect, roi.x, roi.y, img->width,
|
||||||
req.alpha = (img->fg_color & 0xff000000) >> 24;
|
img->height);
|
||||||
if (req.alpha == 0xff)
|
mdss_mdp_set_rect(&req->dst_rect, start_x, start_y, roi.w, roi.h);
|
||||||
req.blend_op = BLEND_OP_OPAQUE;
|
|
||||||
|
req->bg_color = img->bg_color;
|
||||||
|
req->alpha = (img->fg_color & 0xff000000) >> 24;
|
||||||
|
if (req->alpha == 0xff)
|
||||||
|
req->blend_op = BLEND_OP_OPAQUE;
|
||||||
else
|
else
|
||||||
req.blend_op = BLEND_OP_COVERAGE;
|
req->blend_op = BLEND_OP_COVERAGE;
|
||||||
req.transp_mask = (img->bg_color & 0xffffff);
|
req->transp_mask = (img->bg_color & 0xffffff);
|
||||||
|
|
||||||
if (mfd->cursor_buf && (cursor->set & FB_CUR_SETIMAGE)) {
|
if (mfd->cursor_buf && (cursor->set & FB_CUR_SETIMAGE)) {
|
||||||
u32 cursor_addr;
|
u32 cursor_addr;
|
||||||
|
@ -2925,29 +2931,30 @@ static int mdss_mdp_hw_cursor_pipe_update(struct msm_fb_data_type *mfd,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (start_x + roi.w <= left_lm_w) {
|
if (start_x + roi.w <= left_lm_w) {
|
||||||
ret = mdss_mdp_cursor_pipe_setup(mfd, &req, CURSOR_PIPE_LEFT);
|
ret = mdss_mdp_cursor_pipe_setup(mfd, req, CURSOR_PIPE_LEFT);
|
||||||
mdss_mdp_curor_pipe_cleanup(mfd, CURSOR_PIPE_RIGHT);
|
mdss_mdp_curor_pipe_cleanup(mfd, CURSOR_PIPE_RIGHT);
|
||||||
} else if (start_x >= left_lm_w) {
|
} else if (start_x >= left_lm_w) {
|
||||||
ret = mdss_mdp_cursor_pipe_setup(mfd, &req, CURSOR_PIPE_RIGHT);
|
ret = mdss_mdp_cursor_pipe_setup(mfd, req, CURSOR_PIPE_RIGHT);
|
||||||
mdss_mdp_curor_pipe_cleanup(mfd, CURSOR_PIPE_LEFT);
|
mdss_mdp_curor_pipe_cleanup(mfd, CURSOR_PIPE_LEFT);
|
||||||
} else {
|
} else {
|
||||||
mdss_mdp_set_rect(&req.dst_rect, start_x, start_y,
|
mdss_mdp_set_rect(&req->dst_rect, start_x, start_y,
|
||||||
(left_lm_w - start_x), roi.h);
|
(left_lm_w - start_x), roi.h);
|
||||||
mdss_mdp_set_rect(&req.src_rect, 0, 0, (left_lm_w -
|
mdss_mdp_set_rect(&req->src_rect, 0, 0, (left_lm_w -
|
||||||
start_x), img->height);
|
start_x), img->height);
|
||||||
ret = mdss_mdp_cursor_pipe_setup(mfd, &req, CURSOR_PIPE_LEFT);
|
ret = mdss_mdp_cursor_pipe_setup(mfd, req, CURSOR_PIPE_LEFT);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto done;
|
goto done;
|
||||||
|
|
||||||
mdss_mdp_set_rect(&req.dst_rect, left_lm_w, start_y, ((start_x +
|
mdss_mdp_set_rect(&req->dst_rect, left_lm_w, start_y,
|
||||||
roi.w) - left_lm_w), roi.h);
|
((start_x + roi.w) - left_lm_w), roi.h);
|
||||||
mdss_mdp_set_rect(&req.src_rect, (left_lm_w - start_x), 0,
|
mdss_mdp_set_rect(&req->src_rect, (left_lm_w - start_x), 0,
|
||||||
(img->width - (left_lm_w - start_x)),
|
(img->width - (left_lm_w - start_x)),
|
||||||
img->height);
|
img->height);
|
||||||
ret = mdss_mdp_cursor_pipe_setup(mfd, &req, CURSOR_PIPE_RIGHT);
|
ret = mdss_mdp_cursor_pipe_setup(mfd, req, CURSOR_PIPE_RIGHT);
|
||||||
}
|
}
|
||||||
|
|
||||||
done:
|
done:
|
||||||
|
kfree(req);
|
||||||
mutex_unlock(&mdp5_data->ov_lock);
|
mutex_unlock(&mdp5_data->ov_lock);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue