drm/msm/gpu: add per-process pagetables param
authorRob Clark <robdclark@chromium.org>
Mon, 15 Apr 2019 23:55:45 +0000 (16:55 -0700)
committerRob Clark <robdclark@chromium.org>
Fri, 19 Apr 2019 18:49:42 +0000 (11:49 -0700)
For now it always returns '0' (false), but once the iommu work is in
place to enable per-process pagetables we can update the value returned.

Userspace needs to know this to make an informed decision about exposing
KHR_robustness.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Jordan Crouse <jcrouse@codeaurora.org>
drivers/gpu/drm/msm/adreno/adreno_gpu.c
include/uapi/drm/msm_drm.h

index 27898475cdf4a8675fd2b9703f9e0ec0240a067f..7727917806cea492fe572c9ac3a35608174ccfe8 100644 (file)
@@ -63,6 +63,9 @@ int adreno_get_param(struct msm_gpu *gpu, uint32_t param, uint64_t *value)
        case MSM_PARAM_NR_RINGS:
                *value = gpu->nr_rings;
                return 0;
+       case MSM_PARAM_PP_PGTABLE:
+               *value = 0;
+               return 0;
        default:
                DBG("%s: invalid param: %u", gpu->name, param);
                return -EINVAL;
index 91a16b333c69005417b9314d192b0db0eac43b19..a9fdcf1689ce6ceb3677be18db5d13e416ae85f6 100644 (file)
@@ -74,6 +74,7 @@ struct drm_msm_timespec {
 #define MSM_PARAM_TIMESTAMP  0x05
 #define MSM_PARAM_GMEM_BASE  0x06
 #define MSM_PARAM_NR_RINGS   0x07
+#define MSM_PARAM_PP_PGTABLE 0x08  /* => 1 for per-process pagetables, else 0 */
 
 struct drm_msm_param {
        __u32 pipe;           /* in, MSM_PIPE_x */