summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomasz Gorochowik <tgorochowik@antmicro.com>2018-05-21 14:56:29 +0200
committerStefan Agner <stefan.agner@toradex.com>2018-05-23 15:05:14 +0200
commit148241e839644f6af83a3e677e1350ce50ce27e9 (patch)
tree216e4072e119d448b2f0b1f5c376ab9c5bc7d9ab
parent35711c32b6947d880f94bc5467acc842c0b3e96c (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.
-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 0f0636241405..a7d7c5660293 100644
--- a/drivers/media/platform/imx8/mxc-isi-hw.c
+++ b/drivers/media/platform/imx8/mxc-isi-hw.c
@@ -359,7 +359,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;
return;