gpu: nvgpu: Do not call tegra_pcm_writel/readl

In K5.9 those two functions are changed to reject calls directly
using global pmc pointer. So it's a bit complicated to revert to
the point where GPU can feel free to call them.

For an easier future mantainance, a new set of APIs are added to
all existing kernels to let GPU driver control clamp without any
direct access to PMC registers.

Bug 200663781

Change-Id: Ifce4765525eee6d61083896fc9a126892cbb86ba
Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2441010
Reviewed-by: automaticguardword <automaticguardword@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Nicolin Chen
2020-11-03 18:06:32 -08:00
committed by Alex Waterman
parent f8429c8e7c
commit bd114e8d0f

View File

@@ -342,9 +342,7 @@ static int gm20b_tegra_railgate(struct device *dev)
udelay(10);
/* enable clamp */
tegra_pmc_writel_relaxed(0x1, PMC_GPU_RG_CNTRL_0);
tegra_pmc_readl(PMC_GPU_RG_CNTRL_0);
tegra_pmc_gpu_clamp_enable();
udelay(10);
@@ -458,8 +456,7 @@ static int gm20b_tegra_unrailgate(struct device *dev)
udelay(10);
tegra_pmc_writel_relaxed(0, PMC_GPU_RG_CNTRL_0);
tegra_pmc_readl(PMC_GPU_RG_CNTRL_0);
tegra_pmc_gpu_clamp_disable();
udelay(10);