Message ID | 1403803475-16337-3-git-send-email-John.C.Harrison@Intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Thu, Jun 26, 2014 at 06:23:53PM +0100, John.C.Harrison@Intel.com wrote: > From: John Harrison <John.C.Harrison@Intel.com> > > Validation tests need a run time mechanism for querying whether or not the > driver supports the Android native sync facility. > --- > drivers/gpu/drm/i915/i915_dma.c | 7 +++++++ > include/uapi/drm/i915_drm.h | 1 + > 2 files changed, 8 insertions(+) > > diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c > index 6cce55b..67f2918 100644 > --- a/drivers/gpu/drm/i915/i915_dma.c > +++ b/drivers/gpu/drm/i915/i915_dma.c > @@ -1022,6 +1022,13 @@ static int i915_getparam(struct drm_device *dev, void *data, > case I915_PARAM_CMD_PARSER_VERSION: > value = i915_cmd_parser_get_version(); > break; > + case I915_PARAM_HAS_NATIVE_SYNC: > +#ifdef CONFIG_DRM_I915_SYNC > + value = 1; > +#else > + value = 0; > +#endif New userspace ABI (which this is) needs to come with open-source users. Also we do the "announce new features to userspace" patch generally last in a series to avoid unecessary test failures. Finally infrastructure only used by tests should be done in debugfs, which has more lax abi guarantees. And one more: syncpt support and the scheduler are orthogonal imo, and as part of proper syncpt support we also need to destage the android syncpt stuff first (since i915 can't depend upon stuff from drivers/staging). Thus far I have seen neglible efforts from Android people to make this happen :( -Daniel
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c index 6cce55b..67f2918 100644 --- a/drivers/gpu/drm/i915/i915_dma.c +++ b/drivers/gpu/drm/i915/i915_dma.c @@ -1022,6 +1022,13 @@ static int i915_getparam(struct drm_device *dev, void *data, case I915_PARAM_CMD_PARSER_VERSION: value = i915_cmd_parser_get_version(); break; + case I915_PARAM_HAS_NATIVE_SYNC: +#ifdef CONFIG_DRM_I915_SYNC + value = 1; +#else + value = 0; +#endif + break; default: DRM_DEBUG("Unknown parameter %d\n", param->param); return -EINVAL; diff --git a/include/uapi/drm/i915_drm.h b/include/uapi/drm/i915_drm.h index ff57f07..bf54c78 100644 --- a/include/uapi/drm/i915_drm.h +++ b/include/uapi/drm/i915_drm.h @@ -340,6 +340,7 @@ typedef struct drm_i915_irq_wait { #define I915_PARAM_HAS_EXEC_HANDLE_LUT 26 #define I915_PARAM_HAS_WT 27 #define I915_PARAM_CMD_PARSER_VERSION 28 +#define I915_PARAM_HAS_NATIVE_SYNC 30 typedef struct drm_i915_getparam { int param;
From: John Harrison <John.C.Harrison@Intel.com> Validation tests need a run time mechanism for querying whether or not the driver supports the Android native sync facility. --- drivers/gpu/drm/i915/i915_dma.c | 7 +++++++ include/uapi/drm/i915_drm.h | 1 + 2 files changed, 8 insertions(+)