提交 1e8985a8 编写于 作者: T Tomi Valkeinen 提交者: Dave Airlie

drm: fix fb refcount issue with atomic modesetting

After commit 027b3f8b ("drm/modes: stop
handling framebuffer special") extra fb refs are left around when doing
atomic modesetting.

The problem is that the new drm_property_change_valid_get() does not
return anything in the '**ref' parameter, which causes
drm_property_change_valid_put() to do nothing.

For some reason this doesn't cause problems with legacy API.

Also, previously the code only set the 'ref' variable for fbs, with this
patch the 'ref' is set for all objects.

Fixes: 027b3f8b ("drm/modes: stop handling framebuffer special")
Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: NDave Airlie <airlied@redhat.com>
上级 6709887c
......@@ -4839,7 +4839,8 @@ bool drm_property_change_valid_get(struct drm_property *property,
if (value == 0)
return true;
return _object_find(property->dev, value, property->values[0]) != NULL;
*ref = _object_find(property->dev, value, property->values[0]);
return *ref != NULL;
}
for (i = 0; i < property->num_values; i++)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册