media: cedrus: Remove the MBUS quirks
authorMaxime Ripard <maxime@cerno.tech>
Fri, 6 Nov 2020 14:55:05 +0000 (15:55 +0100)
committerMaxime Ripard <maxime@cerno.tech>
Wed, 18 Nov 2020 08:01:31 +0000 (09:01 +0100)
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: Christoph Hellwig <hch@lst.de>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Acked-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/staging/media/sunxi/cedrus/cedrus.c
drivers/staging/media/sunxi/cedrus/cedrus.h
drivers/staging/media/sunxi/cedrus/cedrus_hw.c

index e0e35502e34a375a6a1da54d8ee67e5219be40e7..d5fca10ea5b4cf3eed58aa66e2770e2a32fcc0f4 100644 (file)
@@ -523,7 +523,6 @@ static const struct cedrus_variant sun50i_h5_cedrus_variant = {
 static const struct cedrus_variant sun50i_h6_cedrus_variant = {
        .capabilities   = CEDRUS_CAPABILITY_UNTILED |
                          CEDRUS_CAPABILITY_H265_DEC,
-       .quirks         = CEDRUS_QUIRK_NO_DMA_OFFSET,
        .mod_rate       = 600000000,
 };
 
index 93c843ae14bb98ec25887eeac5a22f01f65d4a06..626090a5811c21b8035cbdf4218ce7d0f8829053 100644 (file)
@@ -29,8 +29,6 @@
 #define CEDRUS_CAPABILITY_UNTILED      BIT(0)
 #define CEDRUS_CAPABILITY_H265_DEC     BIT(1)
 
-#define CEDRUS_QUIRK_NO_DMA_OFFSET     BIT(0)
-
 enum cedrus_codec {
        CEDRUS_CODEC_MPEG2,
        CEDRUS_CODEC_H264,
@@ -150,7 +148,6 @@ struct cedrus_dec_ops {
 
 struct cedrus_variant {
        unsigned int    capabilities;
-       unsigned int    quirks;
        unsigned int    mod_rate;
 };
 
index bcf050a04ffc45015f174130b72036a765176378..286c7fe844c383b3c081c49765b189d35680e9d5 100644 (file)
@@ -222,24 +222,6 @@ int cedrus_hw_probe(struct cedrus_dev *dev)
                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);
        if (ret && ret != -ENODEV) {
                dev_err(dev->dev, "Failed to reserve memory\n");