diff options
author | Dave Airlie <airlied@redhat.com> | 2014-06-05 14:01:29 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2014-07-08 11:39:04 +1000 |
commit | 2390cd11bfbe8d2b1b28c4e0f01fe7e122f7196d (patch) | |
tree | 4ad036c2d84d86465bde21bdce1ec66862660396 /drivers/gpu/drm/drm_crtc.c | |
parent | 40377ef2d9a3ddc8ba4aee11393fb207e82111e1 (diff) | |
download | op-kernel-dev-2390cd11bfbe8d2b1b28c4e0f01fe7e122f7196d.zip op-kernel-dev-2390cd11bfbe8d2b1b28c4e0f01fe7e122f7196d.tar.gz |
drm/crtc: add interface to reinitialise the legacy mode group
This can be called to update things after dynamic connectors/encoders
are created/deleted.
Reviewed-by: Todd Previte <tprevite@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/drm_crtc.c')
-rw-r--r-- | drivers/gpu/drm/drm_crtc.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index 7db6251..f939b05 100644 --- a/drivers/gpu/drm/drm_crtc.c +++ b/drivers/gpu/drm/drm_crtc.c @@ -1513,6 +1513,15 @@ int drm_mode_group_init_legacy_group(struct drm_device *dev, } EXPORT_SYMBOL(drm_mode_group_init_legacy_group); +void drm_reinit_primary_mode_group(struct drm_device *dev) +{ + drm_modeset_lock_all(dev); + drm_mode_group_destroy(&dev->primary->mode_group); + drm_mode_group_init_legacy_group(dev, &dev->primary->mode_group); + drm_modeset_unlock_all(dev); +} +EXPORT_SYMBOL(drm_reinit_primary_mode_group); + /** * drm_crtc_convert_to_umode - convert a drm_display_mode into a modeinfo * @out: drm_mode_modeinfo struct to return to the user |