[PATCH] drm/atomic: do not call ww_acquire_done in drm_atomic_check_only

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch fixes warning case when two more crtc driver are enabled
and two more atomic checking are tried at booting time.

With fbcon, modeset operation is performed at booting time.
In this case, if two mode crtc drivers are enabled, then
drm_atomic_check_only function will be called by restore_fbdev_mode
function - the value of fb_helper->crtc_count is bigger than 1 -
two more times. So that will incur warning by below line
of ww_acquire_done,
	DEBUG_LOCKS_WARN_ON(ctx->done_acquire);
	ctx->done_acquire = 1;

ctx->done_acquire became 1 when drm_mode_set_config_internal for first
crtc driver was called, and then ctx->done_acquire becomes 2
when drm_mode_set_con_internal for second crtc driver was called.

So the function, ww_acqure_done(), should be called at more top function
than at drm_atomic_check_only() to make sure that no one tries to acquire
more locks.

Signed-off-by: Inki Dae <inki.dae@xxxxxxxxxxx>
---
 drivers/gpu/drm/drm_atomic.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c
index 1066e4b..4349154 100644
--- a/drivers/gpu/drm/drm_atomic.c
+++ b/drivers/gpu/drm/drm_atomic.c
@@ -1230,9 +1230,6 @@ int drm_atomic_check_only(struct drm_atomic_state *state)
 		}
 	}
 
-	if (ret == 0)
-		ww_acquire_done(&state->acquire_ctx->ww_ctx);
-
 	return ret;
 }
 EXPORT_SYMBOL(drm_atomic_check_only);
-- 
1.9.1

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux