Commit 2390cd11 authored by Dave Airlie's avatar Dave Airlie

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: default avatarTodd Previte <tprevite@gmail.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 40377ef2
...@@ -1513,6 +1513,15 @@ int drm_mode_group_init_legacy_group(struct drm_device *dev, ...@@ -1513,6 +1513,15 @@ int drm_mode_group_init_legacy_group(struct drm_device *dev,
} }
EXPORT_SYMBOL(drm_mode_group_init_legacy_group); 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 * drm_crtc_convert_to_umode - convert a drm_display_mode into a modeinfo
* @out: drm_mode_modeinfo struct to return to the user * @out: drm_mode_modeinfo struct to return to the user
......
...@@ -942,6 +942,7 @@ extern const char *drm_get_tv_select_name(int val); ...@@ -942,6 +942,7 @@ extern const char *drm_get_tv_select_name(int val);
extern void drm_fb_release(struct drm_file *file_priv); extern void drm_fb_release(struct drm_file *file_priv);
extern int drm_mode_group_init_legacy_group(struct drm_device *dev, struct drm_mode_group *group); extern int drm_mode_group_init_legacy_group(struct drm_device *dev, struct drm_mode_group *group);
extern void drm_mode_group_destroy(struct drm_mode_group *group); extern void drm_mode_group_destroy(struct drm_mode_group *group);
extern void drm_reinit_primary_mode_group(struct drm_device *dev);
extern bool drm_probe_ddc(struct i2c_adapter *adapter); extern bool drm_probe_ddc(struct i2c_adapter *adapter);
extern struct edid *drm_get_edid(struct drm_connector *connector, extern struct edid *drm_get_edid(struct drm_connector *connector,
struct i2c_adapter *adapter); struct i2c_adapter *adapter);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment