Merge branches 'edac-spr', 'edac-igen6' and 'edac-misc' into edac-updates-for-v5.11
[sfrench/cifs-2.6.git] / drivers / gpu / drm / sun4i / sun4i_backend.c
index 77497b45f9a28d25b54860de57bc3b0431286f60..55960cbb101900d3a3760fc6418784d8b5cc2276 100644 (file)
@@ -814,9 +814,15 @@ static int sun4i_backend_bind(struct device *dev, struct device *master,
                 *
                 * XXX(hch): this has no business in a driver and needs to move
                 * to the device tree.
+                *
+                * If we have two subsequent calls to dma_direct_set_offset
+                * returns -EINVAL. Unfortunately, this happens when we have two
+                * backends in the system, and will result in the driver
+                * reporting an error while it has been setup properly before.
+                * Ignore EINVAL, but it should really be removed eventually.
                 */
                ret = dma_direct_set_offset(drm->dev, PHYS_OFFSET, 0, SZ_4G);
-               if (ret)
+               if (ret && ret != -EINVAL)
                        return ret;
        }