Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/msm/gpu: add support for ocmem interconnect path

Some A3xx and all A4xx Adreno GPUs do not have GMEM inside the GPU core
and must use the On Chip MEMory (OCMEM) in order to be functional.
There's a separate interconnect path that needs to be setup to OCMEM.
Add support for this second path to the GPU core.

In the downstream MSM 3.4 sources, the two interconnect paths for the
GPU are between:

- MSM_BUS_MASTER_GRAPHICS_3D and MSM_BUS_SLAVE_EBI_CH0
- MSM_BUS_MASTER_V_OCMEM_GFX3D and MSM_BUS_SLAVE_OCMEM

Signed-off-by: Brian Masney <masneyb@onstation.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Rob Clark <robdclark@chromium.org>

authored by

Brian Masney and committed by
Rob Clark
00bb9243 b435f8b4

+20 -1
+13 -1
drivers/gpu/drm/msm/adreno/adreno_gpu.c
··· 887 887 DBG("fast_rate=%u, slow_rate=27000000", gpu->fast_rate); 888 888 889 889 /* Check for an interconnect path for the bus */ 890 - gpu->icc_path = of_icc_get(dev, NULL); 890 + gpu->icc_path = of_icc_get(dev, "gfx-mem"); 891 + if (!gpu->icc_path) { 892 + /* 893 + * Keep compatbility with device trees that don't have an 894 + * interconnect-names property. 895 + */ 896 + gpu->icc_path = of_icc_get(dev, NULL); 897 + } 891 898 if (IS_ERR(gpu->icc_path)) 892 899 gpu->icc_path = NULL; 900 + 901 + gpu->ocmem_icc_path = of_icc_get(dev, "ocmem"); 902 + if (IS_ERR(gpu->ocmem_icc_path)) 903 + gpu->ocmem_icc_path = NULL; 893 904 894 905 return 0; 895 906 } ··· 988 977 release_firmware(adreno_gpu->fw[i]); 989 978 990 979 icc_put(gpu->icc_path); 980 + icc_put(gpu->ocmem_icc_path); 991 981 992 982 msm_gpu_cleanup(&adreno_gpu->base); 993 983 }
+7
drivers/gpu/drm/msm/msm_gpu.h
··· 111 111 struct clk *ebi1_clk, *core_clk, *rbbmtimer_clk; 112 112 uint32_t fast_rate; 113 113 114 + /* The gfx-mem interconnect path that's used by all GPU types. */ 114 115 struct icc_path *icc_path; 116 + 117 + /* 118 + * Second interconnect path for some A3xx and all A4xx GPUs to the 119 + * On Chip MEMory (OCMEM). 120 + */ 121 + struct icc_path *ocmem_icc_path; 115 122 116 123 /* Hang and Inactivity Detection: 117 124 */