All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Revert "drm: convert drm_atomic_uapi.c to new debug helpers"
@ 2020-11-15 15:31 ` Chris Wilson
  0 siblings, 0 replies; 7+ messages in thread
From: Chris Wilson @ 2020-11-15 15:31 UTC (permalink / raw)
  To: dri-devel; +Cc: Daniel Vetter, intel-gfx, Sam Ravnborg, Chris Wilson

Total wipeout in boot!

<7>[    3.739908] i915 0000:00:02.0: [drm:__drm_fb_helper_initial_config_and_unlock] test CRTC 0 primary plane
<7>[    3.739916] i915 0000:00:02.0: [drm:__drm_fb_helper_initial_config_and_unlock] test CRTC 1 primary plane
9] Hardware name: Hewlett-Packard HP Pro 3500 Series/2ABF, BIOS 8.11 10/24/2012
<4>[    3.754904] Workqueue: events_unbound async_run_entry_fn
<4>[    3.754908] RIP: 0010:drm_atomic_set_crtc_for_connector+0xe0/0x120
<4>[    3.754910] Code: 24 28 be 10 00 00 00 48 c7 c2 60 b0 38 82 48 8b 78 18 ff 75 20 8b 85 d8 00 00 00 50 e8 89 45 ff ff 58 31 c0 5a 5b 5d 41 5c c3 <48> 8b 04 25 00 00 00 00 41 8b 4c 24 28 49 89 d9 be 10 00 00 00 4d
<4>[    3.754911] RSP: 0018:ffffc900002bfa48 EFLAGS: 00010246
<4>[    3.754912] RAX: 0000000000000005 RBX: ffff88800ff1a318 RCX: 0000000000000005
<4>[    3.754913] RDX: ffffffff816d04f0 RSI: ffffffff82388e71 RDI: ffff88800fc51038
<4>[    3.754914] RBP: 0000000000000000 R08: ffff88810414dc10 R09: 00000000fffffffe
<4>[    3.754915] R10: 00000000682c1dc7 R11: 0000000024f563d5 R12: ffff88800fc51000
<4>[    3.754916] R13: 0000000000000000 R14: ffff88800ff1a318 R15: ffff88801aab9a00
<4>[    3.754918] FS:  0000000000000000(0000) GS:ffff88811b480000(0000) knlGS:0000000000000000
c9/0x130
<4>[    3.755084]  do_bind_con_driver+0x1e5/0x2d0
<4>[    3.755087]  do_take_over_console+0x10e/0x180
<4>[    3.755089]  do_fbcon_takeover+0x53/0xb0
<4>[    3.755092]  register_framebuffer+0x22d/0x310
<4>[    3.755095]  __drm_fb_helper_initial_config_and_unlock+0x35d/0x530
<4>[    3.755190]  intel_fbdev_initial_config+0xf/0x20 [i915]
<4>[    3.755192]  async_run_entry_fn+0x34/0x160
<4>[    3.755195]  process_one_work+0x270/0x5c0
<4>[    3.755199]  worker_thread+0x37/0x380
<4>[    3.755201]  ? process_one_work+0x5c0/0x5c0
<4>[    3.755203]  kthread+0x146/0x170
<4>[    3.755205]  ? kthread_park+0x80/0x80
<4>[    3.755208]  ret_from_fork+0x22/0x30
<4>[    3.755211] Modules linked in: i915 mei_hdcp x86_pkg_temp_thermal coretemp crct10dif_pclmul crc32_pclmul ghash_clmulni_intel snd_hda_intel snd_intel_dspcfg snd_hda_codec r8169 snd_hwdep snd_hda_core realtek mei_me snd_pcm mei lpc_ich prime_numbers
<4>[    3.755224] CR2: 0000000000000000
<4>[    3.755226] ---[ end trace df071a2078bd01b3 ]---

Fixes: e3aae683e861 ("drm: convert drm_atomic_uapi.c to new debug helpers")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Simon Ser <contact@emersion.fr>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Sam Ravnborg <sam@ravnborg.org>
---
 drivers/gpu/drm/drm_atomic_uapi.c | 113 +++++++++++++-----------------
 1 file changed, 47 insertions(+), 66 deletions(-)

diff --git a/drivers/gpu/drm/drm_atomic_uapi.c b/drivers/gpu/drm/drm_atomic_uapi.c
index 9df7f2a170e3..d26077ed518a 100644
--- a/drivers/gpu/drm/drm_atomic_uapi.c
+++ b/drivers/gpu/drm/drm_atomic_uapi.c
@@ -85,15 +85,13 @@ int drm_atomic_set_mode_for_crtc(struct drm_crtc_state *state,
 
 		drm_mode_copy(&state->mode, mode);
 		state->enable = true;
-		drm_dbg_atomic(crtc->dev,
-			       "Set [MODE:%s] for [CRTC:%d:%s] state %p\n",
-			       mode->name, crtc->base.id, crtc->name, state);
+		DRM_DEBUG_ATOMIC("Set [MODE:%s] for [CRTC:%d:%s] state %p\n",
+				 mode->name, crtc->base.id, crtc->name, state);
 	} else {
 		memset(&state->mode, 0, sizeof(state->mode));
 		state->enable = false;
-		drm_dbg_atomic(crtc->dev,
-			       "Set [NOMODE] for [CRTC:%d:%s] state %p\n",
-			       crtc->base.id, crtc->name, state);
+		DRM_DEBUG_ATOMIC("Set [NOMODE] for [CRTC:%d:%s] state %p\n",
+				 crtc->base.id, crtc->name, state);
 	}
 
 	return 0;
@@ -130,35 +128,31 @@ int drm_atomic_set_mode_prop_for_crtc(struct drm_crtc_state *state,
 		int ret;
 
 		if (blob->length != sizeof(struct drm_mode_modeinfo)) {
-			drm_dbg_atomic(crtc->dev,
-				       "[CRTC:%d:%s] bad mode blob length: %zu\n",
-				       crtc->base.id, crtc->name,
-				       blob->length);
+			DRM_DEBUG_ATOMIC("[CRTC:%d:%s] bad mode blob length: %zu\n",
+					 crtc->base.id, crtc->name,
+					 blob->length);
 			return -EINVAL;
 		}
 
 		ret = drm_mode_convert_umode(crtc->dev,
 					     &state->mode, blob->data);
 		if (ret) {
-			drm_dbg_atomic(crtc->dev,
-				       "[CRTC:%d:%s] invalid mode (ret=%d, status=%s):\n",
-				       crtc->base.id, crtc->name,
-				       ret, drm_get_mode_status_name(state->mode.status));
+			DRM_DEBUG_ATOMIC("[CRTC:%d:%s] invalid mode (ret=%d, status=%s):\n",
+					 crtc->base.id, crtc->name,
+					 ret, drm_get_mode_status_name(state->mode.status));
 			drm_mode_debug_printmodeline(&state->mode);
 			return -EINVAL;
 		}
 
 		state->mode_blob = drm_property_blob_get(blob);
 		state->enable = true;
-		drm_dbg_atomic(crtc->dev,
-			       "Set [MODE:%s] for [CRTC:%d:%s] state %p\n",
-			       state->mode.name, crtc->base.id, crtc->name,
-			       state);
+		DRM_DEBUG_ATOMIC("Set [MODE:%s] for [CRTC:%d:%s] state %p\n",
+				 state->mode.name, crtc->base.id, crtc->name,
+				 state);
 	} else {
 		state->enable = false;
-		drm_dbg_atomic(crtc->dev,
-			       "Set [NOMODE] for [CRTC:%d:%s] state %p\n",
-			       crtc->base.id, crtc->name, state);
+		DRM_DEBUG_ATOMIC("Set [NOMODE] for [CRTC:%d:%s] state %p\n",
+				 crtc->base.id, crtc->name, state);
 	}
 
 	return 0;
@@ -208,14 +202,12 @@ drm_atomic_set_crtc_for_plane(struct drm_plane_state *plane_state,
 	}
 
 	if (crtc)
-		drm_dbg_atomic(plane->dev,
-			       "Link [PLANE:%d:%s] state %p to [CRTC:%d:%s]\n",
-			       plane->base.id, plane->name, plane_state,
-			       crtc->base.id, crtc->name);
+		DRM_DEBUG_ATOMIC("Link [PLANE:%d:%s] state %p to [CRTC:%d:%s]\n",
+				 plane->base.id, plane->name, plane_state,
+				 crtc->base.id, crtc->name);
 	else
-		drm_dbg_atomic(plane->dev,
-			       "Link [PLANE:%d:%s] state %p to [NOCRTC]\n",
-			       plane->base.id, plane->name, plane_state);
+		DRM_DEBUG_ATOMIC("Link [PLANE:%d:%s] state %p to [NOCRTC]\n",
+				 plane->base.id, plane->name, plane_state);
 
 	return 0;
 }
@@ -238,14 +230,12 @@ drm_atomic_set_fb_for_plane(struct drm_plane_state *plane_state,
 	struct drm_plane *plane = plane_state->plane;
 
 	if (fb)
-		drm_dbg_atomic(plane->dev,
-			       "Set [FB:%d] for [PLANE:%d:%s] state %p\n",
-			       fb->base.id, plane->base.id, plane->name,
-			       plane_state);
+		DRM_DEBUG_ATOMIC("Set [FB:%d] for [PLANE:%d:%s] state %p\n",
+				 fb->base.id, plane->base.id, plane->name,
+				 plane_state);
 	else
-		drm_dbg_atomic(plane->dev,
-			       "Set [NOFB] for [PLANE:%d:%s] state %p\n",
-			       plane->base.id, plane->name, plane_state);
+		DRM_DEBUG_ATOMIC("Set [NOFB] for [PLANE:%d:%s] state %p\n",
+				 plane->base.id, plane->name, plane_state);
 
 	drm_framebuffer_assign(&plane_state->fb, fb);
 }
@@ -334,15 +324,13 @@ drm_atomic_set_crtc_for_connector(struct drm_connector_state *conn_state,
 		drm_connector_get(conn_state->connector);
 		conn_state->crtc = crtc;
 
-		drm_dbg_atomic(crtc->dev,
-			       "Link [CONNECTOR:%d:%s] state %p to [CRTC:%d:%s]\n",
-			       connector->base.id, connector->name,
-			       conn_state, crtc->base.id, crtc->name);
+		DRM_DEBUG_ATOMIC("Link [CONNECTOR:%d:%s] state %p to [CRTC:%d:%s]\n",
+				 connector->base.id, connector->name,
+				 conn_state, crtc->base.id, crtc->name);
 	} else {
-		drm_dbg_atomic(crtc->dev,
-			       "Link [CONNECTOR:%d:%s] state %p to [NOCRTC]\n",
-			       connector->base.id, connector->name,
-			       conn_state);
+		DRM_DEBUG_ATOMIC("Link [CONNECTOR:%d:%s] state %p to [NOCRTC]\n",
+				 connector->base.id, connector->name,
+				 conn_state);
 	}
 
 	return 0;
@@ -486,10 +474,9 @@ static int drm_atomic_crtc_set_property(struct drm_crtc *crtc,
 	} else if (crtc->funcs->atomic_set_property) {
 		return crtc->funcs->atomic_set_property(crtc, state, property, val);
 	} else {
-		drm_dbg_atomic(crtc->dev,
-			       "[CRTC:%d:%s] unknown property [PROP:%d:%s]]\n",
-			       crtc->base.id, crtc->name,
-			       property->base.id, property->name);
+		DRM_DEBUG_ATOMIC("[CRTC:%d:%s] unknown property [PROP:%d:%s]]\n",
+				 crtc->base.id, crtc->name,
+				 property->base.id, property->name);
 		return -EINVAL;
 	}
 
@@ -583,9 +570,8 @@ static int drm_atomic_plane_set_property(struct drm_plane *plane,
 		state->pixel_blend_mode = val;
 	} else if (property == plane->rotation_property) {
 		if (!is_power_of_2(val & DRM_MODE_ROTATE_MASK)) {
-			drm_dbg_atomic(plane->dev,
-				       "[PLANE:%d:%s] bad rotation bitmask: 0x%llx\n",
-				       plane->base.id, plane->name, val);
+			DRM_DEBUG_ATOMIC("[PLANE:%d:%s] bad rotation bitmask: 0x%llx\n",
+					 plane->base.id, plane->name, val);
 			return -EINVAL;
 		}
 		state->rotation = val;
@@ -609,10 +595,9 @@ static int drm_atomic_plane_set_property(struct drm_plane *plane,
 		return plane->funcs->atomic_set_property(plane, state,
 				property, val);
 	} else {
-		drm_dbg_atomic(plane->dev,
-			       "[PLANE:%d:%s] unknown property [PROP:%d:%s]]\n",
-			       plane->base.id, plane->name,
-			       property->base.id, property->name);
+		DRM_DEBUG_ATOMIC("[PLANE:%d:%s] unknown property [PROP:%d:%s]]\n",
+				 plane->base.id, plane->name,
+				 property->base.id, property->name);
 		return -EINVAL;
 	}
 
@@ -680,20 +665,17 @@ static int drm_atomic_set_writeback_fb_for_connector(
 		struct drm_framebuffer *fb)
 {
 	int ret;
-	struct drm_connector *conn = conn_state->connector;
 
 	ret = drm_writeback_set_fb(conn_state, fb);
 	if (ret < 0)
 		return ret;
 
 	if (fb)
-		drm_dbg_atomic(conn->dev,
-			       "Set [FB:%d] for connector state %p\n",
-			       fb->base.id, conn_state);
+		DRM_DEBUG_ATOMIC("Set [FB:%d] for connector state %p\n",
+				 fb->base.id, conn_state);
 	else
-		drm_dbg_atomic(conn->dev,
-			       "Set [NOFB] for connector state %p\n",
-			       conn_state);
+		DRM_DEBUG_ATOMIC("Set [NOFB] for connector state %p\n",
+				 conn_state);
 
 	return 0;
 }
@@ -800,10 +782,9 @@ static int drm_atomic_connector_set_property(struct drm_connector *connector,
 		return connector->funcs->atomic_set_property(connector,
 				state, property, val);
 	} else {
-		drm_dbg_atomic(connector->dev,
-			       "[CONNECTOR:%d:%s] unknown property [PROP:%d:%s]]\n",
-			       connector->base.id, connector->name,
-			       property->base.id, property->name);
+		DRM_DEBUG_ATOMIC("[CONNECTOR:%d:%s] unknown property [PROP:%d:%s]]\n",
+				 connector->base.id, connector->name,
+				 property->base.id, property->name);
 		return -EINVAL;
 	}
 
@@ -1301,7 +1282,7 @@ static void complete_signaling(struct drm_device *dev,
 		/* If this fails log error to the user */
 		if (fence_state[i].out_fence_ptr &&
 		    put_user(-1, fence_state[i].out_fence_ptr))
-			drm_dbg_atomic(dev, "Couldn't clear out_fence_ptr\n");
+			DRM_DEBUG_ATOMIC("Couldn't clear out_fence_ptr\n");
 	}
 
 	kfree(fence_state);
-- 
2.20.1

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

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [Intel-gfx] [PATCH] Revert "drm: convert drm_atomic_uapi.c to new debug helpers"
@ 2020-11-15 15:31 ` Chris Wilson
  0 siblings, 0 replies; 7+ messages in thread
From: Chris Wilson @ 2020-11-15 15:31 UTC (permalink / raw)
  To: dri-devel; +Cc: Daniel Vetter, Simon Ser, intel-gfx, Sam Ravnborg, Chris Wilson

Total wipeout in boot!

<7>[    3.739908] i915 0000:00:02.0: [drm:__drm_fb_helper_initial_config_and_unlock] test CRTC 0 primary plane
<7>[    3.739916] i915 0000:00:02.0: [drm:__drm_fb_helper_initial_config_and_unlock] test CRTC 1 primary plane
9] Hardware name: Hewlett-Packard HP Pro 3500 Series/2ABF, BIOS 8.11 10/24/2012
<4>[    3.754904] Workqueue: events_unbound async_run_entry_fn
<4>[    3.754908] RIP: 0010:drm_atomic_set_crtc_for_connector+0xe0/0x120
<4>[    3.754910] Code: 24 28 be 10 00 00 00 48 c7 c2 60 b0 38 82 48 8b 78 18 ff 75 20 8b 85 d8 00 00 00 50 e8 89 45 ff ff 58 31 c0 5a 5b 5d 41 5c c3 <48> 8b 04 25 00 00 00 00 41 8b 4c 24 28 49 89 d9 be 10 00 00 00 4d
<4>[    3.754911] RSP: 0018:ffffc900002bfa48 EFLAGS: 00010246
<4>[    3.754912] RAX: 0000000000000005 RBX: ffff88800ff1a318 RCX: 0000000000000005
<4>[    3.754913] RDX: ffffffff816d04f0 RSI: ffffffff82388e71 RDI: ffff88800fc51038
<4>[    3.754914] RBP: 0000000000000000 R08: ffff88810414dc10 R09: 00000000fffffffe
<4>[    3.754915] R10: 00000000682c1dc7 R11: 0000000024f563d5 R12: ffff88800fc51000
<4>[    3.754916] R13: 0000000000000000 R14: ffff88800ff1a318 R15: ffff88801aab9a00
<4>[    3.754918] FS:  0000000000000000(0000) GS:ffff88811b480000(0000) knlGS:0000000000000000
c9/0x130
<4>[    3.755084]  do_bind_con_driver+0x1e5/0x2d0
<4>[    3.755087]  do_take_over_console+0x10e/0x180
<4>[    3.755089]  do_fbcon_takeover+0x53/0xb0
<4>[    3.755092]  register_framebuffer+0x22d/0x310
<4>[    3.755095]  __drm_fb_helper_initial_config_and_unlock+0x35d/0x530
<4>[    3.755190]  intel_fbdev_initial_config+0xf/0x20 [i915]
<4>[    3.755192]  async_run_entry_fn+0x34/0x160
<4>[    3.755195]  process_one_work+0x270/0x5c0
<4>[    3.755199]  worker_thread+0x37/0x380
<4>[    3.755201]  ? process_one_work+0x5c0/0x5c0
<4>[    3.755203]  kthread+0x146/0x170
<4>[    3.755205]  ? kthread_park+0x80/0x80
<4>[    3.755208]  ret_from_fork+0x22/0x30
<4>[    3.755211] Modules linked in: i915 mei_hdcp x86_pkg_temp_thermal coretemp crct10dif_pclmul crc32_pclmul ghash_clmulni_intel snd_hda_intel snd_intel_dspcfg snd_hda_codec r8169 snd_hwdep snd_hda_core realtek mei_me snd_pcm mei lpc_ich prime_numbers
<4>[    3.755224] CR2: 0000000000000000
<4>[    3.755226] ---[ end trace df071a2078bd01b3 ]---

Fixes: e3aae683e861 ("drm: convert drm_atomic_uapi.c to new debug helpers")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Simon Ser <contact@emersion.fr>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Sam Ravnborg <sam@ravnborg.org>
---
 drivers/gpu/drm/drm_atomic_uapi.c | 113 +++++++++++++-----------------
 1 file changed, 47 insertions(+), 66 deletions(-)

diff --git a/drivers/gpu/drm/drm_atomic_uapi.c b/drivers/gpu/drm/drm_atomic_uapi.c
index 9df7f2a170e3..d26077ed518a 100644
--- a/drivers/gpu/drm/drm_atomic_uapi.c
+++ b/drivers/gpu/drm/drm_atomic_uapi.c
@@ -85,15 +85,13 @@ int drm_atomic_set_mode_for_crtc(struct drm_crtc_state *state,
 
 		drm_mode_copy(&state->mode, mode);
 		state->enable = true;
-		drm_dbg_atomic(crtc->dev,
-			       "Set [MODE:%s] for [CRTC:%d:%s] state %p\n",
-			       mode->name, crtc->base.id, crtc->name, state);
+		DRM_DEBUG_ATOMIC("Set [MODE:%s] for [CRTC:%d:%s] state %p\n",
+				 mode->name, crtc->base.id, crtc->name, state);
 	} else {
 		memset(&state->mode, 0, sizeof(state->mode));
 		state->enable = false;
-		drm_dbg_atomic(crtc->dev,
-			       "Set [NOMODE] for [CRTC:%d:%s] state %p\n",
-			       crtc->base.id, crtc->name, state);
+		DRM_DEBUG_ATOMIC("Set [NOMODE] for [CRTC:%d:%s] state %p\n",
+				 crtc->base.id, crtc->name, state);
 	}
 
 	return 0;
@@ -130,35 +128,31 @@ int drm_atomic_set_mode_prop_for_crtc(struct drm_crtc_state *state,
 		int ret;
 
 		if (blob->length != sizeof(struct drm_mode_modeinfo)) {
-			drm_dbg_atomic(crtc->dev,
-				       "[CRTC:%d:%s] bad mode blob length: %zu\n",
-				       crtc->base.id, crtc->name,
-				       blob->length);
+			DRM_DEBUG_ATOMIC("[CRTC:%d:%s] bad mode blob length: %zu\n",
+					 crtc->base.id, crtc->name,
+					 blob->length);
 			return -EINVAL;
 		}
 
 		ret = drm_mode_convert_umode(crtc->dev,
 					     &state->mode, blob->data);
 		if (ret) {
-			drm_dbg_atomic(crtc->dev,
-				       "[CRTC:%d:%s] invalid mode (ret=%d, status=%s):\n",
-				       crtc->base.id, crtc->name,
-				       ret, drm_get_mode_status_name(state->mode.status));
+			DRM_DEBUG_ATOMIC("[CRTC:%d:%s] invalid mode (ret=%d, status=%s):\n",
+					 crtc->base.id, crtc->name,
+					 ret, drm_get_mode_status_name(state->mode.status));
 			drm_mode_debug_printmodeline(&state->mode);
 			return -EINVAL;
 		}
 
 		state->mode_blob = drm_property_blob_get(blob);
 		state->enable = true;
-		drm_dbg_atomic(crtc->dev,
-			       "Set [MODE:%s] for [CRTC:%d:%s] state %p\n",
-			       state->mode.name, crtc->base.id, crtc->name,
-			       state);
+		DRM_DEBUG_ATOMIC("Set [MODE:%s] for [CRTC:%d:%s] state %p\n",
+				 state->mode.name, crtc->base.id, crtc->name,
+				 state);
 	} else {
 		state->enable = false;
-		drm_dbg_atomic(crtc->dev,
-			       "Set [NOMODE] for [CRTC:%d:%s] state %p\n",
-			       crtc->base.id, crtc->name, state);
+		DRM_DEBUG_ATOMIC("Set [NOMODE] for [CRTC:%d:%s] state %p\n",
+				 crtc->base.id, crtc->name, state);
 	}
 
 	return 0;
@@ -208,14 +202,12 @@ drm_atomic_set_crtc_for_plane(struct drm_plane_state *plane_state,
 	}
 
 	if (crtc)
-		drm_dbg_atomic(plane->dev,
-			       "Link [PLANE:%d:%s] state %p to [CRTC:%d:%s]\n",
-			       plane->base.id, plane->name, plane_state,
-			       crtc->base.id, crtc->name);
+		DRM_DEBUG_ATOMIC("Link [PLANE:%d:%s] state %p to [CRTC:%d:%s]\n",
+				 plane->base.id, plane->name, plane_state,
+				 crtc->base.id, crtc->name);
 	else
-		drm_dbg_atomic(plane->dev,
-			       "Link [PLANE:%d:%s] state %p to [NOCRTC]\n",
-			       plane->base.id, plane->name, plane_state);
+		DRM_DEBUG_ATOMIC("Link [PLANE:%d:%s] state %p to [NOCRTC]\n",
+				 plane->base.id, plane->name, plane_state);
 
 	return 0;
 }
@@ -238,14 +230,12 @@ drm_atomic_set_fb_for_plane(struct drm_plane_state *plane_state,
 	struct drm_plane *plane = plane_state->plane;
 
 	if (fb)
-		drm_dbg_atomic(plane->dev,
-			       "Set [FB:%d] for [PLANE:%d:%s] state %p\n",
-			       fb->base.id, plane->base.id, plane->name,
-			       plane_state);
+		DRM_DEBUG_ATOMIC("Set [FB:%d] for [PLANE:%d:%s] state %p\n",
+				 fb->base.id, plane->base.id, plane->name,
+				 plane_state);
 	else
-		drm_dbg_atomic(plane->dev,
-			       "Set [NOFB] for [PLANE:%d:%s] state %p\n",
-			       plane->base.id, plane->name, plane_state);
+		DRM_DEBUG_ATOMIC("Set [NOFB] for [PLANE:%d:%s] state %p\n",
+				 plane->base.id, plane->name, plane_state);
 
 	drm_framebuffer_assign(&plane_state->fb, fb);
 }
