summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorTomasz Gorochowik <tgorochowik@antmicro.com>2018-05-21 14:56:29 +0200
committerMax Krummenacher <max.krummenacher@toradex.com>2019-01-30 18:27:52 +0100
commit848d6dd73fd1b263a9baf9046d53bb306d9f6ad5 (patch)
treecbe97984e07c9a98aaf5074c16ddba307cc43530 /drivers
parent343e004b1af1aa2b958836db39ae8516e2deae96 (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) (cherry picked from commit 3ab199d9b1b3d0c94d89c2c1c5b2c5749d4bc476) (cherry picked from commit edfbe38e61e6889afbbdf7a2608e5498619ef4ab)
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/platform/imx8/mxc-isi-hw.c4
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 345735133c73..3194cb98d6fe 100644
--- a/drivers/media/platform/imx8/mxc-isi-hw.c
+++ b/drivers/media/platform/imx8/mxc-isi-hw.c
@@ -444,7 +444,9 @@ void mxc_isi_channel_set_scaling(struct mxc_isi_dev *mxc_isi)
dst_f = &mxc_isi->m2m.dst_f;
}
- 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;
mxc_isi_channel_clear_scaling(mxc_isi);