Re: [RFC 02/44] drm/i915: Added getparam for native sync

Daniel Vetter
2014-07-07T18:52:39Z

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
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch