public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/2] solo6x10: Set FRAME_BUF_SIZE to 200KB
@ 2016-05-04 16:21 Ismael Luceno
  2016-05-04 16:21 ` [PATCH v2 2/2] solo6x10: Simplify solo_enum_ext_input Ismael Luceno
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Ismael Luceno @ 2016-05-04 16:21 UTC (permalink / raw)
  To: linux-media; +Cc: Hans Verkuil, Andrey Utkin, Ismael Luceno

From: Andrey Utkin <andrey.utkin@corp.bluecherry.net>

Such frame size is met in practice. Also report oversized frames.

[ismael: Reworked warning and commit message]

Signed-off-by: Ismael Luceno <ismael@iodev.co.uk>
---
 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c b/drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c
index 67a14c4..f98017b 100644
--- a/drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c
+++ b/drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c
@@ -33,7 +33,7 @@
 #include "solo6x10-jpeg.h"
 
 #define MIN_VID_BUFFERS		2
-#define FRAME_BUF_SIZE		(196 * 1024)
+#define FRAME_BUF_SIZE		(200 * 1024)
 #define MP4_QS			16
 #define DMA_ALIGN		4096
 
@@ -323,8 +323,11 @@ static int solo_send_desc(struct solo_enc_dev *solo_enc, int skip,
 	int i;
 	int ret;
 
-	if (WARN_ON_ONCE(size > FRAME_BUF_SIZE))
+	if (WARN_ON_ONCE(size > FRAME_BUF_SIZE)) {
+		dev_warn(&solo_dev->pdev->dev,
+			 "oversized frame (%d bytes)\n", size);
 		return -EINVAL;
+	}
 
 	solo_enc->desc_count = 1;
 
-- 
2.8.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-06-28 11:58 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-04 16:21 [PATCH v2 1/2] solo6x10: Set FRAME_BUF_SIZE to 200KB Ismael Luceno
2016-05-04 16:21 ` [PATCH v2 2/2] solo6x10: Simplify solo_enum_ext_input Ismael Luceno
2016-05-04 21:14 ` [PATCH v2 1/2] solo6x10: Set FRAME_BUF_SIZE to 200KB Andrey Utkin
2016-05-04 23:24   ` Ismael Luceno
2016-06-27  9:12 ` Hans Verkuil
2016-06-28 11:48   ` Andrey Utkin
2016-06-28 11:58     ` Hans Verkuil

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox