Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8ade2b82 authored by Maarten Lankhorst's avatar Maarten Lankhorst Committed by Dave Airlie
Browse files

drm/ast: do not attempt to acquire a reservation while in an interrupt handler



Mutexes should not be acquired in interrupt context. While the trylock
fastpath is arguably safe on all implementations, the slowpath
unlock path definitely isn't.

Signed-off-by: default avatarMaarten Lankhorst <maarten.lankhorst@canonical.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent a06b9a74
Loading
Loading
Loading
Loading
+3 −2
Original line number Original line Diff line number Diff line
@@ -51,7 +51,7 @@ static void ast_dirty_update(struct ast_fbdev *afbdev,
	struct ast_bo *bo;
	struct ast_bo *bo;
	int src_offset, dst_offset;
	int src_offset, dst_offset;
	int bpp = (afbdev->afb.base.bits_per_pixel + 7)/8;
	int bpp = (afbdev->afb.base.bits_per_pixel + 7)/8;
	int ret;
	int ret = -EBUSY;
	bool unmap = false;
	bool unmap = false;
	bool store_for_later = false;
	bool store_for_later = false;
	int x2, y2;
	int x2, y2;
@@ -65,6 +65,7 @@ static void ast_dirty_update(struct ast_fbdev *afbdev,
	 * then the BO is being moved and we should
	 * then the BO is being moved and we should
	 * store up the damage until later.
	 * store up the damage until later.
	 */
	 */
	if (!in_interrupt())
		ret = ast_bo_reserve(bo, true);
		ret = ast_bo_reserve(bo, true);
	if (ret) {
	if (ret) {
		if (ret != -EBUSY)
		if (ret != -EBUSY)