diff options
author | Oliver Endriss <o.endriss@gmx.de> | 2007-03-13 22:44:57 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-03-27 07:45:56 -0400 |
commit | 7a7cd1920969dd9da4e0d99aab573b3eba24c799 (patch) | |
tree | cfa96369dd710e21d7066bf641eb71e5d380c9cc /include | |
parent | 21b48a70f7e26906d522c81b22228b375b450a8f (diff) |
V4L/DVB (5441): 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.
Thanks-to: Olaf Hering <olaf@aepfle.de>
Acked-by: Michael Hunold <hunold@linuxtv.org>
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/media/saa7146_vv.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/media/saa7146_vv.h b/include/media/saa7146_vv.h index 83fe2e3d1e25..50e33b0e9349 100644 --- a/include/media/saa7146_vv.h +++ b/include/media/saa7146_vv.h | |||
@@ -239,7 +239,8 @@ void saa7146_res_free(struct saa7146_fh *fh, unsigned int bits); | |||
239 | #define SAA7146_HPS_SYNC_PORT_B 0x01 | 239 | #define SAA7146_HPS_SYNC_PORT_B 0x01 |
240 | 240 | ||
241 | /* some memory sizes */ | 241 | /* some memory sizes */ |
242 | #define SAA7146_CLIPPING_MEM (14*PAGE_SIZE) | 242 | /* max. 16 clipping rectangles */ |
243 | #define SAA7146_CLIPPING_MEM (16 * 4 * sizeof(u32)) | ||
243 | 244 | ||
244 | /* some defines for the various clipping-modes */ | 245 | /* some defines for the various clipping-modes */ |
245 | #define SAA7146_CLIPPING_RECT 0x4 | 246 | #define SAA7146_CLIPPING_RECT 0x4 |