diff --git a/msm/sde_rsc.c b/msm/sde_rsc.c index e1ca451718..eb2cdd3fd0 100644 --- a/msm/sde_rsc.c +++ b/msm/sde_rsc.c @@ -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. */ @@ -29,6 +30,9 @@ #define SINGLE_TCS_EXECUTION_TIME_V1 1064000 #define SINGLE_TCS_EXECUTION_TIME_V2 930000 +#define SINGLE_TCS_EXECUTION_TIME_V3 930000 +#define SINGLE_TCS_EXECUTION_TIME_V4 930000 +#define SINGLE_TCS_EXECUTION_TIME_V5 650000 #define RSC_MODE_INSTRUCTION_TIME 100 #define RSC_MODE_THRESHOLD_OVERHEAD 2700 @@ -1713,10 +1717,24 @@ static int sde_rsc_probe(struct platform_device *pdev) of_property_read_u32(pdev->dev.of_node, "qcom,sde-rsc-version", &rsc->version); - if (rsc->version >= SDE_RSC_REV_2) - rsc->single_tcs_execution_time = SINGLE_TCS_EXECUTION_TIME_V2; - else + switch (rsc->version) { + case SDE_RSC_REV_1: rsc->single_tcs_execution_time = SINGLE_TCS_EXECUTION_TIME_V1; + break; + case SDE_RSC_REV_2: + rsc->single_tcs_execution_time = SINGLE_TCS_EXECUTION_TIME_V2; + break; + case SDE_RSC_REV_3: + rsc->single_tcs_execution_time = SINGLE_TCS_EXECUTION_TIME_V3; + break; + case SDE_RSC_REV_4: + rsc->single_tcs_execution_time = SINGLE_TCS_EXECUTION_TIME_V4; + break; + case SDE_RSC_REV_5: + default: + rsc->single_tcs_execution_time = SINGLE_TCS_EXECUTION_TIME_V5; + break; + } if (rsc->version >= SDE_RSC_REV_3) { rsc->time_slot_0_ns = rsc->single_tcs_execution_time diff --git a/msm/sde_rsc_priv.h b/msm/sde_rsc_priv.h index 16d83ea2b5..155cd3dc62 100644 --- a/msm/sde_rsc_priv.h +++ b/msm/sde_rsc_priv.h @@ -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-2020, The Linux Foundation. All rights reserved. */ @@ -28,6 +29,7 @@ #define SDE_RSC_REV_2 0x2 #define SDE_RSC_REV_3 0x3 #define SDE_RSC_REV_4 0x4 +#define SDE_RSC_REV_5 0x5 #define SDE_RSC_HW_MAJOR_MINOR_STEP(major, minor, step) \ (((major & 0xff) << 16) |\ @@ -181,7 +183,7 @@ struct sde_rsc_bw_config { * primary_client: A client which is allowed to make command state request * and ab/ib vote on display rsc * single_tcs_execution_time: worst case time to execute one tcs vote - * (sleep/wake) + * (sleep/wake), in ns * backoff_time_ns: time to only wake tcs in any mode * mode_threshold_time_ns: time to wake TCS in mode-0, must be greater than * backoff time