]> git.baikalelectronics.ru Git - kernel.git/commit
drm: fix fb refcount issue with atomic modesetting
authorTomi Valkeinen <tomi.valkeinen@ti.com>
Tue, 31 May 2016 12:03:18 +0000 (15:03 +0300)
committerDave Airlie <airlied@redhat.com>
Wed, 1 Jun 2016 05:00:05 +0000 (15:00 +1000)
commit3dca34206c16aa115f1f5bcdc15c8715f0663098
treea27724548bdf427e1ed00be91e03d376a0beae3e
parent56a154e247fbd756cfc50f7280651c20505ae032
drm: fix fb refcount issue with atomic modesetting

After commit 85e9be3c4c6df02f21c5229c8084946bc8d744cc ("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: 85e9be3c4c6d ("drm/modes: stop handling framebuffer special")
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/drm_crtc.c