drm/doc: Drop misleading comment on drm_mode_config_cleanup
Subsystems (2)
PATCH 1/1 drm/doc: Drop misleading comment on drm_mode_config_cleanup
This is not something we'll fix, because failing to clean up stuff (or doing it in the wrong order) is a driver bug. The offending FIXME goes all the way back to the original modeset merge.
We've added a WARN_ON in
commit 2b677e8c08eed11e4ebe66a7c334f03e389a19a3
Author: Daniel Vetter <[email protected]> Date: Mon Dec 10 21:16:05 2012 +0100
drm: reference framebuffers which are on the idr
including a comment blaming drivers on this. Right thing to do is most likely drm_atomic_helper_shutdown plus making sure that drm_mode_config_cleanup is not called too early (i.e. not in driver unload, but only in the final drm_device release callback).
--- drivers/gpu/drm/drm_mode_config.c | 2 -- 1 file changed, 2 deletions(-)
drivers/gpu/drm/drm_mode_config.c +0 -2
@@ -428,8 +428,6 @@ EXPORT_SYMBOL(drm_mode_config_init);* Note that since this /should/ happen single-threaded at driver/device * teardown time, no locking is required. It's the driver's job to ensure that * this guarantee actually holds true. -* -* FIXME: cleanup any dangling user buffer objects too */ void drm_mode_config_cleanup (struct drm_device *dev) {
Signature · 6 lines
2.23.0 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 30 lines · On Tuesday, 22 October 2019 17:37:17 BST Daniel Vetter wrote:
This is not something we'll fix, because failing to clean up stuff (or doing it in the wrong order) is a driver bug. The offending FIXME goes all the way back to the original modeset merge.
We've added a
WARN_ONincommit
2b677e8c08eed11e4ebe66a7c334f03e389a19a3Author: Daniel Vetter <[email protected]> Date: Mon Dec 10 21:16:05 2012 +0100drm: reference framebuffers which are on the idr
including a comment blaming drivers on this. Right thing to do is most likely
drm_atomic_helper_shutdownplus making sure thatdrm_mode_config_cleanupis not called too early (i.e. not in driver unload, but only in the finaldrm_devicerelease callback).Cc Mihail Atanassov <[email protected]>Reported-by Mihail Atanassov <[email protected]>Signed-off-by Daniel Vetter <[email protected]>--- drivers/gpu/drm/drm_mode_config.c | 2 -- 1 file changed, 2 deletions(-)drivers/gpu/drm/drm_mode_config.c +0
-0
drivers/gpu/drm/drm_mode_config.c EXPORT_SYMBOL(drm_mode_config_init); · line 433
Quoted 8 lines
drivers/gpu/drm/drm_mode_config.c +0
-2@@ -428,8 +428,6 @@ EXPORT_SYMBOL(drm_mode_config_init);* Note that since this /should/ happen single-threaded at driver/device * teardown time, no locking is required. It's the driver's job to ensure that * this guarantee actually holds true. -* -* FIXME: cleanup any dangling user buffer objects too */ void drm_mode_config_cleanup (struct drm_device *dev) {
Thanks,
Signature · 8 lines
Mihail _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 42 lines · Mihail Atanassov
Quoted 30 lines · On Tuesday, 22 October 2019 17:37:17 BST Daniel Vetter wrote:
This is not something we'll fix, because failing to clean up stuff (or doing it in the wrong order) is a driver bug. The offending FIXME goes all the way back to the original modeset merge.
We've added a
WARN_ONincommit
2b677e8c08eed11e4ebe66a7c334f03e389a19a3Author: Daniel Vetter <[email protected]> Date: Mon Dec 10 21:16:05 2012 +0100drm: reference framebuffers which are on the idr
including a comment blaming drivers on this. Right thing to do is most likely
drm_atomic_helper_shutdownplus making sure thatdrm_mode_config_cleanupis not called too early (i.e. not in driver unload, but only in the finaldrm_devicerelease callback).Cc Mihail Atanassov <[email protected]>Reported-by Mihail Atanassov <[email protected]>Signed-off-by Daniel Vetter <[email protected]>--- drivers/gpu/drm/drm_mode_config.c | 2 -- 1 file changed, 2 deletions(-)drivers/gpu/drm/drm_mode_config.c +0
-0drivers/gpu/drm/drm_mode_config.c EXPORT_SYMBOL(drm_mode_config_init); · line 433
Quoted 8 lines
drivers/gpu/drm/drm_mode_config.c +0
-2@@ -428,8 +428,6 @@ EXPORT_SYMBOL(drm_mode_config_init);* Note that since this /should/ happen single-threaded at driver/device * teardown time, no locking is required. It's the driver's job to ensure that * this guarantee actually holds true. -* -* FIXME: cleanup any dangling user buffer objects too */ void drm_mode_config_cleanup (struct drm_device *dev) {Thanks,
Quoted 1 line
Reviewed-by Mihail Atanassov <[email protected]>
Thanks for your review&report, patch applied.
-Daniel
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel