mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 15:11:48 -04:00
disp: msm: sde: avoid sde irq enable or disable when sde irq not active
During the sde_irq_update, the sde irq may not be active, the enable or disable will be nonsence. set the irq_num init value to negtive, if this value change, means sde irq_num has been initial. Change-Id: I7b23c662ccc9db0b38550897adb939305d941e6a Signed-off-by: longzhao <longzhao@codeaurora.org>
This commit is contained in:
parent
a245be26e4
commit
77edd61d98
2 changed files with 4 additions and 1 deletions
|
|
@ -1,6 +1,6 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2015-2019, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2015-2019, 2021, The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
#define pr_fmt(fmt) "[drm:%s:%d] " fmt, __func__, __LINE__
|
||||
|
|
@ -22,6 +22,8 @@ void sde_irq_update(struct msm_kms *msm_kms, bool enable)
|
|||
SDE_ERROR("invalid kms arguments\n");
|
||||
return;
|
||||
}
|
||||
if (sde_kms->irq_num < 0)
|
||||
return;
|
||||
|
||||
sde_kms->irq_enabled = enable;
|
||||
|
||||
|
|
|
|||
|
|
@ -4795,6 +4795,7 @@ struct msm_kms *sde_kms_init(struct drm_device *dev)
|
|||
|
||||
msm_kms_init(&sde_kms->base, &kms_funcs);
|
||||
sde_kms->dev = dev;
|
||||
sde_kms->irq_num = -1;
|
||||
|
||||
return &sde_kms->base;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue