drm/fb-helper: generic: Call drm_client_add() after setup is done
Subsystems (2)
PATCH 1/1 drm/fb-helper: generic: Call drm_client_add() after setup is done
Hotplug can happen while drm_fbdev_generic_setup() is running so move drm_client_add() call after setup is done to avoid drm_fbdev_client_hotplug() running in two threads at the same time.
--- drivers/gpu/drm/drm_fb_helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/drm_fb_helper.c +2 -2
@@ -3317,8 +3317,6 @@ int drm_fbdev_generic_setup(struct drm_device *dev, unsigned int preferred_bpp)return ret; } -drm_client_add (&fb_helper->client); -if (!preferred_bpp) preferred_bpp = dev->mode_config.preferred_depth;if (!preferred_bpp)
@@ -3329,6 +3327,8 @@ int drm_fbdev_generic_setup(struct drm_device *dev, unsigned int preferred_bpp)if (ret)DRM_DEV_DEBUG (dev->dev,"client hotplug ret=%d\n" , ret); +drm_client_add (&fb_helper->client); +return 0 ; }EXPORT_SYMBOL (drm_fbdev_generic_setup);
Signature · 6 lines
2.20.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 7 lines · Noralf Trønnes
Hotplug can happen while
drm_fbdev_generic_setup()is running so movedrm_client_add()call after setup is done to avoiddrm_fbdev_client_hotplug()running in two threads at the same time.Fixes 9060d7f49376 ("drm/fb-helper: Finish the generic fbdev emulation")Reported-by Daniel Vetter <[email protected]>Signed-off-by Noralf Trønnes <[email protected]>
Not sure we even want a cc: stable on this, things could go boom. I guess we could backport once there's a bug report, up to you.
Quoted 29 lines
--- drivers/gpu/drm/drm_fb_helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/drm_fb_helper.c +2
-2@@ -3317,8 +3317,6 @@ int drm_fbdev_generic_setup(struct drm_device *dev, unsigned int preferred_bpp)return ret; } -drm_client_add (&fb_helper->client); -if (!preferred_bpp) preferred_bpp = dev->mode_config.preferred_depth;if (!preferred_bpp)@@ -3329,6 +3327,8 @@ int drm_fbdev_generic_setup(struct drm_device *dev, unsigned int preferred_bpp)if (ret)DRM_DEV_DEBUG (dev->dev,"client hotplug ret=%d\n" , ret); +drm_client_add (&fb_helper->client); +return 0 ; }EXPORT_SYMBOL (drm_fbdev_generic_setup);Signature · 1 line
2.20.1
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
Noralf Trønnes
AppliedDen 02.04.2019 09.55, skrev Daniel Vetter:
Quoted 5 lines · Noralf Trønnes
Quoted 4 lines
Hotplug can happen while
drm_fbdev_generic_setup()is running so movedrm_client_add()call after setup is done to avoiddrm_fbdev_client_hotplug()running in two threads at the same time.
Quoted 8 lines
Quoted 3 lines
Fixes 9060d7f49376 ("drm/fb-helper: Finish the generic fbdev emulation")Reported-by Daniel Vetter <[email protected]>Signed-off-by Noralf Trønnes <[email protected]>Not sure we even want a cc: stable on this, things could go boom. I guess we could backport once there's a bug report, up to you.
Reviewed-by Daniel Vetter <[email protected]>
Thanks, applied with cc stable.
Noralf.
Quoted 22 lines
Quoted 22 lines
--- drivers/gpu/drm/drm_fb_helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/drm_fb_helper.c +0
-2@@ -3317,8 +3317,6 @@ int drm_fbdev_generic_setup(struct drm_device *dev, unsigned int preferred_bpp)return ret; } -drm_client_add (&fb_helper->client); -if (!preferred_bpp) preferred_bpp = dev->mode_config.preferred_depth;if (!preferred_bpp)@@ -3329,6 +3327,8 @@ int drm_fbdev_generic_setup(struct drm_device *dev, unsigned int preferred_bpp)if (ret)DRM_DEV_DEBUG (dev->dev,"client hotplug ret=%d\n" , ret);
Quoted 9 lines
Quoted 8 lines
drivers/gpu/drm/drm_fb_helper.c +2
-0+drm_client_add (&fb_helper->client); +return 0 ; }EXPORT_SYMBOL (drm_fbdev_generic_setup);Signature · 1 line
2.20.1
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel