drm/msm/a4xx: set interconnect bandwidth vote
authorBrian Masney <masneyb@onstation.org>
Fri, 22 Nov 2019 01:26:45 +0000 (20:26 -0500)
committerRob Clark <robdclark@chromium.org>
Thu, 2 Jan 2020 22:23:48 +0000 (14:23 -0800)
Set the two interconnect paths for the GPU to maximum speed for now to
work towards getting the GPU working upstream. We can revisit a later
time to optimize this for battery life.

Signed-off-by: Brian Masney <masneyb@onstation.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Rob Clark <robdclark@chromium.org>
drivers/gpu/drm/msm/adreno/a4xx_gpu.c

index b01388a9e89e41ed6e6494ce277382286023cdc0..253d8d85daad651c12672081172fbaf4491925da 100644 (file)
@@ -591,6 +591,14 @@ struct msm_gpu *a4xx_gpu_init(struct drm_device *dev)
                goto fail;
        }
 
+       /*
+        * Set the ICC path to maximum speed for now by multiplying the fastest
+        * frequency by the bus width (8). We'll want to scale this later on to
+        * improve battery life.
+        */
+       icc_set_bw(gpu->icc_path, 0, Bps_to_icc(gpu->fast_rate) * 8);
+       icc_set_bw(gpu->ocmem_icc_path, 0, Bps_to_icc(gpu->fast_rate) * 8);
+
        return gpu;
 
 fail: