lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190917071442.24986-1-robin@protonic.nl>
Date:   Tue, 17 Sep 2019 09:14:42 +0200
From:   Robin van der Gracht <robin@...tonic.nl>
To:     Mauro Carvalho Chehab <mchehab@...nel.org>
Cc:     linux-media@...r.kernel.org, linux-kernel@...r.kernel.org,
        Marco Felsch <m.felsch@...gutronix.de>,
        Philipp Zabel <p.zabel@...gutronix.de>,
        Andreas Pretzsch <apr@...eng.de>,
        Robin van der Gracht <robin@...tonic.nl>
Subject: [PATCH] media: i2c: tvp5150: Fix horizontal crop stop boundry

The value for AVID stop is relative to the width of the active video area,
not the maximum register value. Zero means equal and a negative value means
we're cropping on the right side.

Signed-off-by: Robin van der Gracht <robin@...tonic.nl>
---
 drivers/media/i2c/tvp5150.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/i2c/tvp5150.c b/drivers/media/i2c/tvp5150.c
index f47cb9a023fb..6bc65ab5e8ab 100644
--- a/drivers/media/i2c/tvp5150.c
+++ b/drivers/media/i2c/tvp5150.c
@@ -1231,10 +1231,10 @@ __tvp5150_set_selection(struct v4l2_subdev *sd, struct v4l2_rect rect)
 	regmap_write(decoder->regmap, TVP5150_ACT_VD_CROP_ST_LSB,
 		     rect.left | (1 << TVP5150_CROP_SHIFT));
 	regmap_write(decoder->regmap, TVP5150_ACT_VD_CROP_STP_MSB,
-		     (rect.left + rect.width - TVP5150_MAX_CROP_LEFT) >>
+		     (rect.left + rect.width - TVP5150_H_MAX) >>
 		     TVP5150_CROP_SHIFT);
 	regmap_write(decoder->regmap, TVP5150_ACT_VD_CROP_STP_LSB,
-		     rect.left + rect.width - TVP5150_MAX_CROP_LEFT);
+		     rect.left + rect.width - TVP5150_H_MAX);
 }
 
 static int tvp5150_set_selection(struct v4l2_subdev *sd,
-- 
2.20.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