Message ID | 20190417013031.555-2-robdclark@gmail.com (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show |
Series | drm/msm: uabi updates for KHR_robustness | expand |
On Tue, Apr 16, 2019 at 06:30:24PM -0700, Rob Clark wrote: > From: Rob Clark <robdclark@chromium.org> > > 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 | 3 +++ > include/uapi/drm/msm_drm.h | 1 + > 2 files changed, 4 insertions(+) > > diff --git a/drivers/gpu/drm/msm/adreno/adreno_gpu.c b/drivers/gpu/drm/msm/adreno/adreno_gpu.c > index 2cfee1a4fe0b..fbdf6f1c247e 100644 > --- a/drivers/gpu/drm/msm/adreno/adreno_gpu.c > +++ b/drivers/gpu/drm/msm/adreno/adreno_gpu.c > @@ -62,6 +62,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; > diff --git a/include/uapi/drm/msm_drm.h b/include/uapi/drm/msm_drm.h > index 91a16b333c69..a9fdcf1689ce 100644 > --- a/include/uapi/drm/msm_drm.h > +++ b/include/uapi/drm/msm_drm.h > @@ -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 */ > -- > 2.20.1 > > _______________________________________________ > Freedreno mailing list > Freedreno@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/freedreno
diff --git a/drivers/gpu/drm/msm/adreno/adreno_gpu.c b/drivers/gpu/drm/msm/adreno/adreno_gpu.c index 2cfee1a4fe0b..fbdf6f1c247e 100644 --- a/drivers/gpu/drm/msm/adreno/adreno_gpu.c +++ b/drivers/gpu/drm/msm/adreno/adreno_gpu.c @@ -62,6 +62,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; diff --git a/include/uapi/drm/msm_drm.h b/include/uapi/drm/msm_drm.h index 91a16b333c69..a9fdcf1689ce 100644 --- a/include/uapi/drm/msm_drm.h +++ b/include/uapi/drm/msm_drm.h @@ -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 */