1
0
Fork 0

MGS-4061 gpu: imx: dpu-blit: fix kernel panic in pm test

resume will increase unlock counter, max allowed value is 15.
suspend need decrease unlock counter to avoid overflow panic.

Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
(cherry picked from commit 0582cd50ed70f932158fe20d6caf2f4ad68eabf0)
(cherry picked from commit a9b740f91b05398564bf776e4f1959e44c876938)
5.4-rM2-2.2.x-imx-squashed
Xianzhong 2018-07-10 21:44:44 +08:00 committed by Dong Aisheng
parent 20d50b459f
commit 89be3ec26d
2 changed files with 8 additions and 0 deletions

View File

@ -250,9 +250,11 @@
#define CMDSEQ_HIF ((uint32_t)(0x400))
#define CMDSEQ_LOCKUNLOCKHIF ((uint32_t)(0x500))
#define CMDSEQ_LOCKUNLOCKHIF_LOCKUNLOCKHIF__LOCK_KEY 0x5651F763U
#define CMDSEQ_LOCKUNLOCKHIF_LOCKUNLOCKHIF__UNLOCK_KEY 0x691DB936U
#define CMDSEQ_LOCKUNLOCK ((uint32_t)(0x580))
#define CMDSEQ_LOCKUNLOCK_LOCKUNLOCK__LOCK_KEY 0x5651F763U
#define CMDSEQ_LOCKUNLOCK_LOCKUNLOCK__UNLOCK_KEY 0x691DB936U
#define CMDSEQ_BUFFERADDRESS ((uint32_t)(0x588))

View File

@ -396,6 +396,12 @@ EXPORT_SYMBOL_GPL(dpu_bliteng_init);
void dpu_bliteng_fini(struct dpu_bliteng *dpu_bliteng)
{
/* LockUnlock and LockUnlockHIF */
dpu_be_write(dpu_bliteng, CMDSEQ_LOCKUNLOCKHIF_LOCKUNLOCKHIF__LOCK_KEY,
CMDSEQ_LOCKUNLOCKHIF);
dpu_be_write(dpu_bliteng, CMDSEQ_LOCKUNLOCK_LOCKUNLOCK__LOCK_KEY,
CMDSEQ_LOCKUNLOCK);
kfree(dpu_bliteng->cmd_list);
if (dpu_bliteng->buffer_addr_virt)