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

Commit 95d6eb3b authored by Daniel Vetter's avatar Daniel Vetter
Browse files

drm/atomic-helper: debug output for modesets



With the combination of ->enable and ->active it's a bit complicated
to follow what exactly is going on sometimes within a full modeset.
Add debug output to make this all traceable.

Reviewed-by: default avatarThierry Reding <treding@nvidia.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
parent ee0a89cf
Loading
Loading
Loading
Loading
+21 −1
Original line number Original line Diff line number Diff line
@@ -591,6 +591,9 @@ disable_outputs(struct drm_device *dev, struct drm_atomic_state *old_state)


		funcs = encoder->helper_private;
		funcs = encoder->helper_private;


		DRM_DEBUG_KMS("disabling [ENCODER:%d:%s]\n",
			      encoder->base.id, encoder->name);

		/*
		/*
		 * Each encoder has at most one connector (since we always steal
		 * Each encoder has at most one connector (since we always steal
		 * it away), so we won't call call disable hooks twice.
		 * it away), so we won't call call disable hooks twice.
@@ -627,6 +630,10 @@ disable_outputs(struct drm_device *dev, struct drm_atomic_state *old_state)


		funcs = crtc->helper_private;
		funcs = crtc->helper_private;


		DRM_DEBUG_KMS("disabling [CRTC:%d]\n",
			      crtc->base.id);


		/* Right function depends upon target state. */
		/* Right function depends upon target state. */
		if (crtc->state->enable && funcs->prepare)
		if (crtc->state->enable && funcs->prepare)
			funcs->prepare(crtc);
			funcs->prepare(crtc);
@@ -707,9 +714,13 @@ crtc_set_mode(struct drm_device *dev, struct drm_atomic_state *old_state)


		funcs = crtc->helper_private;
		funcs = crtc->helper_private;


		if (crtc->state->enable)
		if (crtc->state->enable) {
			DRM_DEBUG_KMS("modeset on [CRTC:%d]\n",
				      crtc->base.id);

			funcs->mode_set_nofb(crtc);
			funcs->mode_set_nofb(crtc);
		}
		}
	}


	for (i = 0; i < old_state->num_connector; i++) {
	for (i = 0; i < old_state->num_connector; i++) {
		struct drm_connector *connector;
		struct drm_connector *connector;
@@ -732,6 +743,9 @@ crtc_set_mode(struct drm_device *dev, struct drm_atomic_state *old_state)
		if (!new_crtc_state->mode_changed)
		if (!new_crtc_state->mode_changed)
			continue;
			continue;


		DRM_DEBUG_KMS("modeset on [ENCODER:%d:%s]\n",
			      encoder->base.id, encoder->name);

		/*
		/*
		 * Each encoder has at most one connector (since we always steal
		 * Each encoder has at most one connector (since we always steal
		 * it away), so we won't call call mode_set hooks twice.
		 * it away), so we won't call call mode_set hooks twice.
@@ -793,6 +807,9 @@ void drm_atomic_helper_commit_post_planes(struct drm_device *dev,
		funcs = crtc->helper_private;
		funcs = crtc->helper_private;


		if (crtc->state->enable) {
		if (crtc->state->enable) {
			DRM_DEBUG_KMS("enabling [CRTC:%d]\n",
				      crtc->base.id);

			if (funcs->enable)
			if (funcs->enable)
				funcs->enable(crtc);
				funcs->enable(crtc);
			else
			else
@@ -816,6 +833,9 @@ void drm_atomic_helper_commit_post_planes(struct drm_device *dev,
		encoder = connector->state->best_encoder;
		encoder = connector->state->best_encoder;
		funcs = encoder->helper_private;
		funcs = encoder->helper_private;


		DRM_DEBUG_KMS("enabling [ENCODER:%d:%s]\n",
			      encoder->base.id, encoder->name);

		/*
		/*
		 * Each encoder has at most one connector (since we always steal
		 * Each encoder has at most one connector (since we always steal
		 * it away), so we won't call call enable hooks twice.
		 * it away), so we won't call call enable hooks twice.