disp: msm: use pm_runtime_resume_and_get instead of pm_runtime_get_sync

pm_runtime_get_sync increases the usage_count refcount immaterial of
success/failure of the call, leading to invalid refcount on failures.
Use pm_runtime_resume_and_get instead, which takes care of reducing the
refcount on failure cases before returning from the function.

Change-Id: Ib96050d5d7ecbd717e58b8a0dde2d03312444e15
Signed-off-by: Veera Sundaram Sankaran <quic_veeras@quicinc.com>
This commit is contained in:
Veera Sundaram Sankaran
2021-12-14 11:26:15 -08:00
parent e7c09f0092
commit 56862f8118
11 changed files with 75 additions and 46 deletions

View File

@@ -1,5 +1,6 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2016-2021, The Linux Foundation. All rights reserved.
*/
@@ -5283,10 +5284,10 @@ int dsi_display_cont_splash_config(void *dsi_display)
return -EINVAL;
}
rc = pm_runtime_get_sync(display->drm_dev->dev);
rc = pm_runtime_resume_and_get(display->drm_dev->dev);
if (rc < 0) {
DSI_ERR("failed to vote gdsc for continuous splash, rc=%d\n",
rc);
DSI_ERR("failed to enable power resource %d\n", rc);
SDE_EVT32(rc, SDE_EVTLOG_ERROR);
return rc;
}