Skip to content

Commit

Permalink
V4L/DVB (5441): Saa7146: Fix allocation of clipping memory
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Oliver Endriss authored and Mauro Carvalho Chehab committed Mar 27, 2007
1 parent 21b48a7 commit 7a7cd19
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/media/saa7146_vv.h
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,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
Expand Down

0 comments on commit 7a7cd19

Please sign in to comment.