diff options
author | Tomasz Gorochowik <tgorochowik@antmicro.com> | 2018-05-21 14:56:29 +0200 |
---|---|---|
committer | Max Krummenacher <max.krummenacher@toradex.com> | 2018-10-11 19:40:26 +0200 |
commit | 3ab199d9b1b3d0c94d89c2c1c5b2c5749d4bc476 (patch) | |
tree | 632a3212084279340f7f0fb79e238d3c999d4680 | |
parent | 7fb7e36bfc525da2d3834e303db3230b395f35ba (diff) |
imx8: isi: Disable scaling when not needed
The issue is that once the scaling was enabled, then the stream was
disabled and enabled again with a resolution that does not need scaling,
the actual scaling was never disabled in the ISI block. This made ISI
stream the scaled down with a large black padding.
(cherry picked from commit 148241e839644f6af83a3e677e1350ce50ce27e9)
(cherry picked from commit 13bef5c8fde55bf12be73ed05391427d393bb71c)
-rw-r--r-- | drivers/media/platform/imx8/mxc-isi-hw.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/media/platform/imx8/mxc-isi-hw.c b/drivers/media/platform/imx8/mxc-isi-hw.c index 18750776a94f..78de12387774 100644 --- a/drivers/media/platform/imx8/mxc-isi-hw.c +++ b/drivers/media/platform/imx8/mxc-isi-hw.c @@ -397,7 +397,9 @@ void mxc_isi_channel_set_scaling(struct mxc_isi_dev *mxc_isi) u32 xdec = 0, ydec = 0; u32 val0, val1; - if (dst_f->height == src_f->height || + if (mxc_isi->scale == 1) { + mxc_isi->scale = 0; + } else if (dst_f->height == src_f->height || dst_f->width == src_f->width) { mxc_isi->scale = 0; dev_dbg(&mxc_isi->pdev->dev, "%s: no scale\n", __func__); |