Skip to content

Commit 98e5b7f

Browse files
quic-bjorandeandersson
authored andcommitted
drm/msm/adreno: Setup SMMU aparture for per-process page table
Support for per-process page tables requires the SMMU aparture to be setup such that the GPU can make updates with the SMMU. On some targets this is done statically in firmware, on others it's expected to be requested in runtime by the driver, through a SCM call. One place where configuration is expected to be done dynamically is the QCS6490 rb3gen2. The downstream driver does this unconditioanlly on any A6xx and newer, so follow suite and make the call. Signed-off-by: Bjorn Andersson <[email protected]> Reviewed-by: Rob Clark <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
1 parent 1af75b2 commit 98e5b7f

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

drivers/gpu/drm/msm/adreno/adreno_gpu.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -572,8 +572,19 @@ struct drm_gem_object *adreno_fw_create_bo(struct msm_gpu *gpu,
572572

573573
int adreno_hw_init(struct msm_gpu *gpu)
574574
{
575+
struct adreno_gpu *adreno_gpu = to_adreno_gpu(gpu);
576+
int ret;
577+
575578
VERB("%s", gpu->name);
576579

580+
if (adreno_gpu->info->family >= ADRENO_6XX_GEN1 &&
581+
qcom_scm_set_gpu_smmu_aperture_is_available()) {
582+
/* We currently always use context bank 0, so hard code this */
583+
ret = qcom_scm_set_gpu_smmu_aperture(0);
584+
if (ret)
585+
DRM_DEV_ERROR(gpu->dev->dev, "unable to set SMMU aperture: %d\n", ret);
586+
}
587+
577588
for (int i = 0; i < gpu->nr_rings; i++) {
578589
struct msm_ringbuffer *ring = gpu->rb[i];
579590

0 commit comments

Comments
 (0)