summaryrefslogtreecommitdiff
path: root/drivers/gpu/imx
diff options
context:
space:
mode:
authorYuchou Gan <yuchou.gan@nxp.com>2018-05-11 23:43:21 +0800
committerLeonard Crestez <leonard.crestez@nxp.com>2018-08-24 12:41:33 +0300
commit63f4f27c94db741a649ed81aa4f05ff5a948552e (patch)
tree98d6d89b1b4c64058b86012f186b004e129765da /drivers/gpu/imx
parentf2f5f86ee3eddb3f0aed491cf029142908d761af (diff)
MLK-18283-1 gpu: imx: imx8_dprc: Set prg stride bigger for blit engine
Blit engine need arbitrary crop, but ULC can only lie on block boundary, prg stride should be bigger than (width + align_margin) * bpp / 8 Signed-off-by: Yuchou Gan <yuchou.gan@nxp.com>
Diffstat (limited to 'drivers/gpu/imx')
-rw-r--r--drivers/gpu/imx/imx8_dprc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/imx/imx8_dprc.c b/drivers/gpu/imx/imx8_dprc.c
index 431649f2a77f..7136721a4a76 100644
--- a/drivers/gpu/imx/imx8_dprc.c
+++ b/drivers/gpu/imx/imx8_dprc.c
@@ -372,7 +372,7 @@ void dprc_configure(struct dprc *dprc, unsigned int stream_id,
unsigned int prg_stride = width * info->cpp[0];
unsigned int bpp = 8 * info->cpp[0];
unsigned int preq;
- unsigned int mt_w = 0, mt_h = 0; /* w/h in a micro-tile */
+ unsigned int mt_w = 1, mt_h = 0; /* w/h in a micro-tile */
u32 val;
if (WARN_ON(!dprc))
@@ -583,6 +583,9 @@ void dprc_configure(struct dprc *dprc, unsigned int stream_id,
}
}
+ if (dprc->is_blit_chan && dprc->devtype->has_fixup)
+ prg_stride = (width + (x_offset % mt_w)) * info->cpp[0];
+
prg_configure(dprc->prgs[0], width, height, x_offset, y_offset,
prg_stride, bpp, baddr, format, modifier, start);
if (dprc->use_aux_prg)