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:
longzhao 2021-11-18 18:00:26 +08:00
commit 77edd61d98
2 changed files with 4 additions and 1 deletions

View file

@ -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;

View file

@ -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;
}