diff options
author | Thierry Reding <treding@nvidia.com> | 2014-06-27 11:19:24 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2014-07-07 21:31:28 -0400 |
commit | 10a231026574f9ec9761b6435394b8830b485e4e (patch) | |
tree | ae55c7173758db2778f02bb98954e7efceee5ec0 /drivers/gpu/drm/omapdrm | |
parent | 3a4938799dec32783759b0c66ee3bb8c82dd9937 (diff) |
drm: Introduce drm_fb_helper_prepare()
To implement hotplug detection in a race-free manner, drivers must call
drm_kms_helper_poll_init() before hotplug events can be triggered. Such
events can be triggered right after any of the encoders or connectors
are initialized. At the same time, if the drm_fb_helper_hotplug_event()
helper is used by a driver, then the poll helper requires some parts of
the FB helper to be initialized to prevent a crash.
At the same time, drm_fb_helper_init() requires information that is not
necessarily available at such an early stage (number of CRTCs and
connectors), so it cannot be used yet.
Add a new helper, drm_fb_helper_prepare(), that initializes the bare
minimum needed to allow drm_kms_helper_poll_init() to execute and any
subsequent hotplug events to be processed properly.
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/omapdrm')
-rw-r--r-- | drivers/gpu/drm/omapdrm/omap_fbdev.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/omapdrm/omap_fbdev.c b/drivers/gpu/drm/omapdrm/omap_fbdev.c index 4cb12083eb12..8436c6857cda 100644 --- a/drivers/gpu/drm/omapdrm/omap_fbdev.c +++ b/drivers/gpu/drm/omapdrm/omap_fbdev.c | |||
@@ -325,7 +325,7 @@ struct drm_fb_helper *omap_fbdev_init(struct drm_device *dev) | |||
325 | 325 | ||
326 | helper = &fbdev->base; | 326 | helper = &fbdev->base; |
327 | 327 | ||
328 | helper->funcs = &omap_fb_helper_funcs; | 328 | drm_fb_helper_prepare(dev, helper, &omap_fb_helper_funcs); |
329 | 329 | ||
330 | ret = drm_fb_helper_init(dev, helper, | 330 | ret = drm_fb_helper_init(dev, helper, |
331 | priv->num_crtcs, priv->num_connectors); | 331 | priv->num_crtcs, priv->num_connectors); |