@@ -334,15 +324,13 @@ drm_atomic_set_crtc_for_connector(struct drm_connector_state *conn_state,
 		drm_connector_get(conn_state->connector);
 		conn_state->crtc = crtc;
 
-		drm_dbg_atomic(crtc->dev,
-			       "Link [CONNECTOR:%d:%s] state %p to [CRTC:%d:%s]\n",
-			       connector->base.id, connector->name,
-			       conn_state, crtc->base.id, crtc->name);
+		DRM_DEBUG_ATOMIC("Link [CONNECTOR:%d:%s] state %p to [CRTC:%d:%s]\n",
+				 connector->base.id, connector->name,
+				 conn_state, crtc->base.id, crtc->name);
 	} else {
-		drm_dbg_atomic(crtc->dev,
-			       "Link [CONNECTOR:%d:%s] state %p to [NOCRTC]\n",
-			       connector->base.id, connector->name,
-			       conn_state);
+		DRM_DEBUG_ATOMIC("Link [CONNECTOR:%d:%s] state %p to [NOCRTC]\n",
+				 connector->base.id, connector->name,
+				 conn_state);
 	}
 
 	return 0;
@@ -486,10 +474,9 @@ static int drm_atomic_crtc_set_property(struct drm_crtc *crtc,
 	} else if (crtc->funcs->atomic_set_property) {
 		return crtc->funcs->atomic_set_property(crtc, state, property, val);
 	} else {
-		drm_dbg_atomic(crtc->dev,
-			       "[CRTC:%d:%s] unknown property [PROP:%d:%s]]\n",
-			       crtc->base.id, crtc->name,
-			       property->base.id, property->name);
+		DRM_DEBUG_ATOMIC("[CRTC:%d:%s] unknown property [PROP:%d:%s]]\n",
+				 crtc->base.id, crtc->name,
+				 property->base.id, property->name);
 		return -EINVAL;
 	}
 
@@ -583,9 +570,8 @@ static int drm_atomic_plane_set_property(struct drm_plane *plane,
 		state->pixel_blend_mode = val;
 	} else if (property == plane->rotation_property) {
 		if (!is_power_of_2(val & DRM_MODE_ROTATE_MASK)) {
-			drm_dbg_atomic(plane->dev,
-				       "[PLANE:%d:%s] bad rotation bitmask: 0x%llx\n",
-				       plane->base.id, plane->name, val);
+			DRM_DEBUG_ATOMIC("[PLANE:%d:%s] bad rotation bitmask: 0x%llx\n",
+					 plane->base.id, plane->name, val);
 			return -EINVAL;
 		}
 		state->rotation = val;
@@ -609,10 +595,9 @@ static int drm_atomic_plane_set_property(struct drm_plane *plane,
 		return plane->funcs->atomic_set_property(plane, state,
 				property, val);
 	} else {
-		drm_dbg_atomic(plane->dev,
-			       "[PLANE:%d:%s] unknown property [PROP:%d:%s]]\n",
-			       plane->base.id, plane->name,
-			       property->base.id, property->name);
+		DRM_DEBUG_ATOMIC("[PLANE:%d:%s] unknown property [PROP:%d:%s]]\n",
+				 plane->base.id, plane->name,
+				 property->base.id, property->name);
 		return -EINVAL;
 	}
 
@@ -680,20 +665,17 @@ static int drm_atomic_set_writeback_fb_for_connector(
 		struct drm_framebuffer *fb)
 {
 	int ret;
-	struct drm_connector *conn = conn_state->connector;
 
 	ret = drm_writeback_set_fb(conn_state, fb);
 	if (ret < 0)
 		return ret;
 
 	if (fb)
-		drm_dbg_atomic(conn->dev,
-			       "Set [FB:%d] for connector state %p\n",
-			       fb->base.id, conn_state);
+		DRM_DEBUG_ATOMIC("Set [FB:%d] for connector state %p\n",
+				 fb->base.id, conn_state);
 	else
-		drm_dbg_atomic(conn->dev,
-			       "Set [NOFB] for connector state %p\n",
-			       conn_state);
+		DRM_DEBUG_ATOMIC("Set [NOFB] for connector state %p\n",
+				 conn_state);
 
 	return 0;
 }
@@ -800,10 +782,9 @@ static int drm_atomic_connector_set_property(struct drm_connector *connector,
 		return connector->funcs->atomic_set_property(connector,
 				state, property, val);
 	} else {
-		drm_dbg_atomic(connector->dev,
-			       "[CONNECTOR:%d:%s] unknown property [PROP:%d:%s]]\n",
-			       connector->base.id, connector->name,
-			       property->base.id, property->name);
+		DRM_DEBUG_ATOMIC("[CONNECTOR:%d:%s] unknown property [PROP:%d:%s]]\n",
+				 connector->base.id, connector->name,
+				 property->base.id, property->name);
 		return -EINVAL;
 	}
 
@@ -1301,7 +1282,7 @@ static void complete_signaling(struct drm_device *dev,
 		/* If this fails log error to the user */
 		if (fence_state[i].out_fence_ptr &&
 		    put_user(-1, fence_state[i].out_fence_ptr))
-			drm_dbg_atomic(dev, "Couldn't clear out_fence_ptr\n");
+			DRM_DEBUG_ATOMIC("Couldn't clear out_fence_ptr\n");
 	}
 
 	kfree(fence_state);
-- 
2.20.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH] drm: fix oops in drm_atomic_set_crtc_for_connector
  2020-11-15 15:31 ` [Intel-gfx] " Chris Wilson
  (?)
@ 2020-11-15 15:39 ` Simon Ser
  2020-11-15 18:49   ` Sam Ravnborg
  -1 siblings, 1 reply; 7+ messages in thread
From: Simon Ser @ 2020-11-15 15:39 UTC (permalink / raw)
  To: dri-devel; +Cc: Daniel Vetter, Sam Ravnborg, Chris Wilson

crtc can be NULL. connector, extracted from conn_state, can't.

Fixes: e3aae683e861 ("drm: convert drm_atomic_uapi.c to new debug helpers")
Signed-off-by: Simon Ser <contact@emersion.fr>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Sam Ravnborg <sam@ravnborg.org>
---
 drivers/gpu/drm/drm_atomic_uapi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/drm_atomic_uapi.c b/drivers/gpu/drm/drm_atomic_uapi.c
index 9df7f2a170e3..268bb69c2e2f 100644
--- a/drivers/gpu/drm/drm_atomic_uapi.c
+++ b/drivers/gpu/drm/drm_atomic_uapi.c
@@ -334,12 +334,12 @@ drm_atomic_set_crtc_for_connector(struct drm_connector_state *conn_state,
 		drm_connector_get(conn_state->connector);
 		conn_state->crtc = crtc;
 
-		drm_dbg_atomic(crtc->dev,
+		drm_dbg_atomic(connector->dev,
 			       "Link [CONNECTOR:%d:%s] state %p to [CRTC:%d:%s]\n",
 			       connector->base.id, connector->name,
 			       conn_state, crtc->base.id, crtc->name);
 	} else {
-		drm_dbg_atomic(crtc->dev,
+		drm_dbg_atomic(connector->dev,
 			       "Link [CONNECTOR:%d:%s] state %p to [NOCRTC]\n",
 			       connector->base.id, connector->name,
 			       conn_state);
-- 
2.29.2


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

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Revert "drm: convert drm_atomic_uapi.c to new debug helpers"
  2020-11-15 15:31 ` [Intel-gfx] " Chris Wilson
  (?)
  (?)
@ 2020-11-15 15:57 ` Patchwork
  -1 siblings, 0 replies; 7+ messages in thread
From: Patchwork @ 2020-11-15 15:57 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: Revert "drm: convert drm_atomic_uapi.c to new debug helpers"
URL   : https://patchwork.freedesktop.org/series/83856/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
d8ecccff711f Revert "drm: convert drm_atomic_uapi.c to new debug helpers"
-:8: WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line)
#8: 
<7>[    3.739908] i915 0000:00:02.0: [drm:__drm_fb_helper_initial_config_and_unlock] test CRTC 0 primary plane

-:13: WARNING:REPEATED_WORD: Possible repeated word: 'ff'
#13: 
<4>[    3.754910] Code: 24 28 be 10 00 00 00 48 c7 c2 60 b0 38 82 48 8b 78 18 ff 75 20 8b 85 d8 00 00 00 50 e8 89 45 ff ff 58 31 c0 5a 5b 5d 41 5c c3 <48> 8b 04 25 00 00 00 00 41 8b 4c 24 28 49 89 d9 be 10 00 00 00 4d

total: 0 errors, 2 warnings, 0 checks, 206 lines checked


_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Intel-gfx] ✓ Fi.CI.BAT: success for Revert "drm: convert drm_atomic_uapi.c to new debug helpers"
  2020-11-15 15:31 ` [Intel-gfx] " Chris Wilson
                   ` (2 preceding siblings ...)
  (?)
@ 2020-11-15 16:25 ` Patchwork
  -1 siblings, 0 replies; 7+ messages in thread
From: Patchwork @ 2020-11-15 16:25 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx


[-- Attachment #1.1: Type: text/plain, Size: 2155 bytes --]

== Series Details ==

Series: Revert "drm: convert drm_atomic_uapi.c to new debug helpers"
URL   : https://patchwork.freedesktop.org/series/83856/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_9327 -> Patchwork_18908
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18908/index.html

New tests
---------

  New tests have been introduced between CI_DRM_9327 and Patchwork_18908:

### New CI tests (1) ###

  * boot:
    - Statuses : 31 pass(s)
    - Exec time: [0.0] s

  

Known issues
------------

  Here are the changes found in Patchwork_18908 that come from known issues:

### IGT changes ###

#### Possible fixes ####

  * igt@kms_force_connector_basic@force-connector-state:
    - fi-kbl-guc:         [DMESG-WARN][1] -> [PASS][2]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9327/fi-kbl-guc/igt@kms_force_connector_basic@force-connector-state.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18908/fi-kbl-guc/igt@kms_force_connector_basic@force-connector-state.html

  


Participating hosts (5 -> 31)
------------------------------

  Additional (26): fi-kbl-soraka fi-ehl-1 fi-tgl-dsi fi-skl-guc fi-apl-guc fi-snb-2520m fi-pnv-d510 fi-icl-y fi-blb-e6850 fi-skl-6600u fi-snb-2600 fi-cml-u2 fi-bxt-dsi fi-bdw-5557u fi-bsw-n3050 fi-byt-j1900 fi-tgl-u2 fi-glk-dsi fi-cfl-guc fi-ilk-650 fi-kbl-7500u fi-ivb-3770 fi-cfl-8109u fi-bsw-kefka fi-tgl-y fi-skl-6700k2 


Build changes
-------------

  * Linux: CI_DRM_9327 -> Patchwork_18908

  CI-20190529: 20190529
  CI_DRM_9327: af383973ac39069d9ffcac0287a896a107005d54 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_5850: 9748a4a0f93d108955d374a866e60cb962da9b5d @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_18908: d8ecccff711fab11259b12e95ca7eb070f9c5c04 @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

d8ecccff711f Revert "drm: convert drm_atomic_uapi.c to new debug helpers"

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18908/index.html

[-- Attachment #1.2: Type: text/html, Size: 2790 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Intel-gfx] ✗ Fi.CI.IGT: failure for Revert "drm: convert drm_atomic_uapi.c to new debug helpers"
  2020-11-15 15:31 ` [Intel-gfx] " Chris Wilson
                   ` (3 preceding siblings ...)
  (?)
@ 2020-11-15 17:33 ` Patchwork
  -1 siblings, 0 replies; 7+ messages in thread
From: Patchwork @ 2020-11-15 17:33 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx


[-- Attachment #1.1: Type: text/plain, Size: 3139 bytes --]

== Series Details ==

Series: Revert "drm: convert drm_atomic_uapi.c to new debug helpers"
URL   : https://patchwork.freedesktop.org/series/83856/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_9327_full -> Patchwork_18908_full
====================================================

Summary
-------

  **FAILURE**

  Serious unknown changes coming with Patchwork_18908_full absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_18908_full, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  

Possible new issues
-------------------

  Here are the unknown changes that may have been introduced in Patchwork_18908_full:

### IGT changes ###

#### Possible regressions ####

  * igt@gem_softpin@noreloc-s3:
    - shard-kbl:          NOTRUN -> [INCOMPLETE][1]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18908/shard-kbl4/igt@gem_softpin@noreloc-s3.html

  * igt@i915_pm_rc6_residency@rc6-fence:
    - shard-iclb:         NOTRUN -> [WARN][2] +1 similar issue
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18908/shard-iclb6/igt@i915_pm_rc6_residency@rc6-fence.html

  
#### Suppressed ####

  The following results come from untrusted machines, tests, or statuses.
  They do not affect the overall result.

  * {igt@gem_userptr_blits@vma-merge}:
    - shard-snb:          NOTRUN -> [FAIL][3]
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18908/shard-snb5/igt@gem_userptr_blits@vma-merge.html
    - shard-hsw:          NOTRUN -> [FAIL][4]
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18908/shard-hsw4/igt@gem_userptr_blits@vma-merge.html

  * {igt@kms_flip_scaled_crc@flip-64bpp-ytile-to-32bpp-ytile}:
    - shard-kbl:          NOTRUN -> [FAIL][5] +2 similar issues
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18908/shard-kbl6/igt@kms_flip_scaled_crc@flip-64bpp-ytile-to-32bpp-ytile.html

  
New tests
---------

  New tests have been introduced between CI_DRM_9327_full and Patchwork_18908_full:

### New CI tests (1) ###

  * boot:
    - Statuses : 200 pass(s)
    - Exec time: [0.0] s

  

  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).



Participating hosts (12 -> 10)
------------------------------

  Missing    (2): pig-snb-2600 pig-icl-1065g7 


Build changes
-------------

  * CI: None -> CI-20190529
  * Linux: CI_DRM_9327 -> Patchwork_18908

  CI-20190529: 20190529
  CI_DRM_9327: af383973ac39069d9ffcac0287a896a107005d54 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_5850: 9748a4a0f93d108955d374a866e60cb962da9b5d @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_18908: d8ecccff711fab11259b12e95ca7eb070f9c5c04 @ git://anongit.freedesktop.org/gfx-ci/linux
  piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18908/index.html

[-- Attachment #1.2: Type: text/html, Size: 3934 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] drm: fix oops in drm_atomic_set_crtc_for_connector
  2020-11-15 15:39 ` [PATCH] drm: fix oops in drm_atomic_set_crtc_for_connector Simon Ser
@ 2020-11-15 18:49   ` Sam Ravnborg
  0 siblings, 0 replies; 7+ messages in thread
From: Sam Ravnborg @ 2020-11-15 18:49 UTC (permalink / raw)
  To: Simon Ser; +Cc: Daniel Vetter, dri-devel, Chris Wilson

On Sun, Nov 15, 2020 at 03:39:07PM +0000, Simon Ser wrote:
> crtc can be NULL. connector, extracted from conn_state, can't.
> 
> Fixes: e3aae683e861 ("drm: convert drm_atomic_uapi.c to new debug helpers")
> Signed-off-by: Simon Ser <contact@emersion.fr>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Cc: Sam Ravnborg <sam@ravnborg.org>

Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-11-15 18:49 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-15 15:31 [PATCH] Revert "drm: convert drm_atomic_uapi.c to new debug helpers" Chris Wilson
2020-11-15 15:31 ` [Intel-gfx] " Chris Wilson
2020-11-15 15:39 ` [PATCH] drm: fix oops in drm_atomic_set_crtc_for_connector Simon Ser
2020-11-15 18:49   ` Sam Ravnborg
2020-11-15 15:57 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Revert "drm: convert drm_atomic_uapi.c to new debug helpers" Patchwork
2020-11-15 16:25 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2020-11-15 17:33 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.