summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2020-01-27 18:04:03 +0100
committerDaniel Vetter <daniel.vetter@ffwll.ch>2024-01-08 14:01:21 +0100
commit44e7cd92021150d734a2b91336d22a20ba130af9 (patch)
tree1024f9514e1247bb9a4cad6fbe75497f02370ed8
parent075ec22212ef6fda8d054a1aece866ec8248c75b (diff)
drm: Complain if drivers still use the ->load callback
Kinda time to get this sorted. The locking around this really is not nice. Thomas mentioned in his review that the only drivers left unconverted are radeon and amdgpu. Cc: Harry Wentland <harry.wentland@amd.com> Cc: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
-rw-r--r--drivers/gpu/drm/drm_drv.c6
-rw-r--r--include/drm/drm_drv.h3
2 files changed, 9 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
index 243cacb3575c..cd3308cfa918 100644
--- a/drivers/gpu/drm/drm_drv.c
+++ b/drivers/gpu/drm/drm_drv.c
@@ -914,6 +914,12 @@ int drm_dev_register(struct drm_device *dev, unsigned long flags)
else
drm_debugfs_dev_register(dev);
+ if (dev->driver->load) {
+ if (!drm_core_check_feature(dev, DRIVER_LEGACY))
+ DRM_INFO("drm driver %s is using deprecated ->load callback\n",
+ dev->driver->name);
+ }
+
ret = drm_minor_register(dev, DRM_MINOR_RENDER);
if (ret)
goto err_minors;
diff --git a/include/drm/drm_drv.h b/include/drm/drm_drv.h
index 8878260d7529..44a99c028c43 100644
--- a/include/drm/drm_drv.h
+++ b/include/drm/drm_drv.h
@@ -188,6 +188,9 @@ struct drm_driver {
*
* This is deprecated, do not use!
*
+ * FIXME: A few non-DRIVER_LEGACY drivers still use this, and should be
+ * converted.
+ *
* Returns:
*
* Zero on success, non-zero value on failure.