aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorOliver Endriss <o.endriss@gmx.de>2007-04-13 21:23:49 +0200
committerAdrian Bunk <bunk@stusta.de>2007-04-13 22:58:25 +0200
commit2d51ccdd501e620b3c323f4df3f07a6e5d03ea6d (patch)
treed2131a9838ca1c5fd5b152d89f0b6be089749401 /include
parent9c38858ad17d961762deb032d7e9737589cae3a2 (diff)
V4L: saa7146: Fix allocation of clipping memory
Olaf Hering pointed out that SAA7146_CLIPPING_MEM would become very large for PAGE_SIZE > 4K. In fact, the number of clipping windows is limited to 16, and calculate_clipping_registers_rect() does not use more than 256 bytes. SAA7146_CLIPPING_MEM adjusted accordingly. (cherry picked from commit 7a7cd1920969dd9da4e0d99aab573b3eba24c799) Thanks-to: Olaf Hering <olaf@aepfle.de> Signed-off-by: Oliver Endriss <o.endriss@gmx.de> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Adrian Bunk <bunk@stusta.de>
Diffstat (limited to 'include')
-rw-r--r--include/media/saa7146_vv.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/media/saa7146_vv.h b/include/media/saa7146_vv.h
index e5e749e984e..36486c80d11 100644
--- a/include/media/saa7146_vv.h
+++ b/include/media/saa7146_vv.h
@@ -238,7 +238,8 @@ void saa7146_res_free(struct saa7146_fh *fh, unsigned int bits);
#define SAA7146_HPS_SYNC_PORT_B 0x01
/* some memory sizes */
-#define SAA7146_CLIPPING_MEM (14*PAGE_SIZE)
+/* max. 16 clipping rectangles */
+#define SAA7146_CLIPPING_MEM (16 * 4 * sizeof(u32))
/* some defines for the various clipping-modes */
#define SAA7146_CLIPPING_RECT 0x4