Commit c6e95daa authored by Maxime Ripard's avatar Maxime Ripard

media: cedrus: Remove the MBUS quirks

Now that the MBUS quirks are applied by our global notifier, we can
remove them from Cedrus. Since the only quirk was whether or not we had
to apply that DMA quirk, we can also remove the quirks infrastructure.
Suggested-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarMaxime Ripard <maxime@cerno.tech>
Reviewed-by: default avatarChen-Yu Tsai <wens@csie.org>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Acked-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Acked-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent d60ab69b
...@@ -523,7 +523,6 @@ static const struct cedrus_variant sun50i_h5_cedrus_variant = { ...@@ -523,7 +523,6 @@ static const struct cedrus_variant sun50i_h5_cedrus_variant = {
static const struct cedrus_variant sun50i_h6_cedrus_variant = { static const struct cedrus_variant sun50i_h6_cedrus_variant = {
.capabilities = CEDRUS_CAPABILITY_UNTILED | .capabilities = CEDRUS_CAPABILITY_UNTILED |
CEDRUS_CAPABILITY_H265_DEC, CEDRUS_CAPABILITY_H265_DEC,
.quirks = CEDRUS_QUIRK_NO_DMA_OFFSET,
.mod_rate = 600000000, .mod_rate = 600000000,
}; };
......
...@@ -29,8 +29,6 @@ ...@@ -29,8 +29,6 @@
#define CEDRUS_CAPABILITY_UNTILED BIT(0) #define CEDRUS_CAPABILITY_UNTILED BIT(0)
#define CEDRUS_CAPABILITY_H265_DEC BIT(1) #define CEDRUS_CAPABILITY_H265_DEC BIT(1)
#define CEDRUS_QUIRK_NO_DMA_OFFSET BIT(0)
enum cedrus_codec { enum cedrus_codec {
CEDRUS_CODEC_MPEG2, CEDRUS_CODEC_MPEG2,
CEDRUS_CODEC_H264, CEDRUS_CODEC_H264,
...@@ -150,7 +148,6 @@ struct cedrus_dec_ops { ...@@ -150,7 +148,6 @@ struct cedrus_dec_ops {
struct cedrus_variant { struct cedrus_variant {
unsigned int capabilities; unsigned int capabilities;
unsigned int quirks;
unsigned int mod_rate; unsigned int mod_rate;
}; };
......
...@@ -222,24 +222,6 @@ int cedrus_hw_probe(struct cedrus_dev *dev) ...@@ -222,24 +222,6 @@ int cedrus_hw_probe(struct cedrus_dev *dev)
return ret; return ret;
} }
/*
* The VPU is only able to handle bus addresses so we have to subtract
* the RAM offset to the physcal addresses.
*
* This information will eventually be obtained from device-tree.
*
* XXX(hch): this has no business in a driver and needs to move
* to the device tree.
*/
#ifdef PHYS_PFN_OFFSET
if (!(variant->quirks & CEDRUS_QUIRK_NO_DMA_OFFSET)) {
ret = dma_direct_set_offset(dev->dev, PHYS_OFFSET, 0, SZ_4G);
if (ret)
return ret;
}
#endif
ret = of_reserved_mem_device_init(dev->dev); ret = of_reserved_mem_device_init(dev->dev);
if (ret && ret != -ENODEV) { if (ret && ret != -ENODEV) {
dev_err(dev->dev, "Failed to reserve memory\n"); dev_err(dev->dev, "Failed to reserve memory\n");
......
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