aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/drm/drm_crtc.c31
-rw-r--r--drivers/gpu/drm/drm_fb_helper.c2
-rw-r--r--drivers/gpu/drm/drm_sysfs.c6
-rw-r--r--include/drm/drm_crtc.h8
4 files changed, 9 insertions, 38 deletions
diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
index d6d007275947..f2d667b8bee2 100644
--- a/drivers/gpu/drm/drm_crtc.c
+++ b/drivers/gpu/drm/drm_crtc.c
@@ -559,11 +559,11 @@ int drm_connector_init(struct drm_device *dev,
559 dev->mode_config.num_connector++; 559 dev->mode_config.num_connector++;
560 560
561 if (connector_type != DRM_MODE_CONNECTOR_VIRTUAL) 561 if (connector_type != DRM_MODE_CONNECTOR_VIRTUAL)
562 drm_connector_attach_property(connector, 562 drm_object_attach_property(&connector->base,
563 dev->mode_config.edid_property, 563 dev->mode_config.edid_property,
564 0); 564 0);
565 565
566 drm_connector_attach_property(connector, 566 drm_object_attach_property(&connector->base,
567 dev->mode_config.dpms_property, 0); 567 dev->mode_config.dpms_property, 0);
568 568
569 out: 569 out:
@@ -2928,27 +2928,6 @@ void drm_property_destroy(struct drm_device *dev, struct drm_property *property)
2928} 2928}
2929EXPORT_SYMBOL(drm_property_destroy); 2929EXPORT_SYMBOL(drm_property_destroy);
2930 2930
2931void drm_connector_attach_property(struct drm_connector *connector,
2932 struct drm_property *property, uint64_t init_val)
2933{
2934 drm_object_attach_property(&connector->base, property, init_val);
2935}
2936EXPORT_SYMBOL(drm_connector_attach_property);
2937
2938int drm_connector_property_set_value(struct drm_connector *connector,
2939 struct drm_property *property, uint64_t value)
2940{
2941 return drm_object_property_set_value(&connector->base, property, value);
2942}
2943EXPORT_SYMBOL(drm_connector_property_set_value);
2944
2945int drm_connector_property_get_value(struct drm_connector *connector,
2946 struct drm_property *property, uint64_t *val)
2947{
2948 return drm_object_property_get_value(&connector->base, property, val);
2949}
2950EXPORT_SYMBOL(drm_connector_property_get_value);
2951
2952void drm_object_attach_property(struct drm_mode_object *obj, 2931void drm_object_attach_property(struct drm_mode_object *obj,
2953 struct drm_property *property, 2932 struct drm_property *property,
2954 uint64_t init_val) 2933 uint64_t init_val)
@@ -3185,7 +3164,7 @@ int drm_mode_connector_update_edid_property(struct drm_connector *connector,
3185 /* Delete edid, when there is none. */ 3164 /* Delete edid, when there is none. */
3186 if (!edid) { 3165 if (!edid) {
3187 connector->edid_blob_ptr = NULL; 3166 connector->edid_blob_ptr = NULL;
3188 ret = drm_connector_property_set_value(connector, dev->mode_config.edid_property, 0); 3167 ret = drm_object_property_set_value(&connector->base, dev->mode_config.edid_property, 0);
3189 return ret; 3168 return ret;
3190 } 3169 }
3191 3170
@@ -3195,7 +3174,7 @@ int drm_mode_connector_update_edid_property(struct drm_connector *connector,
3195 if (!connector->edid_blob_ptr) 3174 if (!connector->edid_blob_ptr)
3196 return -EINVAL; 3175 return -EINVAL;
3197 3176
3198 ret = drm_connector_property_set_value(connector, 3177 ret = drm_object_property_set_value(&connector->base,
3199 dev->mode_config.edid_property, 3178 dev->mode_config.edid_property,
3200 connector->edid_blob_ptr->base.id); 3179 connector->edid_blob_ptr->base.id);
3201 3180
@@ -3262,7 +3241,7 @@ static int drm_mode_connector_set_obj_prop(struct drm_mode_object *obj,
3262 3241
3263 /* store the property value if successful */ 3242 /* store the property value if successful */
3264 if (!ret) 3243 if (!ret)
3265 drm_connector_property_set_value(connector, property, value); 3244 drm_object_property_set_value(&connector->base, property, value);
3266 return ret; 3245 return ret;
3267} 3246}
3268 3247
diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
index 05e623a5d095..954d175bd7fa 100644
--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/drm_fb_helper.c
@@ -348,7 +348,7 @@ static void drm_fb_helper_dpms(struct fb_info *info, int dpms_mode)
348 for (j = 0; j < fb_helper->connector_count; j++) { 348 for (j = 0; j < fb_helper->connector_count; j++) {
349 connector = fb_helper->connector_info[j]->connector; 349 connector = fb_helper->connector_info[j]->connector;
350 connector->funcs->dpms(connector, dpms_mode); 350 connector->funcs->dpms(connector, dpms_mode);
351 drm_connector_property_set_value(connector, 351 drm_object_property_set_value(&connector->base,
352 dev->mode_config.dpms_property, dpms_mode); 352 dev->mode_config.dpms_property, dpms_mode);
353 } 353 }
354 } 354 }
diff --git a/drivers/gpu/drm/drm_sysfs.c b/drivers/gpu/drm/drm_sysfs.c
index 05cd8fe062af..02296653a058 100644
--- a/drivers/gpu/drm/drm_sysfs.c
+++ b/drivers/gpu/drm/drm_sysfs.c
@@ -182,7 +182,7 @@ static ssize_t dpms_show(struct device *device,
182 uint64_t dpms_status; 182 uint64_t dpms_status;
183 int ret; 183 int ret;
184 184
185 ret = drm_connector_property_get_value(connector, 185 ret = drm_object_property_get_value(&connector->base,
186 dev->mode_config.dpms_property, 186 dev->mode_config.dpms_property,
187 &dpms_status); 187 &dpms_status);
188 if (ret) 188 if (ret)
@@ -277,7 +277,7 @@ static ssize_t subconnector_show(struct device *device,
277 return 0; 277 return 0;
278 } 278 }
279 279
280 ret = drm_connector_property_get_value(connector, prop, &subconnector); 280 ret = drm_object_property_get_value(&connector->base, prop, &subconnector);
281 if (ret) 281 if (ret)
282 return 0; 282 return 0;
283 283
@@ -318,7 +318,7 @@ static ssize_t select_subconnector_show(struct device *device,
318 return 0; 318 return 0;
319 } 319 }
320 320
321 ret = drm_connector_property_get_value(connector, prop, &subconnector); 321 ret = drm_object_property_get_value(&connector->base, prop, &subconnector);
322 if (ret) 322 if (ret)
323 return 0; 323 return 0;
324 324
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
index c0635b7f8696..ee9b0b59237f 100644
--- a/include/drm/drm_crtc.h
+++ b/include/drm/drm_crtc.h
@@ -920,12 +920,6 @@ extern void drm_mode_set_crtcinfo(struct drm_display_mode *p,
920extern void drm_mode_connector_list_update(struct drm_connector *connector); 920extern void drm_mode_connector_list_update(struct drm_connector *connector);
921extern int drm_mode_connector_update_edid_property(struct drm_connector *connector, 921extern int drm_mode_connector_update_edid_property(struct drm_connector *connector,
922 struct edid *edid); 922 struct edid *edid);
923extern int drm_connector_property_set_value(struct drm_connector *connector,
924 struct drm_property *property,
925 uint64_t value);
926extern int drm_connector_property_get_value(struct drm_connector *connector,
927 struct drm_property *property,
928 uint64_t *value);
929extern int drm_object_property_set_value(struct drm_mode_object *obj, 923extern int drm_object_property_set_value(struct drm_mode_object *obj,
930 struct drm_property *property, 924 struct drm_property *property,
931 uint64_t val); 925 uint64_t val);
@@ -947,8 +941,6 @@ extern int drmfb_remove(struct drm_device *dev, struct drm_framebuffer *fb);
947extern void drm_crtc_probe_connector_modes(struct drm_device *dev, int maxX, int maxY); 941extern void drm_crtc_probe_connector_modes(struct drm_device *dev, int maxX, int maxY);
948extern bool drm_crtc_in_use(struct drm_crtc *crtc); 942extern bool drm_crtc_in_use(struct drm_crtc *crtc);
949 943
950extern void drm_connector_attach_property(struct drm_connector *connector,
951 struct drm_property *property, uint64_t init_val);
952extern void drm_object_attach_property(struct drm_mode_object *obj, 944extern void drm_object_attach_property(struct drm_mode_object *obj,
953 struct drm_property *property, 945 struct drm_property *property,
954 uint64_t init_val); 946 uint64_t init_val);