mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 23:24:22 -04:00
drivers: soc: qcom: rpmh: Correctly set dirty flag
Currently rpmh dirty flag is set for all cases regardless of data is really updated or not. Correct it to update for only those cases where data is updated. Change-Id: I2c87ffbf1bae23ddd4b4cb7dced213cac267df59 Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
This commit is contained in:
parent
158a6ac631
commit
800b8a605c
1 changed files with 12 additions and 5 deletions
|
|
@ -1,5 +1,5 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/* Copyright (c) 2016-2019, The Linux Foundation. All rights reserved. */
|
||||
/* Copyright (c) 2016-2020, The Linux Foundation. All rights reserved. */
|
||||
|
||||
#include <linux/atomic.h>
|
||||
#include <linux/bug.h>
|
||||
|
|
@ -175,20 +175,27 @@ static struct cache_req *cache_rpm_request(struct rpmh_ctrlr *ctrlr,
|
|||
existing:
|
||||
switch (state) {
|
||||
case RPMH_ACTIVE_ONLY_STATE:
|
||||
if (req->sleep_val != UINT_MAX)
|
||||
if (req->sleep_val != UINT_MAX) {
|
||||
req->wake_val = cmd->data;
|
||||
ctrlr->dirty = true;
|
||||
}
|
||||
break;
|
||||
case RPMH_WAKE_ONLY_STATE:
|
||||
req->wake_val = cmd->data;
|
||||
if (req->wake_val != cmd->data) {
|
||||
req->wake_val = cmd->data;
|
||||
ctrlr->dirty = true;
|
||||
}
|
||||
break;
|
||||
case RPMH_SLEEP_STATE:
|
||||
req->sleep_val = cmd->data;
|
||||
if (req->sleep_val != cmd->data) {
|
||||
req->sleep_val = cmd->data;
|
||||
ctrlr->dirty = true;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
ctrlr->dirty = true;
|
||||
unlock:
|
||||
spin_unlock_irqrestore(&ctrlr->cache_lock, flags);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue