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.c40
1 files changed, 0 insertions, 40 deletions
diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
index ece947d3b25b..53c87254be4c 100644
--- a/drivers/gpu/drm/drm_crtc.c
+++ b/drivers/gpu/drm/drm_crtc.c
@@ -2302,46 +2302,6 @@ out:
2302 return ret; 2302 return ret;
2303} 2303}
2304 2304
2305
2306int drm_mode_replacefb(struct drm_device *dev,
2307 void *data, struct drm_file *file_priv)
2308{
2309 struct drm_mode_fb_cmd *r = data;
2310 struct drm_mode_object *obj;
2311 struct drm_framebuffer *fb;
2312 int found = 0;
2313 struct drm_framebuffer *fbl = NULL;
2314 int ret = 0;
2315
2316 /* right replace the current bo attached to this fb with a new bo */
2317 mutex_lock(&dev->mode_config.mutex);
2318 obj = drm_mode_object_find(dev, r->fb_id, DRM_MODE_OBJECT_FB);
2319 if (!obj) {
2320 ret = -EINVAL;
2321 goto out;
2322 }
2323 fb = obj_to_fb(obj);
2324
2325 list_for_each_entry(fbl, &file_priv->fbs, filp_head)
2326 if (fb == fbl)
2327 found = 1;
2328
2329 if (!found) {
2330 DRM_ERROR("tried to replace an fb we didn't own\n");
2331 ret = -EINVAL;
2332 goto out;
2333 }
2334
2335 if (dev->mode_config.funcs->resize_fb)
2336 ret = dev->mode_config.funcs->resize_fb(dev, file_priv, fb, r);
2337 else
2338 ret = -EINVAL;
2339out:
2340 mutex_unlock(&dev->mode_config.mutex);
2341 return ret;
2342
2343}
2344
2345int drm_mode_connector_attach_encoder(struct drm_connector *connector, 2305int drm_mode_connector_attach_encoder(struct drm_connector *connector,
2346 struct drm_encoder *encoder) 2306 struct drm_encoder *encoder)
2347{ 2307{