Skip to content

Commit

Permalink
drm/modes: stop handling framebuffer special
Browse files Browse the repository at this point in the history
Since ref counting is in the object now we can just call the
normal interfaces.

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
  • Loading branch information
Dave Airlie committed Apr 22, 2016
1 parent 2ddea3f commit 027b3f8
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions drivers/gpu/drm/drm_crtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -4850,19 +4850,7 @@ bool drm_property_change_valid_get(struct drm_property *property,
if (value == 0)
return true;

/* handle refcnt'd objects specially: */
if (property->values[0] == DRM_MODE_OBJECT_FB) {
struct drm_framebuffer *fb;
fb = drm_framebuffer_lookup(property->dev, value);
if (fb) {
*ref = &fb->base;
return true;
} else {
return false;
}
} else {
return _object_find(property->dev, value, property->values[0]) != NULL;
}
return _object_find(property->dev, value, property->values[0]) != NULL;
}

for (i = 0; i < property->num_values; i++)
Expand All @@ -4878,8 +4866,7 @@ void drm_property_change_valid_put(struct drm_property *property,
return;

if (drm_property_type_is(property, DRM_MODE_PROP_OBJECT)) {
if (property->values[0] == DRM_MODE_OBJECT_FB)
drm_framebuffer_unreference(obj_to_fb(ref));
drm_mode_object_unreference(ref);
} else if (drm_property_type_is(property, DRM_MODE_PROP_BLOB))
drm_property_unreference_blob(obj_to_blob(ref));
}
Expand Down

0 comments on commit 027b3f8

Please sign in to comment.