summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorTerence Hampson <thampson@codeaurora.org>2015-07-17 17:18:45 -0400
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 20:44:18 -0700
commit44d78c021c2f457d7096c002bcef3cce295f7bb0 (patch)
treebdc71e8b409424d15ac0f12ed8361761f4bd962c /drivers
parent93aeac2ac1a89e1ad28ac9ac0b85b65eeb4dc207 (diff)
msm: mdss: y offset calc based on format micro tile height
Address offset was using hardcoded micro tile height of 8; Micro tile height is not fixed and varies from format to format. Change-Id: Idd033c955997ce56c64861637c60dd8e6f08c61e Signed-off-by: Terence Hampson <thampson@codeaurora.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/video/fbdev/msm/mdss_mdp_util.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/video/fbdev/msm/mdss_mdp_util.c b/drivers/video/fbdev/msm/mdss_mdp_util.c
index bde3f67c2da5..668f19169c02 100644
--- a/drivers/video/fbdev/msm/mdss_mdp_util.c
+++ b/drivers/video/fbdev/msm/mdss_mdp_util.c
@@ -822,7 +822,7 @@ int mdss_mdp_validate_offset_for_ubwc_format(
return -EINVAL;
}
- if (y % (UBWC_META_MACRO_W_H)) {
+ if (y % (micro_h * UBWC_META_MACRO_W_H)) {
pr_err("y=%d does not align with meta height=%d\n", y,
UBWC_META_MACRO_W_H);
return -EINVAL;
@@ -875,7 +875,7 @@ void mdss_mdp_ubwc_data_calc_offset(struct mdss_mdp_data *data, u16 x, u16 y,
goto done;
}
- offset = (y / 8) * ps->ystride[2] +
+ offset = (y / micro_h) * ps->ystride[2] +
((x / micro_w) / UBWC_META_MACRO_W_H) *
UBWC_META_BLOCK_SIZE;
if (offset < data->p[2].len) {
@@ -885,7 +885,7 @@ void mdss_mdp_ubwc_data_calc_offset(struct mdss_mdp_data *data, u16 x, u16 y,
goto done;
}
- offset = ((y / 2) / 8) * ps->ystride[3] +
+ offset = ((y / 2) / micro_h) * ps->ystride[3] +
(((x / 2) / chroma_micro_w) / UBWC_META_MACRO_W_H) *
UBWC_META_BLOCK_SIZE;
if (offset < data->p[3].len) {
@@ -905,7 +905,7 @@ void mdss_mdp_ubwc_data_calc_offset(struct mdss_mdp_data *data, u16 x, u16 y,
goto done;
}
- offset = DIV_ROUND_UP(y, 8) * ps->ystride[2] +
+ offset = DIV_ROUND_UP(y, micro_h) * ps->ystride[2] +
((x / micro_w) / UBWC_META_MACRO_W_H) *
UBWC_META_BLOCK_SIZE;
if (offset < data->p[2].len) {