]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
media: zoran: device support only 32bit DMA address
authorCorentin Labbe <clabbe@baylibre.com>
Fri, 25 Sep 2020 18:30:48 +0000 (20:30 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Thu, 1 Oct 2020 08:00:55 +0000 (10:00 +0200)
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>
drivers/staging/media/zoran/zoran_card.c

index dbdb1c4b051587670cab4d531c2a5eb3c0ca1c3e..0a193283eefc502c49cc8f9e4bff06986e591256 100644 (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) {