diff mbox series

[2/2] drm/todo: Add entry to remove load/unload hooks

Message ID 20191023144953.28190-2-daniel.vetter@ffwll.ch (mailing list archive)
State New, archived
Headers show
Series [1/2] drm/property: Enforce more lifetime rules | expand

Commit Message

Daniel Vetter Oct. 23, 2019, 2:49 p.m. UTC
They're midlayer, broken, and because of the old gunk, we can't fix
them. For examples see the various checks in drm_mode_object.c against
dev->registered, which cannot be enforced if the driver still uses the
load hook.

Unfortunately our biggest driver still uses load/unload, so this would
be really great to get fixed.

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 Documentation/gpu/todo.rst | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

Comments

Thierry Reding Oct. 24, 2019, 10:35 a.m. UTC | #1
On Wed, Oct 23, 2019 at 04:49:53PM +0200, Daniel Vetter wrote:
> They're midlayer, broken, and because of the old gunk, we can't fix
> them. For examples see the various checks in drm_mode_object.c against
> dev->registered, which cannot be enforced if the driver still uses the
> load hook.
> 
> Unfortunately our biggest driver still uses load/unload, so this would
> be really great to get fixed.
> 
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: Harry Wentland <harry.wentland@amd.com>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> ---
>  Documentation/gpu/todo.rst | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)

Reminds me that I need to still do that for Tegra:

Reviewed-by: Thierry Reding <treding@nvidia.com>
Daniel Vetter Nov. 4, 2019, 4:57 p.m. UTC | #2
On Thu, Oct 24, 2019 at 12:35:52PM +0200, Thierry Reding wrote:
> On Wed, Oct 23, 2019 at 04:49:53PM +0200, Daniel Vetter wrote:
> > They're midlayer, broken, and because of the old gunk, we can't fix
> > them. For examples see the various checks in drm_mode_object.c against
> > dev->registered, which cannot be enforced if the driver still uses the
> > load hook.
> > 
> > Unfortunately our biggest driver still uses load/unload, so this would
> > be really great to get fixed.
> > 
> > Cc: Alex Deucher <alexander.deucher@amd.com>
> > Cc: Harry Wentland <harry.wentland@amd.com>
> > Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> > ---
> >  Documentation/gpu/todo.rst | 17 +++++++++++++++++
> >  1 file changed, 17 insertions(+)
> 
> Reminds me that I need to still do that for Tegra:
> 
> Reviewed-by: Thierry Reding <treding@nvidia.com>

Both patches applied, thanks for taking a look.
-Daniel
diff mbox series

Patch

diff --git a/Documentation/gpu/todo.rst b/Documentation/gpu/todo.rst
index 73c51b5a0997..5a44f46380c2 100644
--- a/Documentation/gpu/todo.rst
+++ b/Documentation/gpu/todo.rst
@@ -351,6 +351,23 @@  connector register/unregister fixes
 
 Level: Intermediate
 
+Remove load/unload callbacks from all non-DRIVER_LEGACY drivers
+---------------------------------------------------------------
+
+The load/unload callbacks in struct &drm_driver are very much midlayers, plus
+for historical reasons they get the ordering wrong (and we can't fix that)
+between setting up the &drm_driver structure and calling drm_dev_register().
+
+- Rework drivers to no longer use the load/unload callbacks, directly coding the
+  load/unload sequence into the driver's probe function.
+
+- Once all non-DRIVER_LEGACY drivers are converted, disallow the load/unload
+  callbacks for all modern drivers.
+
+Contact: Daniel Vetter
+
+Level: Intermediate
+
 Core refactorings
 =================