From 9f0425f9c1434f582ea4e725dc48c2d843cf81b2 Mon Sep 17 00:00:00 2001 From: Jon Hunter Date: Fri, 21 Jan 2022 10:33:44 +0000 Subject: [PATCH] gpu: host1x-nvhost: Fix clock rate setup The host1x-nvhost driver by default configures the clock rates for the host1x client devices to the maximum supported rate because there is runtime clock scaling support yet. However, currently the host1x-nvhost driver is only setting the rate for the client's first clock and not the others. Fix this by correcting the index used when iterating through the list of clocks. JIRA LS-410 Change-Id: If410ee25548c0dddecc5b0de9d8b6f4f687fd73c Signed-off-by: Jon Hunter Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2657897 Tested-by: mobile promotions Reviewed-by: svcacv Reviewed-by: Mikko Perttunen Reviewed-by: mobile promotions GVS: Gerrit_Virtual_Submit --- drivers/gpu/host1x-nvhost/nvhost.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/host1x-nvhost/nvhost.c b/drivers/gpu/host1x-nvhost/nvhost.c index cd5f6436..97a52266 100644 --- a/drivers/gpu/host1x-nvhost/nvhost.c +++ b/drivers/gpu/host1x-nvhost/nvhost.c @@ -631,7 +631,7 @@ int nvhost_module_init(struct platform_device *pdev) pdata->num_clks = err; for (i = 0; i < pdata->num_clks; i++) { - err = clk_set_rate(pdata->clks[0].clk, ULONG_MAX); + err = clk_set_rate(pdata->clks[i].clk, ULONG_MAX); if (err < 0) { dev_err(&pdev->dev, "failed to set clock rate!\n"); return err;