public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm: Allow mode object properties to be added after a device is registered
@ 2024-05-08 19:43 Mario Limonciello
  2024-05-08 19:43 ` [PATCH 2/2] Revert "drm/amd/display: Temporary Disable MST DP Colorspace Property" Mario Limonciello
  2024-05-08 19:56 ` [PATCH 1/2] drm: Allow mode object properties to be added after a device is registered Ville Syrjälä
  0 siblings, 2 replies; 3+ messages in thread
From: Mario Limonciello @ 2024-05-08 19:43 UTC (permalink / raw)
  To: dri-devel, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
	David Airlie, Daniel Vetter
  Cc: linux-kernel, amd-gfx, Aurabindo Pillai, Daniel Wheeler,
	Fangzhi Zuo, Mario Limonciello, Tyler Schneider

When the colorspace property is registered on MST devices there is
no `obj_free_cb` callback for it in drm_mode_object_add().

Don't show a warning trace for __drm_mode_object_add() calls for
DRM_MODE_OBJECT_PROPERTY.

Reported-and-tested-by: Tyler Schneider <tyler.schneider@amd.com>
Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3353
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
 drivers/gpu/drm/drm_mode_object.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/drm_mode_object.c b/drivers/gpu/drm/drm_mode_object.c
index 0e8355063eee..b077547a2db4 100644
--- a/drivers/gpu/drm/drm_mode_object.c
+++ b/drivers/gpu/drm/drm_mode_object.c
@@ -42,7 +42,7 @@ int __drm_mode_object_add(struct drm_device *dev, struct drm_mode_object *obj,
 {
 	int ret;
 
-	WARN_ON(!dev->driver->load && dev->registered && !obj_free_cb);
+	WARN_ON(!dev->driver->load && dev->registered && !obj_free_cb && obj_type != DRM_MODE_OBJECT_PROPERTY);
 
 	mutex_lock(&dev->mode_config.idr_mutex);
 	ret = idr_alloc(&dev->mode_config.object_idr, register_obj ? obj : NULL,
-- 
2.43.0


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

end of thread, other threads:[~2024-05-08 19:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-08 19:43 [PATCH 1/2] drm: Allow mode object properties to be added after a device is registered Mario Limonciello
2024-05-08 19:43 ` [PATCH 2/2] Revert "drm/amd/display: Temporary Disable MST DP Colorspace Property" Mario Limonciello
2024-05-08 19:56 ` [PATCH 1/2] drm: Allow mode object properties to be added after a device is registered Ville Syrjälä

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox