rockchip/vcodec: fix crash on decoder buffer empty
authorHerman Chen <herman.chen@rock-chips.com>
Mon, 29 Aug 2016 10:04:44 +0000 (18:04 +0800)
committerHuang, Tao <huangtao@rock-chips.com>
Mon, 29 Aug 2016 11:46:26 +0000 (19:46 +0800)
commitd16a8c722057ce403f0a28f6aaee205d8a25ea71
tree469b8ea8c012f7d129a14255e8b010276453aa10
parent849db440c50957eb59510e9d2e3fdf932e12545c
rockchip/vcodec: fix crash on decoder buffer empty

On vpu2 register separate interrupt bit and enable bit to different
register. When decoder found a buffer empty error which means the input
stream is not enough for one complete frame decoder will not stop
reading input stream buffer until it reach the end of buffer. This will
cause mmu fault on the buffer end.

In order to avoid this case decoder need to clear the enable bit in the
enable register to stop decoder from reading.

Change-Id: I6133aa4611fab03f6545b4775e8ee2320552445f
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
drivers/video/rockchip/vcodec/vcodec_service.c