aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_crtc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/drm_crtc.c')
-rw-r--r--drivers/gpu/drm/drm_crtc.c21
1 files changed, 5 insertions, 16 deletions
diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
index 2e880240477e..ece947d3b25b 100644
--- a/drivers/gpu/drm/drm_crtc.c
+++ b/drivers/gpu/drm/drm_crtc.c
@@ -804,7 +804,6 @@ void drm_mode_config_init(struct drm_device *dev)
804 dev->mode_config.num_connector = 0; 804 dev->mode_config.num_connector = 0;
805 dev->mode_config.num_crtc = 0; 805 dev->mode_config.num_crtc = 0;
806 dev->mode_config.num_encoder = 0; 806 dev->mode_config.num_encoder = 0;
807 dev->mode_config.hotplug_counter = 0;
808} 807}
809EXPORT_SYMBOL(drm_mode_config_init); 808EXPORT_SYMBOL(drm_mode_config_init);
810 809
@@ -900,16 +899,6 @@ void drm_mode_config_cleanup(struct drm_device *dev)
900} 899}
901EXPORT_SYMBOL(drm_mode_config_cleanup); 900EXPORT_SYMBOL(drm_mode_config_cleanup);
902 901
903int drm_mode_hotplug_ioctl(struct drm_device *dev,
904 void *data, struct drm_file *file_priv)
905{
906 struct drm_mode_hotplug *arg = data;
907
908 arg->counter = dev->mode_config.hotplug_counter;
909
910 return 0;
911}
912
913/** 902/**
914 * drm_crtc_convert_to_umode - convert a drm_display_mode into a modeinfo 903 * drm_crtc_convert_to_umode - convert a drm_display_mode into a modeinfo
915 * @out: drm_mode_modeinfo struct to return to the user 904 * @out: drm_mode_modeinfo struct to return to the user
@@ -1543,9 +1532,9 @@ int drm_mode_cursor_ioctl(struct drm_device *dev,
1543 } 1532 }
1544 1533
1545 mutex_lock(&dev->mode_config.mutex); 1534 mutex_lock(&dev->mode_config.mutex);
1546 obj = drm_mode_object_find(dev, req->crtc, DRM_MODE_OBJECT_CRTC); 1535 obj = drm_mode_object_find(dev, req->crtc_id, DRM_MODE_OBJECT_CRTC);
1547 if (!obj) { 1536 if (!obj) {
1548 DRM_DEBUG("Unknown CRTC ID %d\n", req->crtc); 1537 DRM_DEBUG("Unknown CRTC ID %d\n", req->crtc_id);
1549 ret = -EINVAL; 1538 ret = -EINVAL;
1550 goto out; 1539 goto out;
1551 } 1540 }
@@ -1622,7 +1611,7 @@ int drm_mode_addfb(struct drm_device *dev,
1622 goto out; 1611 goto out;
1623 } 1612 }
1624 1613
1625 r->buffer_id = fb->base.id; 1614 r->fb_id = fb->base.id;
1626 list_add(&fb->filp_head, &file_priv->fbs); 1615 list_add(&fb->filp_head, &file_priv->fbs);
1627 1616
1628out: 1617out:
@@ -1714,7 +1703,7 @@ int drm_mode_getfb(struct drm_device *dev,
1714 int ret = 0; 1703 int ret = 0;
1715 1704
1716 mutex_lock(&dev->mode_config.mutex); 1705 mutex_lock(&dev->mode_config.mutex);
1717 obj = drm_mode_object_find(dev, r->buffer_id, DRM_MODE_OBJECT_FB); 1706 obj = drm_mode_object_find(dev, r->fb_id, DRM_MODE_OBJECT_FB);
1718 if (!obj) { 1707 if (!obj) {
1719 DRM_ERROR("invalid framebuffer id\n"); 1708 DRM_ERROR("invalid framebuffer id\n");
1720 ret = -EINVAL; 1709 ret = -EINVAL;
@@ -2326,7 +2315,7 @@ int drm_mode_replacefb(struct drm_device *dev,
2326 2315
2327 /* right replace the current bo attached to this fb with a new bo */ 2316 /* right replace the current bo attached to this fb with a new bo */
2328 mutex_lock(&dev->mode_config.mutex); 2317 mutex_lock(&dev->mode_config.mutex);
2329 obj = drm_mode_object_find(dev, r->buffer_id, DRM_MODE_OBJECT_FB); 2318 obj = drm_mode_object_find(dev, r->fb_id, DRM_MODE_OBJECT_FB);
2330 if (!obj) { 2319 if (!obj) {
2331 ret = -EINVAL; 2320 ret = -EINVAL;
2332 goto out; 2321 goto out;