media: zoran: device support only 32bit DMA address

The zoran device only supports 32bit DMA address.

Signed-off-by: Corentin Labbe <clabbe@baylibre.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
This commit is contained in:
Corentin Labbe 2020-09-25 20:30:48 +02:00 committed by Mauro Carvalho Chehab
parent b8fb0a4740
commit d4ae368922
1 changed files with 6 additions and 0 deletions

View File

@ -1111,6 +1111,12 @@ static int zoran_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
int card_num;
const char *codec_name, *vfe_name;
unsigned int nr;
int err;
err = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
if (err)
return -ENODEV;
vb2_dma_contig_set_max_seg_size(&pdev->dev, DMA_BIT_MASK(32));
nr = zoran_num++;
if (nr >= BUZ_MAX) {