From 933de45942a18180e67336888bac346cfe619e70 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Fri, 29 Mar 2013 07:20:36 -0300 Subject: [PATCH] --- yaml --- r: 366897 b: refs/heads/master c: 9e7664e0827528701074875eef872f2be1dfaab8 h: refs/heads/master i: 366895: d5fed11c19cae00e9a3a9ac64feadd8d98232fa0 v: v3 --- [refs] | 2 +- trunk/drivers/staging/media/solo6x10/solo6x10-disp.c | 3 ++- trunk/drivers/staging/media/solo6x10/solo6x10.h | 8 +++++++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index bd5d3cddc0b5..1a1d7d39c456 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 4b0cac5e759552a24dbdc940db268601422d5b0a +refs/heads/master: 9e7664e0827528701074875eef872f2be1dfaab8 diff --git a/trunk/drivers/staging/media/solo6x10/solo6x10-disp.c b/trunk/drivers/staging/media/solo6x10/solo6x10-disp.c index 78070c843f90..32d9953bc36e 100644 --- a/trunk/drivers/staging/media/solo6x10/solo6x10-disp.c +++ b/trunk/drivers/staging/media/solo6x10/solo6x10-disp.c @@ -205,10 +205,11 @@ int solo_set_motion_block(struct solo_dev *solo_dev, u8 ch, const struct solo_motion_thresholds *thresholds) { u32 off = SOLO_MOT_FLAG_AREA + ch * SOLO_MOT_THRESH_SIZE * 2; - u16 buf[SOLO_MOTION_SZ]; + u16 buf[64]; int x, y; int ret = 0; + memset(buf, 0, sizeof(buf)); for (y = 0; y < SOLO_MOTION_SZ; y++) { for (x = 0; x < SOLO_MOTION_SZ; x++) buf[x] = cpu_to_le16(thresholds->thresholds[y][x]); diff --git a/trunk/drivers/staging/media/solo6x10/solo6x10.h b/trunk/drivers/staging/media/solo6x10/solo6x10.h index 3526d6b56c5c..6f91d2e34b2a 100644 --- a/trunk/drivers/staging/media/solo6x10/solo6x10.h +++ b/trunk/drivers/staging/media/solo6x10/solo6x10.h @@ -113,8 +113,14 @@ * each sample representing 16x16 pixels of the source. In * effect, 44x30 samples are used for NTSC, and 44x36 for PAL. * The 5th sample on the 10th row is (10*64)+5 = 645. + * + * Using a 64x64 array will result in a problem on some architectures like + * the powerpc where the size of the argument is limited to 13 bits. + * Since both PAL and NTSC do not use the full table anyway I've chosen + * to limit the array to 45x45 (45*16 = 720, which is the maximum PAL/NTSC + * width). */ -#define SOLO_MOTION_SZ (64) +#define SOLO_MOTION_SZ (45) struct solo_motion_thresholds { __u16 thresholds[SOLO_MOTION_SZ][SOLO_MOTION_SZ]; };