msm: kgsl: Set PERF_MODE tag for all targets
PERF_MODE tag is needed for rpmh based non-gmu targets. Now interconnect driver is properly handling the SLEEP tag and PERF_MODE tag. PERF_MODE tag will be honoured where supported (rpmh) and discarded where not supported (rpm). Hence follow the below now 1. Set the tags at a common place for all targets (gmu and non-gmu). 2. Make use of common tags provided by interconnect driver. 3. Set ALWAYS tag which will keep GPU vote active even if the APPS goes to low power mode while the GPU is running. 4. Set PERF_MODE tag along with ALWAYS tag for GPU Fmax. Change-Id: I6b1a688c584e9cbc0154e3b8d062b9bcc2bae385 Signed-off-by: Harshitha Sai Neelati <quic_hsaineel@quicinc.com>
This commit is contained in:
parent
49e159927f
commit
1e1a07af77
@ -25,7 +25,6 @@
|
||||
#include "adreno.h"
|
||||
#include "adreno_a6xx.h"
|
||||
#include "adreno_trace.h"
|
||||
#include "kgsl_bus.h"
|
||||
#include "kgsl_device.h"
|
||||
#include "kgsl_trace.h"
|
||||
#include "kgsl_util.h"
|
||||
@ -2455,8 +2454,6 @@ static int a6xx_gmu_bus_set(struct adreno_device *adreno_dev, int buslevel,
|
||||
struct kgsl_pwrctrl *pwr = &device->pwrctrl;
|
||||
int ret = 0;
|
||||
|
||||
kgsl_icc_set_tag(pwr, buslevel);
|
||||
|
||||
if (buslevel != pwr->cur_buslevel) {
|
||||
ret = a6xx_gmu_dcvs_set(adreno_dev, INVALID_DCVS_IDX, buslevel);
|
||||
if (ret)
|
||||
|
@ -14,7 +14,6 @@
|
||||
#include "adreno_a6xx_hwsched.h"
|
||||
#include "adreno_hfi.h"
|
||||
#include "adreno_snapshot.h"
|
||||
#include "kgsl_bus.h"
|
||||
#include "kgsl_device.h"
|
||||
#include "kgsl_trace.h"
|
||||
#include "kgsl_util.h"
|
||||
@ -1034,8 +1033,6 @@ static int a6xx_hwsched_bus_set(struct adreno_device *adreno_dev, int buslevel,
|
||||
struct kgsl_pwrctrl *pwr = &device->pwrctrl;
|
||||
int ret = 0;
|
||||
|
||||
kgsl_icc_set_tag(pwr, buslevel);
|
||||
|
||||
if (buslevel != pwr->cur_buslevel) {
|
||||
ret = a6xx_hwsched_dcvs_set(adreno_dev, INVALID_DCVS_IDX,
|
||||
buslevel);
|
||||
|
@ -26,7 +26,6 @@
|
||||
#include "adreno.h"
|
||||
#include "adreno_gen7.h"
|
||||
#include "adreno_trace.h"
|
||||
#include "kgsl_bus.h"
|
||||
#include "kgsl_device.h"
|
||||
#include "kgsl_trace.h"
|
||||
#include "kgsl_util.h"
|
||||
@ -2031,8 +2030,6 @@ static int gen7_gmu_bus_set(struct adreno_device *adreno_dev, int buslevel,
|
||||
struct kgsl_pwrctrl *pwr = &device->pwrctrl;
|
||||
int ret = 0;
|
||||
|
||||
kgsl_icc_set_tag(pwr, buslevel);
|
||||
|
||||
if (buslevel != pwr->cur_buslevel) {
|
||||
ret = gen7_gmu_dcvs_set(adreno_dev, INVALID_DCVS_IDX, buslevel);
|
||||
if (ret)
|
||||
|
@ -13,7 +13,6 @@
|
||||
#include "adreno_gen7.h"
|
||||
#include "adreno_gen7_hwsched.h"
|
||||
#include "adreno_snapshot.h"
|
||||
#include "kgsl_bus.h"
|
||||
#include "kgsl_device.h"
|
||||
#include "kgsl_trace.h"
|
||||
#include "kgsl_util.h"
|
||||
@ -1120,8 +1119,6 @@ static int gen7_hwsched_bus_set(struct adreno_device *adreno_dev, int buslevel,
|
||||
struct kgsl_pwrctrl *pwr = &device->pwrctrl;
|
||||
int ret = 0;
|
||||
|
||||
kgsl_icc_set_tag(pwr, buslevel);
|
||||
|
||||
if (buslevel != pwr->cur_buslevel) {
|
||||
ret = gen7_hwsched_dcvs_set(adreno_dev, INVALID_DCVS_IDX,
|
||||
buslevel);
|
||||
|
@ -4,6 +4,7 @@
|
||||
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <dt-bindings/interconnect/qcom,icc.h>
|
||||
#include <linux/interconnect.h>
|
||||
#include <linux/of.h>
|
||||
#include <soc/qcom/of_common.h>
|
||||
@ -12,9 +13,6 @@
|
||||
#include "kgsl_device.h"
|
||||
#include "kgsl_trace.h"
|
||||
|
||||
#define ACTIVE_ALWAYS_TAG 0x7
|
||||
#define PERF_MODE_TAG 0x8
|
||||
|
||||
static u32 _ab_buslevel_update(struct kgsl_pwrctrl *pwr,
|
||||
u32 ib)
|
||||
{
|
||||
@ -95,15 +93,12 @@ int kgsl_bus_update(struct kgsl_device *device,
|
||||
max(pwr->cur_dcvs_buslevel, pwr->rt_bus_hint) :
|
||||
pwr->cur_dcvs_buslevel;
|
||||
|
||||
return device->ftbl->gpu_bus_set(device, buslevel, ab);
|
||||
}
|
||||
|
||||
void kgsl_icc_set_tag(struct kgsl_pwrctrl *pwr, int buslevel)
|
||||
{
|
||||
if (buslevel == pwr->pwrlevels[0].bus_max)
|
||||
icc_set_tag(pwr->icc_path, ACTIVE_ALWAYS_TAG | PERF_MODE_TAG);
|
||||
icc_set_tag(pwr->icc_path, QCOM_ICC_TAG_ALWAYS | QCOM_ICC_TAG_PERF_MODE);
|
||||
else
|
||||
icc_set_tag(pwr->icc_path, ACTIVE_ALWAYS_TAG);
|
||||
icc_set_tag(pwr->icc_path, QCOM_ICC_TAG_ALWAYS);
|
||||
|
||||
return device->ftbl->gpu_bus_set(device, buslevel, ab);
|
||||
}
|
||||
|
||||
static void validate_pwrlevels(struct kgsl_device *device, u32 *ibs,
|
||||
|
@ -17,12 +17,10 @@ enum kgsl_bus_vote {
|
||||
|
||||
struct kgsl_device;
|
||||
struct platform_device;
|
||||
struct kgsl_pwrctrl;
|
||||
|
||||
int kgsl_bus_init(struct kgsl_device *device, struct platform_device *pdev);
|
||||
void kgsl_bus_close(struct kgsl_device *device);
|
||||
int kgsl_bus_update(struct kgsl_device *device, enum kgsl_bus_vote vote_state);
|
||||
void kgsl_icc_set_tag(struct kgsl_pwrctrl *pwr, int buslevel);
|
||||
|
||||
u32 *kgsl_bus_get_table(struct platform_device *pdev,
|
||||
const char *name, int *count);
|
||||
|
Loading…
Reference in New Issue
Block a user