From: Daniel Stone Date: Mon, 25 May 2015 18:11:49 +0000 (+0100) Subject: drm: Retain reference to blob properties in lookup X-Git-Tag: v4.14-rc1~5088^2~41^2~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=da9b2a381a32c2a287f99e4be2f372587c53ef14;p=platform%2Fkernel%2Flinux-rpi.git drm: Retain reference to blob properties in lookup 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 Tested-by: Sean Paul Signed-off-by: Daniel Vetter --- diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index e548c50..2de6edf 100644 --- a/drivers/gpu/drm/drm_crtc.c +++ b/drivers/gpu/drm/drm_crtc.c @@ -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)); } /**