Commit 70a4f5cd authored by Jernej Skrabec's avatar Jernej Skrabec Committed by Mauro Carvalho Chehab

media: cedrus: Add a quirk for not setting DMA offset

H6 VPU doesn't work if DMA offset is set.

Add a quirk for it.
Signed-off-by: default avatarJernej Skrabec <jernej.skrabec@siol.net>
Acked-by: default avatarMaxime Ripard <maxime.ripard@bootlin.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent dfecb7b2
......@@ -28,6 +28,8 @@
#define CEDRUS_CAPABILITY_UNTILED BIT(0)
#define CEDRUS_QUIRK_NO_DMA_OFFSET BIT(0)
enum cedrus_codec {
CEDRUS_CODEC_MPEG2,
......@@ -91,6 +93,7 @@ struct cedrus_dec_ops {
struct cedrus_variant {
unsigned int capabilities;
unsigned int quirks;
};
struct cedrus_dev {
......
......@@ -177,7 +177,8 @@ int cedrus_hw_probe(struct cedrus_dev *dev)
*/
#ifdef PHYS_PFN_OFFSET
dev->dev->dma_pfn_offset = PHYS_PFN_OFFSET;
if (!(variant->quirks & CEDRUS_QUIRK_NO_DMA_OFFSET))
dev->dev->dma_pfn_offset = PHYS_PFN_OFFSET;
#endif
ret = of_reserved_mem_device_init(dev->dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment