drm/exynos: Unreference fb in exynos_disable_plane()
Subsystems (3)
Inki Dae
maintainerFrom: YoungJun Cho <[email protected]>
This patch is for unreferencing the (current)fb if plane->fb is existed in exynos_disable_plane(). In exynos_update_plane(), the new fb reference count can be bigger than 1.
So it can't be removed for that reference count.
And this patch is based on exynos-drm-next.
Signed-off-by YoungJun Cho <[email protected]>
Signed-off-by Inki Dae <[email protected]>
Signed-off-by Kyungmin Park <[email protected]>
--- drivers/gpu/drm/exynos/exynos_drm_plane.c | 12 +++++++++++- 1 files changed, 11 insertions(+), 1 deletions(-)
drivers/gpu/drm/exynos/exynos_drm_plane.c +11 -1
@@ -161,13 +161,15 @@ exynos_update_plane(struct drm_plane *plane, struct drm_crtc *crtc,if (plane->fb)drm_framebuffer_unreference (plane->fb); + plane->fb = fb; +/* * Take a reference to new fb. * * Taking a reference means that this plane's dma is going to access * memory region to the new fb. */ -drm_framebuffer_reference (fb); +drm_framebuffer_reference (plane->fb); plane->crtc = crtc;exynos_plane_commit (plane);
@@ -180,6 +182,14 @@ static int exynos_disable_plane(struct drm_plane *plane) {DRM_DEBUG_KMS ("[%d] %s\n" , __LINE__, __func__); +/* +* Unreference the (current)fb if plane->fb is existed. +* In exynos_update_plane(), the new fb reference count can be bigger +* than 1. So it can't be removed for that reference count. +*/ +if (plane->fb) +drm_framebuffer_unreference (plane->fb); +exynos_plane_dpms (plane,DRM_MODE_DPMS_OFF );return 0 ;
Signature · 1 line
1.7.4.1