diff options
author | Rob Clark <robdclark@gmail.com> | 2014-12-18 16:01:54 -0500 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2015-01-05 07:55:29 -0500 |
commit | ae16c597b61ae4613b13a0c3fac302e8d8827ac7 (patch) | |
tree | 317f0b969445d5ff94067e101d3f7c9f5c6db9ad /drivers/gpu/drm/drm_crtc.c | |
parent | 6b4959f43a04e12d39c5700607727f2cbcfeac31 (diff) |
drm/atomic: atomic connector properties
Expose the core connector state as properties so it can be updated via
atomic ioctl.
Signed-off-by: Rob Clark <robdclark@gmail.com>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/drm_crtc.c')
-rw-r--r-- | drivers/gpu/drm/drm_crtc.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index 46fa0945b53e..3cb1fa09ac9e 100644 --- a/drivers/gpu/drm/drm_crtc.c +++ b/drivers/gpu/drm/drm_crtc.c | |||
@@ -831,6 +831,7 @@ int drm_connector_init(struct drm_device *dev, | |||
831 | const struct drm_connector_funcs *funcs, | 831 | const struct drm_connector_funcs *funcs, |
832 | int connector_type) | 832 | int connector_type) |
833 | { | 833 | { |
834 | struct drm_mode_config *config = &dev->mode_config; | ||
834 | int ret; | 835 | int ret; |
835 | struct ida *connector_ida = | 836 | struct ida *connector_ida = |
836 | &drm_connector_enum_list[connector_type].ida; | 837 | &drm_connector_enum_list[connector_type].ida; |
@@ -869,16 +870,20 @@ int drm_connector_init(struct drm_device *dev, | |||
869 | 870 | ||
870 | /* We should add connectors at the end to avoid upsetting the connector | 871 | /* We should add connectors at the end to avoid upsetting the connector |
871 | * index too much. */ | 872 | * index too much. */ |
872 | list_add_tail(&connector->head, &dev->mode_config.connector_list); | 873 | list_add_tail(&connector->head, &config->connector_list); |
873 | dev->mode_config.num_connector++; | 874 | config->num_connector++; |
874 | 875 | ||
875 | if (connector_type != DRM_MODE_CONNECTOR_VIRTUAL) | 876 | if (connector_type != DRM_MODE_CONNECTOR_VIRTUAL) |
876 | drm_object_attach_property(&connector->base, | 877 | drm_object_attach_property(&connector->base, |
877 | dev->mode_config.edid_property, | 878 | config->edid_property, |
878 | 0); | 879 | 0); |
879 | 880 | ||
880 | drm_object_attach_property(&connector->base, | 881 | drm_object_attach_property(&connector->base, |
881 | dev->mode_config.dpms_property, 0); | 882 | config->dpms_property, 0); |
883 | |||
884 | if (drm_core_check_feature(dev, DRIVER_ATOMIC)) { | ||
885 | drm_object_attach_property(&connector->base, config->prop_crtc_id, 0); | ||
886 | } | ||
882 | 887 | ||
883 | connector->debugfs_entry = NULL; | 888 | connector->debugfs_entry = NULL; |
884 | 889 | ||