]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
[media] saa7134: fix page size on some archs
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>
Mon, 22 Jun 2015 19:40:39 +0000 (16:40 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Wed, 24 Jun 2015 11:38:28 +0000 (08:38 -0300)
commit816de50d35743088f18e0da9e03e3347c768b7a2
treedb6380eb1f835941382174287b03468b50e246c9
parent846793b3f926da8224f15c438043f08dd5f11882
[media] saa7134: fix page size on some archs

On some archs, like tile, the PAGE_SIZE is not 4K. In the case
of tile arch, it can be either 16KB or 64KB.

Due to that, a warning is produced:
drivers/media/pci/saa7134/saa7134.h:678:43: warning: large integer implicitly truncated to unsigned type [-Woverflow]

This is actually an error, as it will write trach to the DMA size
registers. The logic at saa7134-ts already does the right thing:

saa_writeb(SAA7134_TS_DMA0, ((dev->ts.nr_packets-1)&0xff));
saa_writeb(SAA7134_TS_DMA1, (((dev->ts.nr_packets-1)>>8)&0xff));
/* TSNOPIT=0, TSCOLAP=0 */
saa_writeb(SAA7134_TS_DMA2,
((((dev->ts.nr_packets-1)>>16)&0x3f) | 0x00));

So, fix the driver to take larger page sizes into account.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/pci/saa7134/saa7134-go7007.c