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>
Fri, 14 Aug 2015 21:10:14 +0000 (17:10 -0400)
commit657c63f0af2d0b44446c840cd42228ef1ebcdce4
tree189ad9f2d2009d787f5d4b8b41bf3a9eaad5f6a3
parenta9702ca23edae7b72dcff266a0c5ae56f6af0fa5
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