drm/msm/mdp5: release SMB (shared memory blocks) in various cases
authorWentao Xu <wentaox@codeaurora.org>
Fri, 19 Jun 2015 18:03:42 +0000 (14:03 -0400)
committerRob Clark <robdclark@gmail.com>
Wed, 29 Jul 2015 20:38:24 +0000 (16:38 -0400)
commitb4cba04f05ed6b9b2278547295ecc5c40180e612
tree4c7febf82b93f36f313d714cbf75cef3e3a57e28
parent99fc1bc48f352185f1711795f0829bbf503c0712
drm/msm/mdp5: release SMB (shared memory blocks) in various cases

Release all blocks after the pipe is disabled, even when vsync
didn't happen in some error cases. Allow requesting SMB multiple
times before configuring to hardware, by releasing blocks not
programmed to hardware yet for shrinking case.

This fixes a potential leak of shared memory pool blocks.

Signed-off-by: Wentao Xu <wentaox@codeaurora.org>
Tested-by: Archit Taneja <architt@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c
drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.h
drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c
drivers/gpu/drm/msm/mdp/mdp5/mdp5_smp.c
drivers/gpu/drm/msm/mdp/mdp5/mdp5_smp.h