dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/tests: modeset: Add drm connector atomic_[duplicate/destroy]_state
@ 2025-08-11  6:34 Xiaolei Wang
  2025-08-20 14:03 ` Maxime Ripard
  2025-08-21 11:21 ` Dmitry Baryshkov
  0 siblings, 2 replies; 3+ messages in thread
From: Xiaolei Wang @ 2025-08-11  6:34 UTC (permalink / raw)
  To: maarten.lankhorst, mripard, tzimmermann, airlied, simona,
	jani.nikula, ville.syrjala
  Cc: dri-devel, linux-kernel

Commit 66671944e176 ("drm/tests: helpers: Add atomic helpers")
added the atomic state path, so adding the drm connector
atomic_[duplicate/destroy]_state is also necessary.

WARNING: CPU: 0 PID: 96 at drivers/gpu/drm/drm_connector.c:234 drm_connector_init_only+0x934/0xee0
 Call trace:
  drm_connector_init_only+0x934/0xee0 (P)
  drmm_connector_init+0xe0/0x1b0
  drm_client_modeset_test_init+0x290/0x534
  kunit_try_run_case+0x110/0x3b4
  kunit_generic_run_threadfn_adapter+0x80/0xec
  kthread+0x3b8/0x6c0
  ret_from_fork+0x10/0x20

Signed-off-by: Xiaolei Wang <xiaolei.wang@windriver.com>
---
 drivers/gpu/drm/tests/drm_client_modeset_test.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/tests/drm_client_modeset_test.c b/drivers/gpu/drm/tests/drm_client_modeset_test.c
index 3f44fe5e92e4..e702a27c2368 100644
--- a/drivers/gpu/drm/tests/drm_client_modeset_test.c
+++ b/drivers/gpu/drm/tests/drm_client_modeset_test.c
@@ -12,6 +12,7 @@
 #include <drm/drm_modes.h>
 #include <drm/drm_modeset_helper_vtables.h>
 #include <drm/drm_probe_helper.h>
+#include <drm/drm_atomic_state_helper.h>
 
 struct drm_client_modeset_test_priv {
 	struct drm_device *drm;
@@ -48,6 +49,9 @@ static const struct drm_connector_helper_funcs drm_client_modeset_connector_help
 };
 
 static const struct drm_connector_funcs drm_client_modeset_connector_funcs = {
+	.reset                  = drm_atomic_helper_connector_reset,
+	.atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state,
+	.atomic_destroy_state   = drm_atomic_helper_connector_destroy_state,
 };
 
 static int drm_client_modeset_test_init(struct kunit *test)
-- 
2.43.0


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

* Re: [PATCH] drm/tests: modeset: Add drm connector atomic_[duplicate/destroy]_state
  2025-08-11  6:34 [PATCH] drm/tests: modeset: Add drm connector atomic_[duplicate/destroy]_state Xiaolei Wang
@ 2025-08-20 14:03 ` Maxime Ripard
  2025-08-21 11:21 ` Dmitry Baryshkov
  1 sibling, 0 replies; 3+ messages in thread
From: Maxime Ripard @ 2025-08-20 14:03 UTC (permalink / raw)
  To: Xiaolei Wang
  Cc: airlied, dri-devel, jani.nikula, linux-kernel, maarten.lankhorst,
	mripard, simona, tzimmermann, ville.syrjala, Maxime Ripard

On Mon, 11 Aug 2025 14:34:03 +0800, Xiaolei Wang wrote:
> Commit 66671944e176 ("drm/tests: helpers: Add atomic helpers")
> added the atomic state path, so adding the drm connector
> atomic_[duplicate/destroy]_state is also necessary.
> 
> WARNING: CPU: 0 PID: 96 at drivers/gpu/drm/drm_connector.c:234 drm_connector_init_only+0x934/0xee0
> 
> [ ... ]

Reviewed-by: Maxime Ripard <mripard@kernel.org>

Thanks!
Maxime

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

* Re: [PATCH] drm/tests: modeset: Add drm connector atomic_[duplicate/destroy]_state
  2025-08-11  6:34 [PATCH] drm/tests: modeset: Add drm connector atomic_[duplicate/destroy]_state Xiaolei Wang
  2025-08-20 14:03 ` Maxime Ripard
@ 2025-08-21 11:21 ` Dmitry Baryshkov
  1 sibling, 0 replies; 3+ messages in thread
From: Dmitry Baryshkov @ 2025-08-21 11:21 UTC (permalink / raw)
  To: Xiaolei Wang
  Cc: maarten.lankhorst, mripard, tzimmermann, airlied, simona,
	jani.nikula, ville.syrjala, dri-devel, linux-kernel

On Mon, Aug 11, 2025 at 02:34:03PM +0800, Xiaolei Wang wrote:
> Commit 66671944e176 ("drm/tests: helpers: Add atomic helpers")
> added the atomic state path, so adding the drm connector
> atomic_[duplicate/destroy]_state is also necessary.
> 
> WARNING: CPU: 0 PID: 96 at drivers/gpu/drm/drm_connector.c:234 drm_connector_init_only+0x934/0xee0
>  Call trace:
>   drm_connector_init_only+0x934/0xee0 (P)
>   drmm_connector_init+0xe0/0x1b0
>   drm_client_modeset_test_init+0x290/0x534
>   kunit_try_run_case+0x110/0x3b4
>   kunit_generic_run_threadfn_adapter+0x80/0xec
>   kthread+0x3b8/0x6c0
>   ret_from_fork+0x10/0x20
> 
> Signed-off-by: Xiaolei Wang <xiaolei.wang@windriver.com>
> ---
>  drivers/gpu/drm/tests/drm_client_modeset_test.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 

Fixes: 66671944e176 ("drm/tests: helpers: Add atomic helpers")

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>

-- 
With best wishes
Dmitry

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

end of thread, other threads:[~2025-08-21 11:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-11  6:34 [PATCH] drm/tests: modeset: Add drm connector atomic_[duplicate/destroy]_state Xiaolei Wang
2025-08-20 14:03 ` Maxime Ripard
2025-08-21 11:21 ` Dmitry Baryshkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).