[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <eafc2fdb-fd0b-1d60-f7d5-03fe169d43f3@ti.com>
Date: Tue, 27 Sep 2016 11:45:30 +0300
From: Tomi Valkeinen <tomi.valkeinen@...com>
To: Sudip Mukherjee <sudipm.mukherjee@...il.com>,
Jean-Christophe Plagniol-Villard <plagnioj@...osoft.com>
CC: <linux-kernel@...r.kernel.org>, <linux-fbdev@...r.kernel.org>
Subject: Re: [PATCH] matroxfb: fix size of memcpy
On 25/08/16 20:44, Sudip Mukherjee wrote:
> hw->DACreg has a size of 80 bytes and MGADACbpp32 has 21. So when
> memcpy copies MGADACbpp32 to hw->DACreg it copies 80 bytes but
> only 21 bytes are valid.
>
> Signed-off-by: Sudip Mukherjee <sudip.mukherjee@...ethink.co.uk>
> ---
> drivers/video/fbdev/matrox/matroxfb_Ti3026.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/video/fbdev/matrox/matroxfb_Ti3026.c b/drivers/video/fbdev/matrox/matroxfb_Ti3026.c
> index 195ad7c..68fa037 100644
> --- a/drivers/video/fbdev/matrox/matroxfb_Ti3026.c
> +++ b/drivers/video/fbdev/matrox/matroxfb_Ti3026.c
> @@ -372,7 +372,7 @@ static int Ti3026_init(struct matrox_fb_info *minfo, struct my_timming *m)
>
> DBG(__func__)
>
> - memcpy(hw->DACreg, MGADACbpp32, sizeof(hw->DACreg));
> + memcpy(hw->DACreg, MGADACbpp32, sizeof(MGADACbpp32));
> switch (minfo->fbcon.var.bits_per_pixel) {
> case 4: hw->DACreg[POS3026_XLATCHCTRL] = TVP3026_XLATCHCTRL_16_1; /* or _8_1, they are same */
> hw->DACreg[POS3026_XTRUECOLORCTRL] = TVP3026_XTRUECOLORCTRL_PSEUDOCOLOR;
>
Thanks, queued for 4.9.
Tomi
Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)
Powered by blists - more mailing lists