Skip to content

Commit

Permalink
drm: Retain reference to blob properties in lookup
Browse files Browse the repository at this point in the history
When we look up a blob property, make sure we retain a reference to the
blob for the lifetime.

v2: Use DRM_MODE_PROP_BLOB, not PROP_OBJECT + OBJECT_BLOB.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Tested-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
  • Loading branch information
Daniel Stone authored and Daniel Vetter committed May 26, 2015
1 parent e2f5d2e commit da9b2a3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/gpu/drm/drm_crtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -4775,7 +4775,8 @@ void drm_property_change_valid_put(struct drm_property *property,
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));
}
} 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 da9b2a3

Please sign in to comment.