Skip to content

Commit cdf117d

Browse files
committed
Merge tag 'drm/sun4i-dma-fix-pull-request' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/mripard/linux into drm-misc-fixes
Fix for drm/sun4i shared with arm-soc This patch is a preliminary fix that will conflict with subsequent work merged through arm-soc. Signed-off-by: Maxime Ripard <maxime@cerno.tech> # gpg: Signature made Wed 18 Nov 2020 09:51:53 AM CET # gpg: using EDDSA key 5C1337A45ECA9AEB89060E9EE3EF0D6F671851C5 # gpg: Good signature from "Maxime Ripard <maxime.ripard@anandra.org>" [unknown] # gpg: aka "Maxime Ripard <mripard@kernel.org>" [unknown] # gpg: aka "Maxime Ripard (Work Address) <maxime.ripard@bootlin.com>" [unknown] # gpg: aka "Maxime Ripard (Work Address) <maxime@bootlin.com>" [unknown] # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: BE56 75C3 7E81 8C8B 5764 241C 254B CFC5 6BF6 CE8D # Subkey fingerprint: 5C13 37A4 5ECA 9AEB 8906 0E9E E3EF 0D6F 6718 51C5 From: Maxime Ripard <maxime@cerno.tech> Link: https://patchwork.freedesktop.org/patch/msgid/20201118090455.sznrgpduuytlc22k@gilmour.lan
2 parents 6654b57 + 957a1ea commit cdf117d

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

drivers/gpu/drm/sun4i/sun4i_backend.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -814,9 +814,15 @@ static int sun4i_backend_bind(struct device *dev, struct device *master,
814814
*
815815
* XXX(hch): this has no business in a driver and needs to move
816816
* to the device tree.
817+
*
818+
* If we have two subsequent calls to dma_direct_set_offset
819+
* returns -EINVAL. Unfortunately, this happens when we have two
820+
* backends in the system, and will result in the driver
821+
* reporting an error while it has been setup properly before.
822+
* Ignore EINVAL, but it should really be removed eventually.
817823
*/
818824
ret = dma_direct_set_offset(drm->dev, PHYS_OFFSET, 0, SZ_4G);
819-
if (ret)
825+
if (ret && ret != -EINVAL)
820826
return ret;
821827
}
822828

0 commit comments

Comments
 (0)