Skip to content

Commit 027b3f8

Browse files
committed
drm/modes: stop handling framebuffer special
Since ref counting is in the object now we can just call the normal interfaces. Reviewed-by: Daniel Vetter <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
1 parent 2ddea3f commit 027b3f8

File tree

1 file changed

+2
-15
lines changed

1 file changed

+2
-15
lines changed

drivers/gpu/drm/drm_crtc.c

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4850,19 +4850,7 @@ bool drm_property_change_valid_get(struct drm_property *property,
48504850
if (value == 0)
48514851
return true;
48524852

4853-
/* handle refcnt'd objects specially: */
4854-
if (property->values[0] == DRM_MODE_OBJECT_FB) {
4855-
struct drm_framebuffer *fb;
4856-
fb = drm_framebuffer_lookup(property->dev, value);
4857-
if (fb) {
4858-
*ref = &fb->base;
4859-
return true;
4860-
} else {
4861-
return false;
4862-
}
4863-
} else {
4864-
return _object_find(property->dev, value, property->values[0]) != NULL;
4865-
}
4853+
return _object_find(property->dev, value, property->values[0]) != NULL;
48664854
}
48674855

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

48804868
if (drm_property_type_is(property, DRM_MODE_PROP_OBJECT)) {
4881-
if (property->values[0] == DRM_MODE_OBJECT_FB)
4882-
drm_framebuffer_unreference(obj_to_fb(ref));
4869+
drm_mode_object_unreference(ref);
48834870
} else if (drm_property_type_is(property, DRM_MODE_PROP_BLOB))
48844871
drm_property_unreference_blob(obj_to_blob(ref));
48854872
}

0 commit comments

Comments
 (0)